﻿/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.dashboard-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f8f9fa;
}

/* Header Styles */
.dashboard-header {
    background: linear-gradient(135deg, #2c3e50 0%, #1a2530 100%);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.company-info h1 {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

.company-info p {
    font-size: 0.9rem;
    color: #bdc3c7;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

    .search-box input {
        background-color: rgba(255, 255, 255, 0.1);
        border: none;
        border-radius: 20px;
        padding: 0.5rem 1rem 0.5rem 2.5rem;
        color: white;
        width: 250px;
    }

    .search-box svg {
        position: absolute;
        left: 10px;
        color: #bdc3c7;
    }

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notifications {
    position: relative;
    cursor: pointer;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

    .user-profile img {
        width: 35px;
        height: 35px;
        border-radius: 50%;
        background-color: #3498db;
        padding: 5px;
    }

/* Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.main-nav a {
    color: #ecf0f1;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

    .main-nav a:hover::after,
    .main-nav .active a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 3px;
        background-color: #3498db;
        border-radius: 3px;
    }

/* Stats Overview */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem 2rem;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-info h3 {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    display: block;
    margin-bottom: 0.3rem;
}

.stat-change {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .stat-icon.construction {
        background-color: rgba(52, 152, 219, 0.1);
        color: #3498db;
    }

    .stat-icon.properties {
        background-color: rgba(46, 204, 113, 0.1);
        color: #2ecc71;
    }

    .stat-icon.revenue {
        background-color: rgba(155, 89, 182, 0.1);
        color: #9b59b6;
    }

    .stat-icon.team {
        background-color: rgba(241, 196, 15, 0.1);
        color: #f1c40f;
    }

/* Main Dashboard */
.main-dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 0 2rem 2rem;
}

.dashboard-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Widget Styles */
.widget {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid #f1f2f6;
}

    .widget-header h3 {
        font-size: 1.1rem;
        color: #2c3e50;
    }

.widget-menu {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #7f8c8d;
    cursor: pointer;
    transform: rotate(90deg);
}

.widget-content {
    padding: 1.5rem;
}

/* Project Progress */
.project-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.2rem;
}

    .project-item:last-child {
        margin-bottom: 0;
    }

.project-info {
    flex: 1;
    margin-right: 1rem;
}

    .project-info h4 {
        font-size: 0.95rem;
        color: #2c3e50;
        margin-bottom: 0.2rem;
    }

    .project-info span {
        font-size: 0.8rem;
        color: #7f8c8d;
    }

.progress-bar {
    width: 120px;
    height: 8px;
    background-color: #ecf0f1;
    border-radius: 4px;
    margin-right: 1rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #3498db;
    border-radius: 4px;
}

.progress-value {
    font-weight: 600;
    color: #2c3e50;
    width: 35px;
    text-align: right;
}

/* Activity Feed */
.activity-item {
    display: flex;
    margin-bottom: 1.2rem;
}

    .activity-item:last-child {
        margin-bottom: 0;
    }

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: #3498db;
}

.activity-details p {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    color: #2c3e50;
}

.activity-time {
    font-size: 0.8rem;
    color: #7f8c8d;
}

/* Property Listings */
.property-listings {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.property-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.property-image {
    height: 140px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7f8c8d;
}

.property-status {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #2ecc71;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.property-details {
    padding: 1rem;
}

    .property-details h4 {
        font-size: 1rem;
        color: #2c3e50;
        margin-bottom: 0.3rem;
    }

    .property-details p {
        font-size: 0.85rem;
        color: #7f8c8d;
        margin-bottom: 1rem;
    }

.property-stats {
    display: flex;
    justify-content: space-between;
}

.stat {
    text-align: center;
}

    .stat .value {
        display: block;
        font-weight: 700;
        color: #2c3e50;
        margin-bottom: 0.2rem;
    }

    .stat .label {
        font-size: 0.8rem;
        color: #7f8c8d;
    }

/* Financial Chart */
.financial-chart {
    display: flex;
    flex-direction: column;
}

.chart-bars {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 200px;
    margin-bottom: 1rem;
}

.bar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 40px;
}

.bar {
    width: 30px;
    background: linear-gradient(to top, #3498db, #2ecc71);
    border-radius: 4px 4px 0 0;
}

.bar-container span {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #7f8c8d;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

    .color-dot.revenue {
        background-color: #3498db;
    }

    .color-dot.expenses {
        background-color: #e74c3c;
    }

/* Team Availability */
.team-availability {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.team-member {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.member-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e0e0e0;
}

.member-details h4 {
    font-size: 0.9rem;
    color: #2c3e50;
    margin-bottom: 0.2rem;
}

.member-details p {
    font-size: 0.8rem;
    color: #7f8c8d;
}

.availability {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-weight: 500;
}

    .availability.available {
        background-color: rgba(46, 204, 113, 0.1);
        color: #27ae60;
    }

    .availability.on-leave {
        background-color: rgba(241, 196, 15, 0.1);
        color: #f39c12;
    }

    .availability.busy {
        background-color: rgba(231, 76, 60, 0.1);
        color: #c0392b;
    }

/* Upcoming Tasks */
.upcoming-tasks {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.task-priority {
    width: 8px;
    height: 40px;
    border-radius: 4px;
}

    .task-priority.high {
        background-color: #e74c3c;
    }

    .task-priority.medium {
        background-color: #f39c12;
    }

    .task-priority.low {
        background-color: #3498db;
    }

.task-details {
    flex: 1;
}

    .task-details h4 {
        font-size: 0.9rem;
        color: #2c3e50;
        margin-bottom: 0.2rem;
    }

    .task-details p {
        font-size: 0.8rem;
        color: #7f8c8d;
    }

.task-date {
    font-size: 0.8rem;
    color: #7f8c8d;
    white-space: nowrap;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-dashboard {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .main-dashboard {
        grid-template-columns: 1fr;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .search-box input {
        width: 100%;
    }

    .stats-overview {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .dashboard-header {
        padding: 1rem;
    }

    .stats-overview {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .main-dashboard {
        padding: 0 1rem 1rem;
    }

    .main-nav ul {
        flex-wrap: wrap;
        gap: 1rem;
    }
}
