:root {
  --ink: #1c1d1b;
  --muted: #5c5f59;
  --sand: #f4efe6;
  --leaf: #3a6b4f;
  --moss: #24362b;
  --sun: #f0b35f;
  --sky: #b7d7d8;
  --card: #fbf9f2;
  --card-strong: #ffffff;
  --stroke: rgba(28, 29, 27, 0.12);
  --shadow: 0 18px 40px rgba(28, 29, 27, 0.15);
}

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

body {
  font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(circle at 10% 20%, #fff4d6 0%, transparent 50%),
    radial-gradient(circle at 80% 10%, #c7e3e0 0%, transparent 45%),
    linear-gradient(160deg, #f9f3e9, #efe7db 45%, #efe7db 100%);
  color: var(--ink);
  min-height: 100vh;
  padding: 2.5rem 6vw 4rem;
  position: relative;
  overflow-x: hidden;
}

.bg-blur {
  position: fixed;
  inset: -20% 10% auto -20%;
  height: 60vh;
  background: radial-gradient(circle, rgba(58, 107, 79, 0.22), transparent 60%);
  filter: blur(20px);
  z-index: 0;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(28, 29, 27, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 29, 27, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

.back-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--moss);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.back-link::before {
  content: "\2190";
  font-size: 1rem;
}

.hero {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin-bottom: 2.5rem;
  animation: fadeUp 0.6s ease both;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.26rem;
  font-size: 0.75rem;
  color: var(--moss);
}

.hero h1 {
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: clamp(2.4rem, 2.5vw + 1.8rem, 3.4rem);
  margin-top: 0.6rem;
}

.sub {
  margin-top: 0.7rem;
  color: var(--muted);
  line-height: 1.6;
}

.hero-meta {
  margin-top: 1rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.pill {
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  background: rgba(58, 107, 79, 0.12);
  font-size: 0.78rem;
  color: var(--moss);
  border: 1px solid rgba(58, 107, 79, 0.2);
}

.layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(280px, 0.95fr);
  gap: 1.6rem;
  align-items: start;
}

.panel {
  background: var(--card);
  border-radius: 22px;
  padding: 1.6rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--stroke);
  animation: fadeUp 0.6s ease both;
}

.panel:nth-child(2) {
  animation-delay: 0.12s;
}

.panel-header h2 {
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 1.5rem;
}

.panel-header p {
  margin-top: 0.4rem;
  color: var(--muted);
}

form {
  margin-top: 1.3rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

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

label {
  font-size: 0.85rem;
  color: var(--moss);
}

input,
select,
textarea {
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: var(--card-strong);
  padding: 0.65rem 0.7rem;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(58, 107, 79, 0.4);
  border-color: rgba(58, 107, 79, 0.5);
}

.inline {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 0.6rem;
}

.checkline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.6rem;
  background: rgba(58, 107, 79, 0.08);
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
}

.checkline label {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.85rem;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

button {
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.2rem;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
}

.primary {
  background: var(--leaf);
  color: #f9f7f1;
  box-shadow: 0 12px 24px rgba(58, 107, 79, 0.25);
}

.ghost {
  background: transparent;
  border: 1px solid rgba(28, 29, 27, 0.15);
  color: var(--moss);
}

#form-message {
  font-size: 0.85rem;
  color: var(--moss);
}

.summary-panel {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

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

.kpi {
  background: rgba(240, 179, 95, 0.2);
  border-radius: 16px;
  padding: 0.8rem;
  border: 1px solid rgba(240, 179, 95, 0.25);
}

.kpi strong {
  font-size: 1.4rem;
  display: block;
  margin-top: 0.25rem;
  color: var(--moss);
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.entry-list {
  display: grid;
  gap: 0.8rem;
}

.entry {
  background: var(--card-strong);
  border-radius: 16px;
  padding: 0.9rem;
  border: 1px solid rgba(28, 29, 27, 0.1);
  display: grid;
  gap: 0.6rem;
  animation: fadeUp 0.4s ease both;
}

.entry-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.entry-title {
  font-weight: 600;
}

.entry-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.entry-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(58, 107, 79, 0.12);
  font-size: 0.72rem;
  color: var(--moss);
}

.entry-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.entry-actions button {
  font-size: 0.8rem;
}

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

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  body {
    padding: 2rem 5vw 3rem;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  form {
    grid-template-columns: 1fr;
  }
}
