:root {
  --ink: #17211c;
  --muted: #65736d;
  --subtle: #96a29c;
  --line: #dfe8e2;
  --line-strong: #c7d5cd;
  --page: #f5f7f5;
  --surface: #ffffff;
  --surface-soft: #f8fbf9;
  --green-900: #06351f;
  --green-800: #073d28;
  --green-700: #0f7c46;
  --green-600: #168354;
  --green-500: #16a34a;
  --green-100: #e8f5ee;
  --amber: #d98b22;
  --amber-soft: #fff4df;
  --blue: #2d73c8;
  --blue-soft: #e9f2ff;
  --red: #d74735;
  --red-soft: #fff0ed;
  --shadow: 0 12px 30px rgba(23, 33, 28, 0.07);
  --radius: 8px;
  --nav-w: 224px;
  --top-h: 60px;
  color: var(--ink);
  background: var(--page);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC",
    "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}

* {
  box-sizing: border-box;
}

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

body {
  background:
    linear-gradient(180deg, #f9fbfa 0, #f5f8f6 260px, var(--page) 100%),
    var(--page);
  font-size: 14px;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.locked {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.print-root {
  display: none;
}

svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 120;
  overflow: auto;
  color: #17221d;
  background:
    radial-gradient(circle at 50% 0%, rgba(22, 163, 74, 0.1), transparent 360px),
    linear-gradient(180deg, #f8fbf9 0%, #f1f7f3 48%, #ffffff 100%);
}

.login-screen[hidden] {
  display: none;
}

.login-screen:not([hidden]) ~ .app-shell {
  display: none;
}

.login-sky,
.login-orchard,
.login-branch,
.login-ground {
  position: absolute;
  pointer-events: none;
}

.login-sky {
  top: 0;
  left: 0;
  right: 0;
  height: 48vh;
  min-height: 360px;
  opacity: 0.42;
  background:
    radial-gradient(circle at 52% 24%, rgba(255, 255, 255, 0.96) 0 34px, transparent 108px),
    radial-gradient(circle at 62% 22%, rgba(255, 255, 255, 0.88) 0 28px, transparent 96px),
    radial-gradient(circle at 36% 28%, rgba(255, 255, 255, 0.82) 0 20px, transparent 82px),
    radial-gradient(circle at 8% 10%, rgba(255, 244, 169, 0.78), rgba(255, 255, 255, 0) 200px);
}

.login-orchard {
  top: 250px;
  left: 0;
  right: 0;
  height: 270px;
  opacity: 0.35;
}

.login-mountain,
.login-hill {
  position: absolute;
  display: block;
}

.login-mountain {
  bottom: 92px;
  width: 560px;
  height: 210px;
  border-radius: 52% 48% 0 0;
  background: linear-gradient(180deg, rgba(164, 205, 198, 0.42), rgba(255, 255, 255, 0));
}

.mountain-left {
  left: -120px;
  transform: skewX(-18deg);
}

.mountain-right {
  right: -160px;
  height: 245px;
  background: linear-gradient(180deg, rgba(112, 178, 164, 0.28), rgba(255, 255, 255, 0));
  transform: skewX(16deg);
}

.login-hill {
  bottom: 0;
  width: 720px;
  height: 180px;
  border-radius: 55% 45% 0 0;
}

.hill-left {
  left: -170px;
  background: linear-gradient(180deg, rgba(113, 183, 92, 0.36), rgba(236, 248, 225, 0.2));
}

.hill-right {
  right: -140px;
  background: linear-gradient(180deg, rgba(92, 168, 85, 0.28), rgba(244, 251, 236, 0.2));
}

.login-trees {
  position: absolute;
  left: 9%;
  right: 9%;
  bottom: 58px;
  height: 36px;
  opacity: 0.68;
  background:
    radial-gradient(circle at 5% 35%, #62b65d 0 17px, transparent 18px),
    radial-gradient(circle at 17% 55%, #6cc05f 0 18px, transparent 19px),
    radial-gradient(circle at 29% 42%, #5ead58 0 17px, transparent 18px),
    radial-gradient(circle at 41% 60%, #6ebf61 0 18px, transparent 19px),
    radial-gradient(circle at 53% 38%, #62b65d 0 17px, transparent 18px),
    radial-gradient(circle at 65% 54%, #6cc05f 0 18px, transparent 19px),
    radial-gradient(circle at 77% 42%, #5ead58 0 17px, transparent 18px),
    radial-gradient(circle at 89% 55%, #6ebf61 0 18px, transparent 19px);
}

.login-branch {
  z-index: 1;
  opacity: 0.48;
}

.branch-top-left {
  top: -16px;
  left: -6px;
  width: 230px;
  height: 168px;
}

.branch-top-right {
  top: 18px;
  right: -4px;
  width: 240px;
  height: 330px;
}

.leaf {
  position: absolute;
  width: 74px;
  height: 32px;
  border-radius: 74px 0 74px 0;
  background: linear-gradient(135deg, #9bd047, #379431);
  box-shadow: 0 7px 18px rgba(27, 114, 35, 0.14);
}

.branch-top-left .leaf-a {
  top: 15px;
  left: 18px;
  transform: rotate(18deg);
}

.branch-top-left .leaf-b {
  top: 50px;
  left: 76px;
  transform: rotate(-28deg);
}

.branch-top-left .leaf-c {
  top: 0;
  left: 130px;
  transform: rotate(42deg);
}

.branch-top-right .leaf-a {
  top: 22px;
  right: 104px;
  transform: rotate(-34deg);
}

.branch-top-right .leaf-b {
  top: 74px;
  right: 45px;
  transform: rotate(28deg);
}

.branch-top-right .leaf-c {
  top: 140px;
  right: 116px;
  transform: rotate(-12deg);
}

.fruit {
  position: absolute;
  width: 40px;
  height: 50px;
  border-radius: 50% 50% 48% 48%;
  background: linear-gradient(160deg, #ffcf50 10%, #f59a24 76%);
  box-shadow: inset -6px -8px 0 rgba(173, 112, 20, 0.16), 0 8px 18px rgba(131, 90, 20, 0.18);
}

.branch-top-left .fruit-a {
  left: 0;
  top: 96px;
}

.branch-top-right .fruit-a {
  right: 24px;
  top: 116px;
}

.branch-top-right .fruit-b {
  right: 72px;
  top: 184px;
}

.branch-top-right .fruit-c {
  right: 18px;
  top: 242px;
}

.login-content {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  min-height: 100%;
  padding: 128px 28px 196px;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-bottom: 88px;
  text-align: left;
}

.login-logo {
  position: relative;
  width: 86px;
  height: 86px;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(160deg, #43bf3d 0%, #087a35 100%);
  box-shadow: 0 16px 34px rgba(12, 101, 47, 0.2);
}

.login-logo .logo-crown {
  position: absolute;
  top: 18px;
  left: 26px;
  width: 36px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  box-shadow: -17px 6px 0 #fff, 17px 7px 0 #fff, 0 -8px 0 #fff;
}

.login-logo .logo-trunk {
  position: absolute;
  top: 49px;
  left: 42px;
  width: 7px;
  height: 23px;
  border-radius: 999px;
  background: #fff;
}

.login-logo .logo-row {
  position: absolute;
  left: -8px;
  right: -8px;
  height: 10px;
  border: 4px solid #fff;
  border-top: 0;
  border-radius: 0 0 50% 50%;
}

.login-logo .row-one {
  bottom: 24px;
}

.login-logo .row-two {
  bottom: 12px;
}

.login-logo .row-three {
  bottom: 0;
}

.login-brand h1 {
  margin: 0;
  color: #086333;
  font-size: 62px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.72);
}

.login-brand p {
  margin: 16px 0 0;
  color: #44524c;
  font-size: 22px;
  letter-spacing: 0;
}

.login-card {
  width: min(640px, calc(100vw - 40px));
  padding: 42px 40px 36px;
  border-radius: 8px;
  border: 1px solid rgba(200, 216, 207, 0.88);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 54px rgba(23, 33, 28, 0.12);
  backdrop-filter: blur(12px);
}

.auth-form {
  display: grid;
  gap: 20px;
}

.auth-form[hidden] {
  display: none;
}

.auth-register-form {
  gap: 16px;
}

.auth-register-note {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid rgba(217, 139, 34, 0.22);
  border-radius: 8px;
  color: #9b5b0f;
  background: linear-gradient(135deg, #fff6e6, rgba(255, 255, 255, 0.9));
}

.auth-register-note strong {
  font-size: 16px;
  line-height: 1.3;
}

.auth-register-note span {
  color: #7c766c;
  font-size: 13px;
  line-height: 1.45;
}

.login-screen[data-mode="register"] .login-card {
  width: min(680px, calc(100vw - 40px));
}

.login-screen[data-mode="register"] .login-brand {
  margin-bottom: 54px;
}

.auth-field {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 62px;
  padding: 0 22px;
  border: 1px solid rgba(183, 190, 188, 0.52);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.auth-field:focus-within {
  border-color: rgba(17, 131, 57, 0.48);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(32, 161, 102, 0.12);
}

.auth-field input,
.auth-field select {
  flex: 1;
  width: 100%;
  height: 60px;
  padding: 0;
  border: 0;
  outline: 0;
  color: #15251c;
  background: transparent;
  font-size: 20px;
  font-weight: 500;
}

.auth-field input:focus,
.auth-field select:focus {
  border-color: transparent;
  box-shadow: none;
}

.auth-field input::placeholder {
  color: #9a9f9c;
  font-weight: 400;
}

.auth-field select {
  appearance: none;
}

.auth-icon {
  position: relative;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  color: #118339;
}

.phone-icon {
  border: 0;
  border-radius: 0;
}

.phone-icon::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 5px;
  width: 17px;
  height: 29px;
  border: 3px solid currentColor;
  border-radius: 6px;
}

.phone-icon::after {
  content: "";
  position: absolute;
  left: 20px;
  bottom: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.lock-icon {
  border: 0;
  border-radius: 0;
}

.lock-icon::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 15px;
  width: 25px;
  height: 20px;
  border: 3px solid currentColor;
  border-radius: 5px;
}

.lock-icon::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 5px;
  width: 15px;
  height: 18px;
  border: 3px solid currentColor;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
}

.user-icon::before,
.user-icon::after {
  content: "";
  position: absolute;
  background: #118339;
}

.user-icon::before {
  left: 13px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.user-icon::after {
  left: 7px;
  bottom: 7px;
  width: 28px;
  height: 18px;
  border-radius: 16px 16px 5px 5px;
}

.password-field {
  position: relative;
  display: block;
  flex: 1;
  min-width: 0;
}

.password-field input {
  width: 100%;
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 2px;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #8d9490;
  background: transparent;
  transform: translateY(-50%);
}

.password-toggle:hover {
  color: var(--green-700);
  background: rgba(232, 245, 238, 0.72);
}

.password-toggle svg {
  width: 19px;
  height: 19px;
}

.login-submit {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 68px;
  margin-top: 6px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #168354 0%, #0f7c46 100%);
  box-shadow: 0 14px 26px rgba(15, 124, 70, 0.22);
  font-size: 28px;
  font-weight: 850;
}

.login-submit:hover {
  filter: brightness(1.02);
}

.login-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 2px;
  color: #303b35;
}

.plain-auth-btn {
  padding: 0;
  border: 0;
  color: #303b35;
  background: transparent;
  font-size: 16px;
}

.plain-auth-btn:hover,
.plain-auth-btn.accent {
  color: #087a35;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin: 32px 0 24px;
  color: #777f7b;
  font-size: 15px;
  font-style: normal;
}

.auth-divider span {
  height: 1px;
  background: #dfe4e2;
}

.auth-divider em {
  font-style: normal;
}

.auth-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.quick-auth {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  color: #313d36;
  background: transparent;
  font-size: 16px;
}

.quick-auth[hidden] {
  display: none;
}

.quick-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: linear-gradient(180deg, #e7f8df, #f4fbef);
}

.quick-icon::before,
.quick-icon::after {
  content: "";
  position: absolute;
  background: #118339;
}

.register-icon::before {
  width: 34px;
  height: 26px;
  border-radius: 8px;
}

.register-icon::after {
  width: 4px;
  height: 30px;
  border-radius: 999px;
  box-shadow: 0 0 0 0 #118339;
}

.login-icon::before {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.login-icon::after {
  width: 18px;
  height: 18px;
  right: 22px;
  bottom: 20px;
  border: 4px solid #f4fbef;
  border-radius: 50%;
}

.auth-message {
  margin-bottom: 18px;
  padding: 11px 13px;
  border: 1px solid rgba(215, 71, 53, 0.2);
  border-radius: 10px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 14px;
  line-height: 1.45;
}

.auth-message.info {
  border-color: rgba(45, 115, 200, 0.22);
  color: #1d65b7;
  background: var(--blue-soft);
}

.form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.auth-message[hidden] {
  display: none;
}

.login-slogan {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 70px 0 0;
  color: #086333;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
}

.login-slogan::before,
.login-slogan::after {
  content: "";
  width: 20px;
  height: 12px;
  margin: 0 20px;
  border-radius: 20px 0 20px 0;
  background: #57b945;
}

.login-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 180px;
  opacity: 0.5;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(214, 239, 158, 0.78) 0 30%, transparent 31%),
    linear-gradient(180deg, transparent 0%, rgba(238, 248, 214, 0.8) 38%, rgba(213, 239, 149, 0.72) 100%);
}

.ground-tree {
  position: absolute;
  left: 18px;
  bottom: 14px;
  width: 150px;
  height: 150px;
}

.ground-tree::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 0;
  width: 112px;
  height: 106px;
  border-radius: 50%;
  background: radial-gradient(circle at 42% 38%, #71bf3e 0 22%, #2e9139 70%);
  box-shadow: 20px 28px 0 -10px #4da83c, -18px 46px 0 -18px #6dbd3f;
}

.ground-tree::after {
  content: "";
  position: absolute;
  left: 58px;
  bottom: 0;
  width: 22px;
  height: 66px;
  border-radius: 12px 12px 4px 4px;
  background: #9b6a31;
}

.fruit-basket {
  position: absolute;
  left: 178px;
  bottom: 32px;
  width: 108px;
  height: 44px;
  border-radius: 12px 12px 24px 24px;
  background: repeating-linear-gradient(90deg, #bd7d28 0 10px, #d7973b 10px 20px);
  box-shadow: 16px -24px 0 -8px #f4c248, 42px -32px 0 -10px #f08d29, 66px -26px 0 -8px #7abf3a;
}

.watering-can {
  position: absolute;
  right: 150px;
  bottom: 34px;
  width: 96px;
  height: 58px;
  border-radius: 16px 16px 12px 12px;
  background: #65b86b;
  transform: rotate(-3deg);
}

.watering-can::before {
  content: "";
  position: absolute;
  right: -42px;
  top: 12px;
  width: 52px;
  height: 14px;
  border-radius: 999px;
  background: #65b86b;
  transform: rotate(-20deg);
}

.watering-can::after {
  content: "";
  position: absolute;
  left: 18px;
  top: -38px;
  width: 44px;
  height: 40px;
  border: 8px solid #65b86b;
  border-bottom: 0;
  border-radius: 44px 44px 0 0;
}

.wood-sign {
  position: absolute;
  right: 38px;
  bottom: 74px;
  display: grid;
  place-items: center;
  width: 126px;
  height: 78px;
  border: 5px solid #b77c34;
  border-radius: 8px;
  color: #6f491e;
  background: #f7d99d;
  font-size: 17px;
  font-weight: 800;
  transform: rotate(2deg);
}

.wood-sign::after {
  content: "";
  position: absolute;
  left: 56px;
  bottom: -52px;
  width: 10px;
  height: 52px;
  background: #9b6a31;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--nav-w) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 18px 14px;
  color: #edf8f1;
  background:
    linear-gradient(180deg, rgba(22, 131, 84, 0.12), transparent 220px),
    #073d28;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  padding: 2px 4px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(214, 255, 226, 0.2);
  border-radius: 8px;
  color: #baf3c1;
  background: rgba(255, 255, 255, 0.08);
}

.brand-mark svg {
  width: 24px;
  height: 24px;
}

.brand strong {
  display: block;
  font-size: 16px;
  line-height: 1.25;
  white-space: nowrap;
}

.brand span {
  display: block;
  margin-top: 4px;
  color: rgba(237, 248, 241, 0.64);
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 5px;
}

.nav button {
  display: flex;
  position: relative;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(237, 248, 241, 0.76);
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 650;
}

.nav button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
}

.nav button.active {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.12);
  background: #0f7c46;
  box-shadow: inset 3px 0 0 rgba(186, 243, 193, 0.72);
}

.nav svg {
  width: 19px;
  height: 19px;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  padding: 0 6px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--red);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

.collapse-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 9px 11px;
  border: 0;
  color: rgba(237, 248, 241, 0.68);
  background: transparent;
  text-align: left;
}

.collapse-btn span {
  font-size: 21px;
  line-height: 1;
}

.main {
  min-width: 0;
}

.grid-main > *,
.report-grid > *,
.stack,
.panel,
.panel-body,
.table-wrap {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--top-h);
  padding: 0 24px;
  border-bottom: 1px solid rgba(211, 224, 217, 0.92);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(23, 33, 28, 0.02);
}

.icon-btn.menu-toggle {
  display: none;
}

.selector-row,
.topbar-actions,
.actions,
.toolbar-left,
.toolbar-right,
.pages {
  display: flex;
  align-items: center;
}

.selector-row {
  gap: 14px;
}

.selector-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: -8px;
}

.selector-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.topbar-actions {
  gap: 14px;
  margin-left: auto;
  color: var(--muted);
}

.date,
.account {
  white-space: nowrap;
}

.app-version {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--green-700);
  background: var(--green-100);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.account {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 650;
}

.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #ffffff;
  background: #48564f;
  font-size: 13px;
}

select,
input,
textarea {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

select {
  min-height: 34px;
  padding: 0 30px 0 11px;
}

input {
  min-height: 34px;
  padding: 0 11px;
}

textarea {
  min-height: 82px;
  padding: 10px 11px;
  resize: vertical;
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(32, 161, 102, 0.14);
}

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #ffffff;
}

.icon-btn:hover {
  color: var(--green-700);
  border-color: rgba(13, 103, 64, 0.32);
  background: var(--surface-soft);
}

.icon-btn.danger {
  color: var(--red);
}

.icon-btn.danger:hover {
  border-color: rgba(215, 71, 53, 0.32);
  color: #a92618;
  background: var(--red-soft);
}

.notification span {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--red);
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  pointer-events: none;
}

.page {
  padding: 20px 24px 30px;
}

.page-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.page-title-row h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 850;
  line-height: 1.25;
}

.page-title-row p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.actions {
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font-size: 13px;
  font-weight: 650;
}

.btn:hover {
  border-color: rgba(13, 103, 64, 0.34);
  color: var(--green-700);
  background: var(--surface-soft);
}

.btn.primary {
  border-color: #0f7c46;
  color: #ffffff;
  background: #0f7c46;
  box-shadow: 0 8px 18px rgba(15, 124, 70, 0.16);
}

.btn.primary:hover {
  color: #ffffff;
  background: #0b6f3d;
}

.btn.danger {
  border-color: rgba(215, 71, 53, 0.2);
  color: var(--red);
  background: var(--red-soft);
}

.btn.danger:hover {
  border-color: rgba(215, 71, 53, 0.36);
  color: #a92618;
  background: #ffe6e1;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  color: var(--muted);
  border-color: var(--line);
  background: #f7faf7;
}

.btn.warning {
  border-color: #e2af64;
  color: #9b5b0f;
  background: #fff8eb;
}

.btn.ghost {
  border-color: transparent;
  color: var(--green-700);
  background: transparent;
}

.btn.danger.ghost {
  border-color: rgba(215, 71, 53, 0.18);
  color: var(--red);
  background: transparent;
}

.btn.danger.ghost:hover {
  border-color: rgba(215, 71, 53, 0.34);
  color: #a92618;
  background: var(--red-soft);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(144px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.kpi-card {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  min-height: 98px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(23, 33, 28, 0.045);
}

.kpi-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: var(--green-700);
  background: var(--green-100);
}

.kpi-icon svg {
  width: 20px;
  height: 20px;
}

.kpi-card.warn .kpi-icon {
  color: var(--amber);
  background: var(--amber-soft);
}

.kpi-card.blue .kpi-icon {
  color: var(--blue);
  background: var(--blue-soft);
}

.kpi-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.kpi-card strong {
  display: block;
  margin-top: 4px;
  font-size: 25px;
  line-height: 1.1;
}

.kpi-card strong span {
  margin-left: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.kpi-card small {
  display: block;
  margin-top: 8px;
  color: var(--green-700);
  font-size: 12px;
}

.grid-main {
  display: grid;
  grid-template-columns: minmax(620px, 1.45fr) minmax(340px, 0.72fr);
  gap: 16px;
}

.stack {
  display: grid;
  gap: 16px;
  align-content: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(23, 33, 28, 0.04);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 249, 0.88));
}

.panel-head h2,
.panel-head h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
}

.panel-head .muted {
  color: var(--muted);
  font-size: 13px;
}

.panel-body {
  padding: 14px 16px 16px;
}

.approval-reminder {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.approval-stat {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(23, 33, 28, 0.035);
}

.approval-stat span,
.approval-stat small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.approval-stat strong {
  display: block;
  margin: 8px 0 6px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.approval-stat.urgent {
  border-color: rgba(217, 139, 34, 0.28);
  background: linear-gradient(135deg, #fff9ee, #ffffff);
}

.approval-stat.urgent strong {
  color: #a65f0e;
}

.approval-stat.notice {
  border-color: rgba(13, 103, 64, 0.18);
  background: linear-gradient(135deg, #f0faf4, #ffffff);
}

.approval-list {
  display: grid;
  gap: 10px;
}

.approval-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(217, 139, 34, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 244, 223, 0.72), rgba(255, 255, 255, 0.96)),
    var(--surface);
}

.approval-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--green-600), var(--green-800));
  font-size: 18px;
  font-weight: 850;
}

.approval-main {
  min-width: 0;
}

.approval-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.approval-card-head strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.approval-main small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.approval-main p {
  margin: 7px 0 0;
  color: var(--green-800);
  font-size: 13px;
  line-height: 1.45;
}

.approval-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.plot-meta {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 10px;
  padding: 14px 16px;
}

.meta-item {
  min-width: 0;
}

.meta-item span,
.caption {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.meta-item strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.toolbar-left,
.toolbar-right {
  flex-wrap: wrap;
  gap: 8px;
}

.search {
  position: relative;
}

.search input {
  width: 228px;
  padding-right: 36px;
}

.search svg {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 16px;
  height: 16px;
  color: var(--subtle);
  transform: translateY(-50%);
}

.bulk-delete-progress {
  display: grid;
  gap: 8px;
  margin: -2px 0 12px;
  padding: 12px 14px;
  border: 1px solid #b8d6c4;
  border-radius: 8px;
  background: linear-gradient(180deg, #f3fbf6 0%, #ffffff 100%);
}

.bulk-delete-progress[data-status="error"] {
  border-color: rgba(215, 71, 53, 0.28);
  background: linear-gradient(180deg, #fff7f5 0%, #ffffff 100%);
}

.bulk-delete-progress-head,
.bulk-delete-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bulk-delete-progress-head strong {
  color: var(--green-800);
  font-size: 14px;
}

.bulk-delete-progress[data-status="error"] .bulk-delete-progress-head strong {
  color: var(--red);
}

.bulk-delete-progress-head span,
.bulk-delete-progress-meta {
  color: var(--muted);
  font-size: 12px;
}

.bulk-delete-progress-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6eee9;
}

.bulk-delete-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-600), var(--blue));
  transition: width 0.18s ease;
}

.bulk-delete-progress[data-status="error"] .bulk-delete-progress-track span {
  background: var(--red);
}

.tree-archive {
  display: grid;
  gap: 12px;
}

.archive-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
}

.archive-summary div {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(23, 33, 28, 0.035);
}

.archive-summary span,
.tree-detail-kicker,
.tree-detail-stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.archive-summary strong {
  display: block;
  margin-top: 6px;
  color: var(--green-800);
  font-size: 21px;
  line-height: 1.1;
}

.tree-archive-panel .panel-head {
  min-height: 58px;
}

.tree-archive-panel table {
  min-width: 980px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-wrap.compact table {
  min-width: 680px;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #ffffff;
}

thead th {
  height: 40px;
  padding: 0 11px;
  border-bottom: 1px solid var(--line);
  color: #435149;
  background: #f7faf8;
  font-size: 12px;
  font-weight: 750;
  text-align: left;
  white-space: nowrap;
}

tbody td {
  height: 50px;
  padding: 7px 11px;
  border-bottom: 1px solid var(--line);
  color: #26342e;
  font-size: 13px;
  vertical-align: middle;
}

tbody tr {
  transition: background 0.15s ease;
}

tbody tr:hover {
  background: #f6fbf8;
}

tbody tr.sub-row td {
  height: auto;
  padding-top: 0;
  color: var(--muted);
  background: #fbfdfb;
  font-size: 12px;
}

tbody tr.selected {
  background: #eaf6ef;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.tree-code {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
}

.work-line {
  display: block;
  white-space: nowrap;
}

.check {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: #ffffff;
  background: #ffffff;
}

.check.checked {
  border-color: var(--green-500);
  background: var(--green-500);
}

.check.checked::after {
  content: "✓";
  font-size: 12px;
  line-height: 1;
}

.select-cell {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
}

.select-cell input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--green-600);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-500);
}

.dot.warn {
  background: var(--amber);
}

.dot.danger {
  background: var(--red);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--green-700);
  background: var(--green-100);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.tag.warn {
  color: #9b5b0f;
  background: var(--amber-soft);
}

.tag.blue {
  color: #1d65b7;
  background: var(--blue-soft);
}

.tag.red {
  color: var(--red);
  background: var(--red-soft);
}

.link-btn {
  border: 0;
  color: var(--green-700);
  background: transparent;
  font-weight: 700;
}

.link-btn:hover {
  color: var(--green-900);
  text-decoration: underline;
}

.link-btn.accent {
  color: #1d65b7;
}

.link-btn.accent:hover {
  color: #174f91;
}

.link-btn.danger {
  color: var(--red);
}

.link-btn.danger:hover {
  color: #a92618;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.pages {
  gap: 5px;
}

.page-btn {
  min-width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #ffffff;
}

.page-btn:not(:disabled):hover {
  border-color: var(--green-500);
  color: var(--green-700);
}

.page-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  background: #f7faf7;
}

.page-btn.active {
  border-color: var(--green-700);
  color: #ffffff;
  background: var(--green-700);
}

.tree-card {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 16px;
  padding: 16px;
}

.tree-card h2 {
  margin: 0 0 12px;
  color: var(--green-800);
  font-size: 19px;
  line-height: 1.25;
}

.tree-photo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 142px;
  overflow: hidden;
  border-radius: var(--radius);
  color: var(--green-700);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 70% 20%, rgba(217, 139, 34, 0.16), transparent 70px),
    linear-gradient(145deg, var(--green-100), #f8fbf9);
}

.tree-photo img,
.tree-photo-large img,
.tree-form-photo img,
.tree-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tree-photo.has-image,
.tree-form-photo.has-image,
.tree-thumb.has-image {
  background: #ffffff;
}

.tree-photo-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 58px;
  border-radius: 18px;
  color: #0f7c46;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 0 0 1px rgba(15, 124, 70, 0.1);
}

.tree-photo-empty-frame {
  position: relative;
  width: 42px;
  height: 32px;
  border: 2px solid currentColor;
  border-radius: 10px;
}

.tree-photo-empty-frame::before {
  content: "";
  position: absolute;
  left: 7px;
  top: -8px;
  width: 16px;
  height: 8px;
  border-radius: 7px 7px 0 0;
  background: currentColor;
  opacity: 0.28;
}

.tree-photo-empty-sun {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #d98b22;
}

.tree-photo-empty-leaf {
  position: absolute;
  left: 10px;
  bottom: 5px;
  width: 17px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 14px 14px 14px 3px;
  background: rgba(255, 255, 255, 0.5);
  transform: rotate(-24deg);
}

.tree-identity-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 170px;
}

.tree-identity-cell > div:last-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.tree-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green-700);
  background: var(--green-100);
}

.tree-thumb .tree-photo-empty {
  width: 30px;
  height: 28px;
  border-radius: 9px;
}

.tree-thumb .tree-photo-empty-frame {
  width: 22px;
  height: 17px;
  border-width: 1.5px;
  border-radius: 6px;
}

.tree-thumb .tree-photo-empty-frame::before {
  left: 4px;
  top: -5px;
  width: 9px;
  height: 5px;
}

.tree-thumb .tree-photo-empty-sun {
  top: 4px;
  right: 4px;
  width: 4px;
  height: 4px;
}

.tree-thumb .tree-photo-empty-leaf {
  left: 5px;
  bottom: 3px;
  width: 9px;
  height: 6px;
  border-width: 1.5px;
}

.tree-form-identity {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.tree-form-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 112px;
  min-height: 112px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green-700);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0)),
    var(--green-100);
}

.tree-form-identity-fields {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.tree-photo-upload input {
  min-height: auto;
  padding: 8px 0 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
}

.tree-photo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.tree-photo-actions .tree-photo-upload {
  flex: 1 1 220px;
  min-width: 190px;
}

.tree-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 260px minmax(210px, 0.65fr);
  gap: 22px;
  align-items: stretch;
  padding: 20px;
}

.tree-detail-copy {
  min-width: 0;
}

.tree-detail-kicker {
  margin-bottom: 8px;
  font-weight: 700;
}

.tree-detail-copy h2 {
  margin: 0;
  color: var(--green-800);
  font-size: 32px;
  line-height: 1.1;
}

.tree-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 18px;
}

.tree-photo-large {
  min-height: 270px;
}

.tree-photo-large .tree-photo-empty {
  width: 88px;
  height: 80px;
  border-radius: 24px;
}

.tree-photo-large .tree-photo-empty-frame {
  width: 58px;
  height: 44px;
  border-radius: 13px;
}

.tree-photo-large .tree-photo-empty-sun {
  width: 10px;
  height: 10px;
}

.tree-photo-large .tree-photo-empty-leaf {
  width: 24px;
  height: 17px;
}

.detail-list-wide {
  gap: 10px;
}

.detail-list-wide .detail-row {
  grid-template-columns: 82px minmax(0, 1fr);
}

.tree-detail-stats {
  display: grid;
  gap: 10px;
  align-content: start;
}

.tree-detail-stats div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.tree-detail-stats strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.tree-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.photo-count {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 7px;
  border-radius: 5px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.56);
  font-size: 12px;
}

.detail-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.detail-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 8px;
  color: var(--ink);
}

.detail-row dt {
  color: var(--muted);
}

.detail-row dd {
  min-width: 0;
  margin: 0;
  line-height: 1.55;
  word-break: break-word;
}

.timeline-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 16px 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #ffffff;
  font-size: 12px;
  font-weight: 650;
}

.chip.active {
  color: var(--green-700);
  border-color: rgba(13, 103, 64, 0.26);
  background: var(--green-100);
}

.timeline {
  display: grid;
  padding: 0 16px 16px;
}

.event {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.event-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--green-700);
  background: var(--green-100);
}

.event-icon svg {
  width: 16px;
  height: 16px;
}

.event.fertilize .event-icon {
  color: var(--amber);
  background: var(--amber-soft);
}

.event.prune .event-icon {
  color: var(--blue);
  background: var(--blue-soft);
}

.event.irrigate .event-icon {
  color: #1687b8;
  background: #e6f8ff;
}

.event strong {
  display: block;
  margin-bottom: 4px;
}

.event p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.qr-grid-panel {
  display: grid;
  grid-template-columns: 1fr;
}

.qr-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qr-svg {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.qr-svg svg,
.qr-svg img {
  display: block;
  width: 100%;
  height: 100%;
}

.qr-svg svg {
  stroke: none;
}

.qr-svg img {
  object-fit: contain;
}

.mini-qr {
  width: 72px;
  height: 72px;
}

.qr-plate-info {
  display: grid;
  gap: 4px;
  min-width: 160px;
}

.qr-plate-info strong {
  color: var(--ink);
  font-size: 13px;
}

.qr-plate-info span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.alert-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.alert-item {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.alert-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.alert-main time {
  color: var(--subtle);
  font-size: 12px;
}

.alert-item.detail {
  grid-template-columns: 10px minmax(0, 1fr) auto auto;
  gap: 10px;
  min-height: 54px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.alert-item.detail:last-child {
  border-bottom: 0;
}

.alert-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
}

.alert-item.ok .alert-dot {
  background: var(--green-500);
}

.alert-item.danger .alert-dot {
  background: var(--red);
}

.notification-drawer {
  display: grid;
  gap: 16px;
}

.notification-list {
  gap: 0;
}

.alert-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #9b5b0f;
  background: var(--amber-soft);
  font-size: 12px;
  font-weight: 800;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
}

.module-card {
  min-height: 128px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(23, 33, 28, 0.035);
}

.module-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.module-card p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.55;
}

.plot-map {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.plot-block {
  min-height: 104px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfc;
}

.plot-block.active {
  border-color: rgba(13, 103, 64, 0.42);
  background: var(--green-100);
}

.plot-block strong {
  display: block;
  margin-bottom: 8px;
}

.plot-block small {
  display: block;
  min-height: 18px;
  margin-bottom: 8px;
  color: var(--muted);
}

.plot-rows {
  display: grid;
  gap: 5px;
}

.plot-row-line {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green-500), #94d278);
}

.report-page {
  --report-ink: #12211a;
  --report-muted: #61706a;
  --report-line: #dbe6df;
  --report-soft: #f5f8f6;
  --report-shadow: 0 14px 34px rgba(18, 33, 26, 0.06);
  max-width: 1680px;
  color: var(--report-ink);
  font-variant-numeric: tabular-nums;
}

.report-page .page-title-row {
  align-items: center;
  margin-bottom: 18px;
}

.report-page .page-title-row h1 {
  font-size: 25px;
  font-weight: 850;
}

.report-page .page-title-row p {
  color: #697770;
  font-size: 14px;
}

.report-page .btn {
  min-height: 38px;
  padding: 0 16px;
  border-color: #c9d8d0;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(18, 33, 26, 0.045);
}

.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(340px, 0.66fr);
  gap: 16px;
  margin-bottom: 16px;
}

.report-page .panel {
  overflow: hidden;
  border-color: rgba(190, 207, 198, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 34px rgba(18, 33, 26, 0.055);
}

.report-page .panel-head {
  min-height: 56px;
  padding: 0 20px;
  border-bottom-color: rgba(213, 225, 219, 0.9);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 249, 0.92));
}

.report-page .panel-head h2 {
  color: var(--report-ink);
  font-size: 16px;
  font-weight: 800;
}

.report-page .panel-head .muted {
  color: var(--report-muted);
  font-size: 12px;
  font-weight: 650;
}

.report-page .panel-body {
  padding: 18px 20px 20px;
}

.report-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(560px, 1.1fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 16px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(178, 201, 188, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 250, 247, 0.96) 52%, rgba(238, 247, 244, 0.94) 100%),
    radial-gradient(circle at 100% 0%, rgba(15, 124, 70, 0.08), transparent 300px);
  box-shadow: var(--report-shadow);
}

.report-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--green-700), var(--blue), var(--amber));
}

.report-hero-copy {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding-left: 4px;
}

.report-hero .caption {
  margin-bottom: 10px;
  color: #3f7460;
  font-size: 12px;
  font-weight: 800;
}

.report-hero h2 {
  max-width: 620px;
  margin: 0;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: 0;
}

.report-hero p {
  max-width: 780px;
  margin: 14px 0 0;
  color: var(--report-muted);
  font-size: 15px;
  line-height: 1.75;
}

.report-hero-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.report-hero-signals span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(192, 207, 199, 0.82);
  border-radius: 8px;
  color: #33453c;
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.report-hero-signals svg {
  width: 15px;
  height: 15px;
  color: var(--green-700);
}

.report-metrics {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-content: center;
}

.report-metric {
  position: relative;
  min-width: 0;
  min-height: 132px;
  padding: 14px 13px 13px;
  border: 1px solid rgba(199, 214, 206, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 26px rgba(18, 33, 26, 0.05);
}

.report-metric::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 34px;
  height: 3px;
  border-radius: 999px;
  background: #b8c8c0;
}

.report-metric.green::after,
.report-metric.forest::after {
  background: var(--green-600);
}

.report-metric.blue::after {
  background: var(--blue);
}

.report-metric.amber::after {
  background: var(--amber);
}

.report-metric-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  border-radius: 8px;
  color: var(--green-700);
  background: #e8f5ee;
}

.report-metric.blue .report-metric-icon {
  color: var(--blue);
  background: var(--blue-soft);
}

.report-metric.amber .report-metric-icon {
  color: var(--amber);
  background: var(--amber-soft);
}

.report-metric-icon svg {
  width: 17px;
  height: 17px;
}

.report-metric > span:not(.report-metric-icon),
.report-metric small {
  display: block;
  color: var(--report-muted);
  font-size: 12px;
  font-weight: 700;
}

.report-metric strong {
  display: block;
  margin: 9px 0 3px;
  color: var(--report-ink);
  font-size: 30px;
  font-weight: 900;
  line-height: 0.96;
}

.report-chart-panel .panel-body {
  padding-bottom: 14px;
}

.chart-shell {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
}

.orchard-curve {
  display: block;
  width: 100%;
  min-width: 650px;
  height: auto;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
}

.chart-bg {
  fill: #fbfdfc;
}

.chart-gridline line {
  stroke: #dce7e1;
  stroke-dasharray: 5 7;
}

.chart-gridline text,
.chart-x-label text {
  fill: #53665c;
  font-size: 12px;
  stroke: none;
  paint-order: normal;
}

.chart-gridline text {
  text-anchor: end;
  font-weight: 650;
}

.chart-x-label line,
.chart-axis {
  stroke: #aebeb6;
}

.chart-x-label text {
  text-anchor: middle;
  font-weight: 650;
}

.chart-line {
  fill: none;
  stroke: var(--line-color);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 4px 7px rgba(18, 33, 26, 0.08));
}

.chart-point circle {
  fill: #ffffff;
  stroke: var(--point-color);
  stroke-width: 3.4;
}

.chart-line-label {
  font-size: 12px;
  font-weight: 800;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 10px 0 0 64px;
  color: var(--report-muted);
  font-size: 12px;
  font-weight: 700;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chart-legend i {
  width: 26px;
  height: 4px;
  border-radius: 999px;
  box-shadow: 0 5px 10px rgba(18, 33, 26, 0.08);
}

.report-ratio-panel .panel-body {
  display: grid;
  gap: 18px;
}

.ratio-list {
  display: grid;
  gap: 18px;
}

.ratio-meter {
  display: grid;
  gap: 11px;
}

.ratio-meter > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.ratio-meter span {
  color: var(--report-muted);
  font-size: 13px;
  font-weight: 750;
}

.ratio-meter strong {
  color: var(--report-ink);
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.ratio-meter.health .bar-fill {
  background: linear-gradient(90deg, var(--green-700), #58b96d);
}

.ratio-meter.qr .bar-fill {
  background: linear-gradient(90deg, var(--blue), #66a3ea);
}

.ratio-meter.work .bar-fill {
  background: linear-gradient(90deg, var(--amber), #e7ba56);
}

.report-risk-card {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid rgba(217, 139, 34, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffaf0, #ffffff);
}

.report-risk-card span,
.report-risk-card small {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #80601f;
  font-size: 12px;
  font-weight: 750;
}

.report-risk-card svg {
  width: 15px;
  height: 15px;
}

.report-risk-card strong {
  color: #2c2418;
  font-size: 16px;
  line-height: 1.35;
}

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

.orchard-report-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(201, 216, 208, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdfc 100%);
  box-shadow: 0 10px 26px rgba(18, 33, 26, 0.045);
}

.orchard-report-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.orchard-report-head strong {
  display: block;
  color: var(--report-ink);
  font-size: 17px;
  font-weight: 850;
}

.orchard-report-head small {
  display: block;
  margin-top: 5px;
  color: var(--report-muted);
  font-size: 12px;
  line-height: 1.45;
}

.report-card-numbers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.report-card-numbers span {
  min-width: 0;
  padding: 10px;
  border: 1px solid #edf3ef;
  border-radius: 8px;
  background: #ffffff;
}

.report-card-numbers b,
.report-card-numbers small {
  display: block;
}

.report-card-numbers b {
  color: var(--report-ink);
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
}

.report-card-numbers small {
  margin-top: 6px;
  color: var(--report-muted);
  font-size: 12px;
  font-weight: 700;
}

.health-stack {
  display: flex;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef4f0;
}

.health-stack span {
  display: block;
  min-width: 0;
}

.health-ok {
  background: linear-gradient(90deg, var(--green-700), var(--green-500));
}

.health-warn {
  background: linear-gradient(90deg, var(--amber), var(--red));
}

.orchard-report-foot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
  color: var(--report-muted);
  font-size: 12px;
}

.orchard-report-foot span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.report-insights article {
  position: relative;
  min-width: 0;
  padding: 16px 16px 16px 18px;
  border: 1px solid rgba(201, 216, 208, 0.88);
  border-radius: 8px;
  background: #ffffff;
}

.report-insights article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 3px;
  border-radius: 999px;
  background: var(--green-600);
}

.report-insights article:nth-child(2)::before {
  background: var(--amber);
}

.report-insights article:nth-child(3)::before {
  background: var(--blue);
}

.report-insights strong,
.report-insights span {
  display: block;
}

.report-insights strong {
  color: var(--report-ink);
  font-size: 15px;
  font-weight: 850;
}

.report-insights span {
  margin-top: 8px;
  color: var(--report-muted);
  font-size: 13px;
  line-height: 1.65;
}

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

.bar-row {
  display: grid;
  grid-template-columns: 86px 1fr 48px;
  gap: 10px;
  align-items: center;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2ef;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-600), #7bc76b);
}

.inventory-list,
.permission-list,
.settings-list {
  display: grid;
  gap: 9px;
}

.role-permissions {
  display: grid;
  gap: 12px;
}

.role-permission-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.role-permission-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.role-permission-head strong {
  display: block;
  font-size: 15px;
}

.role-permission-head small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.permission-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.permission-check {
  min-height: 50px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.permission-check strong,
.permission-check small {
  display: block;
}

.permission-check strong {
  font-size: 13px;
}

.permission-check small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.dictionary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dictionary-groups {
  display: grid;
  gap: 10px;
}

.dictionary-group {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  align-items: start;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.dictionary-group strong {
  padding-top: 5px;
  color: var(--ink);
  font-size: 14px;
}

.dictionary-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--green-800);
  background: var(--green-100);
  font-size: 13px;
  font-weight: 700;
}

.inventory-row,
.permission-row,
.settings-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.permission-row.pending {
  border-color: rgba(216, 137, 23, 0.28);
  background: linear-gradient(90deg, rgba(255, 248, 232, 0.9), var(--surface-soft));
}

.permission-row.rejected {
  border-color: rgba(215, 71, 53, 0.2);
  background: linear-gradient(90deg, rgba(255, 240, 237, 0.78), var(--surface-soft));
}

.inventory-row small,
.permission-row small,
.settings-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(10, 28, 20, 0.22);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 70;
  width: min(440px, 94vw);
  height: 100vh;
  overflow-y: auto;
  padding: 18px;
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: -22px 0 42px rgba(15, 35, 24, 0.14);
  transform: translateX(105%);
  transition: transform 0.22s ease;
}

.drawer.open {
  transform: translateX(0);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: rgba(10, 28, 20, 0.28);
}

.qr-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 90;
  width: min(390px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(15, 35, 24, 0.2);
  transform: translate(-50%, -50%);
}

.qr-modal[hidden],
.modal-backdrop[hidden] {
  display: none;
}

.qr-modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.qr-modal-head h2 {
  margin: 4px 0 0;
  font-size: 18px;
}

.qr-modal-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.qr-modal-preview {
  display: grid;
  place-items: center;
  gap: 8px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.qr-modal-preview img,
.qr-modal-preview svg {
  display: block;
  width: min(260px, 68vw);
  height: min(260px, 68vw);
}

.qr-modal-fallback {
  width: min(260px, 68vw);
  height: min(260px, 68vw);
}

.qr-modal-preview figcaption {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.qr-modal-meta {
  display: grid;
  gap: 8px;
  margin: 0;
}

.qr-modal-meta div {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 10px;
}

.qr-modal-meta dt {
  color: var(--muted);
}

.qr-modal-meta dd {
  min-width: 0;
  margin: 0;
  word-break: break-word;
}

.qr-modal-meta a {
  color: var(--green-700);
  text-decoration: none;
  font-weight: 800;
}

.drawer-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

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

.form {
  display: grid;
  gap: 14px;
  padding-top: 16px;
}

.form .two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field-stack {
  display: grid;
  gap: 8px;
}

.inline-register {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.form-password-field {
  margin-top: 6px;
}

.password-helper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
}

.inline-register .btn {
  min-height: 32px;
  white-space: nowrap;
}

.readonly-field {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface-soft);
  font-weight: 700;
}

.batch-default-box {
  display: grid;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.batch-preview {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--green-100);
}

.batch-preview strong {
  color: var(--green-800);
  font-size: 14px;
}

.batch-preview small {
  color: var(--muted);
  line-height: 1.5;
}

.bulk-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.bulk-edit-field {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.bulk-edit-field small {
  color: var(--muted);
  line-height: 1.45;
}

.bulk-edit-field > select,
.bulk-edit-field > input,
.bulk-edit-field > textarea {
  background: #ffffff;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.check-line input {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  accent-color: var(--green-700);
}

.batch-default-box small {
  color: var(--muted);
  line-height: 1.5;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  max-width: 380px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 124, 70, 0.22);
  border-radius: 8px;
  color: var(--green-900);
  background:
    linear-gradient(90deg, rgba(232, 245, 238, 0.92), #ffffff),
    #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed #d7e3dc;
  border-radius: 8px;
  background: #fbfdfc;
}

.empty-state svg {
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
  color: var(--subtle);
}

@media print {
  @page {
    size: A4;
    margin: 8mm;
  }

  body {
    background: #ffffff;
  }

  body > :not(.print-root) {
    display: none !important;
  }

  .print-root {
    display: block !important;
    color: #111111;
    background: #ffffff;
    font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  }

  .print-sheet {
    display: grid;
    grid-template-columns: repeat(2, 90mm);
    gap: 6mm;
    align-content: start;
  }

  .print-tree-label {
    display: grid;
    grid-template-columns: 40mm minmax(0, 1fr);
    gap: 4mm;
    width: 90mm;
    height: 54mm;
    padding: 2.8mm;
    break-inside: avoid;
    page-break-inside: avoid;
    border: 0.45mm solid #0f7c46;
    border-radius: 3mm;
    background: #ffffff;
  }

  .print-label-qr {
    display: grid;
    place-items: center;
    align-self: center;
    width: 40mm;
    height: 40mm;
    padding: 1mm;
    border: 0.25mm solid #d7e3dc;
    border-radius: 1.5mm;
    background: #ffffff;
  }

  .print-label-qr img,
  .print-label-qr svg {
    display: block;
    width: 100%;
    height: 100%;
    stroke: none;
  }

  .print-label-info {
    display: grid;
    align-content: center;
    gap: 1.7mm;
    min-width: 0;
  }

  .print-label-info h2 {
    margin: 0 0 1mm;
    color: #0b281a;
    font-size: 26pt;
    line-height: 1;
    letter-spacing: 0;
  }

  .print-label-line {
    margin: 0;
    min-width: 0;
    overflow: hidden;
    padding: 1.1mm 1.6mm;
    border-radius: 1.4mm;
    background: #eef7f1;
    color: #13231b;
    font-size: 9.2pt;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 1180px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .archive-summary {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .grid-main,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .tree-detail-hero,
  .tree-detail-grid {
    grid-template-columns: 1fr;
  }

  .tree-photo-large {
    min-height: 240px;
  }

  .report-hero {
    grid-template-columns: 1fr;
  }

  .report-insights {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .login-content {
    padding: 94px 18px 210px;
  }

  .login-brand {
    gap: 14px;
    margin-bottom: 56px;
  }

  .login-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    transform: scale(0.86);
  }

  .login-brand h1 {
    font-size: 38px;
  }

  .login-brand p {
    margin-top: 10px;
    font-size: 15px;
    letter-spacing: 0;
  }

  .login-card {
    width: min(100%, 520px);
    padding: 30px 22px 28px;
  }

  .auth-field {
    min-height: 56px;
    padding: 0 18px;
  }

  .auth-field input {
    height: 54px;
    font-size: 17px;
  }

  .login-submit {
    min-height: 58px;
    font-size: 22px;
  }

  .login-branch,
  .fruit-basket,
  .watering-can,
  .wood-sign {
    transform: scale(0.72);
  }

  .branch-top-right {
    right: -54px;
  }

  .branch-top-left {
    left: -54px;
  }

  .login-slogan {
    position: relative;
    z-index: 3;
    margin-top: 34px;
    font-size: 20px;
    letter-spacing: 0;
  }

  .login-ground {
    height: 118px;
  }

  .ground-tree {
    left: -20px;
    bottom: -24px;
    transform: scale(0.62);
    transform-origin: left bottom;
  }

  .fruit-basket {
    left: 132px;
    bottom: 8px;
    transform: scale(0.62);
    transform-origin: left bottom;
  }

  .watering-can,
  .wood-sign {
    display: none;
  }
}

@media (max-width: 1100px) {
  :root {
    --nav-w: 0px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 50;
    width: 236px;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .icon-btn.menu-toggle {
    display: inline-grid;
  }

  .topbar {
    height: auto;
    min-height: var(--top-h);
    align-items: start;
    padding: 10px 12px;
  }

  .selector-row,
  .topbar-actions {
    flex-wrap: wrap;
    gap: 8px;
  }

  .selector-row {
    width: 100%;
  }

  .selector-row label {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    width: 100%;
    min-width: 0;
  }

  .selector-actions {
    width: 100%;
    margin-left: 0;
  }

  .selector-row select {
    width: 100%;
    min-width: 0;
  }

  .topbar-actions {
    margin-left: 0;
    width: 100%;
    font-size: 13px;
  }

  .app-version {
    min-height: 26px;
  }

  .page {
    padding: 12px;
  }

  .page-title-row,
  .toolbar,
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .kpi-grid,
  .archive-summary,
  .approval-reminder,
  .module-grid,
  .plot-meta,
  .plot-map,
  .report-metrics,
  .orchard-report-grid {
    grid-template-columns: 1fr;
  }

  .bulk-edit-grid {
    grid-template-columns: 1fr;
  }

  .bulk-delete-progress-head,
  .bulk-delete-progress-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .report-hero {
    padding: 14px;
  }

  .report-hero h2 {
    font-size: 20px;
  }

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

  .orchard-curve {
    min-width: 560px;
  }

  .tree-card {
    grid-template-columns: 1fr;
  }

  .tree-form-identity {
    grid-template-columns: 1fr;
  }

  .tree-form-photo {
    width: 100%;
    min-height: 180px;
  }

  .approval-card {
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: start;
  }

  .approval-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .approval-actions .btn {
    flex: 1;
  }

  .tree-detail-hero {
    padding: 16px;
  }

  .tree-detail-copy h2 {
    font-size: 27px;
  }

  .tree-detail-stats {
    grid-template-columns: 1fr;
  }

  .search input {
    width: 100%;
  }

  .dictionary-group {
    grid-template-columns: 1fr;
  }

  .dictionary-group strong {
    padding-top: 0;
  }

  .toolbar-left,
  .toolbar-right,
  .actions {
    align-items: stretch;
  }

  .permission-check-grid,
  .role-permission-head,
  .password-helper {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .btn,
  select {
    width: 100%;
  }

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

  .inline-register {
    grid-template-columns: 1fr;
  }

  .inventory-row,
  .permission-row,
  .settings-row {
    grid-template-columns: 1fr;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }
}

@media (max-width: 1100px) {
  .report-page .report-hero {
    padding: 18px;
  }

  .report-page .report-hero h2 {
    font-size: 30px;
  }

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

  .report-page .report-metric {
    min-height: 118px;
  }

  .report-page .orchard-report-foot {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .report-page .page-title-row {
    gap: 12px;
  }

  .report-page .report-hero {
    padding: 16px;
  }

  .report-page .report-hero h2 {
    font-size: 25px;
  }

  .report-page .report-hero p {
    font-size: 14px;
  }

  .report-page .report-metrics,
  .report-page .orchard-report-grid,
  .report-page .report-card-numbers,
  .report-page .report-insights {
    grid-template-columns: 1fr;
  }

  .report-page .panel-head {
    align-items: flex-start;
    min-height: auto;
    padding: 14px 16px;
  }

  .report-page .panel-body {
    padding: 16px;
  }

  .report-page .chart-legend {
    margin-left: 0;
  }

  .report-page .orchard-curve {
    min-width: 520px;
  }
}
