:root { font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
body { margin: 24px; background: #f6f7fb; color: #111; }
.wrap { max-width: 980px; margin: 0 auto; }
h1 { font-size: 20px; margin: 0 0 12px; }
.card { background: white; border-radius: 14px; padding: 16px; box-shadow: 0 6px 22px rgba(0,0,0,.08); }
.grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; }
@media (max-width: 900px){ .grid { grid-template-columns: 1fr; } }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
label { display: grid; gap: 6px; font-size: 12px; color: #333; }
input, select, button {
  border-radius: 10px; border: 1px solid #d0d5dd; padding: 10px 12px; font-size: 14px;
  background: #fff;
}
button { cursor: pointer; border: 0; background: #2563eb; color: #fff; font-weight: 600; }
button.secondary { background: #e5e7eb; color: #111; }
button.danger { background: #ef4444; }
.muted { color: #666; font-size: 13px; }
.pill {
  display:inline-block; padding: 8px 12px; border-radius: 999px;
  background: #dcfce7; border: 1px solid #86efac; font-weight: 700;
}
.pill.warn { background:#fff7ed; border-color:#fdba74; }
.pill.bad { background:#fee2e2; border-color:#fca5a5; }
table { width:100%; border-collapse: collapse; font-size: 14px; }
th, td { border-bottom: 1px solid #eee; padding: 8px 6px; text-align: left; }
th { color:#444; font-size: 12px; text-transform: uppercase; letter-spacing:.04em; }
.right { text-align:right; }
.chart {
  width: 100%; height: 260px; background: #0b1220; border-radius: 12px; overflow:hidden;
  position: relative;
}
canvas { display:block; width: 100%; height: auto; }
.small { font-size: 12px; }
.split { display:flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.checkline { display:flex; gap: 8px; align-items:center; padding: 10px 12px; border: 1px solid #d0d5dd; border-radius: 10px; }
.checkline input[type="checkbox"] { width: 18px; height: 18px; }
.fit-details { font-size: 10px; color: #888; }

/* Footer */
.footer {
  text-align: center;
  padding: 24px 24px 32px;
  color: #666;
  font-size: 13px;
}
.footer a {
  color: #2563eb;
  text-decoration: none;
}
.footer a:hover {
  text-decoration: underline;
}

/* Buy me a coffee button */
.coffee-btn {
  position: fixed;
  bottom: 16px;
  right: 16px;
  opacity: 0;
  transition: opacity 2s ease-in-out;
  z-index: 1000;
}
.coffee-btn.show {
  opacity: 1;
}
.coffee-link {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fde047;
  color: #000;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 9999px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  text-decoration: none;
  transition: all 0.3s;
  max-width: 200px;
  font-size: 14px;
}
.coffee-link:hover {
  background: #ca8a04;
  color: #f3f4f6;
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}
.coffee-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .coffee-link {
    padding: 8px 12px;
    font-size: 12px;
    max-width: 180px;
  }
  .coffee-icon {
    width: 14px;
    height: 14px;
  }
}
