:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --text: #172033;
    --muted: #667085;
    --line: #e5e7eb;
    --accent: #2563eb;
    --accent-dark: #1d4ed8;
    --green: #16a34a;
    --amber: #d97706;
    --red: #dc2626;
    --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top left, #e0ecff, transparent 28rem), var(--bg);
}

a { color: inherit; }
.app-shell { max-width: 1240px; margin: 0 auto; padding: 28px; }
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}
.eyebrow { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
h1 { margin: 4px 0 0; font-size: 34px; line-height: 1.1; }
h2 { margin: 0 0 8px; font-size: 20px; }
p { line-height: 1.55; }
.topbar-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 14px;
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid var(--line);
    background: #fff;
    font-weight: 700;
    color: var(--text);
}
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-dark); }
.btn.small { min-height: 32px; padding: 7px 12px; font-size: 13px; }
.pill { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 12px; color: var(--muted); font-weight: 700; }
.back-link { display: inline-block; color: var(--muted); text-decoration: none; margin-bottom: 8px; }
.flash { border-radius: 14px; padding: 14px 16px; margin-bottom: 18px; border: 1px solid var(--line); background: #fff; }
.flash.success { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.flash.error { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.metric-card, .panel {
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 22px;
    box-shadow: var(--shadow);
}
.metric-card { padding: 20px; }
.metric-label { color: var(--muted); font-weight: 700; font-size: 13px; }
.metric-value { margin-top: 8px; font-size: 34px; font-weight: 800; }
.metric-value.small { font-size: 18px; }
.panel { padding: 22px; margin-bottom: 18px; overflow: hidden; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.panel-heading p { margin: 0; color: var(--muted); max-width: 620px; }
.grid-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.chart { min-height: 320px; width: 100%; }
.chart.wide { min-height: 360px; }
.gantt-box { width: 100%; overflow-x: auto; min-height: 260px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 760px; }
th, td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.muted { color: var(--muted); }
.progress-line { display: inline-block; width: 120px; height: 8px; border-radius: 99px; background: #e5e7eb; margin-right: 8px; vertical-align: middle; overflow: hidden; }
.progress-line span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.status { display: inline-flex; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #eef2ff; color: #3730a3; white-space: nowrap; }
.status.green, .status.completed { background: #dcfce7; color: #166534; }
.status.amber, .status.at-risk, .status.completed-late { background: #fef3c7; color: #92400e; }
.status.red, .status.late---no-evidence { background: #fee2e2; color: #991b1b; }
.status.in-progress { background: #dbeafe; color: #1e40af; }
.action-card { border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin: 10px 0; background: #fff; }
.evidence-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.evidence-item { display: flex; flex-direction: column; gap: 3px; text-decoration: none; border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fff; }
.evidence-item:hover { border-color: var(--accent); }
.evidence-item small { color: var(--muted); }
.insight { border-left: 6px solid var(--accent); }
@media (max-width: 900px) {
    .app-shell { padding: 18px; }
    .topbar, .panel-heading { flex-direction: column; align-items: stretch; }
    .summary-grid, .grid-two, .evidence-list { grid-template-columns: 1fr; }
}


.update-form {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
}

.update-form input[type="text"] {
    min-width: 240px;
    padding: 0.7rem 0.8rem;
    border: 1px solid #d6dbe6;
    border-radius: 10px;
    font-size: 0.95rem;
    background: #fff;
}

.update-form input[type="text"]:focus {
    outline: none;
    border-color: #5c7cfa;
    box-shadow: 0 0 0 3px rgba(92, 124, 250, 0.15);
}
