/* ===== Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ===== Page base — dark theme ===== */
body {
  font-family: system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 1rem;
  background: #0f1117;
  color: #e2e8f0;
}

header {
  margin-bottom: 1.5rem;
}

h1 {
  font-size: 1.5rem;
  margin: 0;
  color: #a78bfa;
  letter-spacing: 0.01em;
  text-align: center;
}

/* ===== Card container ===== */
main {
  max-width: 600px;
  margin: 0 auto;
  background: #1a1d27;
  border-radius: 10px;
  padding: 1.5rem;
  border: 1px solid #2d3148;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

/* ===== Date picker + Record button row ===== */
.controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.controls label {
  font-weight: 500;
  color: #94a3b8;
}

.controls-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.controls-row input[type="date"] {
  flex: 1;
  min-width: 0;
  padding: 0.4rem 0.6rem;
  border: 1px solid #2d3148;
  border-radius: 6px;
  font-size: 1rem;
  background: #0f1117;
  color: #e2e8f0;
  /* color-scheme: dark tells the browser to render the native date picker
     chrome (calendar popup, spinner arrows) in dark mode. */
  color-scheme: dark;
}

.controls-row input[type="date"]:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124,58,237,0.3);
}

.controls-row button {
  padding: 0.4rem 1.1rem;
  border: none;
  border-radius: 6px;
  background: #7c3aed;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.controls-row button:hover:not(:disabled) {
  background: #6d28d9;
}

.controls-row button:disabled {
  background: #3b2a6e;
  color: #94a3b8;
  cursor: not-allowed;
}

/* ===== Status / feedback message ===== */
#status-msg {
  color: #64748b;
  font-size: 0.95rem;
  margin: 0 0 0.75rem;
}

/* ===== Records list ===== */
#records-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#records-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid #2d3148;
  font-size: 0.95rem;
  color: #cbd5e1;
}

/* Remove the divider after the last entry so there's no trailing line. */
#records-list li:last-child {
  border-bottom: none;
}
