:root {
  --green: #04764e;
  --green-deep: #035c3d;
  --mint: #ebf6f0;
  --cream: #f6dbb3;
  --ink: #161616;
  --muted: #8a8a8a;
  --line: #e9e9e9;
  --note: #656565;
  --danger: #9b2c2c;
  --danger-bg: #fff1f0;
  --shadow: 0 18px 50px rgba(4, 118, 78, 0.08);
  --font: "Noto Sans KR", "Poppins", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: #e7eee9;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}

button, input { font: inherit; }

a { color: var(--green); }

.screen {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  background: #fff;
  position: relative;
  box-shadow: var(--shadow);
}

.sheet { padding: 32px 30px 40px; }

.sheet-app { padding: 12px 24px 112px; }

.page-tabs {
  position: sticky;
  top: 64px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 8px;
  padding: 4px 0 12px;
  background: #fff;
}

.page-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 8px;
  border: 1px solid var(--green);
  border-radius: 30px;
  background: #fff;
  color: var(--green);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

a.page-tab { text-decoration: none; }

.page-tab.is-current {
  background: var(--green);
  color: #fff;
}

.wallet-count {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.wallet-card {
  margin-bottom: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(4, 118, 78, 0.08);
}

.wallet-top,
.wallet-facts div,
.sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.wallet-top { align-items: flex-start; margin-bottom: 14px; }

.wallet-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.wallet-tag-urgent { background: var(--danger-bg); color: var(--danger); }

.wallet-tag-wait { background: var(--cream); color: #313131; }

.wallet-tag-ok { background: var(--mint); color: var(--green); }

.wallet-due { margin: 0; text-align: right; }

.wallet-due strong {
  display: block;
  color: var(--danger);
  font-size: 20px;
  line-height: 1.2;
}

.wallet-due span { color: var(--muted); font-size: 12px; font-weight: 700; }

.wallet-card h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.wallet-type { margin: 4px 0 14px; color: var(--note); font-size: 13px; }

.wallet-facts {
  margin: 0 0 14px;
  padding: 4px 14px;
  border-radius: 18px;
  background: #fafafa;
}

.wallet-facts div { padding: 11px 0; border-bottom: 1px solid var(--line); }

.wallet-facts div:last-child { border-bottom: 0; }

.wallet-facts dt { color: var(--muted); font-size: 13px; }

.wallet-facts dd {
  max-width: 62%;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.wallet-brief {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--mint);
  color: var(--green-deep);
  font-size: 13px;
  font-weight: 600;
}

.wallet-card .btn { margin-bottom: 8px; }

.wallet-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.wallet-move {
  min-width: 72px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--green);
  border-radius: 50px;
  background: #fff;
  color: var(--green);
  font-weight: 700;
  cursor: pointer;
}

.wallet-move:disabled { opacity: 0.35; cursor: default; }

.wallet-dots { display: flex; align-items: center; gap: 6px; }

.wallet-dots i {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: #d5d5d5;
}

.wallet-dots i.is-current { width: 22px; background: var(--green); }

.wallet-empty,
.wallet-hint {
  margin: 14px 0 0;
  color: var(--note);
  font-size: 13px;
  text-align: center;
}

.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
}

.sheet-mask[hidden] { display: none; }

.sheet-panel {
  width: min(480px, 100%);
  padding: 22px 22px calc(22px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: #fff;
}

.sheet-head { align-items: flex-start; margin-bottom: 8px; }

.sheet-kicker {
  margin: 0;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.sheet-head h2 { margin: 4px 0 0; font-size: 20px; }

.sheet-close {
  border: 0;
  background: transparent;
  color: var(--note);
  font-weight: 700;
  cursor: pointer;
}

.sheet-label { margin: 0 0 10px; color: var(--note); font-size: 13px; }

.sheet-actions { display: grid; gap: 8px; margin-bottom: 16px; }

.sheet-actions .btn { min-height: 48px; }

.sheet-admin { padding: 12px 24px 40px; }

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 36px;
}

.logo-center {
  flex-direction: column;
  text-align: center;
  gap: 8px;
  margin-bottom: 28px;
}

.logo-name {
  display: block;
  font-family: "Noto Sans KR", Poppins, sans-serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 1.1;
  color: var(--green);
}

.logo-center .logo-name { font-size: 38px; }

.logo-tag {
  display: block;
  margin-top: 4px;
  color: var(--note);
  font-size: 14px;
}

.page-title {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.page-desc {
  margin: 0 0 28px;
  font-size: 14px;
  color: #222;
}

.step {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.back {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.field { display: block; margin-bottom: 22px; }

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

.field-wrap { position: relative; display: block; }

.field-input {
  width: 100%;
  height: 60px;
  padding: 0 36px 0 0;
  border: 0;
  border-bottom: 2px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  outline: none;
}

.field-input::placeholder { color: #8b8b8b; }

.field-input:focus { border-bottom-color: var(--green); }

textarea.field-input {
  height: auto;
  min-height: 96px;
  padding: 12px 0;
  resize: vertical;
}

.field-eye {
  position: absolute;
  right: 0;
  top: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  padding: 16px 22px;
  border: 0;
  border-radius: 50px;
  background: var(--green);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover { background: var(--green-deep); }

.btn:disabled { opacity: 0.55; cursor: default; }

.btn-cream {
  background: var(--cream);
  color: #313131;
}

.btn-cream:hover { background: #efcf9d; }

.btn-line {
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--line);
}

.btn-line:hover { background: var(--mint); }

.stack { display: grid; gap: 12px; }

.form-note {
  margin: 18px 0 0;
  color: var(--note);
  font-size: 14px;
  text-align: center;
}

.form-note a { font-weight: 700; }

.account-foot { margin-top: 48px; text-align: center; }

.account-foot p {
  margin: 0 0 12px;
  font-weight: 500;
  opacity: 0.45;
}

.alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--mint);
  color: var(--green);
  font-size: 14px;
}

.alert ul { margin: 0; padding-left: 18px; }

.alert-error { background: var(--danger-bg); color: var(--danger); }

.choice {
  display: block;
  width: 100%;
  margin-bottom: 14px;
  padding: 18px 20px;
  border: 2px solid var(--line);
  border-radius: 20px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.choice strong { display: block; margin-bottom: 4px; font-size: 16px; }

.choice span { color: var(--muted); font-size: 13px; }

.choice:hover, .choice:focus { border-color: var(--green); outline: none; }

.onboard {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 30px calc(28px + env(safe-area-inset-bottom));
}

.slides { flex: 1; display: grid; }

.slide { display: none; align-content: center; }

.slide.is-active { display: grid; gap: 18px; }

.art {
  height: 230px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: var(--mint);
}

.slide h2 {
  margin: 8px 0 0;
  font-size: 28px;
  line-height: 1.35;
  letter-spacing: -0.03em;
}

.slide p { margin: 0; color: var(--note); font-size: 14px; }

.dots { display: flex; justify-content: center; gap: 8px; margin: 18px 0; }

.dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: #d5d5d5;
  cursor: pointer;
}

.dots button.is-active { width: 22px; background: var(--green); }

.welcome-gate { padding-top: 72px; }

.js .welcome-gate { display: none; }

.js .screen.is-ready .onboard { display: none; }

.js .screen.is-ready .welcome-gate { display: block; }

.screen-app { min-height: 100vh; }

.topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 64px;
  padding: 0 12px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
}

.topbar strong { font-size: 18px; }

.topbar-gap { width: 42px; }

.icon-button, .drawer-nav button, .tabbar button, .drawer-logout button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--ink);
}

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 20;
}

.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 21;
  width: min(82vw, 320px);
  padding: 28px 22px;
  background: #fff;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
}

.screen.is-drawer .drawer { transform: translateX(max(0px, calc(50vw - 240px))); }

.drawer .logo { margin-bottom: 8px; }

.drawer-user { margin: 0 0 22px; font-weight: 700; }

.drawer-nav { display: grid; gap: 4px; }

.drawer-nav a, .drawer-nav button {
  padding: 12px 4px;
  border-radius: 12px;
  color: var(--ink);
  font-weight: 600;
  text-align: left;
  text-decoration: none;
}

.drawer-nav .is-current { color: var(--green); }

.drawer-logout { margin-top: 28px; }

.drawer-logout button { color: var(--note); font-weight: 700; padding: 0; }

.hello { margin: 8px 0 4px; font-size: 14px; color: var(--muted); }

.hello + h2 { margin: 0 0 18px; font-size: 28px; letter-spacing: -0.03em; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

a.stat { color: inherit; text-decoration: none; }

.stat {
  padding: 18px 16px;
  border-radius: 22px;
  background: var(--mint);
}

.stat span { display: block; color: var(--note); font-size: 13px; }

.stat strong { display: block; margin-top: 8px; font-size: 18px; }

.panel {
  margin-top: 16px;
  padding: 22px 18px;
  border-radius: 24px;
  background: #fafafa;
}

.panel h3 { margin: 0 0 6px; font-size: 18px; }

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

.tabbar-3 { grid-template-columns: repeat(3, 1fr); }

.tabbar {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(448px, calc(100% - 32px));
  height: 68px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.tabbar a, .tabbar button {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9a9a9a;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.tabbar .is-current { color: var(--green); }

.kv { margin: 0 0 22px; }

.kv div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 2px solid var(--line);
}

.kv dt { color: var(--muted); font-size: 14px; }

.kv dd { margin: 0; font-weight: 700; text-align: right; }

.check-list { margin: 0; padding: 0; list-style: none; }

.check-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 2px solid var(--line);
  font-size: 14px;
}

.check-list .ok { color: var(--green); font-weight: 700; }

.check-list .miss { color: var(--danger); font-weight: 700; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: min(420px, calc(100% - 32px));
  padding: 14px 16px;
  border-radius: 16px;
  background: #1d1d1d;
  color: #fff;
  text-align: center;
  z-index: 40;
}

.plant-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.plant-name {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.plant-name::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--green);
}

.plant-weather {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0 18px;
  color: var(--note);
  font-size: 12px;
  font-weight: 700;
}

.plant-weather span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.plant-weather em {
  color: var(--green);
  font-style: normal;
}

.plan-chip {
  flex: none;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--cream);
  color: #313131;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.count-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
  padding: 8px;
  border-radius: 22px;
  background: #f3f6f4;
}

.count-tabs button {
  border: 0;
  border-radius: 16px;
  background: transparent;
  padding: 10px 4px 8px;
  color: var(--muted);
  cursor: pointer;
}

.count-tabs button span,
.count-tabs button strong { display: block; }

.count-tabs button span { font-size: 13px; font-weight: 700; }

.count-tabs button strong { margin-top: 2px; font-size: 22px; }

.count-tabs button.is-current {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(22, 22, 22, 0.06);
}

.count-tabs button[data-tab="due"].is-current strong { color: var(--danger); }

.count-tabs button[data-tab="waiting"].is-current strong { color: #8a5a12; }

.view-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 18px 0 12px;
}

.view-head h3 { margin: 0; font-size: 15px; }

.view-head h3.is-due { color: var(--danger); }

.view-head h3.is-wait { color: #8a5a12; }

.view-actions { display: flex; gap: 6px; }

.text-chip,
.day-filter {
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.text-chip { cursor: pointer; }

.text-chip-fill {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.item-card {
  padding: 20px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(4, 118, 78, 0.08);
  cursor: pointer;
}

.item-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.cycle-chip,
.due-chip,
.wait-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.cycle-chip { background: #f4f4f4; color: #313131; }

.due-chip { background: var(--danger-bg); color: var(--danger); }

.wait-chip { background: var(--cream); color: #313131; }

.field-kicker {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.item-card h3 {
  margin: 2px 0 14px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.item-type { margin: 2px 0 14px; font-size: 15px; font-weight: 700; }

.test-box {
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--mint);
}

.test-box span {
  display: block;
  margin-bottom: 4px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.test-box p { margin: 0; font-size: 14px; font-weight: 700; }

.tap-hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.item-card .btn { margin-top: 14px; }

.card-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-top: 14px;
}

.card-last { margin: 0; }

.card-last span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.card-last strong { font-size: 14px; }

.card-remain {
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--green);
}

.card-remain.is-over { color: var(--danger); }

.product-row {
  margin-bottom: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.product-row-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.product-row .card-foot { margin-top: 10px; }

.product-row .card-remain { font-size: 22px; }

.product-row p { margin: 4px 0 0; color: var(--note); font-size: 12px; }

.product-row-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.row-actions { display: flex; gap: 8px; }

.row-edit,
.row-delete {
  border: 0;
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

.row-edit { color: var(--green); }

.row-delete { color: var(--danger); }

.row-delete.is-locked { opacity: 0.4; }

.staff-count {
  margin: 0 0 16px;
  color: var(--green);
  font-weight: 700;
}

.staff-card {
  margin-bottom: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
}

a.staff-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.certificate-frame {
  display: block;
  width: 100%;
  min-height: 70vh;
  margin: 12px 0 16px;
  border: 0;
  border-radius: 16px;
  background: var(--mint);
}

.certificate-shot {
  display: block;
  width: 100%;
  height: auto;
  margin: 12px 0 16px;
  border-radius: 16px;
}

.staff-card p { margin: 4px 0 0; color: var(--note); font-size: 13px; }

.staff-card .row-actions { margin-top: 10px; align-items: center; }

.staff-card form { margin: 0; }

.row-edit { text-decoration: none; }

.scan-box {
  margin-bottom: 8px;
  padding: 14px;
  border-radius: 18px;
  background: var(--mint);
}

.scan-box p { margin: 0 0 10px; color: var(--green-deep); font-size: 13px; }

.scan-status { margin: 10px 0 0; color: var(--green); font-size: 12px; font-weight: 700; }

.sheet-panel-tall { max-height: 92vh; overflow: auto; }

@media (min-width: 900px) {
  body { padding: 28px 0; }
  .screen { min-height: calc(100vh - 56px); border-radius: 28px; }
}
