:root {
  --green: #347552;
  --deep: #204b35;
  --leaf: #77a879;
  --pale: #edf5ed;
  --text: #254432;
  --muted: #7d9181;
  --border: #e1ebe1;
  --bird-primary: var(--green);
  --bird-primary-strong: #286747;
  --bg-card: rgba(255, 255, 255, 0.91);
  --bg-soft: #f0f6ed;
  --text-primary: var(--text);
  --text-muted: var(--muted);
  --border-color: var(--border);
  --shadow-sm: 0 12px 32px rgba(38, 75, 47, 0.06);
  --radius-lg: 18px;
  --radius-md: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(ellipse at 8% 20%, rgba(171, 207, 169, 0.35), transparent 32%),
    radial-gradient(ellipse at 95% 85%, rgba(179, 211, 175, 0.32), transparent 30%),
    linear-gradient(140deg, #f6f8f1, #edf5ed 55%, #f5f7ef);
  overflow-x: hidden;
}

.site-page { min-height: 100vh; }

.vine {
  position: fixed;
  z-index: 0;
  width: 260px;
  height: 440px;
  border-left: 2px solid rgba(78, 132, 82, 0.14);
  border-radius: 50%;
  pointer-events: none;
  animation: ivy-sway 9s ease-in-out infinite;
}

.vine::before,
.vine::after {
  content: "";
  position: absolute;
  width: 35px;
  height: 19px;
  border-radius: 100% 0 100% 0;
  background: rgba(91, 151, 92, 0.13);
}

.vine::before { top: 95px; left: -34px; transform: rotate(18deg); }
.vine::after { top: 145px; left: 2px; transform: rotate(78deg); }
.vine.left { top: 120px; left: -175px; }
.vine.right { right: -175px; bottom: -100px; transform: rotate(180deg); animation-delay: -4s; }

@keyframes ivy-sway {
  0%, 100% { translate: 0 0; }
  50% { translate: 8px -12px; }
}

#ivy-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.ivy-leaf,
.ivy-trail {
  position: fixed;
  pointer-events: none;
  z-index: 4;
  font-size: 16px;
}

.ivy-leaf { top: -40px; animation: ivy-fall linear forwards; }
.ivy-trail { z-index: 6; animation: ivy-trail 1s ease forwards; }

@keyframes ivy-fall { to { transform: translateY(110vh) rotate(720deg); opacity: 0.2; } }
@keyframes ivy-trail { to { transform: translate(var(--dx), 60px) rotate(180deg); opacity: 0; } }

.site-navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(221, 233, 220, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: none;
}

.site-navbar .container-fluid {
  width: min(1180px, calc(100% - 48px));
  min-height: 76px;
  margin: auto;
}

.ivy-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--deep) !important;
  text-decoration: none;
}

.ivy-brand-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #3d7a52;
  background: none;
  box-shadow: none;
}

.ivy-brand-name {
  display: block;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: 1px;
  line-height: 1.1;
}

.ivy-brand-en {
  display: block;
  margin-top: 2px;
  color: #8aa08c;
  font-size: 10px;
  letter-spacing: 3px;
}

.site-navbar .navbar-nav {
  align-items: center;
  flex-wrap: wrap;
}

.site-navbar .nav-link {
  flex: 0 0 auto;
  padding: 0 14px !important;
  border-radius: 0;
  color: #3e5c48 !important;
  font-size: 16px;
  line-height: 76px;
  white-space: nowrap;
  font-style: normal;
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link:focus {
  color: var(--deep) !important;
  background: transparent;
}

.hero-banner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 620px;
  margin: 0;
  overflow: hidden;
  background: #f3f6f0;
}

.hero-banner-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
}

.hero-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(243, 246, 240, 0.94) 0%, rgba(243, 246, 240, 0.82) 36%, rgba(243, 246, 240, 0.35) 58%, rgba(243, 246, 240, 0.08) 100%);
}

.hero-banner-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 72px 0;
}

.hero-banner .eyebrow {
  margin: 0 0 14px;
  color: #6d8b72;
  font-size: 13px;
  letter-spacing: 4px;
}

.hero-banner h1,
.hero-panel {
  max-width: none;
}

.hero-panel {
  width: min(680px, 58%);
}

.hero-lead {
  margin: 16px 0 0;
  color: #4f6756;
  font-size: 16px;
  line-height: 1.7;
}

.hero-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.hero-point {
  margin: 0;
  padding: 14px 12px;
  border: 1px solid rgba(210, 224, 210, 0.95);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: #315744;
  font-size: 14px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-cta-secondary {
  background: transparent;
  color: #2f6b45;
  border: 1px solid #2f6b45;
}

.hero-contact {
  margin: 14px 0 0;
  color: #6d8372;
  font-size: 13px;
}

.hero-banner h1 {
  margin: 0;
  color: #1f4a34;
  font-size: clamp(40px, 5vw, 58px);
  line-height: 1.15;
  letter-spacing: 1px;
}

.hero-banner .hero-copy {
  margin: 18px 0 0;
  color: #4f6756;
  font-size: 16px;
  line-height: 1.85;
}

.hero-cta {
  display: inline-block;
  margin-top: 26px;
  padding: 12px 26px;
  border-radius: 10px;
  background: #2f6b45;
  color: #fff;
  font-size: 15px;
  text-decoration: none;
}

.hero-cta:hover {
  background: #255738;
  color: #fff;
  text-decoration: none;
}

.ivy-main {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  margin: 28px auto 55px;
}

.hero {
  position: relative;
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 34px 40px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.96), rgba(239, 247, 237, 0.9));
  box-shadow: 0 14px 40px rgba(43, 82, 48, 0.07);
}

.hero::after {
  content: "❧";
  position: absolute;
  top: -57px;
  right: 29px;
  color: rgba(77, 132, 79, 0.13);
  font-family: Georgia, serif;
  font-size: 230px;
  transform: rotate(-24deg);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 11px;
  color: #769478;
  font-size: 11px;
  letter-spacing: 3px;
}

.hero h1,
.site-hero-title {
  margin: 0;
  color: #285a3d;
  font-size: clamp(27px, 4vw, 36px);
  letter-spacing: 2px;
}

.hero-copy,
.site-hero-lead,
.site-hero-body {
  max-width: 560px;
  margin: 12px 0 0;
  color: #778a7b;
  font-size: 14px;
  line-height: 1.8;
}

.hero-seal {
  position: relative;
  z-index: 1;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(118, 166, 117, 0.35);
  border-radius: 50%;
  color: #54825b;
  background: rgba(232, 243, 228, 0.78);
  box-shadow: 0 0 0 10px rgba(232, 243, 228, 0.35);
  font-size: 36px;
  flex: 0 0 auto;
}

.ivy-columns {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 18px;
  margin-top: 20px;
}

.site-card,
.site-panel,
.site-hero,
.card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  color: var(--text);
}

.site-card,
.site-panel { padding: 18px 22px 22px; transition: transform .25s ease, box-shadow .25s ease; }

.site-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(45, 106, 79, 0.16);
}

.site-section-title,
.card h2,
h2 {
  margin: 0 0 12px;
  color: #315f40;
  font-size: 16px;
  font-weight: 700;
}

.site-muted { color: var(--muted); }

.form-control,
.custom-select,
select {
  width: 100%;
  min-height: 43px;
  border: 1px solid #dce8dc;
  border-radius: 11px;
  color: #355b40;
  background: #fbfdf9;
}

.form-control:focus,
.custom-select:focus {
  border-color: #77a77a;
  box-shadow: 0 0 0 3px rgba(103, 157, 112, 0.13);
}

.btn-primary,
.site-btn-primary {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #4b9161, #286747);
  box-shadow: 0 7px 16px rgba(41, 105, 65, 0.19);
}

.btn-primary:hover,
.site-btn-primary:hover {
  color: #fff;
  background: linear-gradient(135deg, #3f8154, #1f5538);
  transform: translateY(-2px);
}

.btn-outline-dark,
.btn-dark {
  color: var(--green);
  border-color: #cfe0cf;
  background: #fff;
  border-radius: 999px;
}

.btn-outline-dark:hover,
.btn-dark:hover {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.auth-wrap {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-card { width: 100%; max-width: 420px; }
.auth-card .btn { width: 100%; }
.auth-error { color: #a33b32; margin-bottom: 12px; }
.auth-switch { margin-top: 14px; text-align: center; }

.site-field-stack .select2-container { display: block; width: 100% !important; }
.site-field-stack .select2-container--default .select2-selection--single {
  border: 1px solid #dce8dc !important;
  border-radius: 11px !important;
  min-height: 43px;
  background: #fbfdf9;
}
.site-field-stack .select2-container--default .select2-selection--single .select2-selection__rendered {
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  line-height: 1.6;
  color: #355b40;
}
.site-field-stack .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100%;
  top: 0;
  right: 0.4rem;
}
.select2-container--default .select2-results > .select2-results__options {
  max-height: min(360px, 50vh);
}

.site-country-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  width: 100%;
}
.site-country-option__name { font-weight: 600; }
.site-pill {
  display: inline-block;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  font-size: 0.74rem;
  background: #e7f3e6;
  color: #2d6a4f;
}
.site-pill--price { background: #f3f7e8; }

.site-orders {
  max-height: min(58vh, 520px);
  overflow: auto;
}
.site-order-item {
  border: 1px dashed #d9e6d8;
  border-radius: 13px;
  background: linear-gradient(145deg, #fbfdf9, #f4f8f1);
  padding: 10px 12px;
  margin-bottom: 10px;
}
.site-order-row { display: flex; gap: 0.4rem; line-height: 1.5; }
.site-order-label { color: var(--muted); min-width: 72px; }
.site-order-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 8px; }

.site-lang-footer,
.site-pagination {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
}
.site-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
  padding: 0.75rem 1rem;
}
.site-lang-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: min(720px, calc(100% - 48px));
  margin: 12px auto 36px;
  padding: 14px 16px;
}
.site-lang-footer a {
  color: #315744;
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid #d5e4d4;
  border-radius: 999px;
  background: #fff;
}
.page-shell {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100% - 48px));
  margin: 36px auto 12px;
}
.page-shell > h1,
.auth-panel h1 {
  margin: 0 0 16px;
  color: #285a3d;
  font-size: 28px;
  text-align: center;
}
.page-card { padding: 22px 24px; }
.auth-panel { width: min(420px, 100%); }
.table-wrap { overflow-x: auto; }
.table,
.table-dark,
.table-striped.table-dark tbody tr {
  background: #fff !important;
  color: var(--text);
}
.table th,
.table td,
.table-dark th,
.table-dark td {
  border-color: var(--border);
  word-break: break-word;
  vertical-align: middle;
}
.table thead th,
.table-dark thead th { background: #f0f6ed; color: #315f40; }
.badge-secondary {
  background: #e7f3e6;
  color: #2d6a4f;
  border: 1px solid #d5e6d4;
}

@media (max-width: 700px) {
  .site-navbar .container-fluid { min-height: 64px; width: calc(100% - 24px); }
  .site-navbar .nav-link { padding: 0 10px !important; font-size: 15px; line-height: 40px; white-space: nowrap; }
  .hero-banner { min-height: 520px; }
  .hero-banner::before { background: linear-gradient(180deg, rgba(243,246,240,0.92) 0%, rgba(243,246,240,0.78) 55%, rgba(243,246,240,0.35) 100%); }
  .hero-banner-inner { width: calc(100% - 40px); padding: 48px 0; }
  .hero-panel { width: 100%; }
  .hero-points { grid-template-columns: 1fr; }
  .ivy-main { width: calc(100% - 24px); margin-top: 20px; }
  .hero { min-height: 170px; padding: 26px 20px; }
  .hero-seal { width: 72px; height: 72px; font-size: 28px; }
  .ivy-columns { grid-template-columns: 1fr; }
  .site-pagination { flex-direction: column; }
  .site-pagination .btn,
  .table .btn-sm { width: 100%; margin-bottom: 0.35rem; }
}

@media (max-width: 430px) {
  .ivy-brand-name { font-size: 17px; }
  .hero-seal { display: none; }
  .site-order-label { min-width: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.api-page {
  width: min(880px, calc(100% - 36px));
  margin: 28px auto 56px;
}

.api-page h1 {
  margin: 0 0 16px;
  color: #285a3d;
  font-size: 28px;
  letter-spacing: 1px;
}

.api-card {
  margin-top: 16px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
}

.api-card h2 {
  margin: 0 0 10px;
  color: #285a3d;
  font-size: 18px;
}

.api-card h3 {
  margin: 16px 0 8px;
  color: #4d6b52;
  font-size: 13px;
  letter-spacing: 1px;
}

.api-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.api-method {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e7f3e6;
  color: #2d6a4f;
  font-size: 12px;
  letter-spacing: 1px;
}

.api-path {
  color: #315f40;
  font-size: 15px;
}

.api-meta p {
  margin: 0 0 12px;
  color: #5d7362;
}

.api-meta p:last-child { margin-bottom: 0; }

.api-meta code,
.api-key {
  display: block;
  margin-top: 4px;
  color: #244833;
  word-break: break-all;
}

.api-table {
  margin-bottom: 0;
  background: #fff;
}

.api-table th,
.api-table td {
  background: #fff;
  color: var(--text);
}
