:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #475569;
    --accent: #10b981;
    --bg-main: #f1f5f9;
    --bg-surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --font-en: 'Inter', sans-serif;
    --font-mr: 'Noto Sans Devanagari', sans-serif;
}

body {
    margin: 0;
    font-family: var(--font-en);
    background-color: var(--bg-main);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 260px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: fixed;
    height: 100vh;
    box-sizing: border-box;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
}

.nav-logo { width: 40px; height: 40px; }
.brand-text { font-weight: 800; font-size: 20px; color: var(--primary); display: flex; flex-direction: column; line-height: 1; }
.brand-sub { font-size: 12px; color: var(--text-muted); font-weight: 500; }

.nav-links { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-muted);
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}
.nav-item:hover, .nav-item.active { background: #eff6ff; color: var(--primary); }
.nav-item i { font-size: 20px; }

.install-btn {
    display: none; /* JS toggles this */
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--text-main);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

/* MAIN AREA */
.main-content {
    margin-left: 260px; /* Sidebar width */
    flex: 1;
    padding: 30px;
    max-width: 1600px;
}

/* HEADER */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    gap: 20px;
}
.header-title h1 { margin: 0; font-size: 24px; }
.header-title p { margin: 5px 0 0; color: var(--text-muted); font-size: 14px; }

.search-container {
    position: relative;
    width: 300px;
}
.search-container i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.search-container input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-family: var(--font-en);
    outline: none;
    box-sizing: border-box;
    transition: box-shadow 0.2s;
}
.search-container input:focus { box-shadow: 0 0 0 3px rgba(37,99,235,0.1); border-color: var(--primary); }

/* STATS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    background: var(--bg-surface);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
}
.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}
.stat-icon.blue { background: #dbeafe; color: var(--primary); }
.stat-icon.green { background: #d1fae5; color: #059669; }
.stat-icon.purple { background: #f3e8ff; color: #7c3aed; }
.stat-info h3 { margin: 0; font-size: 24px; font-weight: 700; }
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* FILTERS */
.filters-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}
.filter-group {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 10px;
}
.filter-group i { color: var(--text-muted); }
.filter-group select {
    border: none;
    padding: 12px 0;
    font-family: var(--font-en);
    color: var(--text-main);
    background: transparent;
    outline: none;
    min-width: 140px;
    cursor: pointer;
}

/* GRID */
.works-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.count-badge { background: #e2e8f0; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 700; }

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

/* PROJECT CARD */
.project-card {
    background: var(--bg-surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.card-status-bar { height: 6px; width: 100%; }
.status-blue { background: var(--primary); }
.status-orange { background: #f59e0b; }

.card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }

.card-top { display: flex; justify-content: space-between; margin-bottom: 15px; }
.chip { padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.chip-type { background: #f1f5f9; color: var(--text-muted); }
.chip-spv { background: #eff6ff; color: var(--primary); }

.card-title {
    margin: 0 0 15px 0;
    font-size: 16px;
    line-height: 1.5;
    font-family: var(--font-mr); /* MARATHI FONT */
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 48px; /* Fixed height for alignment */
}

.card-meta { display: flex; gap: 15px; margin-bottom: 20px; font-size: 13px; color: var(--text-muted); }
.meta-item { display: flex; align-items: center; gap: 6px; }

.card-financials {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
}
.fin-row { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 13px; }
.fin-row:last-child { margin-bottom: 0; }
.cost-val { font-weight: 700; font-family: monospace; font-size: 14px; }
.cost-val.muted { color: var(--text-muted); }

.card-footer { margin-top: auto; border-top: 1px dashed var(--border); padding-top: 10px; }
.footer-remark { font-size: 12px; color: var(--text-muted); display: flex; gap: 6px; align-items: center; }

/* LOADING / EMPTY */
.loading-state, .empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    color: var(--text-muted);
}
.empty-state i { font-size: 48px; margin-bottom: 10px; opacity: 0.5; }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .sidebar { width: 80px; padding: 20px 10px; }
    .brand-text, .nav-item span, .install-btn { display: none; }
    .nav-item { justify-content: center; }
    .main-content { margin-left: 80px; }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%; height: auto; position: fixed; bottom: 0; top: auto;
        flex-direction: row; justify-content: space-around; padding: 10px;
        border-right: none; border-top: 1px solid var(--border);
        box-shadow: 0 -4px 10px rgb(0 0 0 / 0.05);
    }
    .brand, .install-btn { display: none; }
    .nav-item { flex-direction: column; font-size: 10px; gap: 4px; padding: 8px; }
    .nav-item span { display: block; }
    
    .main-content { margin: 0 0 80px 0; padding: 15px; }
    
    .top-header { flex-direction: column; align-items: flex-start; gap: 15px; }
    .search-container { width: 100%; }
    .stats-grid { grid-template-columns: 1fr; }
}