/* Custom Styles for Project Management System */

:root {
    --sidebar-width: 260px;
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --dark-color: #1e293b;
    --light-bg: #f8fafc;
    --border-color: #e2e8f0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--light-bg);
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--dark-color) 0%, #0f172a 100%);
    padding: 0;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar-brand {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand h4 {
    color: #fff;
    margin: 0;
    font-weight: 700;
}

.sidebar-brand small {
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar-menu .menu-header {
    color: rgba(255,255,255,0.4);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem 1.5rem 0.5rem;
}

.sidebar-menu .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 0.7rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-size: 0.9rem;
}

.sidebar-menu .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
    border-left-color: var(--primary-color);
}

.sidebar-menu .nav-link.active {
    color: #fff;
    background: rgba(67, 97, 238, 0.2);
    border-left-color: var(--primary-color);
}

.sidebar-menu .nav-link i {
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* Top Navbar */
.top-navbar {
    background: #fff;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.search-box {
    position: relative;
    width: 300px;
}

.search-box input {
    padding-left: 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--light-bg);
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification-badge {
    position: relative;
}

.notification-badge .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.65rem;
}

/* Content Area */
.content-area {
    padding: 1.5rem;
}

.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
}

.page-header .breadcrumb {
    margin: 0;
    padding: 0;
    background: transparent;
}

.page-header .breadcrumb-item {
    font-size: 0.85rem;
}

/* Stats Cards */
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

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

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

.stat-card .stat-icon.primary { background: rgba(67, 97, 238, 0.1); color: var(--primary-color); }
.stat-card .stat-icon.success { background: rgba(16, 185, 129, 0.1); color: var(--success-color); }
.stat-card .stat-icon.warning { background: rgba(245, 158, 11, 0.1); color: var(--warning-color); }
.stat-card .stat-icon.danger { background: rgba(239, 68, 68, 0.1); color: var(--danger-color); }
.stat-card .stat-icon.info { background: rgba(6, 182, 212, 0.1); color: var(--info-color); }

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark-color);
}

.stat-card .stat-label {
    color: #64748b;
    font-size: 0.85rem;
}

.stat-card .stat-change {
    font-size: 0.8rem;
    font-weight: 500;
}

.stat-card .stat-change.positive { color: var(--success-color); }
.stat-card .stat-change.negative { color: var(--danger-color); }

/* Cards */
.card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: none;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

/* Tables */
.table-container {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.table {
    margin: 0;
}

.table thead th {
    background: var(--light-bg);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.85rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background: var(--light-bg);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
    border-radius: 6px;
}

.badge-pipeline {
    font-size: 0.75rem;
}

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

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

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

.avatar-stack {
    display: flex;
}

.avatar-stack .avatar {
    margin-left: -10px;
    border: 2px solid #fff;
}

.avatar-stack .avatar:first-child {
    margin-left: 0;
}

/* Kanban Board */
.kanban-board {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.kanban-column {
    min-width: 300px;
    max-width: 300px;
    background: var(--light-bg);
    border-radius: 12px;
    padding: 1rem;
}

.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid;
}

.kanban-column-header h6 {
    margin: 0;
    font-weight: 600;
    font-size: 0.9rem;
}

.kanban-column-header .count {
    background: rgba(0,0,0,0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.kanban-card {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
    cursor: grab;
    transition: all 0.2s ease;
}

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

.kanban-card .card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.kanban-card .card-company {
    color: #64748b;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.kanban-card .card-value {
    font-weight: 700;
    color: var(--primary-color);
}

.kanban-card .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: #64748b;
}

/* Pipeline Colors */
.pipeline-lead { border-color: #94a3b8; }
.pipeline-qualification { border-color: #06b6d4; }
.pipeline-proposal { border-color: #8b5cf6; }
.pipeline-negotiation { border-color: #f59e0b; }
.pipeline-won { border-color: #10b981; }
.pipeline-lost { border-color: #ef4444; }

/* Progress Bar */
.progress {
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
}

.progress-bar {
    border-radius: 4px;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.timeline-item .timeline-date {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.timeline-item .timeline-content {
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Calendar */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.calendar-day {
    background: #fff;
    min-height: 100px;
    padding: 0.5rem;
}

.calendar-day.other-month {
    background: var(--light-bg);
    color: #94a3b8;
}

.calendar-day.today {
    background: rgba(67, 97, 238, 0.05);
}

.calendar-day .day-number {
    font-weight: 600;
    font-size: 0.9rem;
}

.calendar-event {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    margin-top: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Forms */
.form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.625rem 1rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
}

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

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

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

/* Tabs */
.nav-tabs {
    border-bottom: 2px solid var(--border-color);
}

.nav-tabs .nav-link {
    border: none;
    color: #64748b;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    margin-bottom: -2px;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color);
    border: none;
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--primary-color);
}

/* Pills */
.nav-pills .nav-link {
    border-radius: 8px;
    color: #64748b;
    font-weight: 500;
}

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

/* Modal */
.modal-content {
    border: none;
    border-radius: 12px;
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

/* Dropdown */
.dropdown-menu {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 6px;
    padding: 0.5rem 1rem;
}

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

/* Checklist */
.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

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

.checklist-item.completed {
    text-decoration: line-through;
    color: #94a3b8;
}

/* Activity Feed */
.activity-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

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

/* Status Indicators */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-dot.online { background: var(--success-color); }
.status-dot.busy { background: var(--danger-color); }
.status-dot.away { background: var(--warning-color); }
.status-dot.offline { background: #94a3b8; }

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

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

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

.hover-shadow:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

/* Client Portal */
.portal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    padding: 2rem;
}

/* Charts placeholder */
.chart-placeholder {
    background: var(--light-bg);
    border-radius: 8px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

/* Skill Tags */
.skill-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--light-bg);
    border-radius: 20px;
    font-size: 0.8rem;
    margin: 0.25rem;
    color: var(--dark-color);
}

/* Priority */
.priority-high { color: var(--danger-color); }
.priority-medium { color: var(--warning-color); }
.priority-low { color: var(--success-color); }

/* Gantt Chart Placeholder */
.gantt-row {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.gantt-label {
    width: 200px;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.gantt-bar-container {
    flex: 1;
    height: 24px;
    position: relative;
}

.gantt-bar {
    position: absolute;
    height: 100%;
    border-radius: 4px;
    background: var(--primary-color);
}
