:root {
  --primary: #77c344;
  --primary-dark: #5a9632;
  --primary-light: #8ed05c;
  --primary-surface: #f0f9e8;
  --bg: #f8faf9;
  --text: #1a2b22;
  --text-muted: #5a7060;
  --text-hint: #9cb5a5;
  --white: #ffffff;
  --shadow: 0 8px 32px rgba(26, 43, 34, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --error: #e53935;
  --success: #43a047;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--primary-dark);
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

/* ─── Navbar ─── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(119, 195, 68, 0.15);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--primary-dark);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 6px 20px rgba(119, 195, 68, 0.35);
}

.btn-outline {
  background: white;
  color: var(--primary-dark);
  border: 2px solid rgba(119, 195, 68, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid #e5ece8;
}

.btn-block {
  width: 100%;
}

/* ─── Hero ─── */
.hero {
  padding: 72px 0 56px;
  background:
    radial-gradient(circle at 85% 15%, rgba(119, 195, 68, 0.18), transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(119, 195, 68, 0.12), transparent 35%),
    var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--primary-surface);
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero p.lead {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.phone-mock {
  background: linear-gradient(160deg, var(--primary), var(--primary-dark));
  border-radius: 28px;
  padding: 28px;
  color: white;
  box-shadow: var(--shadow);
}

.phone-mock h3 {
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.mock-card {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
  font-size: 0.88rem;
}

/* ─── Features ─── */
.section {
  padding: 64px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-size: 1.9rem;
  margin-bottom: 8px;
}

.section-title p {
  color: var(--text-muted);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.feature-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-surface);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  margin-bottom: 14px;
}

.feature-card h3 {
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ─── CTA ─── */
.cta {
  margin: 20px 0 64px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 24px;
  padding: 48px 32px;
  text-align: center;
  color: white;
}

.cta h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.cta p {
  opacity: 0.9;
  margin-bottom: 24px;
}

/* ─── Footer ─── */
.footer {
  border-top: 1px solid #e8efe9;
  padding: 28px 0;
  color: var(--text-hint);
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* ─── Auth pages ─── */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(119, 195, 68, 0.15), transparent 40%),
    var(--bg);
}

.auth-card {
  width: min(420px, 100%);
  background: white;
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.auth-card p.sub {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #dfe8e1;
  border-radius: 10px;
  font: inherit;
  background: #fcfefc;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid rgba(119, 195, 68, 0.35);
  border-color: var(--primary);
}

.auth-error {
  background: #fdecea;
  color: var(--error);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.auth-back {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--text-hint);
}

/* ─── Admin panel ─── */
.admin-layout {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.admin-header {
  background: white;
  border-bottom: 1px solid #e8efe9;
  padding: 14px 0;
}

.admin-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-toolbar {
  background: white;
  border-bottom: 1px solid #eef3ef;
  padding: 16px 0;
}

.toolbar-grid {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: end;
}

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

.admin-main {
  padding: 20px 0 100px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tab {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid #dfe8e1;
  background: white;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-muted);
}

.tab.active {
  background: var(--primary-surface);
  border-color: rgba(119, 195, 68, 0.4);
  color: var(--primary-dark);
}

.day-card {
  background: white;
  border-radius: var(--radius-sm);
  border: 1px solid #e8efe9;
  margin-bottom: 10px;
  overflow: hidden;
}

.day-card summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.day-card summary::-webkit-details-marker {
  display: none;
}

.day-body {
  padding: 0 16px 16px;
}

.day-body label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 12px 0 6px;
}

.day-body label small {
  font-weight: 500;
  color: var(--text-hint);
}

.day-body textarea,
.day-body input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dfe8e1;
  border-radius: 8px;
  font: inherit;
  margin-bottom: 4px;
}

.day-badge {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3f5f4;
  color: var(--text-hint);
}

.day-badge.filled {
  background: var(--primary-surface);
  color: var(--primary-dark);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
}

.two-col h4 {
  font-size: 0.88rem;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #dfe8e1;
  background: white;
  cursor: pointer;
  font-size: 0.85rem;
}

.chip.active {
  background: var(--primary-surface);
  border-color: var(--primary);
  color: var(--primary-dark);
  font-weight: 700;
}

.empty-hint {
  color: var(--text-hint);
  text-align: center;
  padding: 40px 16px;
}

.save-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid #e8efe9;
  padding: 12px 0;
  backdrop-filter: blur(8px);
}

.save-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a2b22;
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 200;
  font-size: 0.9rem;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-success {
  background: var(--success);
}

.toast-error {
  background: var(--error);
}

body.is-loading {
  cursor: wait;
}

body.is-loading .btn {
  opacity: 0.7;
  pointer-events: none;
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .phone-mock {
    order: -1;
  }

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

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

  .nav-links .hide-mobile {
    display: none;
  }
}
