:root {
  --paper: #f9fdf4;
  --paper-2: #eff8e8;
  --ink: #122016;
  --muted: #60715f;
  --line: #cfe1c7;
  --panel: rgba(255, 255, 250, 0.92);
  --panel-strong: #ffffff;
  --green: #13783f;
  --green-2: #1d9a53;
  --lime: #a7e85f;
  --mint: #dff8df;
  --red: #c73b33;
  --amber: #f2a51d;
  --gold: #ffe28a;
  --blue: #2381ad;
  --shadow: 0 20px 60px rgba(24, 91, 46, 0.16);
  --shadow-soft: 0 12px 34px rgba(24, 91, 46, 0.1);
  --radius: 8px;
  font-family: "Segoe UI", "Aptos", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 4%, rgba(167, 232, 95, 0.34), transparent 28%),
    radial-gradient(circle at 92% 8%, rgba(35, 129, 173, 0.2), transparent 30%),
    linear-gradient(90deg, rgba(19, 120, 63, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(19, 120, 63, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, #fbfff7 0%, #eef8e7 100%);
  background-size: auto, auto, 34px 34px, 34px 34px, auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 18%, rgba(255, 255, 255, 0.52) 18% 19%, transparent 19% 100%),
    linear-gradient(65deg, transparent 0 72%, rgba(255, 226, 138, 0.22) 72% 73%, transparent 73% 100%);
  opacity: 0.72;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell,
.workspace {
  position: relative;
  width: min(1220px, calc(100% - 28px));
  margin: 0 auto;
}

.topbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: white;
  background:
    linear-gradient(145deg, #19a958, #0d6536);
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 12px 28px rgba(19, 120, 63, 0.32);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.2rem;
  letter-spacing: 0;
}

.brand small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
}

.top-actions,
.button-row,
.item-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.small-button,
.icon-button,
.quick-dates button,
.filter-tabs button,
.item-actions button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 42px;
  padding: 0 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 18px rgba(28, 79, 42, 0.08);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.primary-button {
  border-color: #0f6737;
  color: white;
  background: linear-gradient(180deg, #1ba85b, #13783f);
  font-weight: 800;
  box-shadow: 0 13px 26px rgba(19, 120, 63, 0.26);
}

.primary-button:hover,
.secondary-button:hover,
.small-button:hover,
.icon-button:hover,
.quick-dates button:hover,
.filter-tabs button:hover,
.item-actions button:hover {
  transform: translateY(-1px);
  border-color: var(--green);
  box-shadow: 0 14px 28px rgba(28, 79, 42, 0.14);
}

.full {
  width: 100%;
}

.hero-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
  gap: 24px;
  align-items: end;
  min-height: 352px;
  padding: 36px;
  overflow: hidden;
  border: 1px solid rgba(19, 120, 63, 0.2);
  border-radius: 16px;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 250, 0.82) 52%, rgba(221, 248, 213, 0.74) 100%),
    url("data:image/svg+xml,%3Csvg width='1000' height='540' viewBox='0 0 1000 540' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1000' height='540' fill='%23f8fff3'/%3E%3Cg stroke='%2313783f' stroke-opacity='.22' stroke-width='4' fill='none'%3E%3Cpath d='M70 452h860M95 112h810M136 105v348M300 105v348M464 105v348M628 105v348M792 105v348M905 105v348'/%3E%3C/g%3E%3Cg fill='%23ffffff' stroke='%23122016' stroke-opacity='.24'%3E%3Crect x='122' y='140' width='116' height='54' rx='9'/%3E%3Crect x='286' y='140' width='116' height='54' rx='9'/%3E%3Crect x='450' y='140' width='116' height='54' rx='9'/%3E%3Crect x='614' y='140' width='116' height='54' rx='9'/%3E%3Crect x='778' y='140' width='116' height='54' rx='9'/%3E%3Crect x='122' y='252' width='116' height='54' rx='9'/%3E%3Crect x='286' y='252' width='116' height='54' rx='9'/%3E%3Crect x='450' y='252' width='116' height='54' rx='9'/%3E%3Crect x='614' y='252' width='116' height='54' rx='9'/%3E%3Crect x='778' y='252' width='116' height='54' rx='9'/%3E%3C/g%3E%3Cg fill='%23a7e85f' fill-opacity='.42'%3E%3Ccircle cx='155' cy='426' r='22'/%3E%3Ccircle cx='858' cy='96' r='28'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  box-shadow: var(--shadow);
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -130px;
  width: 330px;
  height: 330px;
  border: 38px solid rgba(167, 232, 95, 0.34);
  border-radius: 50%;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

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

h1 {
  position: relative;
  z-index: 1;
  max-width: 790px;
  margin-bottom: 16px;
  font-size: clamp(2.25rem, 5vw, 4.9rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy p:last-child {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin-bottom: 0;
  color: #344939;
  font-size: 1.08rem;
  font-weight: 500;
}

.hero-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.hero-metrics article {
  min-height: 118px;
  padding: 16px;
  border: 1px solid rgba(19, 120, 63, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 24px rgba(19, 120, 63, 0.1);
}

.hero-metrics span {
  display: block;
  color: var(--green);
  font-size: 2.35rem;
  font-weight: 900;
}

.hero-metrics small {
  color: var(--muted);
  font-weight: 800;
}

.workspace {
  padding: 22px 0 60px;
}

.control-panel,
.capture-panel,
.entry-panel,
.board {
  border: 1px solid rgba(19, 120, 63, 0.18);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.control-panel,
.capture-panel,
.entry-panel,
.board {
  padding: 18px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.field-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 6px;
  color: #596d58;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #c8dfc0;
  border-radius: var(--radius);
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

input:focus,
select:focus {
  outline: 4px solid rgba(167, 232, 95, 0.34);
  border-color: var(--green);
}

.progress-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.32fr);
  gap: 18px;
  align-items: center;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(19, 120, 63, 0.16);
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(229, 251, 219, 0.85), rgba(255, 255, 255, 0.7));
}

.progress-strip strong,
.progress-strip span {
  display: block;
}

.progress-strip strong {
  color: #0d6536;
  font-size: 1rem;
}

.progress-strip span {
  color: var(--muted);
  margin-top: 3px;
  font-size: 0.9rem;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(19, 120, 63, 0.13);
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lime), var(--green));
  transition: width 0.22s ease;
}

.audit-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  gap: 18px;
  margin-top: 18px;
}

.panel-header,
.board-header,
.item-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.panel-header h2,
.board-header h2 {
  margin-bottom: 0;
}

.status-pill,
.action-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  color: #07522b;
  background: linear-gradient(180deg, #e4ffd1, #c9f7b5);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.photo-drop {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 310px;
  margin: 18px 0 14px;
  overflow: hidden;
  border: 2px dashed #8bcf75;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.78), rgba(239,248,232,0.52)),
    repeating-linear-gradient(-45deg, #ffffff, #ffffff 12px, #eef9e8 12px, #eef9e8 24px);
}

.photo-drop input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.photo-drop img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.photo-drop.has-photo img {
  display: block;
}

.drop-copy {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  max-width: 320px;
  padding: 22px;
  text-align: center;
  border: 1px solid rgba(19, 120, 63, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(24, 91, 46, 0.12);
  pointer-events: none;
}

.camera-cue {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(19, 120, 63, 0.22);
  border-radius: 999px;
  background: linear-gradient(180deg, #ecffe2, #c9f7b5);
  box-shadow: 0 12px 26px rgba(19, 120, 63, 0.18);
}

.camera-cue svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: #0d6536;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.photo-drop.has-photo .drop-copy {
  opacity: 0;
}

.drop-copy strong {
  color: var(--green);
  font-size: 1.12rem;
}

.drop-copy span,
.truth-box p,
.item-meta,
.item-note,
.empty-state {
  color: var(--muted);
}

.truth-box {
  padding: 14px;
  border-left: 5px solid var(--green);
  background: linear-gradient(90deg, #e5fbdb, #f8fff4);
  border-radius: 0 10px 10px 0;
}

.truth-box h3,
.truth-box p {
  margin-bottom: 0;
}

.truth-box h3 {
  margin-bottom: 4px;
  color: #0d6536;
  font-size: 1rem;
}

.item-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.quick-dates {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.quick-dates button {
  min-height: 40px;
  padding: 0 6px;
  color: #0b4a28;
  background: linear-gradient(180deg, #ffffff, #ecffe2);
  font-weight: 900;
}

.board {
  margin-top: 18px;
}

.filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-tabs button {
  min-height: 36px;
  font-size: 0.85rem;
}

.filter-tabs button.active {
  color: white;
  border-color: var(--green);
  background: linear-gradient(180deg, #1ba85b, #13783f);
}

.empty-state {
  display: none;
  margin-top: 16px;
  padding: 18px;
  border: 1px dashed #9dcc8f;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
}

.empty-state.show {
  display: block;
}

.item-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.audit-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid #d3e6cb;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 22px rgba(24, 91, 46, 0.08);
}

.thumb {
  width: 96px;
  height: 74px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(19, 120, 63, 0.12), rgba(255, 226, 138, 0.26)),
    #eef7e8;
  background-size: cover;
  background-position: center;
  border: 1px solid #cfe1c7;
}

.item-title-row h3 {
  margin-bottom: 4px;
}

.item-meta,
.item-note {
  margin-bottom: 0;
  font-size: 0.92rem;
}

.item-note:empty {
  display: none;
}

.audit-item.pull .action-badge {
  color: white;
  background: linear-gradient(180deg, #df584f, var(--red));
}

.audit-item.markdown .action-badge {
  color: #402802;
  background: linear-gradient(180deg, #ffe58f, #f5b93d);
}

.audit-item.ok .action-badge {
  color: white;
  background: linear-gradient(180deg, #1ba85b, var(--green));
}

.audit-item.done {
  opacity: 0.58;
}

.audit-item.done h3 {
  text-decoration: line-through;
}

@media (max-width: 920px) {
  .hero-panel,
  .audit-grid {
    grid-template-columns: 1fr;
  }

  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .progress-strip {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    max-width: 560px;
  }
}

@media (max-width: 620px) {
  .app-shell,
  .workspace {
    width: min(100% - 18px, 1220px);
  }

  .topbar,
  .panel-header,
  .board-header {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    align-items: stretch;
  }

  .top-actions button {
    flex: 1;
  }

  .hero-panel {
    min-height: auto;
    padding: 22px;
  }

  .hero-metrics,
  .field-grid,
  .field-grid.two,
  .quick-dates {
    grid-template-columns: 1fr;
  }

  .audit-item {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .thumb {
    width: 76px;
    height: 70px;
  }

  .item-actions {
    grid-column: 1 / -1;
  }

  .item-actions button {
    flex: 1;
  }
}
