/* Mini Health Tracker - Sade ve okunaklı stiller */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f4f7fb;
  --card-bg: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --border: #e5e7eb;
  --success-bg: #d1fae5;
  --success-text: #065f46;
  --error-bg: #fee2e2;
  --error-text: #991b1b;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: white;
  padding: 2rem 1rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.subtitle {
  opacity: 0.9;
  font-size: 0.95rem;
}

main {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 1rem;
  display: grid;
  gap: 1.5rem;
}

.card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.04);
}

.card h2 {
  margin-bottom: 1rem;
  color: var(--text);
  font-size: 1.25rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

label.full {
  grid-column: 1 / -1;
}

label span {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

input, textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.btn {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}

.btn:hover {
  background: #f3f4f6;
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn.primary:hover {
  background: var(--primary-hover);
}

.btn.danger {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.btn.danger:hover {
  background: var(--danger-hover);
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.list-header h2 {
  margin-bottom: 0;
}

.message {
  padding: 0.7rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.message.success {
  background: var(--success-bg);
  color: var(--success-text);
}

.message.error {
  background: var(--error-bg);
  color: var(--error-text);
}

.hidden {
  display: none;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 2rem;
}

.records {
  display: grid;
  gap: 0.75rem;
}

.record {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafbfc;
  transition: box-shadow 0.15s;
}

.record:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.record-info h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.record-meta strong {
  color: var(--text);
}

.record-notes {
  font-size: 0.9rem;
  color: var(--text);
  margin-top: 0.4rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border);
}

footer {
  text-align: center;
  padding: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  header h1 {
    font-size: 1.5rem;
  }
  .record {
    grid-template-columns: 1fr;
  }
}
