/* assets/css/style.css - Complete CSS */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
    overflow-x: hidden;
}

/* ========== HEADER STYLES ========== */
.dashboard-header {
    background: #ffffff;
    padding: 0 2rem;
    height: 70px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.logo h1 {
    color: #667eea;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo h1 i {
    margin-right: 10px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-search {
    position: relative;
}

.header-search input {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 2px solid #e8ecf1;
    border-radius: 25px;
    background: #f8f9fa;
    width: 250px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.header-search input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    width: 300px;
}

.header-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.notifications {
    position: relative;
    cursor: pointer;
    font-size: 1.2rem;
    color: #555;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #667eea;
    object-fit: cover;
}

.user-profile > span {
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    font-size: 0.9rem;
    transition: transform 0.3s;
}

.dropdown-toggle:hover {
    color: #667eea;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 200px;
    background: white;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border-radius: 12px;
    padding: 0.5rem 0;
    z-index: 1000;
    margin-top: 10px;
}

.dropdown-menu.show {
    display: block;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.2rem;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
    font-size: 0.9rem;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
}

.dropdown-menu hr {
    margin: 0.3rem 0;
    border: none;
    border-top: 1px solid #e8ecf1;
}

.text-danger {
    color: #dc3545 !important;
}

/* ========== SIDEBAR STYLES ========== */
.sidebar {
    width: 250px;
    background: #ffffff;
    height: calc(100vh - 70px);
    position: fixed;
    left: 0;
    top: 70px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    overflow-y: auto;
    z-index: 999;
    transition: all 0.3s;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 2px;
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
}

.sidebar-nav li {
    padding: 0.2rem 0.8rem;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #666;
    text-decoration: none;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.sidebar-nav li a:hover {
    background: #f0f2ff;
    color: #667eea;
}

.sidebar-nav li.active a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.sidebar-nav li a i {
    width: 22px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar-nav li a span {
    flex: 1;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    margin-left: 250px;
    margin-top: 70px;
    padding: 2rem;
    min-height: calc(100vh - 70px);
}

/* ========== WELCOME SECTION ========== */
.welcome-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.welcome-section h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.welcome-section p {
    margin: 5px 0 0;
    opacity: 0.9;
    font-size: 1rem;
}

.welcome-date {
    font-size: 1rem;
    opacity: 0.95;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.welcome-date i {
    margin-right: 8px;
}

/* ========== STATS GRID ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s;
    border: 1px solid rgba(0,0,0,0.05);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.projects-icon { background: #e8ecff; color: #667eea; }
.revenue-icon { background: #d4edda; color: #28a745; }
.employees-icon { background: #fff3cd; color: #ffc107; }
.tasks-icon { background: #f8d7da; color: #dc3545; }

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-info h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.2rem;
}

.stat-info p {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.stat-details {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
}

.stat-details span {
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    background: #f8f9fa;
    color: #666;
}

.stat-details .trend-up {
    color: #28a745;
    background: #d4edda;
}

.stat-details .status-in_progress {
    color: #667eea;
    background: #e8ecff;
}

.stat-details .status-completed {
    color: #28a745;
    background: #d4edda;
}

/* ========== DASHBOARD GRID ========== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.card-header h3 i {
    margin-right: 8px;
    color: #667eea;
}

.view-all {
    color: #667eea;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s;
}

.view-all:hover {
    color: #764ba2;
}

.badge {
    background: #f0f2ff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    color: #667eea;
    font-weight: 500;
}

/* ========== CHART ========== */
.chart-container {
    height: 250px;
    margin-top: 0.5rem;
}

/* ========== TASK LIST ========== */
.task-list {
    max-height: 400px;
    overflow-y: auto;
}

.task-list::-webkit-scrollbar {
    width: 4px;
}

.task-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 2px;
}

.task-item {
    padding: 0.8rem;
    border: 1px solid #f0f2f5;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: background 0.3s;
}

.task-item:hover {
    background: #f8f9fa;
}

.task-priority {
    width: 4px;
    height: 50px;
    border-radius: 4px;
    flex-shrink: 0;
}

.priority-low { background: #28a745; }
.priority-medium { background: #ffc107; }
.priority-high { background: #dc3545; }
.priority-urgent { background: #6f42c1; }

.task-content {
    flex: 1;
    min-width: 0;
}

.task-content h4 {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
    color: #333;
}

.task-content p {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.3rem;
}

.task-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
    align-items: center;
}

.task-status {
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-weight: 500;
    text-transform: capitalize;
}

.status-todo { background: #f0f2f5; color: #666; }
.status-in_progress { background: #e8ecff; color: #667eea; }
.status-review { background: #fff3cd; color: #856404; }
.status-completed { background: #d4edda; color: #28a745; }

.task-due {
    color: #888;
}

.task-due i {
    margin-right: 4px;
}

/* ========== CHAT PREVIEW ========== */
.chat-preview {
    max-height: 400px;
    overflow-y: auto;
}

.chat-preview::-webkit-scrollbar {
    width: 4px;
}

.chat-preview::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 2px;
}

.chat-message {
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    border-radius: 10px;
    background: #f8f9fa;
    border: 1px solid #f0f2f5;
}

.chat-message.sent {
    background: #e8ecff;
    border-color: #d4d9ff;
    margin-left: 20%;
}

.chat-message.received {
    background: #f8f9fa;
    margin-right: 20%;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
}

.message-header strong {
    color: #333;
}

.message-time {
    color: #999;
    font-size: 0.75rem;
}

.chat-message p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
}

/* ========== WORKLOAD LIST ========== */
.workload-list {
    margin-top: 0.5rem;
}

.workload-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f0f2f5;
}

.workload-item:last-child {
    border-bottom: none;
}

.member-name {
    min-width: 120px;
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.workload-bar {
    flex: 1;
    height: 8px;
    background: #f0f2f5;
    border-radius: 4px;
    overflow: hidden;
}

.workload-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.task-count {
    min-width: 60px;
    text-align: right;
    font-size: 0.8rem;
    color: #888;
}

/* ========== EMPTY MESSAGE ========== */
.empty-message {
    text-align: center;
    padding: 2rem;
    color: #999;
}

.empty-message i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
    color: #ddd;
}

/* ========== QUICK ACTIONS ========== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.action-btn {
    padding: 1rem 1.2rem;
    background: white;
    border: 2px solid #e8ecf1;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    transition: all 0.3s;
    color: #333;
    font-weight: 500;
    font-family: inherit;
}

.action-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.action-btn i {
    font-size: 1.2rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .header-search input {
        width: 180px;
    }
    
    .header-search input:focus {
        width: 220px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    
    .sidebar-nav li a span {
        display: none;
    }
    
    .sidebar-nav li a {
        justify-content: center;
        padding: 0.7rem;
    }
    
    .sidebar-nav li a i {
        font-size: 1.2rem;
        margin: 0;
    }
    
    .main-content {
        margin-left: 70px;
        padding: 1rem;
    }
    
    .welcome-section {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.5rem 1rem;
    }
    
    .welcome-section h1 {
        font-size: 1.3rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-info h3 {
        font-size: 1.3rem;
    }
    
    .header-search input {
        width: 140px;
    }
    
    .header-search input:focus {
        width: 160px;
    }
    
    .quick-actions {
        grid-template-columns: 1fr 1fr;
    }
    
    .user-profile > span {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .dashboard-card {
        padding: 1rem;
    }
    
    .header-search input {
        width: 120px;
        padding: 0.4rem 0.8rem 0.4rem 2rem;
        font-size: 0.8rem;
    }
    
    .header-search input:focus {
        width: 140px;
    }
    
    .main-content {
        padding: 0.8rem;
    }
    
    .welcome-date {
        font-size: 0.8rem;
    }
    
    .chat-message.sent,
    .chat-message.received {
        margin: 0 0 0.5rem 0;
    }
}