@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg: #7f9d74;
  --surface: #f8f6ea;
  --surface-soft: #fcfbf3;
  --text: #1f2f21;
  --muted: #617363;
  --primary: #365f2c;
  --primary-strong: #2a4a23;
  --danger: #e14d63;
  --success: #2a7b4d;
  --border: #d6dcc5;
  --shadow: 0 24px 44px rgba(24, 45, 24, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background-image: url('https://sun9-56.userapi.com/s/v1/ig2/PLEg_RdSpwNdg1tGa-4JkN3Fl6UoTBZBOZKJfbRKnPurhACpJJvUZcs3jP-MlDTp6a2uwSmNHBE_Uq2BwTruavNb.jpg?quality=95&rotate=270&as=32x15,48x22,72x33,108x50,160x74,240x111,360x166,480x222,540x249,640x296,720x333,1080x499,1280x591,1440x665,2000x924&from=bu&cs=2000x0');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100vh;
}

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

.shell {
  width: min(1100px, calc(100% - 42px));
  margin: 30px auto;
  min-height: 93vh;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface-soft);
}

body.centered-screen {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 80px;
}

body.centered-screen .shell {
  width: min(520px, calc(100% - 20px));
  margin: 0 auto;
  min-height: auto;
  display: flex;
  flex-direction: column;
}

body.centered-screen .page {
  display: flex;
  align-items: center;
  justify-content: center;
}

body.centered-screen .page .card {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

body.centered-screen.profile-top {
  align-items: flex-start;
}

body.centered-screen.profile-top .shell {
  margin-top: 12px;
}

body.centered-screen.profile-top .page {
  min-height: auto;
  align-items: flex-start;
  justify-content: center;
}

body.centered-screen.auth-top {
  align-items: flex-start;
}

body.centered-screen.auth-top .page {
  align-items: center;
  justify-content: center;
  padding-top: 20px;
}

body.centered-screen.auth-top .page .card {
  margin-left: auto;
  margin-right: auto;
}

.topbar {
  background: rgba(251, 250, 244, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #dfe4cf;
}

.topbar-inner {
  max-width: 100%;
  margin: 0;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: 0.02em;
  color: #1f3d24;
}

.brand::before {
  content: "✿";
  font-size: 1.2rem;
  transform: translateY(-1px);
  color: #5f8c51;
}

.menu {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.menu a {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 0.83rem;
  color: #566651;
  border: 1px solid transparent;
}

.menu a.active,
.menu a:hover {
  background: #f2f4e9;
  color: #294326;
  border-color: #d8dfc5;
}

.page {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 24px 28px 34px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: 1.2fr 0.8fr;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 10px 24px rgba(40, 60, 35, 0.08);
}

.card.soft {
  background: #f2f5e8;
  box-shadow: none;
}

h1,
h2,
h3,
p {
  margin: 0 0 12px;
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", serif;
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(2.2rem, 3.8vw, 4rem);
  font-weight: 600;
  line-height: 0.96;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 600;
  line-height: 0.98;
}

h3 {
  font-size: clamp(1.35rem, 2.1vw, 2rem);
}

p.muted,
.muted {
  color: var(--muted);
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 18px;
  align-items: stretch;
}

.hero .card:first-child {
  background:
    linear-gradient(0deg, rgba(28, 50, 27, 0.5), rgba(28, 50, 27, 0.5)),
    url("https://images.unsplash.com/photo-1469474968028-56623f02e42e?auto=format&fit=crop&w=1600&q=80") center/cover;
  border-color: #30482f;
  color: #f5f3e9;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero .card:first-child .muted {
  color: rgba(245, 243, 233, 0.86);
}

.hero .card:first-child .badge {
  background: rgba(252, 250, 245, 0.18);
  color: #f8f7f0;
  border: 1px solid rgba(247, 244, 233, 0.35);
}

.hero .card:first-child .btn.secondary {
  background: rgba(248, 246, 238, 0.9);
}

.hero-art {
  border-radius: 22px;
  border: 1px solid #3f5c39;
  background-image:
    linear-gradient(0deg, rgba(34, 58, 30, 0.35), rgba(34, 58, 30, 0.35)),
    url('https://i.pinimg.com/736x/eb/72/62/eb7262361684e17f4a3c102e4b1771f2.jpg');
  background-size: cover, cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 220px;
  color: transparent;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: #2f4f27;
  border-radius: 22px;
  padding: 18px;
  border: 1px solid #3f6534;
}

.stat {
  border-radius: 14px;
  border: 1px solid #5c7a53;
  background: rgba(241, 248, 233, 0.07);
  padding: 12px;
}

.stats .stat h3,
.stats .stat .muted {
  color: #eef4e8;
}

input,
select {
  width: 100%;
  border: 1px solid var(--border);
  background: #fffef9;
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 0.95rem;
  outline: none;
}

input:focus,
select:focus {
  border-color: #91b083;
  box-shadow: 0 0 0 3px rgba(81, 129, 62, 0.16);
}

.form {
  display: grid;
  gap: 10px;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.93rem;
  cursor: pointer;
  transition: 0.15s ease;
  border: 1px solid transparent;
}

.btn.primary {
  color: #fff;
  background: var(--primary);
}

.btn.primary:hover {
  background: var(--primary-strong);
}

.btn.secondary {
  color: var(--text);
  background: #eef3e5;
  border-color: #d1ddbe;
}

.btn.danger {
  color: #fff;
  background: var(--danger);
}

.badge {
  display: inline-flex;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 0.76rem;
  background: #ecf4e0;
  color: #2a5f31;
}

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

.plant-card,
.composition-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: #fffdf6;
}

.composition-cover {
  height: 180px;
  width: 100%;
  display: block;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border);
  background:
    linear-gradient(0deg, rgba(35, 58, 35, 0.2), rgba(35, 58, 35, 0.2)),
    url("https://images.unsplash.com/photo-1526397751294-331021109fbd?auto=format&fit=crop&w=900&q=80") center/cover;
  margin-bottom: 10px;
}

.empty {
  color: var(--muted);
  text-align: center;
  border: 1px dashed #b8d8c1;
  border-radius: 12px;
  padding: 22px;
  background: #f8fff9;
}

.alert {
  margin-top: 4px;
  font-size: 0.88rem;
}

.alert.error {
  color: #cf2c5d;
}

.alert.success {
  color: #0d8f61;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(7, 18, 43, 0.42);
  padding: 16px;
}

.modal.show {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 420px;
  background: #fffdf5;
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 16px;
}

@media (max-width: 860px) {
  .shell {
    width: min(1100px, calc(100% - 18px));
    margin: 12px auto;
    border-radius: 16px;
  }

  .topbar-inner,
  .page {
    padding-left: 14px;
    padding-right: 14px;
  }

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

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