
:root{
  --bg:#0b1220;
  --card:#0f172a;
  --text:#e5e7eb;
  --muted:#9ca3af;
  --border:#1f2937;
  --primary:#3b82f6;
  --accent:#22c55e;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial;
  background:var(--bg);
  color:var(--text);
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  padding:18px 16px 6px;
  max-width:980px;
  margin:0 auto;
}
.logo{ width:48px; height:48px; border-radius:10px; }
.brand h1{ margin:0; font-size:28px; }
.brand p{ margin:2px 0 0; color:var(--muted); }
main{ max-width:980px; margin:0 auto; padding:16px; }
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:12px;
  padding:16px;
  margin-bottom:16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.card h2{ margin-top:0; font-size:20px; }
.grid2{ display:grid; gap:12px; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); }
.row{ display:flex; gap:12px; align-items:center; }
.row label{ width:160px; color:var(--muted); }
.row input[type="date"],
.row input[type="number"],
.row input[type="text"]{
  flex:1;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:8px;
  background:#0b1220;
  color:var(--text);
}
.actions{ display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
button, .import-label{
  background:var(--primary);
  color:#fff;
  border:none;
  padding:10px 14px;
  border-radius:8px;
  cursor:pointer;
}
button.secondary, .import-label.secondary{ background:#374151; }
button:disabled{ opacity:.6; cursor:not-allowed; }
.stats{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap:12px;
  margin-top:12px;
}
.stats > div{
  border:1px solid var(--border);
  border-radius:10px;
  padding:10px;
  text-align:center;
  background:#0b1220;
}
.table-container{ overflow:auto; border:1px solid var(--border); border-radius:10px; }
table{ border-collapse:collapse; width:100%; }
th, td{ padding:10px 12px; border-bottom:1px solid var(--border); text-align:left; white-space:nowrap; }
tbody tr:hover{ background:#0b1528; }
td:last-child{ text-align:right; }
.hint{ color:var(--muted); font-size:14px; margin:6px 0 0; }
.fun{ font-size:16px; }
.badges{ display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.badge{
  display:inline-flex; align-items:center; gap:8px;
  background:#0b1220; border:1px solid var(--border);
  padding:8px 10px; border-radius:999px;
}
.badge .dot{ width:10px; height:10px; border-radius:50%; background:var(--accent); display:inline-block; }
footer{ text-align:center; color:var(--muted); padding:16px 0 40px; font-size:14px; }

/* Chart fixes */
#progressChart {
  width: 100%;
  height: 400px;
  max-height: 400px;
}

/* Daily change colors */
.text-green {
  color: #22c55e;
  font-weight: 500;
}

.text-red {
  color: #ef4444;
  font-weight: 500;
}
