:root { --navy:#12233f; --blue:#6588ff; --bg:#f4f6fa; --border:#dde3ee; --bad:#c0392b; }
* { box-sizing: border-box; }
body { margin:0; font:15px/1.45 -apple-system, "Segoe UI", Roboto, sans-serif; background:var(--bg); color:#1c2333; display:flex; min-height:100vh; }
.sidebar { width:210px; background:var(--navy); color:#dfe6f5; padding:18px 14px; flex-shrink:0; }
.brand { font-weight:700; font-size:17px; margin-bottom:18px; }
.login-logo { width:96px; height:auto; margin-bottom:10px; }
.topbar-logo { height:44px; width:auto; }
.sidebar nav { display:flex; flex-direction:column; gap:4px; }
.sidebar a { color:#c8d3ec; text-decoration:none; padding:8px 10px; border-radius:6px; }
.sidebar a:hover { background:#1d3257; }
.sidebar a.active { background:var(--blue); color:#fff; }
.footnote { margin-top:24px; padding-top:14px; border-top:1px solid rgba(255,255,255,.14); font-size:12px; color:#8fa0c4; }
main { flex:1; padding:26px 34px 40px; max-width:1150px; }
.topbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:26px; padding-bottom:16px; border-bottom:1px solid var(--border); }
.topbar-brand { display:flex; align-items:center; gap:12px; }
.topbar-title { font-size:18px; font-weight:700; color:#1c2333; }
.topbar-actions { display:flex; align-items:center; gap:12px; margin-left:auto; }
button { background:var(--blue); color:#fff; border:0; border-radius:6px; padding:8px 14px; cursor:pointer; }
button:disabled { opacity:.5; }
h1 { font-size:22px; margin:4px 0 16px; }
h2 { font-size:16px; margin:22px 0 8px; }
.cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:14px; margin-bottom:22px; }
.card { background:#fff; border:1px solid var(--border); border-radius:10px; padding:12px 14px; }
.card h2 { margin:0 0 6px; font-size:13px; font-weight:600; color:#5a6780; }
.kpi { font-size:22px; font-weight:700; margin:0; }
.muted { color:#6a7692; font-size:13px; }
.bad { color:var(--bad); }
table { width:100%; border-collapse:collapse; background:#fff; border:1px solid var(--border); border-radius:10px; overflow:hidden; font-size:14px; }
th, td { text-align:left; padding:8px 10px; border-bottom:1px solid var(--border); }
thead th { background:#eef2fa; font-size:12.5px; text-transform:uppercase; letter-spacing:.03em; color:#43506f; }
tbody tr:last-child td { border-bottom:0; }
tfoot th { background:#f7f9fd; }
.state { padding:2px 8px; border-radius:99px; font-size:12.5px; background:#e6efe6; color:#256029; text-transform:lowercase; }
.state-bad { background:#FBEAEA; color:#C0392B; }
.kpi.bad { background:transparent; }
.warnings { margin-bottom:12px; }
.warning { background:#fff8e6; border:1px solid #f0d98c; border-radius:8px; padding:8px 12px; margin:4px 0; font-size:13.5px; }
.project { background:#fff; border:1px solid var(--border); border-radius:10px; padding:12px 16px; margin-bottom:14px; }
.breakdown { margin-top:8px; }
@media (max-width:700px){ body{flex-direction:column;} .sidebar{width:auto;} .sidebar nav{flex-direction:row; flex-wrap:wrap;} }
body.centered { display:flex; align-items:center; justify-content:center; min-height:100vh; background:var(--bg); }
.login-card { background:#fff; border:1px solid var(--border); border-radius:14px; padding:34px 40px; text-align:center; max-width:380px; }
.google-btn { display:inline-flex; align-items:center; gap:10px; margin-top:14px; background:#fff; color:#1f2937; border:1px solid #c4c9d4; border-radius:6px; padding:10px 18px; text-decoration:none; font-weight:600; }
.google-btn:hover { background:#f0f3fa; }
.google-btn .g { color:var(--blue); font-weight:800; }
.small { font-size:12px; }

.kpi .cur { font-size:16px; font-weight:600; color:#4a5878; }
button .icon { width:14px; height:14px; margin-right:8px; vertical-align:-2px; }
button.loading .icon { animation:spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.charts { display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:14px; margin:22px 0; }
.chart-card { background:#fff; border:1px solid var(--border); border-radius:10px; padding:14px 16px; }
.chart-card.inline { padding:10px 12px; margin:10px 0; border:none; background:#fafbfe; }
.chart-card canvas { max-height:240px; }
.chart-note { color:var(--bad); font-size:13px; margin:8px 0 0; }
.add-form { display:flex; align-items:flex-end; gap:20px; flex-wrap:wrap; margin-top:8px; }
.add-form label { display:flex; flex-direction:column; gap:6px; font-size:13.5px; color:#43506f; font-weight:600; }
.add-form input { width:320px; padding:8px 10px; border:1px solid var(--border); border-radius:6px; font-size:14px; font-weight:400; }
.add-form input:focus { outline:2px solid var(--blue); outline-offset:1px; border-color:var(--blue); }
button.danger { background:#fff; color:var(--bad); border:1px solid #e3b7b1; }
button.danger:hover { background:#fbeaea; }
.inline-form { display:inline; }
.alert-banner { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.alert-close { background:transparent; border:0; color:#8a6d1a; padding:2px 6px; cursor:pointer; display:inline-flex; }
.alert-close:hover { color:#5c4a10; }
.alert-close .icon { margin-right:0; width:16px; height:16px; }

.user-email { word-break:break-all; margin-bottom:6px; }
.signout-form { margin-top:22px; }
button.signout { background:transparent; color:#c8d3ec; border:1px solid #3a5486; border-radius:6px; padding:6px 14px; font-size:13px; }
button.signout:hover { background:#1d3257; color:#fff; }
.subhead { font-size:14px; margin:18px 0 8px; color:#43506f; text-transform:uppercase; letter-spacing:.03em; }
