/* =========================
   Global Base
   ========================= */
body {
    font-family: "Segoe UI", sans-serif;
    margin: 0;
    background: #f9fafc;
    color: #222;
}

.container { 
    max-width: 1200px; 
    margin: 20px auto; 
    padding: 20px; 
}

/* =========================
   Login Page
   ========================= */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-align: center;
}
.login-container h2 { margin-bottom: 10px; }
.login-container input[type="password"] {
    padding: 12px;
    width: 80%;
    margin: 15px 0;
    border: 1px solid #ccc;
    border-radius: 6px;
}
.login-container button {
    padding: 12px 25px;
    background: #001240;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.login-container button:hover { background: #003080; }
.error { color: red; font-size: 0.9rem; }

/* =========================
   KPI Stats
   ========================= */
.stats { display: flex; gap: 20px; margin-bottom: 20px; }
.stat { 
    flex: 1; 
    border-radius: 8px; 
    padding: 15px; 
    text-align: center; 
    font-weight: bold; 
}
.stat strong { display:block; font-size: 1.3rem; }
.stat.blue { background:#e5f0ff; color:#0040a0; }
.stat.green { background:#e5ffe5; color:#006600; }
.stat.gray { background:#eee; color:#555; }
.stat.red { background:#ffe5e5; color:#b30000; }

/* =========================
   Project Portfolio Table
   ========================= */
.overview-table { 
    width:100%; 
    border-collapse:collapse; 
    margin-top:20px; 
    background:#fff; 
}
.overview-table th, 
.overview-table td { 
    border:1px solid #ddd; 
    padding:10px; 
    text-align:center; 
}

/* Status Badges (scoped to table/dashboard) */
.overview-table .badge { 
    padding:5px 10px; 
    border-radius:6px; 
    font-weight:bold; 
    color:#fff; 
}
.overview-table .badge.in_progress { background:#0040a0; }
.overview-table .badge.completed { background:#006600; }
.overview-table .badge.not_started { background:#b30000; }

/* Progress Bars (scoped to table only) */
.overview-table .progress-bar { background:#eee; border-radius:6px; overflow:hidden; }
.overview-table .progress { 
    color:#fff; 
    font-size:0.8rem; 
    padding:3px; 
    text-align:center; 
}
.overview-table .progress.low { background:#b30000; }
.overview-table .progress.mid { background:#e68a00; }
.overview-table .progress.done { background:#006600; }

/* Procurement Flags */
.flag-alert { 
    background:red; 
    color:#fff; 
    padding:3px 6px; 
    border-radius:4px; 
    font-size:0.8rem; 
}

/* Buttons */
.btn { 
    display:inline-block; 
    padding:4px 8px; 
    margin:2px; 
    background:#0040a0; 
    color:#fff; 
    border-radius:5px; 
    text-decoration:none; 
    font-size:0.85rem; 
}
.btn:hover { background:#002a70; }
.btn.small { 
    padding:6px 14px; 
    font-size:0.85rem; 
    border-radius:5px; 
    border:none; 
    cursor:pointer; 
    display:inline-flex; 
    align-items:center; 
    gap:5px; 
    transition:background .2s; 
}

/* =========================
   Modals
   ========================= */
.modal { display:none; position:fixed; z-index:1000; left:0; top:0; width:100%; height:100%; background:rgba(0,0,0,0.7); }
.modal-content { background:#fff; margin:2% auto; padding:20px; border-radius:8px; width:800px; position:relative; }
.close { position:absolute; top:10px; right:15px; font-size:1.5rem; cursor:pointer; }

/* =========================
   Activity Feed
   ========================= */
.activity-feed { background:#f9f9f9; padding:10px; border-radius:6px; margin-top:20px; }
.activity { margin-bottom:6px; font-size:0.9rem; }
.badge.small { padding:2px 6px; border-radius:4px; font-size:0.8rem; }
.badge.task { background:#0040a0; color:#fff; }
.badge.procurement { background:#006600; color:#fff; }

/* =========================
   Gantt Overrides
   ========================= */
#gantt { width:100%; min-height:500px; margin:20px 0; border:1px solid #ddd; border-radius:6px; background:#fff; }

#gantt .bar { stroke:#333; stroke-width:1; }
#gantt .bar.in_progress { fill:#1d72b8 !important; }
#gantt .bar.completed { fill:#28a745 !important; }
#gantt .bar.not_started { fill:#dc3545 !important; }

#gantt .grid-header { fill:#f5f5f5 !important; }
#gantt .grid-row { fill:none !important; }
#gantt .today-highlight { fill:rgba(0,123,255,0.1) !important; }
