* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f0f2f5;
    color: #1a1a2e;
}

header {
    background: #1a1a2e;
    color: white;
    padding: 24px 40px;
}

header h1 {
    font-size: 24px;
    font-weight: 600;
}

header p {
    color: #8892b0;
    margin-top: 4px;
    font-size: 14px;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 40px;
}

.section {
    margin-bottom: 40px;
}

.section h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1a1a2e;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.project-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.project-card:hover {
    border-color: #4f8ef7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79,142,247,0.15);
}

.project-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.project-card .location {
    font-size: 12px;
    color: #8892b0;
    margin-bottom: 12px;
}

.project-card .budget {
    font-size: 13px;
    color: #555;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.status-active { background: #e3f9e5; color: #1a7f37; }
.status-completed { background: #dbeafe; color: #1d4ed8; }
.status-on_hold { background: #fef3c7; color: #92400e; }
.status-cancelled { background: #fee2e2; color: #991b1b; }

/* Detail Header */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.btn-export {
    background: #1a1a2e;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-export:hover {
    background: #4f8ef7;
}

/* Summary Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.card-label {
    font-size: 12px;
    color: #8892b0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.card-value {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.chart-box {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.chart-box h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #555;
}

/* Table */
.table-box {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.table-box h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #555;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    font-size: 12px;
    color: #8892b0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    border-bottom: 1px solid #f0f2f5;
}

td {
    padding: 12px;
    font-size: 14px;
    border-bottom: 1px solid #f0f2f5;
}

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

.loading {
    color: #8892b0;
    font-size: 14px;
}

.overrun-warning {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}

.btn-insights {
    background: #4f8ef7;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
    margin-left: 8px;
}

.btn-insights:hover {
    background: #1a1a2e;
}

.insights-box {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border-left: 4px solid #4f8ef7;
}

.insights-box h3 {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-bottom: 12px;
}

.insights-box p {
    font-size: 14px;
    line-height: 1.7;
    color: #333;
}

.header-buttons {
    display: flex;
    gap: 8px;
}