:root {
  --bg: #0c0e12;
  --surface: #161b22;
  --surface-elevated: #1f262e;
  --text: #f0f3f6;
  --text-muted: #9aa5b1;
  --accent: #e6a817;          /* golden amber */
  --accent-hover: #d4920c;
  --accent-soft: rgba(230, 168, 23, 0.12);
  --border: #2a3340;
  --success: #3dbe7a;
  --danger: #ef5b5b;
  --hop: #6b9e3e;             /* hop green accent */
  --foam: #f5f1e8;
}

[data-theme="light"] {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --surface-elevated: #faf8f5;
  --text: #1a1d23;
  --text-muted: #5c6570;
  --accent: #c48a0a;
  --accent-hover: #a87308;
  --accent-soft: rgba(196, 138, 10, 0.1);
  --border: #e6e0d6;
  --hop: #5a8a32;
  --foam: #fffefb;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  background-image: radial-gradient(circle at 10% 20%, rgba(230,168,23,0.04) 0%, transparent 40%),
                    radial-gradient(circle at 90% 80%, rgba(107,158,62,0.03) 0%, transparent 40%);
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }

.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}
.nav .container { display: flex; justify-content: space-between; align-items: center; }
.brand {
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand::before { content: "🍺 "; }
.nav-links a {
  margin-left: 1.75rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--accent); }

main { padding: 2.25rem 0 3rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.6rem 1.75rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,0.22); }

h1, h2, h3 { margin-top: 0; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: 1.85rem; color: var(--accent); }

.btn {
  background: var(--accent);
  color: #1a1200;
  border: none;
  padding: 0.55rem 1.15rem;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s, transform 0.1s;
}
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-secondary:hover { background: var(--accent-soft); border-color: var(--accent); }

.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th {
  padding: 0.85rem 0.75rem;
  text-align: left;
  border-bottom: 2px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.table td { padding: 0.85rem 0.75rem; border-bottom: 1px solid var(--border); }
.table tr:hover td { background: rgba(255,255,255,0.02); }

.badge {
  padding: 0.28rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.badge-Planning { background: #3b82f6; color: white; }
.badge-Brewing { background: #f59e0b; color: #1a1200; }
.badge-Fermenting { background: #8b5cf6; color: white; }
.badge-Conditioning { background: #10b981; color: white; }
.badge-Completed { background: #6b7280; color: white; }
.badge-Archived { background: #4b5563; color: white; }

.field { margin: 0.55rem 0; display: flex; gap: 0.5rem; align-items: baseline; flex-wrap: wrap; }
.field-label { color: var(--text-muted); font-size: 0.9rem; min-width: 140px; }
.field-value { font-weight: 600; }

/* Tap display */
.tap-side {
  background: var(--surface-elevated);
  border-radius: 16px;
  margin: 0.75rem;
  box-shadow: inset 0 0 0 1px var(--border);
}
.tap-side h2 {
  font-size: 2.6rem;
  background: linear-gradient(90deg, var(--accent), #f5d76e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .nav .container { flex-direction: column; gap: 0.6rem; }
  .nav-links a { margin: 0 0.6rem; }
  .card { padding: 1.25rem; }
  h1 { font-size: 1.6rem; }
}
