/* Main Stylesheet */

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Smooth transitions */
* {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Focus styles */
:focus {
    outline: none;
}

/* Loading spinner */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Table styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 2px solid #e2e8f0;
    background-color: #f7fafc;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.data-table tr:hover {
    background-color: #f7fafc;
}

/* Card styles */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn-danger {
    background-color: #dc2626;
    color: white;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

/* Form styles */
.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
}

.form-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

/* Sidebar styles */
.sidebar {
    width: 250px;
    background-color: #ffffff;
    border-right: 1px solid #e2e8f0;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s ease-in-out;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #4a5568;
    text-decoration: none;
    border-radius: 6px;
    margin: 0.25rem 0.5rem;
    transition: all 0.2s;
}

.sidebar-item:hover {
    background-color: #f7fafc;
    color: #2563eb;
}

.sidebar-item.active {
    background-color: #eff6ff;
    color: #2563eb;
    font-weight: 500;
}

/* Main content area */
.main-content {
    margin-left: 250px;
    padding: 2rem;
    min-height: 100vh;
    background-color: #f7fafc;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
}

.mobile-menu-toggle:hover {
    background-color: #f9fafb;
}

.mobile-overlay {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        z-index: 70; /* Higher than overlay */
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 100vw;
        box-shadow: none;
    }

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

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

    .mobile-menu-toggle {
        display: block;
    }

    .mobile-overlay {
        display: block;
        z-index: 50; /* Lower than sidebar */
    }

    /* Ultra-aggressive mobile optimizations - phones only */
    .card {
        margin-bottom: 0.5rem;
    }

    .card-body {
        padding: 0.5rem;
    }

    .card-header {
        padding: 0.5rem 0.5rem 0.25rem 0.5rem;
        margin-bottom: 0.25rem;
    }

    /* Mobile stats cards - extremely compact */
    .stats-grid {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .stat-card {
        padding: 0.5rem;
        border-radius: 4px;
    }

    .stat-value {
        font-size: 1.125rem;
        margin-bottom: 0.125rem;
    }

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

    /* Mobile view toggle buttons - smaller containers, same icons */
    .view-toggle-btn {
        min-width: 36px;
        min-height: 36px;
        padding: 0.5rem;
        border-radius: 4px;
    }

    .view-toggle-btn i {
        width: 1.5rem;
        height: 1.5rem;
    }

    /* Mobile project cards - extremely compact */
    .project-card {
        padding: 0.5rem;
        margin-bottom: 0.375rem;
        border-radius: 4px;
    }

    .project-card-title {
        font-size: 0.8125rem;
        margin-bottom: 0.125rem;
        line-height: 1.2;
    }

    .project-card-description {
        font-size: 0.6875rem;
        margin-bottom: 0.375rem;
        line-height: 1.2;
    }

    .project-card-meta {
        margin-top: 0.125rem;
    }

    .project-card-meta span {
        font-size: 0.6875rem;
    }

    /* Mobile table improvements - ultra minimal padding */
    .data-table th,
    .data-table td {
        padding: 0.25rem 0.125rem;
        font-size: 0.6875rem;
    }

    /* Mobile header spacing - ultra tight */
    .mb-6 {
        margin-bottom: 0.75rem !important;
    }

    /* Mobile main content padding - tighter */
    .main-content {
        padding: 0.75rem;
    }

    /* Mobile grid layouts - single column with minimal gaps */
    .grid.grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    /* Mobile activity sections - tighter spacing */
    .card.mt-4,
    .card.mt-6 {
        margin-top: 0.5rem !important;
    }

    /* Mobile - hide view toggle buttons */
    .view-toggle-btn {
        display: none;
    }

    /* Mobile button adjustments - keep text visible */
    .btn.btn-primary {
        padding: 0.5rem 1rem;
    }

    /* Override for non-mobile - restore text visibility */
    @media (min-width: 769px) {
        .btn.btn-primary {
            font-size: inherit;
            padding: 0.5rem 1rem;
        }
    }
}

