:root {
  --bg: #f4efe6;
  --panel: rgba(255, 252, 246, 0.9);
  --panel-strong: #fffdf8;
  --text: #1d1a14;
  --muted: #70685b;
  --line: rgba(89, 72, 44, 0.12);
  --accent: #d96c2f;
  --accent-strong: #b94f17;
  --shadow: 0 20px 60px rgba(79, 52, 24, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(217, 108, 47, 0.2), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 196, 87, 0.2), transparent 24%),
    linear-gradient(180deg, #fbf6ee 0%, var(--bg) 100%);
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hero,
.panel,
.total-card {
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.hero,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 24px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 20px;
  align-items: end;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 0.95;
}

.subtitle {
  margin-top: 12px;
  max-width: 560px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.auth-badge {
  display: inline-flex;
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(29, 26, 20, 0.08);
  font-size: 13px;
  font-weight: 700;
}

.date-picker,
.entry-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.date-picker span,
.entry-form span {
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
}

input:focus {
  outline: 2px solid rgba(217, 108, 47, 0.2);
  border-color: rgba(217, 108, 47, 0.4);
}

.totals-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.total-card {
  padding: 20px;
  border-radius: 24px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.total-card span {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--muted);
}

.total-card strong {
  font-size: 28px;
}

.total-card.accent {
  background: linear-gradient(135deg, #d96c2f 0%, #f29d52 100%);
  color: white;
}

.total-card.accent span {
  color: rgba(255, 255, 255, 0.78);
}

.panel + .panel {
  margin-top: 18px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 20px;
}

.panel-note {
  color: var(--muted);
  font-size: 14px;
}

.entry-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.submit-button,
.delete-button {
  border: none;
  border-radius: 18px;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease,
    background 0.18s ease;
}

.submit-button {
  padding: 16px 18px;
  background: var(--text);
  color: white;
  font-weight: 700;
}

.submit-button:hover,
.delete-button:hover {
  transform: translateY(-1px);
}

.entries-list {
  display: grid;
  gap: 14px;
}

.entry-card {
  padding: 18px;
  border-radius: 22px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.entry-main {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.entry-name {
  font-size: 20px;
}

.entry-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.entry-macros {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.entry-macros span {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(217, 108, 47, 0.08);
  font-size: 14px;
}

.delete-button {
  padding: 10px 14px;
  background: rgba(185, 79, 23, 0.12);
  color: var(--accent-strong);
  font-weight: 700;
}

.empty-state {
  padding: 28px 22px;
  border-radius: 22px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.45);
  border: 1px dashed rgba(89, 72, 44, 0.2);
}

.empty-state.error {
  color: #8c2f16;
  border-style: solid;
  background: rgba(185, 79, 23, 0.08);
}

@media (max-width: 840px) {
  .hero,
  .entry-form,
  .totals-grid,
  .entry-macros {
    grid-template-columns: 1fr;
  }

  .panel-header,
  .entry-main {
    align-items: stretch;
    flex-direction: column;
  }

  .delete-button,
  .submit-button {
    width: 100%;
  }
}
