:root {
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #193b31;
  background: #f5f6f0;
  font-synthesis: none;
  --green: #24543e;
  --muted: #6c776c;
  --line: #dce2d8;
  --gold: #b88a37;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  background: var(--green);
  color: white;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 11px 17px;
  font-weight: 650;
  min-height: 43px;
}
button:hover {
  filter: brightness(0.94);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button.secondary {
  color: var(--green);
  background: white;
  border-color: var(--line);
}
button.subtle {
  background: transparent;
  color: var(--green);
}
button.danger {
  background: #a33b32;
}
button.small {
  font-size: 12px;
  padding: 7px 10px;
  min-height: 34px;
}
.icon {
  background: transparent;
  color: var(--green);
  padding: 6px 12px;
  font-size: 22px;
}
a {
  color: var(--green);
}
:focus-visible {
  outline: 3px solid #c68f2c;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 29px;
  font-weight: 650;
  letter-spacing: -0.8px;
  margin-bottom: 8px;
}
h2 {
  font-size: 22px;
}
h3 {
  font-size: 16px;
}
p {
  line-height: 1.5;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.shell {
  display: grid;
  grid-template-columns: 224px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #173c2f;
  color: #e7ede4;
  padding: 30px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  padding: 0 12px 30px;
  border-bottom: 1px solid #ffffff20;
  margin-bottom: 22px;
}
.brand strong {
  font-size: 27px;
  letter-spacing: 2px;
  display: block;
  font-family: Georgia, serif;
}
.brand span {
  font-size: 9px;
  letter-spacing: 2.1px;
  line-height: 2.5;
}
.brand .mark {
  width: 39px;
  height: 31px;
  border: 1px solid #d8bd77;
  border-radius: 50% 50% 35% 35%;
  display: grid;
  place-items: center;
  color: #d8bd77;
  margin-bottom: 17px;
  font-size: 22px;
}
.nav {
  display: grid;
  gap: 5px;
}
.nav button {
  text-align: left;
  background: transparent;
  color: #c6d5c9;
  font-weight: 500;
  font-size: 14px;
}
.nav button.active {
  background: #ffffff14;
  color: white;
  border-left: 3px solid #ceb37b;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 25px 10px 0;
  font-size: 12px;
  color: #b4c7b8;
}
.sidebar-bottom button {
  color: white;
}
.workspace {
  min-width: 0;
}
.topbar {
  background: #fffefa;
  border-bottom: 1px solid var(--line);
  height: 73px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  gap: 20px;
  font-size: 13px;
}
.topbar span {
  color: var(--muted);
}
main {
  padding: 31px 34px;
  max-width: 1800px;
  margin: auto;
}
.heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 26px;
}
.heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 25px;
}
.stat {
  background: #fffefa;
  border: 1px solid var(--line);
  padding: 18px 21px;
  border-radius: 9px;
}
.stat span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.stat strong {
  font-size: 28px;
  font-weight: 600;
}
.stat small {
  margin-left: 9px;
  color: var(--muted);
}
.panel {
  background: #fffefa;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 22px;
  overflow: hidden;
}
.panel-head {
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.panel-head h2,
.panel-head h3 {
  margin: 0;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.toolbar input[type="search"] {
  margin-left: auto;
  width: 230px;
}
.toolbar input[type="date"] {
  width: 155px;
}
input,
select,
textarea {
  background: white;
  border: 1px solid #cbd4c9;
  color: #223c31;
  border-radius: 6px;
  padding: 10px 11px;
  min-height: 43px;
  max-width: 100%;
  width: 100%;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
select[multiple] {
  min-height: 110px;
}
.board-scroll {
  overflow-x: auto;
}
.board {
  display: grid;
  grid-template-columns: 140px repeat(7, minmax(145px, 1fr));
  min-width: 1160px;
}
.day-head {
  padding: 16px 12px;
  background: #f8f9f4;
  text-align: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.day-head strong {
  display: block;
  color: #203e31;
  font-size: 18px;
  margin-top: 6px;
}
.scanner-head {
  padding: 20px 13px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.5;
}
.scanner-head small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.day-cell {
  min-height: 158px;
  padding: 7px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.today {
  background: #f0f5e9;
}
.visit {
  display: block;
  width: 100%;
  text-align: left;
  background: #edf3e9;
  border: 1px solid #d0dfc5;
  border-left: 3px solid #739658;
  color: #244329;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 7px;
  min-height: 100px;
  font-weight: 400;
}
.visit.draft {
  background: #f7f1e5;
  border-color: #e9d9b7;
  border-left-color: #c29745;
}
.visit.cancelled {
  opacity: 0.5;
}
.visit strong {
  font-size: 12px;
  display: block;
  margin: 6px 0;
}
.visit .time {
  font-size: 11px;
  font-weight: 700;
}
.visit small {
  display: block;
  font-size: 10px;
  line-height: 1.5;
}
.pill {
  display: inline-flex;
  border-radius: 4px;
  padding: 4px 7px;
  background: #eaf0e4;
  color: #3c6235;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}
.pill.warn {
  background: #fbefcf;
  color: #866020;
}
.pill.bad {
  background: #f9e6df;
  color: #923d2a;
}
.empty {
  padding: 34px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.empty strong {
  display: block;
  color: #274637;
  margin-bottom: 8px;
}
.attention {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.attention:last-child {
  border: 0;
}
.attention .detail {
  flex: 1;
}
.attention p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.dot {
  width: 9px;
  height: 9px;
  background: #c29546;
  border-radius: 50%;
  flex-shrink: 0;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th,
td {
  text-align: left;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-size: 11px;
  color: var(--muted);
  font-weight: 650;
  background: #f9faf5;
  letter-spacing: 0.6px;
}
td small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}
.notice {
  background: #f8f0dd;
  border: 1px solid #e2cd98;
  color: #75602e;
  padding: 14px 18px;
  border-radius: 7px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 20px;
}
.error {
  color: #a2352e;
  font-size: 13px;
  white-space: pre-line;
}
.success {
  color: #2e6947;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field {
  display: grid;
  gap: 7px;
  font-size: 12px;
  color: #46594a;
  margin-bottom: 16px;
}
.field.full {
  grid-column: 1/-1;
}
.field small {
  color: var(--muted);
}
.field.check {
  display: flex;
  align-items: center;
  font-size: 13px;
}
.field.check input {
  width: 18px;
  min-height: 18px;
}
.form-section {
  padding: 22px;
}
dialog {
  border: 0;
  border-radius: 12px;
  width: min(760px, calc(100% - 28px));
  max-height: 90vh;
  padding: 0;
  box-shadow: 0 20px 80px #142e3440;
  color: #193b31;
}
dialog::backdrop {
  background: #142e345c;
}
dialog form {
  padding: 25px;
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
  padding-bottom: 8px;
}
.modal-head h2 {
  margin-bottom: 12px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 15px;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #163d30;
  color: white;
  padding: 13px 22px;
  border-radius: 8px;
  z-index: 9;
  box-shadow: 0 3px 20px #0002;
  display: none;
  max-width: 90%;
  font-size: 14px;
}
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 25px;
  background:
    radial-gradient(ellipse at top left, #dce6d1, transparent 65%), #f3f4ea;
}
.login-card {
  max-width: 440px;
  width: 100%;
  padding: 42px;
  background: #fffefa;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.login-card .brand {
  color: #284d35;
  padding-left: 0;
}
.login-card a.button {
  display: block;
  padding: 13px;
  text-align: center;
  background: #24543e;
  color: white;
  text-decoration: none;
  border-radius: 6px;
}
.login-card input {
  margin-bottom: 12px;
}
.login-card button {
  width: 100%;
}
.agenda {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.agenda article {
  background: white;
  border: 1px solid var(--line);
  padding: 22px;
  border-radius: 9px;
}
.agenda h3 {
  margin: 14px 0 7px;
}
.agenda .actions {
  margin-top: 18px;
}
.farmer {
  max-width: 560px;
  margin: 30px auto;
  padding: 25px;
}
.farmer article {
  padding: 28px;
  background: #fffefa;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.farmer h1 {
  font-size: 27px;
}
.farmer .large {
  font-size: 23px;
  font-weight: 650;
}
.farmer button {
  width: 100%;
  margin: 7px 0;
  min-height: 52px;
}
.farmer textarea {
  margin-bottom: 12px;
}
.footnote {
  font-size: 12px;
  color: var(--muted);
  margin: 16px 0;
}
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.tabs button.active {
  background: #24543e;
  color: white;
}
.detail-list {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  font-size: 14px;
}
.detail-list dt {
  color: var(--muted);
}
.detail-list dd {
  margin: 0;
}
.print-only {
  display: none;
}
@media (max-width: 1050px) {
  .shell {
    grid-template-columns: 180px 1fr;
  }
  main {
    padding: 25px 20px;
  }
  .topbar {
    padding: 0 20px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .heading {
    align-items: flex-start;
  }
  .heading .actions {
    justify-content: flex-end;
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .sidebar {
    height: auto;
    position: static;
    padding: 14px 15px;
  }
  .brand {
    padding: 0;
    margin: 0;
    border: 0;
  }
  .brand .mark,
  .brand span,
  .sidebar-bottom {
    display: none;
  }
  .brand strong {
    font-size: 22px;
  }
  .nav {
    display: flex;
    overflow-x: auto;
    gap: 3px;
    margin-top: 14px;
  }
  .nav button {
    white-space: nowrap;
    font-size: 12px;
    padding: 9px 12px;
  }
  .nav button.active {
    border-left: 0;
    border-bottom: 2px solid #ceb37b;
  }
  .topbar {
    height: 52px;
    padding: 0 17px;
    font-size: 11px;
  }
  .topbar .muted {
    display: none;
  }
  main {
    padding: 23px 15px;
  }
  .heading {
    display: block;
    margin-bottom: 20px;
  }
  .heading .actions {
    justify-content: flex-start;
    margin-top: 18px;
  }
  h1 {
    font-size: 26px;
  }
  .stat {
    padding: 15px;
  }
  .stat strong {
    font-size: 25px;
  }
  .stats {
    gap: 9px;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
  .toolbar {
    padding: 12px;
    gap: 7px;
  }
  .toolbar input[type="search"] {
    width: 100%;
    margin-left: 0;
  }
  .attention {
    padding: 15px;
    gap: 10px;
  }
  .attention button {
    font-size: 12px;
  }
  .panel-head {
    padding: 15px;
  }
  .panel-head h2 {
    font-size: 18px;
  }
  .farmer {
    margin: 8px auto;
    padding: 12px;
  }
  .farmer article {
    padding: 24px;
  }
  .detail-list {
    grid-template-columns: 100px 1fr;
  }
  dialog form {
    padding: 20px;
  }
  td,
  th {
    padding: 12px;
  }
  .login-card {
    padding: 30px;
  }
}
@media print {
  .sidebar,
  .topbar,
  .heading .actions,
  .toolbar,
  button,
  .no-print {
    display: none !important;
  }
  .shell {
    display: block;
  }
  main {
    padding: 0;
  }
  .panel {
    border: 0;
  }
  .agenda {
    display: block;
  }
  .agenda article {
    break-inside: avoid;
    margin: 15px 0;
  }
  .print-only {
    display: block;
  }
  body {
    background: white;
  }
}
.toolbar select {
  width: 170px;
}
.demo-banner {
  background: #e7edda;
  border: 1px solid #b8c9a2;
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 26px;
  display: grid;
  gap: 14px;
}
.demo-banner strong {
  font-size: 11px;
  letter-spacing: 1.5px;
}
.demo-banner p {
  font-size: 13px;
  margin: 5px 0 0;
  max-width: 850px;
}
.demo-banner label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.demo-banner select {
  width: 180px;
}
.demo-link {
  padding: 10px 14px;
  font-weight: 650;
  font-size: 13px;
}
.demo-banner .actions {
  gap: 12px;
}
