:root {
    --bg-dark: #0a0e17;
    --text-main: #f0f4f8;
    --text-muted: #8c9baf;
    --primary: #4f46e5;
    --primary-hover: #6366f1;
    --accent: #ec4899;
    --glass-bg: rgba(17, 24, 39, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --card-bg: rgba(30, 41, 59, 0.7);
    --danger: #ef4444;
    
    --stat-planning: #6366f1;
    --stat-active: #10b981;
    --stat-on-hold: #f59e0b;
    --stat-completed: #8b5cf6;
    
    /* Mobile viewport height variable */
    --vh: 1vh;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    /* Prevent pull-to-refresh on mobile */
    overscroll-behavior: none;
    /* Better text rendering on mobile */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Dashboard Styles */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.dashboard-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Quick Actions */
.quick-actions-section {
    margin-bottom: 2rem;
}

.quick-actions-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quick-action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-main);
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.quick-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.quick-action-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.quick-action-title {
    font-weight: 600;
    font-size: 1rem;
}

.quick-action-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* Dashboard Metrics */
.dashboard-metrics-section {
    margin-bottom: 2rem;
}

.dashboard-metrics-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.dashboard-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.dashboard-metric-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.dashboard-metric-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

/* Dashboard Content Grid */
.dashboard-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.dashboard-panel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.panel-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.panel-refresh-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.panel-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

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

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.activity-icon.project-created { background: rgba(34, 197, 94, 0.2); color: #86efac; }
.activity-icon.project-updated { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.activity-icon.task-completed { background: rgba(168, 85, 247, 0.2); color: #c4b5fd; }
.activity-icon.default { background: rgba(255, 255, 255, 0.1); color: var(--text-muted); }

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

.activity-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.activity-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.activity-time {
    color: var(--text-muted);
}

/* Deadlines List */
.deadlines-list {
    max-height: 400px;
    overflow-y: auto;
}

.deadline-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

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

.deadline-priority.Urgent { background: #ef4444; }
.deadline-priority.High { background: #f59e0b; }
.deadline-priority.Medium { background: #3b82f6; }
.deadline-priority.Low { background: #10b981; }

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

.deadline-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.deadline-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.deadline-due {
    font-weight: 500;
}

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

.deadline-due.due-soon {
    color: #f59e0b;
}

.deadline-due.upcoming {
    color: #10b981;
}

/* Company Overview */
.company-overview-section {
    margin-bottom: 2rem;
}

.company-overview-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

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

.company-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.company-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.company-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.company-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

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

.company-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.company-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.company-completion {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

.completion-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.completion-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

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

.completion-percentage {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Navigation Pills */
.view-nav-pills {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.nav-pill-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-pill-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.nav-pill-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

/* Company Dropdown Styling */
.dashboard-controls select,
.analytics-controls select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 0.6rem 2.5rem 0.6rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-width: 200px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1.2rem;
}

.dashboard-controls select:hover,
.analytics-controls select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.dashboard-controls select:focus,
.analytics-controls select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.dashboard-controls select option,
.analytics-controls select option {
    background: var(--background);
    color: white;
    padding: 0.5rem;
}

/* Dashboard and Analytics Headers */
.dashboard-header,
.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dashboard-header h2,
.analytics-header h2 {
    color: var(--text-main);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.dashboard-controls,
.analytics-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Enhanced Refresh Button */
#refreshDashboardBtn,
#refreshAnalyticsBtn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#refreshDashboardBtn:hover,
#refreshAnalyticsBtn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    transform: translateY(-1px);
}

#refreshDashboardBtn:active,
#refreshAnalyticsBtn:active {
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .view-nav-pills {
        display: none;
    }
    
    .dashboard-header,
    .analytics-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .dashboard-controls,
    .analytics-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .dashboard-controls select,
    .analytics-controls select {
        min-width: 150px;
        flex: 1;
        min-width: 0;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-content-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .company-overview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-metrics-grid {
        grid-template-columns: 1fr;
    }
}

/* Dynamic Blobs for Background */
.blob {
    position: absolute;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.5;
    animation: drift 20s infinite alternate cubic-bezier(0.5, 0, 0.5, 1);
}
.blob-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: radial-gradient(circle, var(--primary) 0%, transparent 70%); }
.blob-2 { bottom: -10%; right: -10%; width: 60vw; height: 60vw; background: radial-gradient(circle, var(--accent) 0%, transparent 70%); animation-delay: -10s; }

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 10%) scale(1.1); }
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border-radius: 20px;
}

.app-container {
    width: 100%;
    max-width: 1400px;
    height: 90vh;
    height: calc(var(--vh, 1vh) * 90);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.8s ease-out;
    /* Prevent bounce scrolling on mobile */
    overscroll-behavior: contain;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.branding h1 { font-weight: 700; font-size: 1.8rem; letter-spacing: -0.5px; }
.branding span { color: var(--accent); }

.companies-nav {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--glass-border) transparent;
    padding-bottom: 0.5rem;
    position: relative;
}

.companies-nav::before,
.companies-nav::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0.5rem;
    width: 2rem;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.companies-nav::before {
    left: 0;
    background: linear-gradient(to right, rgba(10, 14, 23, 0.8), transparent);
}

.companies-nav::after {
    right: 0;
    background: linear-gradient(to left, rgba(10, 14, 23, 0.8), transparent);
}

.companies-nav.scrollable-left::before { opacity: 1; }
.companies-nav.scrollable-right::after { opacity: 1; }

.companies-nav::-webkit-scrollbar {
    height: 6px;
}

.companies-nav::-webkit-scrollbar-track {
    background: transparent;
}

.companies-nav::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 3px;
}

.companies-nav::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-btn:hover { 
    color: var(--text-main); 
    background: #4f46e5; 
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}
.tab-btn.active { color: var(--text-main); background: #4f46e5; box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4); }

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-hover)); color: white; box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5); }
.btn-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }
.btn-danger:hover { background: var(--danger); color: white; }

.tab-btn.btn-sm { font-size: 0.85rem; padding: 0.4rem 0.8rem; }

.sub-nav {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--glass-border) transparent;
    padding: 0.75rem 2rem;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--glass-border);
    flex-wrap: nowrap;
}

.sub-nav::-webkit-scrollbar {
    height: 4px;
}

.sub-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sub-nav::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 2px;
}

.sub-nav::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

main { flex: 1; padding: 2rem; display: flex; flex-direction: column; overflow: hidden; }

.header-content { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 2rem; }
.header-content h2 { font-size: 2rem; font-weight: 300; }
.stats { display: flex; gap: 1.5rem; color: var(--text-muted); font-size: 0.9rem; font-weight: 600; }
.stats span { color: var(--text-main); font-size: 1.2rem; }

.board {
    display: flex; gap: 1.5rem; flex: 1; overflow-x: auto; padding-bottom: 1rem;
}
.board::-webkit-scrollbar { height: 8px; }
.board::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.column {
    flex: 1; min-width: 300px; display: flex; flex-direction: column;
    background: rgba(15, 23, 42, 0.4); border-radius: 16px; padding: 1.25rem;
}

.column h3 {
    font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem;
}
.column h3::before { content: ''; width: 8px; height: 8px; border-radius: 50%; }
.status-planning::before { background: var(--stat-planning); }
.status-active::before { background: var(--stat-active); box-shadow: 0 0 10px var(--stat-active); }
.status-on-hold::before { background: var(--stat-on-hold); }
.status-completed::before { background: var(--stat-completed); }

.cards { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; padding-right: 0.5rem; }
.cards::-webkit-scrollbar { width: 4px; }
.cards::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.card {
    background: var(--card-bg); border: 1px solid var(--glass-border); padding: 1.25rem; border-radius: 12px;
    cursor: pointer; transition: all 0.2s ease; animation: slideUp 0.4s ease forwards; opacity: 0;
}
.card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.2); background: rgba(40, 53, 75, 0.8); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.card h4 { font-size: 1.1rem; margin-bottom: 0.5rem; font-weight: 600; color: #fff; }
.card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { font-size: 0.75rem; color: rgba(255,255,255,0.4); display: flex; justify-content: space-between; }

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

/* Drag and Drop */
.card.dragging { opacity: 0.5; background: rgba(79, 70, 229, 0.4); border-color: var(--primary); cursor: grabbing; transform: scale(1.02); }
.cards.drag-over { background: rgba(255,255,255,0.05); border-radius: 12px; }

/* Priority and Tags */
.pill { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 0.65rem; font-weight: 600; margin-right: 0.4rem; margin-bottom: 0.4rem; text-transform: uppercase; letter-spacing: 0.5px; }
.pill-priority-Low { background: rgba(16, 185, 129, 0.1); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.pill-priority-Medium { background: rgba(59, 130, 246, 0.1); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.pill-priority-High { background: rgba(245, 158, 11, 0.1); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.pill-priority-Urgent { background: rgba(239, 68, 68, 0.1); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); box-shadow: 0 0 8px rgba(239, 68, 68, 0.3); }
.pill-tag { background: rgba(255, 255, 255, 0.05); color: #e2e8f0; border: 1px solid rgba(255, 255, 255, 0.1); }

/* Tasks Progress */
.task-progress { font-size: 0.75rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.5rem; margin-top: 0.75rem; font-weight: 600; }
.task-progress-bar { flex: 1; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; }
.task-progress-fill { height: 100%; background: var(--stat-active); transition: width 0.3s ease; }

/* Sub-Tasks Checklist */
.task-item { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.75rem; background: rgba(15,23,42,0.4); border-radius: 8px; margin-bottom: 0.5rem; border: 1px solid var(--glass-border); transition: all 0.2s; }
.task-item.overdue { border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.05); }
.task-item.overdue::before { content: '⚠️ OVERDUE'; font-size: 0.7rem; color: #f87171; font-weight: 600; margin-bottom: 0.25rem; }

.task-main { display: flex; align-items: center; gap: 0.75rem; justify-content: space-between; }
.task-left { display: flex; align-items: center; gap: 0.75rem; flex: 1; }
.task-right { display: flex; align-items: center; gap: 0.5rem; }

.task-item input[type="checkbox"] { width: auto; transform: scale(1.2); cursor: pointer; accent-color: var(--primary); }
.task-title { flex: 1; font-size: 0.9rem; transition: all 0.2s; }
.task-item.completed .task-title { text-decoration: line-through; opacity: 0.4; }
.task-item.completed { background: rgba(16, 185, 129, 0.05); border-color: rgba(16, 185, 129, 0.2); }

.task-description { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--glass-border); line-height: 1.4; }

.task-due-date { font-size: 0.75rem; padding: 2px 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.05); color: var(--text-muted); }
.task-due-date.overdue { background: rgba(239, 68, 68, 0.1); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

.task-priority { font-size: 0.7rem; font-weight: 600; }
.task-dependency { font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; background: rgba(99, 102, 241, 0.1); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, 0.3); }

.task-assigned { font-size: 0.75rem; padding: 2px 6px; border-radius: 4px; background: rgba(79, 70, 229, 0.1); color: #a5b4fc; }

.task-del-btn { background: none; border: none; color: var(--danger); cursor: pointer; opacity: 0; font-size: 1.2rem; transition: opacity 0.2s; padding: 2px; min-width: 24px; min-height: 24px; }
.task-item:hover .task-del-btn { opacity: 1; }

/* Analytics Dashboard Styles */
.analytics-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--glass-border); }
.analytics-controls { display: flex; align-items: center; gap: 0.5rem; }
.analytics-header h2 { margin: 0; color: var(--text); display: flex; align-items: center; gap: 0.5rem; }

.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.metric-card { background: rgba(15,23,42,0.4); border: 1px solid var(--glass-border); border-radius: 12px; padding: 1.5rem; display: flex; align-items: center; gap: 1rem; transition: all 0.2s; }
.metric-card:hover { background: rgba(15,23,42,0.6); transform: translateY(-2px); }
.metric-icon { font-size: 2rem; opacity: 0.8; }
.metric-content { flex: 1; }
.metric-value { font-size: 2rem; font-weight: 700; color: var(--text); line-height: 1; }
.metric-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; text-transform: uppercase; letter-spacing: 0.5px; }

.analytics-section { margin-bottom: 2rem; }
.analytics-section h3 { margin: 0 0 1rem 0; color: var(--text); display: flex; align-items: center; gap: 0.5rem; }

.task-metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.task-metric-card { background: rgba(15,23,42,0.4); border: 1px solid var(--glass-border); border-radius: 8px; padding: 1rem; text-align: center; transition: all 0.2s; }
.task-metric-card:hover { background: rgba(15,23,42,0.6); }
.task-metric-card.overdue { border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.05); }
.task-metric-value { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.task-metric-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }

.charts-section { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.chart-container { background: rgba(15,23,42,0.4); border: 1px solid var(--glass-border); border-radius: 12px; padding: 1.5rem; }
.chart-container h3 { margin: 0 0 1rem 0; color: var(--text); }
.chart-placeholder { height: 300px; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.2); border-radius: 8px; position: relative; }
.chart-placeholder canvas { max-width: 100%; max-height: 100%; }

.table-container { background: rgba(15,23,42,0.4); border: 1px solid var(--glass-border); border-radius: 12px; overflow: hidden; }
#topProjectsTable { width: 100%; border-collapse: collapse; }
#topProjectsTable th { background: rgba(0,0,0,0.2); padding: 1rem; text-align: left; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--glass-border); }
#topProjectsTable td { padding: 1rem; border-bottom: 1px solid rgba(255,255,255,0.05); color: var(--text); }
#topProjectsTable tr:hover { background: rgba(255,255,255,0.02); }
#topProjectsTable tr:last-child td { border-bottom: none; }

.burndown-controls { margin-bottom: 1rem; }
.burndown-controls select { padding: 0.5rem; border-radius: 6px; border: 1px solid var(--glass-border); background: rgba(15,23,42,0.4); color: var(--text); min-width: 200px; }

/* Loading states */
.loading { opacity: 0.6; pointer-events: none; }
.loading::after { content: ''; position: absolute; top: 50%; left: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border: 2px solid var(--primary); border-radius: 50%; border-top-color: transparent; animation: spin 1s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive adjustments */
@media (max-width: 768px) {
    .analytics-header { flex-direction: column; gap: 1rem; align-items: flex-start; }
    .analytics-controls { width: 100%; justify-content: space-between; }
    .metrics-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
    .charts-section { grid-template-columns: 1fr; }
    .task-metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Task Creation Form */
.task-creation-form { animation: slideUp 0.3s ease-out; }

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

/* User Mgmt */
.users-list { max-height: 400px; overflow-y: auto; padding-right: 0.5rem; }
.user-item { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; background: rgba(255,255,255,0.03); border-radius: 8px; margin-bottom: 0.5rem; border: 1px solid var(--glass-border); }
.user-item-info { flex:1; }
.user-item-info strong { display: block; font-size: 1rem; margin-bottom: 0.2rem; }
.user-item-info small { color: var(--text-muted); font-size: 0.8rem; }
.user-item-actions { display: flex; gap: 0.5rem; }

/* Modal */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(5px);
    display: flex; justify-content: center; align-items: center;
    z-index: 100; opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal {
    width: 100%; max-width: 500px; padding: 2rem; transform: scale(0.95); transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-overlay.active .modal { transform: scale(1); }

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-header h3 { font-size: 1.5rem; font-weight: 300; }
.close-btn { background: none; border: none; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; transition: color 0.2s; }
.close-btn:hover { color: #fff; }

.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; font-weight: 600; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; background: rgba(15, 23, 42, 0.5); border: 1px solid var(--glass-border);
    color: #fff; padding: 0.75rem 1rem; border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 0.95rem; outline: none; transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); }

.modal-actions { display: flex; justify-content: flex-end; gap: 1rem; margin-top: 2rem; }

.setup-toast { position: fixed; bottom: 2rem; right: 2rem; padding: 1.5rem; border-left: 4px solid var(--danger); z-index: 1000; animation: slideInX 0.4s ease; }
@keyframes slideInX { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }

/* Dropdown Styles */
.dropdown-item {
    background: none;
    border: none;
    color: var(--text-main);
    padding: 0.5rem 1rem;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.2s;
}
.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}
.dropdown-item.text-danger {
    color: var(--danger);
}
.dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}
#userDropdownBtn {
    transition: background 0.2s;
}
#userDropdownBtn:hover {
    background: rgba(255,255,255,0.1) !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body { 
        padding: 0; 
        font-size: 14px;
        line-height: 1.4;
        /* Fix viewport height issues */
        height: 100vh;
        height: calc(var(--vh, 1vh) * 100);
    }
    
    .app-container { 
        height: 100vh; 
        height: calc(var(--vh, 1vh) * 100);
        border-radius: 0; 
        border: none; 
        max-width: 100%;
    }
    
    /* Better touch feedback */
    .btn, .tab-btn, .card, .close-btn, .dropdown-item {
        -webkit-tap-highlight-color: rgba(79, 70, 229, 0.2);
        position: relative;
    }
    
    .btn:active, .tab-btn:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    .card:active {
        transform: scale(0.98);
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        transition: all 0.1s ease;
    }
    
    /* Top Navigation */
    .top-nav { 
        flex-direction: row !important; 
        gap: 0.5rem; 
        align-items: center !important; 
        padding: 0.75rem 1rem !important; 
        flex-wrap: nowrap;
    }
    
    .branding h1 { 
        font-size: 1.2rem !important; 
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }
    
    .top-nav > div:last-child { 
        flex-shrink: 0;
        margin-left: auto;
    }
    
    #userDropdownBtn {
        padding: 0.3rem 0.8rem !important;
        font-size: 0.8rem;
        min-width: auto;
    }
    
    #currentUserDisplay {
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* Secondary Header */
    header { 
        flex-direction: column; 
        align-items: stretch; 
        gap: 1rem; 
        padding: 1rem !important; 
    }
    
    .header-actions { 
        width: 100%; 
        justify-content: space-between; 
        gap: 0.5rem;
    }
    
    .header-actions .btn { 
        flex: 1; 
        text-align: center; 
        padding: 0.75rem 0.5rem; 
        font-size: 0.85rem; 
        min-height: 44px; /* Touch target size */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .companies-nav { 
        overflow-x: auto; 
        width: 100%; 
        padding-bottom: 0.75rem !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-btn {
        scroll-snap-align: start;
        min-width: 80px;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        touch-action: manipulation;
    }
    
    .sub-nav { 
        padding: 0.75rem 1rem !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    
    .sub-nav .tab-btn {
        scroll-snap-align: start;
        min-width: 60px;
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
    
    main { 
        padding: 1rem !important; 
        min-height: 0;
    }
    
    .header-content { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 0.75rem; 
        margin-bottom: 1rem; 
    }
    
    .header-content h2 { 
        font-size: 1.4rem; 
        margin: 0; 
        line-height: 1.2;
    }
    
    .stats { 
        width: 100%; 
        justify-content: space-around; 
        gap: 1rem;
        padding: 0.75rem;
        background: rgba(255,255,255,0.03);
        border-radius: 8px;
        border: 1px solid var(--glass-border);
    }
    
    .stat {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.25rem;
    }
    
    .stat span { 
        font-size: 1rem; 
        font-weight: 700;
    }
    
    /* Kanban Board */
    .board { 
        flex-direction: column; 
        overflow-y: auto; 
        overflow-x: hidden; 
        gap: 1rem; 
        padding-bottom: 2rem;
        scroll-snap-type: y mandatory;
        -webkit-overflow-scrolling: touch;
        /* Better scroll performance */
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
    
    .column { 
        min-width: 100%; 
        flex: none; 
        max-height: none;
        scroll-snap-align: start;
        padding: 1rem;
        /* Better scroll performance */
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
    
    .column h3 {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
        padding: 0.5rem;
        background: rgba(255,255,255,0.03);
        border-radius: 6px;
        position: sticky;
        top: 0;
        z-index: 1;
    }
    
    .cards { 
        gap: 0.75rem;
        padding-right: 0.25rem;
    }
    
    .card {
        padding: 1rem;
        border-radius: 10px;
        touch-action: manipulation;
        cursor: grab;
        user-select: none;
        -webkit-user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    .card:active {
        cursor: grabbing;
        transform: scale(0.98);
    }
    
    .card h4 { 
        font-size: 1rem; 
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }
    
    .card p { 
        font-size: 0.8rem; 
        line-height: 1.4;
        margin-bottom: 0.75rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .card .meta { 
        font-size: 0.7rem; 
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .pill {
        font-size: 0.6rem;
        padding: 3px 6px;
        margin-right: 0.25rem;
        margin-bottom: 0.25rem;
    }
    
    .task-progress {
        font-size: 0.7rem;
        margin-top: 0.5rem;
    }
    
    /* Login Screen */
    #loginScreen .glass { 
        width: 95% !important; 
        max-width: 400px;
        padding: 2rem 1.5rem !important; 
        margin: 1rem;
    }
    
    #loginScreen h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    #loginScreen .btn {
        min-height: 48px;
        font-size: 1rem;
    }
    
    /* Modals */
    .modal-overlay {
        padding: 1rem;
    }
    
    .modal { 
        padding: 1.5rem !important; 
        max-width: 100% !important;
        width: 100% !important;
        max-height: 85vh;
        overflow-y: auto;
        border-radius: 12px;
    }
    
    .modal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1rem;
    }
    
    .modal-header h3 {
        font-size: 1.2rem;
    }
    
    .close-btn {
        position: absolute;
        top: 1rem;
        right: 1rem;
        font-size: 1.2rem;
        padding: 0.5rem;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group label {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
    }
    
    .form-group input, 
    .form-group select, 
    .form-group textarea {
        padding: 0.75rem;
        font-size: 0.9rem;
        min-height: 44px;
        border-radius: 8px;
    }
    
    .form-group textarea {
        min-height: 80px;
        resize: vertical;
    }
    
    .modal-actions { 
        flex-direction: column; 
        gap: 0.75rem; 
        margin-top: 1.5rem;
    }
    
    .modal-actions .btn {
        min-height: 48px;
        font-size: 0.95rem;
    }
    
    /* Users Modal */
    #usersModalOverlay .modal { 
        width: 100% !important; 
        padding: 1.5rem !important;
        max-height: 85vh;
    }
    
    #newUserForm { 
        flex-direction: column; 
        align-items: stretch !important;
        gap: 0;
    }
    
    #newUserForm .form-group { 
        flex: 1 1 100% !important; 
        margin-bottom: 1rem !important; 
        width: 100%; 
    }
    
    .users-list { 
        max-height: 300px;
        margin-top: 1rem;
    }
    
    .user-item { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .user-item-info {
        width: 100%;
    }
    
    .user-item-info strong { 
        font-size: 0.95rem;
    }
    
    .user-item-info small { 
        font-size: 0.75rem;
    }
    
    .user-item-actions { 
        width: 100%; 
        justify-content: flex-end;
        gap: 0.5rem;
    }
    
    .user-item-actions .btn {
        min-height: 36px;
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    /* Task Management */
    .task-item {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .task-item input[type="checkbox"] {
        transform: scale(1.3);
        min-width: 20px;
        min-height: 20px;
    }
    
    .task-item span {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .task-del-btn {
        min-width: 36px;
        min-height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.5rem;
    }
    
    /* Dropdown Menu */
    .dropdown-menu {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: none !important;
        min-width: auto !important;
        border-radius: 12px 12px 0 0 !important;
        max-height: 50vh;
        overflow-y: auto;
        padding: 1rem;
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }
    
    .dropdown-menu.active {
        transform: translateY(0);
    }
    
    .dropdown-item {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        border-radius: 8px;
    }
    
    /* Setup Toast */
    .setup-toast { 
        position: fixed; 
        bottom: 1rem; 
        left: 1rem; 
        right: 1rem; 
        top: auto;
        padding: 1rem; 
        border-radius: 8px;
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    /* Touch Optimizations */
    * {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
    }
    
    .btn, .tab-btn, .card, .close-btn, .dropdown-item {
        touch-action: manipulation;
    }
    
    /* Better scrolling */
    .board, .cards, .companies-nav, .sub-nav, .users-list {
        -webkit-overflow-scrolling: touch;
        /* Better scroll performance */
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        /* Smooth scrolling */
        scroll-behavior: smooth;
    }
    
    /* Prevent zoom on input focus */
    input, select, textarea {
        font-size: 16px !important;
        /* Prevent zoom on focus */
        transform: scale(0.9);
        transform-origin: left center;
    }
    
    input:focus, select:focus, textarea:focus {
        transform: scale(1);
    }
    
    /* Better modal experience */
    .modal-overlay {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    
    /* Loading states */
    .btn.loading {
        pointer-events: none;
        opacity: 0.7;
    }
    
    .btn.loading::after {
        content: '';
        display: inline-block;
        width: 12px;
        height: 12px;
        margin-left: 8px;
        border: 2px solid transparent;
        border-top: 2px solid currentColor;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }
    
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
    
    /* Safe area insets for notched phones */
    @supports (padding: max(0px)) {
        .app-container {
            padding-left: max(0px, env(safe-area-inset-left));
            padding-right: max(0px, env(safe-area-inset-right));
        }
        
        .top-nav {
            padding-left: max(1rem, env(safe-area-inset-left));
            padding-right: max(1rem, env(safe-area-inset-right));
        }
    }
}

/* Small Mobile Phones */
@media (max-width: 480px) {
    .branding h1 {
        font-size: 1rem !important;
        max-width: 120px;
    }
    
    .header-content h2 {
        font-size: 1.2rem;
    }
    
    .stats {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .stat span {
        font-size: 0.9rem;
    }
    
    .column {
        padding: 0.75rem;
    }
    
    .card {
        padding: 0.75rem;
    }
    
    .card h4 {
        font-size: 0.9rem;
    }
    
    .pill {
        font-size: 0.55rem;
        padding: 2px 4px;
    }
    
    .modal {
        padding: 1rem !important;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px !important;
        padding: 0.6rem;
    }
}

/* Search Styles */
.search-container input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.search-header {
    margin-bottom: 2rem;
}

.search-controls {
    margin-bottom: 1rem;
}

.search-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.active-filters {
    margin-bottom: 1rem;
}

.filter-chip {
    background: rgba(79, 70, 229, 0.2);
    color: #a5b4fc;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-chip:hover {
    background: rgba(79, 70, 229, 0.3);
}

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

.search-section h3 {
    margin-bottom: 1rem;
    color: var(--text-main);
}

.search-results-grid {
    display: grid;
    gap: 1rem;
}

.search-result-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.search-result-card:hover {
    background: rgba(255,255,255,0.05);
    transform: translateY(-2px);
}

.search-result-card mark {
    background: rgba(79, 70, 229, 0.3);
    color: white;
    padding: 0 2px;
    border-radius: 2px;
}

.search-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.search-pagination button {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.05);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.search-pagination button:hover {
    background: rgba(255,255,255,0.1);
}

.search-pagination button.active {
    background: var(--primary);
    color: white;
}

/* Advanced Search Modal */
#advancedSearchModal .form-group {
    margin-bottom: 1rem;
}

#advancedSearchModal .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-weight: 500;
}

#advancedSearchModal .form-group input,
#advancedSearchModal .form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: white;
    font-size: 0.9rem;
}

#advancedSearchModal .form-group input:focus,
#advancedSearchModal .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-container {
        position: relative;
        width: 100%;
    }
    
    .search-container input {
        width: 100%;
        padding-right: 3rem;
    }
    
    .search-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .search-results-grid {
        grid-template-columns: 1fr;
    }
    
    .search-pagination {
        flex-wrap: wrap;
    }
}
