:root {
  /* Mirrors AppColors in the Android app (Constants.kt) */
  --honey: #FFB300;
  --orange: #FB8C00;
  --honey-light: #FFF8E1;
  --honey-bg: #FFFDE7;
  --green: #43A047;
  --green-dark: #2E7D32;
  --text: #212121;
  --white: #FFFFFF;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  --script: "Dancing Script", "Segoe Script", "Brush Script MT", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.5rem;
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand-mark {
  width: 40px;
  height: 40px;
  max-width: 40px;
  max-height: 40px;
  object-fit: contain;
  display: block;
}
.brand-name {
  font-family: var(--script);
  font-size: 2rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.site-nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}
.site-nav a:hover { color: var(--orange); }

.btn-login {
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.5rem 1.25rem;
  border: none;
  border-radius: 999px;
  background: var(--green);
  color: var(--white);
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-login:hover { background: var(--green-dark); }
.btn-login-ghost {
  background: transparent;
  color: var(--green-dark);
  border: 2px solid var(--green);
  padding: 0.4rem 1rem;
}
.btn-login-ghost:hover { background: var(--honey-light); }
.header-user { font-weight: 600; color: var(--green-dark); }

/* ---------- Landing ---------- */
.landing {
  background: linear-gradient(135deg, var(--honey) 0%, var(--orange) 100%);
  padding: 4rem 1.5rem;
}
.landing-inner {
  max-width: 1000px;
  margin: 0 auto;
}
.landing-head { text-align: center; margin-bottom: 2.75rem; }
.brand-title {
  font-family: var(--script);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: var(--white);
  line-height: 1.1;
}
.title-dash { color: rgba(255, 255, 255, 0.7); }
.tagline {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
}

/* ---------- Feature tiles ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.feature-card {
  background: var(--white);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--honey);
}
.feature-icon { font-size: 1.8rem; }
.feature-card h3 { margin: 0.6rem 0 0.4rem; color: var(--green-dark); font-size: 1.1rem; }
.feature-card p { margin: 0; color: #444; font-size: 0.92rem; }

/* ---------- Login modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  position: relative;
  width: 100%;
  max-width: 380px;
  animation: modal-in 0.18s ease-out;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.modal-close {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--white);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 1;
}
.modal-close:hover { background: var(--honey-light); }
.modal-title {
  margin: 0 0 1.25rem;
  font-size: 1.3rem;
  color: var(--green-dark);
  text-align: center;
}

/* ---------- Auth panel ---------- */
.auth-panel {
  background: var(--white);
  border-radius: 16px;
  padding: 1.75rem 1.6rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border: 1px solid #dadce0;
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease;
  min-height: 44px;
}
.btn-google:hover { background: #f7f7f7; }
.g-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-weight: 800;
  font-size: 0.8rem;
}
.btn-primary {
  width: 100%;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 10px;
  background: var(--green);
  color: var(--white);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
  min-height: 44px;
}
.btn-primary:hover { background: var(--green-dark); }
.btn-primary:active { transform: scale(0.99); }
.btn-secondary {
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border: 2px solid var(--green);
  border-radius: 10px;
  background: transparent;
  color: var(--green-dark);
  cursor: pointer;
  min-height: 44px;
}
.btn-secondary:hover { background: var(--honey-light); }
.btn-link {
  background: none;
  border: none;
  color: var(--green-dark);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.3rem 0;
}
.btn-link:hover { color: var(--orange); text-decoration: underline; }

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #999;
  font-size: 0.8rem;
  margin: 0.85rem 0;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #e0e0e0;
}
.divider span { padding: 0 0.75rem; }

.email-form { text-align: left; }
.field-input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  min-height: 42px;
}
.field-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.15);
}
.secondary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.6rem;
}
.auth-hint { font-size: 0.85rem; color: #666; margin: 0.85rem 0 0; }
.welcome { font-size: 1.2rem; font-weight: 700; margin: 0 0 0.25rem; text-align: center; }
.auth-status { font-size: 0.85rem; color: var(--orange); margin: 0.85rem 0 0; min-height: 1em; text-align: center; }

/* ---------- About ---------- */
.about {
  padding: 3rem 1.5rem 4rem;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.about h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--green-dark);
  margin-top: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-dark);
  color: var(--white);
  text-align: center;
  padding: 1.5rem;
}
.site-footer p { margin: 0; font-size: 0.9rem; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .feature-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .site-nav a { display: none; }
  .site-nav { gap: 0.75rem; }
  .landing { padding: 3rem 1rem; }
}

/* Anchor styled as a solid primary button */
a.btn-link-solid {
  display: block;
  text-align: center;
  text-decoration: none;
  line-height: 1.9;
}

/* ---------- Dashboard ---------- */
.dashboard { max-width: 1000px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.dashboard-title {
  font-family: var(--script);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--green-dark);
  margin: 0 0 0.25rem;
}
.dashboard-sub { color: #666; margin: 0 0 2rem; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.stat-card {
  background: var(--white);
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  text-align: center;
  border-top: 4px solid var(--honey);
}
.stat-value { font-size: 2.25rem; font-weight: 700; color: var(--green-dark); line-height: 1; }
.stat-label { font-size: 0.85rem; color: #666; margin-top: 0.35rem; }

.dash-section { margin-bottom: 2.5rem; }
.dash-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.dash-section-head h2 { color: var(--green-dark); margin: 0; font-size: 1.35rem; }

.hive-list { display: grid; gap: 0.75rem; }
.hive-item {
  background: var(--white);
  border-radius: 12px;
  padding: 0.9rem 1.2rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.hive-name { font-weight: 700; color: var(--text); }
.hive-meta { font-size: 0.85rem; color: #666; margin-top: 0.15rem; }
.queen-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid #999;
  vertical-align: middle;
  margin-right: 4px;
}
.badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--honey-light);
  color: var(--green-dark);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-archived { background: #eee; color: #777; }

.empty-state {
  color: #666;
  background: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.add-form { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.add-form input, .add-form select {
  padding: 0.5rem 0.7rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  min-height: 42px;
  font-size: 0.9rem;
}
.add-form input[type="text"] { flex: 1; min-width: 150px; }
.btn-small {
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  background: var(--green);
  color: var(--white);
  cursor: pointer;
  min-height: 42px;
}
.btn-small:hover { background: var(--green-dark); }
.btn-del {
  background: none;
  border: none;
  color: #c62828;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.25rem 0.4rem;
}
.btn-del:hover { color: #8e0000; }

@media (max-width: 560px) {
  .stats-row { grid-template-columns: 1fr; }
  .hive-item { flex-direction: column; align-items: flex-start; }
}
