/* FluxReact - ClickUp Clone Styling */

:root {
    --primary: #7B68EE;
    --primary-dark: #6A5ACD;
    --secondary: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-hover: #f3f4f6;
    
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    
    --sidebar-width: 260px;
    --header-height: 60px;
    --border-radius: 8px;
    --transition: all 0.2s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.app-logo {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--info));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    margin-bottom: 4px;
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.sidebar-footer {
    padding: 15px;
    border-top: 1px solid var(--border-color);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--border-radius);
    background: var(--bg-hover);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

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

.user-name {
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 11px;
    color: var(--text-tertiary);
}

.user-actions {
    display: flex;
    gap: 5px;
}

.user-actions a {
    font-size: 16px;
    text-decoration: none;
    opacity: 0.7;
    transition: var(--transition);
}

.user-actions a:hover {
    opacity: 1;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px;
    overflow-y: auto;
}

/* Dashboard */
.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.dashboard-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

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

/* Mobile optimized stats grid */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 20px;
    }
}

.stat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    transition: var(--transition);
}

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

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

.stat-icon svg {
    stroke-width: 2;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

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

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

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile optimized dashboard grid */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.dashboard-section {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

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

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
}

/* Task List */
.task-list {
    padding: 10px;
}

/* Mobile optimized task list */
@media (max-width: 768px) {
    .task-list {
        padding: 8px;
    }
}

.task-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: var(--border-radius);
    margin-bottom: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.task-item:hover {
    background: var(--bg-hover);
}

/* Mobile optimized task items */
@media (max-width: 768px) {
    .task-item {
        padding: 10px 8px;
        gap: 10px;
    }
}

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

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

.task-title {
    font-weight: 500;
    margin-bottom: 6px;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
}

/* Mobile optimized task meta */
@media (max-width: 768px) {
    .task-meta {
        gap: 6px;
        font-size: 11px;
    }
    
    .task-meta > * {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px;
    }
}

.task-project {
    font-weight: 600;
}

.task-status {
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.task-priority {
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.priority-urgent {
    background: #FEE2E2;
    color: #DC2626;
}

.priority-high {
    background: #FED7AA;
    color: #EA580C;
}

.task-due {
    color: var(--text-secondary);
}

/* Activity Feed */
.activity-feed {
    padding: 15px;
    max-height: 500px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.activity-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.activity-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 13px;
    margin-bottom: 4px;
}

.activity-time {
    font-size: 11px;
    color: var(--text-tertiary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

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

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

.btn-primary:hover {
    background: var(--primary-dark);
}

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

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-block {
    width: 100%;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="datetime-local"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
}

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

.form-group.checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.alert-error {
    background: #FEE2E2;
    color: #DC2626;
    border: 1px solid #FCA5A5;
}

.alert-success {
    background: #D1FAE5;
    color: #059669;
    border: 1px solid #6EE7B7;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

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

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

.login-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow-xl);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-secondary);
}

.login-form {
    margin-top: 20px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-secondary);
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* Navigation Divider */
.nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 10px 15px;
}

/* Top Navigation Bar */
.top-nav {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1100;
}

.top-nav-left .page-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.top-nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Quick Link Button */
.quick-link-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: linear-gradient(135deg, var(--primary), var(--info));
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.quick-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.quick-link-btn svg {
    flex-shrink: 0;
}

/* Notifications */
.notification-dropdown {
    position: relative;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    padding: 8px;
    border-radius: var(--border-radius);
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    line-height: 1.2;
}

.notification-panel {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    max-height: 400px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 1200;
    margin-top: 5px;
}

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

.notification-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.mark-all-read {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.mark-all-read:hover {
    background: var(--bg-hover);
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.notification-item:hover {
    background: var(--bg-hover);
}

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

.notification-item.unread {
    background: #f8faff;
    border-left: 3px solid var(--primary);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

.notification-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 13px;
}

.notification-message {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 6px;
    line-height: 1.4;
}

.notification-time {
    color: var(--text-tertiary);
    font-size: 11px;
}

.notification-loading {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
}

.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
}

.notification-footer {
    padding: 10px 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.notification-footer a {
    color: var(--primary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
}

.notification-footer a:hover {
    text-decoration: underline;
}

/* Notification overlay to dim background when dropdown open */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 900; /* below top-nav (1100) and panel (1200) */
    pointer-events: none; /* visual only, don’t block clicks */
}

/* Delete button inside notification item */
.notification-item .notification-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.notification-item .notification-delete:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* User Menu Top */
.user-menu-top .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
}

.user-menu-top .user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-menu-top .avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 12px;
}

/* User menu dropdown */
.user-menu-top {
    position: relative;
}

.user-menu-panel {
    position: absolute;
    top: 110%;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    padding: 8px;
    display: none;
    z-index: 1200; /* above overlay and below notifications panel */
    min-width: 180px;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    text-decoration: none;
}

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

/* Adjust main content for top nav */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* Notification Sound Animation */
@keyframes notificationPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.notification-btn.pulse {
    animation: notificationPulse 0.3s ease-in-out;
}

/* Continuous animation for unread notifications */
@keyframes bellRing {
    0%, 100% { 
        transform: rotate(0deg) scale(1);
    }
    10%, 30%, 50%, 70%, 90% { 
        transform: rotate(-10deg) scale(1.05);
    }
    20%, 40%, 60%, 80% { 
        transform: rotate(10deg) scale(1.05);
    }
}

.notification-btn.has-unread {
    animation: bellRing 1s ease-in-out infinite;
    color: var(--danger);
}

.notification-btn.has-unread:hover {
    color: var(--danger);
    animation: bellRing 0.6s ease-in-out infinite;
}

/* Notification animations */
@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

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

/* Notifications Page Styles */
.notifications-page {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.page-header-content h1 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.page-header-content h1 svg {
    color: var(--primary);
}

.page-description {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
}

.unread-badge {
    background: var(--danger);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
}

.page-actions {
    display: flex;
    gap: 0.75rem;
}

.notifications-filters {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.filter-group select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
    color: var(--text-primary);
    font-size: 0.875rem;
    min-width: 120px;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(123, 104, 238, 0.1);
}

.filter-actions {
    margin-left: auto;
}

.notifications-content {
    min-height: 400px;
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
}

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

.notification-card.unread {
    border-left: 4px solid var(--primary);
    background: linear-gradient(90deg, rgba(123, 104, 238, 0.02) 0%, var(--bg-primary) 100%);
}

.notification-card.unread::before {
    content: '';
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

.notification-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(123, 104, 238, 0.1);
    border-radius: 8px;
    color: var(--primary);
}

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

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.notification-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.notification-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.notification-type {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.notification-time {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    white-space: nowrap;
}

.notification-message {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

.notification-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Responsive design for notifications page */
@media (max-width: 768px) {
    .notifications-page {
        padding: 1rem;
    }
    
    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .page-actions {
        justify-content: flex-start;
    }
    
    .notifications-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }
    
    .filter-group select {
        min-width: auto;
    }
    
    .filter-actions {
        margin-left: 0;
    }
    
    .notification-card {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .notification-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .notification-meta {
        justify-content: flex-start;
    }
    
    .notification-actions {
        flex-direction: row;
        justify-content: flex-start;
    }
    
    .pagination {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Department Grouping Styles */
.departments-view {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.department-section {
    background: var(--bg-primary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.department-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(123, 104, 238, 0.1), rgba(123, 104, 238, 0.05));
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.department-header:hover {
    background: linear-gradient(135deg, rgba(123, 104, 238, 0.15), rgba(123, 104, 238, 0.08));
}

.department-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.department-icon {
    font-size: 1.5rem;
}

.department-count {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-left: 0.5rem;
}

.department-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.department-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.department-toggle svg {
    transition: transform 0.3s ease;
}

.department-projects {
    padding: 1.5rem 2rem 2rem;
    gap: 1.5rem;
}

.project-department {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

/* Toggle button active state */
.btn.active {
    background: var(--primary);
    color: white;
}

.btn.active:hover {
    background: var(--primary-dark);
}

/* Table Scroll Indicators */
.table-scroll-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 4px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.table-scroll-indicator.left {
    left: 5px;
}

.table-scroll-indicator.right {
    right: 5px;
}

.table-container {
    position: relative;
}

/* Pull to Refresh Indicator */
.pull-to-refresh-indicator {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

/* Mobile Responsive Design */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.mobile-menu-toggle svg {
    width: 20px;
    height: 20px;
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
}

/* Tablet Styles */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 220px;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .content-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 280px;
        --header-height: 70px;
    }
    
    body {
        font-size: 16px; /* Better readability on mobile */
    }
    
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Hide sidebar by default on mobile */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: var(--sidebar-width);
        box-shadow: var(--shadow-xl);
        z-index: 100;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    /* Adjust main content for mobile */
    .main-content {
        margin-left: 0;
        padding: 80px 15px 15px;
        width: 100%;
    }
    
    /* Mobile header adjustments */
    .content-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        margin-bottom: 20px;
    }
    
    .content-header h1 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Mobile navigation adjustments */
    .sidebar-nav {
        padding: 15px 8px;
    }
    
    .nav-item {
        padding: 12px 15px;
        font-size: 16px;
        margin-bottom: 6px;
    }
    
    .nav-item i {
        font-size: 18px;
    }
    
    /* Mobile cards and stats */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px 15px;
    }
    
    .stat-card h3 {
        font-size: 1.8rem;
    }
    
    /* Mobile tables */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow-sm);
    }
    
    .table {
        min-width: 600px; /* Ensure table doesn't get too cramped */
    }
    
    .table th,
    .table td {
        padding: 12px 8px;
        font-size: 14px;
    }
    
    /* Mobile forms */
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-control {
        padding: 12px 15px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 8px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-row .form-group {
        margin-bottom: 0;
    }
    
    /* Mobile buttons */
    .btn {
        padding: 12px 20px;
        font-size: 16px;
        border-radius: 8px;
        min-height: 44px; /* Touch target size */
    }
    
    .btn-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    /* Mobile modals */
    .modal-dialog {
        margin: 15px;
        max-width: calc(100% - 30px);
    }
    
    .modal-content {
        border-radius: 12px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px 15px;
    }
    
    /* Mobile tickets and tasks */
    .ticket-card,
    .task-card {
        margin-bottom: 15px;
        border-radius: 12px;
        box-shadow: var(--shadow-sm);
    }
    
    .ticket-header,
    .task-header {
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .ticket-meta,
    .task-meta {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .priority-badge,
    .status-badge {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    /* Mobile project cards */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .project-card {
        border-radius: 12px;
        box-shadow: var(--shadow-sm);
    }
    
    .project-header {
        padding: 15px;
    }
    
    .project-title {
        font-size: 1.1rem;
    }
    
    /* Mobile department view */
    .department-header {
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .department-title {
        font-size: 1.1rem;
    }
    
    .department-projects {
        padding: 15px;
        gap: 15px;
    }
    
    .department-count {
        display: none;
    }
    
    /* Mobile filters and search */
    .filters-container {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .filter-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-box {
        width: 100%;
        margin-bottom: 15px;
    }
    
    /* Mobile pagination */
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
        justify-content: center;
    }
    
    .pagination .page-link {
        min-width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Mobile notifications */
    .notification-item {
        padding: 15px;
        border-radius: 8px;
        margin-bottom: 10px;
    }
    
    .notification-content {
        flex-direction: column;
        gap: 8px;
    }
    
    /* Mobile user profile */
    .user-profile {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .user-avatar {
        align-self: center;
    }
    
    /* Mobile utility classes */
    .mobile-hidden {
        display: none !important;
    }
    
    .mobile-only {
        display: block !important;
    }
    
    .mobile-full-width {
        width: 100% !important;
    }
    
    /* Mobile text adjustments */
    .mobile-text-center {
        text-align: center !important;
    }
    
    .mobile-text-small {
        font-size: 14px !important;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    :root {
        --sidebar-width: 100%;
    }
    
    .main-content {
        padding: 70px 10px 10px;
    }
    
    .content-header h1 {
        font-size: 1.3rem;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .table {
        min-width: 500px;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .form-control {
        padding: 10px 12px;
    }
    
    .stat-card {
        padding: 15px 10px;
    }
    
    .ticket-card,
    .task-card,
    .project-card {
        margin-bottom: 10px;
    }
}

/* Dashboard Styles */
.stat-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: var(--transition);
}

.stat-card-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Project card footer styles */
.project-footer {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8rem;
    color: #666;
    margin-top: auto;
}

.project-team,
.project-assignee,
.project-visibility {
    display: flex;
    align-items: center;
    gap: 4px;
}

.project-assignee {
    color: #4CAF50;
}

.project-visibility {
    color: #2196F3;
}

.task-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
}

.task-link:hover {
    color: var(--primary);
}
