:root {
  --bg: #0f1720;
  --card: #18232f;
  --text: #e9eef3;
  --muted: #8fa1b3;
  --accent: #7cc4a4;
  --warn: #d98c7a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "SF Arabic", "Geeza Pro", system-ui, sans-serif;
  line-height: 1.7;
  padding: env(safe-area-inset-top) 16px calc(env(safe-area-inset-bottom) + 24px);
}

.top { text-align: center; padding: 24px 0 8px; }
.top h1 { margin: 0; font-size: 28px; }
.daily { color: var(--accent); margin: 8px 0 0; font-size: 16px; }

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 18px;
  margin: 14px 0;
}
.card h2 { margin: 0 0 10px; font-size: 18px; }
.muted { color: var(--muted); font-size: 14px; margin: 8px 0; }

button, .file-btn {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 14px;
  margin-top: 10px;
  font: inherit;
  font-size: 16px;
  background: var(--accent);
  color: #0f1720;
  text-align: center;
}
button.ghost, .file-btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid #2c3b4a;
}
button.big { font-size: 22px; padding: 22px; }
.file-btn input { display: none; }

.counter { text-align: center; }
.counter span { font-size: 64px; font-weight: 700; color: var(--accent); }
.counter small { margin-right: 8px; color: var(--muted); font-size: 18px; }

textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #2c3b4a;
  background: #111a24;
  color: var(--text);
  padding: 12px;
  font: inherit;
  font-size: 16px;
}

.log, .notes { list-style: none; padding: 0; margin: 10px 0 0; }
.log li { color: var(--muted); font-size: 14px; padding: 4px 0; border-bottom: 1px solid #22303d; }
.notes li { background: #111a24; border-radius: 12px; padding: 12px; margin-top: 10px; white-space: pre-wrap; }
.notes .date { display: block; color: var(--muted); font-size: 12px; }
.notes .del { width: auto; display: inline-block; padding: 4px 12px; margin-top: 8px; font-size: 13px; background: transparent; color: var(--warn); border: 1px solid #4a2f2a; }

details summary { color: var(--muted); font-size: 14px; margin-top: 8px; }

.chart { display: flex; align-items: flex-end; gap: 6px; height: 140px; direction: ltr; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar div { width: 100%; background: var(--accent); border-radius: 6px 6px 0 0; min-height: 2px; }
.bar span { font-size: 11px; color: var(--muted); }

.overlay { position: fixed; inset: 0; background: rgba(8, 12, 17, .94); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 10; }
.overlay[hidden] { display: none; }
.sheet { width: 100%; max-width: 420px; text-align: center; }
.circle {
  width: 180px; height: 180px; margin: 24px auto;
  border-radius: 50%;
  background: radial-gradient(circle, #7cc4a4 0%, #3c6e5c 70%);
  display: flex; align-items: center; justify-content: center;
  transform: scale(.6);
  transition: transform 4s ease-in-out;
}
.circle span { color: #0f1720; font-size: 18px; font-weight: 600; }
.step { font-size: 18px; }
.checklist { text-align: right; padding-right: 20px; }
.checklist li { margin: 6px 0; }
