* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  background: #e8e8e8;
  color: #111;
}

.container {
  max-width: 540px;
  margin: 0 auto;
  padding: 16px;
}

h1 {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

/* ── Error Banner ── */
.error-banner {
  background: #c62828;
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

/* ── Form Card ── */
.form-card {
  background: #fff;
  border: 3px solid #111;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}

.datetime-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.input-date,
.input-time {
  flex: 1;
  padding: 10px 8px;
  font-size: 1rem;
  border: 2px solid #aaa;
  border-radius: 6px;
  background: #fafafa;
}

/* ── Activity Buttons ── */
.activity-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.btn-activity {
  flex: 1;
  padding: 14px 4px;
  font-size: 1.2rem;
  font-weight: 700;
  border: 3px solid #111;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.05s, box-shadow 0.05s;
  -webkit-tap-highlight-color: transparent;
}

.btn-pee   { background: #FFD700; color: #111; }
.btn-poop  { background: #6B3A1F; color: #fff; }
.btn-eat   { background: #2E7D32; color: #fff; }
.btn-other { background: #fff;    color: #111; }

.btn-activity.selected {
  box-shadow: 0 0 0 3px #111, 0 0 0 6px #fff;
  transform: scale(1.06);
}

/* ── Note Input ── */
.note-row {
  margin-bottom: 14px;
}

.input-note {
  width: 100%;
  padding: 10px 8px;
  font-size: 1rem;
  border: 2px solid #aaa;
  border-radius: 6px;
  background: #fafafa;
}

/* ── Submit Button ── */
.btn-submit {
  width: 100%;
  padding: 14px;
  font-size: 1.1rem;
  font-weight: 700;
  background: #1565C0;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.5px;
  -webkit-tap-highlight-color: transparent;
}

.btn-submit:disabled {
  background: #aaa;
  cursor: not-allowed;
}

/* ── Entry List ── */
.entry-list {
  border: 3px solid #111;
  border-radius: 10px;
  overflow: hidden;
}

.entry-row {
  display: flex;
  align-items: center;
  padding: 13px 14px;
  border-bottom: 3px solid #111;
}

.entry-row:last-child {
  border-bottom: none;
}

/* Activity row colors */
.row-pee   { background: #FFD700; color: #111; }
.row-poop  { background: #6B3A1F; color: #fff; }
.row-eat   { background: #2E7D32; color: #fff; }
.row-other { background: #fff;    color: #111; }

.entry-info {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.entry-date {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

.entry-time {
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  white-space: nowrap;
}

.entry-activity {
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
}

.entry-note {
  font-size: 0.85rem;
  opacity: 0.85;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Delete Button ── */
.btn-delete {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #c62828;
  color: #fff;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  -webkit-tap-highlight-color: transparent;
}

.btn-delete:disabled {
  background: #aaa;
  cursor: not-allowed;
}

/* ── States ── */
.loading,
.no-entries {
  text-align: center;
  padding: 24px 16px;
  color: #555;
  font-size: 0.95rem;
}
