/* ===================================
   Project Collaboration Hub
   Custom Styles
   =================================== */

/* === Global Variables === */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --sidebar-width: 250px;
    --navbar-height: 56px;
}

/* === Typography === */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.95rem;
    color: #212529;
    background-color: #f8f9fa;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

/* === Navbar Enhancements === */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.navbar-brand {
    font-size: 1.25rem;
    transition: opacity 0.2s;
}

.navbar-brand:hover {
    opacity: 0.8;
}

/* Project Switcher */
#projectSwitcher {
    font-size: 0.9rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

#projectSwitcher:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

/* === Sidebar === */
aside.bg-light {
    box-shadow: 2px 0 4px rgba(0,0,0,.05);
}

aside .nav-link {
    color: #495057;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s;
}

aside .nav-link:hover {
    background-color: #e9ecef;
    color: var(--primary-color);
}

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

/* === Cards === */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
    transition: all 0.2s;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    transform: translateY(-2px);
}

.card-header {
    background-color: #fff;
    border-bottom: 2px solid #f8f9fa;
    font-weight: 600;
}

/* === Buttons === */
.btn {
    border-radius: 0.25rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

/* === Forms === */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, .25);
}

/* === Tables === */
.table {
    background-color: white;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: #6c757d;
}

/* === Alerts === */
.alert {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

/* === Badges === */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* === Dropdowns === */
.dropdown-menu {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

/* === Breadcrumb === */
.breadcrumb {
    background-color: transparent;
    padding: 0.75rem 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.2rem;
}

/* === Project Cards === */
.project-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.project-card:hover {
    border-left-color: var(--primary-color);
    transform: translateX(4px);
}

.project-card .project-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-size: 1.5rem;
}

/* === Task Items === */
.task-item {
    padding: 1rem;
    border-left: 3px solid #dee2e6;
    transition: all 0.2s;
}

.task-item:hover {
    background-color: #f8f9fa;
    border-left-color: var(--primary-color);
}

.task-item.priority-high {
    border-left-color: var(--danger-color);
}

.task-item.priority-medium {
    border-left-color: var(--warning-color);
}

.task-item.priority-low {
    border-left-color: var(--success-color);
}

/* === Progress Bars === */
.progress {
    height: 0.5rem;
    border-radius: 1rem;
}

/* === Status Badges === */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-badge.status-todo {
    background-color: #e9ecef;
    color: #495057;
}

.status-badge.status-in-progress {
    background-color: #cfe2ff;
    color: #084298;
}

.status-badge.status-review {
    background-color: #fff3cd;
    color: #664d03;
}

.status-badge.status-done {
    background-color: #d1e7dd;
    color: #0f5132;
}

/* === Avatar === */
.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-sm {
    width: 24px;
    height: 24px;
}

.avatar-lg {
    width: 48px;
    height: 48px;
}

/* === Empty States === */
.empty-state {
    padding: 3rem 1rem;
    text-align: center;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

/* === Loading Spinner === */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* === Animations === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* === Utilities === */
.cursor-pointer {
    cursor: pointer;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* === Responsive === */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -100%;
        transition: left 0.3s;
        z-index: 1040;
    }

    .sidebar.show {
        left: 0;
    }
}

/* === Dark Mode Support (Optional) === */
@media (prefers-color-scheme: dark) {
    /* Future dark mode support */
}

/* === Print Styles === */
@media print {
    .navbar,
    .sidebar,
    .footer,
    .btn,
    .dropdown {
        display: none !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}
