/* === RESET & BASE === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Montserrat', system-ui, sans-serif;
  background: #f5f5f0;
  color: #2d2d2d;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: #2e7d32; text-decoration: none; }
a:hover { text-decoration: underline; }

/* === NAV === */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  background: #fff;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
  z-index: 1000;
  height: 64px;
  overflow: hidden;
}
.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; }
.nav-logo:hover { text-decoration: none; }
.nav-logo-img { height: 102px !important; max-height: 102px !important; width: auto !important; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 14px; font-weight: 500; color: #555; }
.nav-links a:hover { color: #2e7d32; text-decoration: none; }
.nav-cta {
  background: #2e7d32 !important;
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600 !important;
}
.nav-cta:hover { background: #256b29 !important; }
.theme-toggle {
  background: none; border: none; cursor: pointer;
  font-size: 20px; padding: 4px 8px; border-radius: 8px;
  transition: background 0.2s;
}
.theme-toggle:hover { background: rgba(0,0,0,0.05); }

/* Light/dark asset switching */
.dark-only { display: none; }
.light-only { display: inline; }
body.dark .dark-only { display: inline; }
body.dark .light-only { display: none; }

/* === DARK THEME === */
body.dark { background: #1a1a1a; color: #e0e0e0; }
body.dark .nav { background: #222; box-shadow: 0 1px 8px rgba(0,0,0,0.3); }
body.dark .nav-links a { color: #aaa; }
body.dark .nav-cta { background: #2e7d32 !important; color: #fff !important; }
body.dark .theme-toggle { color: #fff; }
body.dark .theme-toggle:hover { background: rgba(255,255,255,0.1); }
body.dark .hero-text h1 { color: #f0f0f0; }
body.dark .hero-sub { color: #999; }
body.dark .stat-num { color: #e0e0e0; }
body.dark .login-card { background: #2a2e28; box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
body.dark .login-card h2 { color: #e0e0e0; }
body.dark .login-sub { color: #888; }
body.dark .login-legal { color: #777; }
body.dark .btn { background: #fff; border-color: #ddd; color: #2d2d2d; }
body.dark .btn:hover { background: #f0f0f0; }
body.dark .features { background: #f5f5f0; color: #2d2d2d; }
body.dark .features h2 { color: #2d2d2d; }
body.dark .feature { background: #1a1a1a; color: #e0e0e0; box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
body.dark .feature h3 { color: #e0e0e0; }
body.dark .feature p { color: #bbb; }
body.dark .download-banner { background: #f5f5f0; }
body.dark .download-banner h2 { color: #2d2d2d; }
body.dark .download-banner p { color: #555; }
body.dark .store-btn { background: #1a1a1a; border-color: #333; color: #fff; }
body.dark .store-btn:hover { background: #111; border-color: #2e7d32; }
body.dark .feature { background: #2a2a2a; color: #e0e0e0; box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
body.dark .feature h3 { color: #e0e0e0; }
body.dark .feature p { color: #999; }
body.dark .footer { color: #666; }

/* === HERO === */
.hero {
  padding: 88px 24px 60px;
  display: flex;
}
.hero-inner {
  max-width: 1140px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 60px;
}
.hero-text { flex: 1; }
.hero-text h1 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
}
.hero-text h1 em { font-style: normal; }
.plantao-img {
  height: 48px;
  vertical-align: baseline;
  margin-left: -2px;
  position: relative;
  top: 1px;
}
.hero-sub {
  font-size: 16px;
  color: #666;
  max-width: 480px;
  margin-bottom: 40px;
  line-height: 1.7;
}

/* Stats */
.stats { display: flex; gap: 40px; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: 32px; font-weight: 700; color: #2e9d52; }
.stat-label { font-size: 13px; color: #999; margin-top: 2px; }

/* === LOGIN CARD === */
.login-card {
  background: #f0f4e8;
  border-radius: 16px;
  padding: 36px 32px;
  width: 380px;
  min-width: 340px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.login-cactus {
  width: 72px;
  height: auto;
  margin-bottom: 12px;
}
.login-card h2 {
  font-family: 'Quicksand', sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}
.login-sub {
  font-size: 14px;
  color: #999;
  margin-bottom: 20px;
}
.login-error {
  font-size: 13px;
  color: #d32f2f;
  margin-bottom: 12px;
  min-height: 18px;
}

/* Google button container */
.google-btn-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
  min-height: 44px;
}

/* Apple button */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 44px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #2d2d2d;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
.btn:hover {
  background: #fafafa;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.login-legal {
  font-size: 11px;
  color: #999;
  margin-top: 16px;
  line-height: 1.5;
}
.login-legal a { color: #2e7d32; text-decoration: underline; }

/* === FEATURES === */
.features {
  background: #1a1a1a;
  color: #fff;
  padding: 80px 24px;
}
.features h2 {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  font-weight: 800;
  font-variation-settings: 'SOFT' 50;
  text-align: center;
  margin-bottom: 48px;
}
.features-grid {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.feature {
  background: #f5f5f0;
  color: #2d2d2d;
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.feature-icon {
  margin-bottom: 16px;
}
.feature h3 {
  font-family: 'Quicksand', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #2d2d2d;
}
.feature p { font-size: 14px; color: #555; line-height: 1.6; }

/* === PRICING === */
.pricing { padding: 80px 24px; text-align: center; max-width: 900px; margin: 0 auto; }
.pricing h2 { font-family: 'Fraunces', serif; font-size: 32px; font-weight: 800; font-variation-settings: 'SOFT' 50; margin-bottom: 32px; margin-top: -40px; }
.pricing-sub { color: #555; font-size: 16px; margin-bottom: 40px; }
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.pricing-card { background: #fff; border-radius: 16px; padding: 32px 24px; text-align: center; border: 2px solid #e0e0e0; position: relative; box-shadow: 0 4px 20px rgba(0,0,0,0.08); cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; }
.pricing-card:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.12); }
.pricing-card-selected { border-color: #2e7d32 !important; box-shadow: 0 6px 28px rgba(46,125,50,0.2) !important; }
.pricing-card-featured { border-color: #e0e0e0; }
.pricing-card-featured.pricing-card-selected { border-color: #2e7d32 !important; box-shadow: 0 8px 32px rgba(46,125,50,0.25) !important; }
.pricing-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: #2e7d32; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 1px; padding: 4px 16px; border-radius: 20px; }
.pricing-card h3 { font-family: 'Quicksand', sans-serif; font-size: 26px; margin-bottom: 4px; margin-top: 8px; }
.pricing-tagline { color: #777; font-size: 13px; font-style: italic; margin-bottom: 20px; }
.pricing-price { display: flex; align-items: flex-start; justify-content: center; gap: 2px; margin-bottom: 8px; }
.pricing-currency { font-size: 16px; font-weight: 700; color: #2d2d2d; margin-top: 8px; }
.pricing-amount { font-size: 56px; font-weight: 700; line-height: 1; color: #2d2d2d; }
.pricing-cents { font-size: 22px; font-weight: 700; color: #2d2d2d; margin-top: 4px; }
.pricing-period { font-size: 13px; color: #999; margin-top: 36px; }
.pricing-card-featured .pricing-currency,
.pricing-card-featured .pricing-amount,
.pricing-card-featured .pricing-cents { color: #2e7d32; }
.pricing-detail { font-size: 13px; font-weight: 600; color: #e65100; margin-bottom: 4px; }
.pricing-detail-green { color: #2e7d32; }
.pricing-after { font-size: 12px; color: #999; margin-bottom: 20px; }
.pricing-features { list-style: none; text-align: left; margin: 16px 0; padding: 0; }
.pricing-features li { font-size: 14px; padding: 5px 0; color: #555; display: flex; align-items: center; gap: 8px; }
.check-icon { flex-shrink: 0; }
body.dark .pricing-features li { color: #bbb; }
.pricing-card .btn { display: inline-block; width: 100%; padding: 14px; font-size: 15px; font-weight: 600; border-radius: 12px; text-decoration: none; cursor: pointer; }
.btn-primary { background: #2e7d32; color: #fff; border: none; }
.btn-primary:hover { background: #256b29; }
.btn-outline { background: transparent; color: #2d2d2d; border: 2px solid #ccc; }
.btn-outline:hover { border-color: #2e7d32; color: #2e7d32; }
.pricing-cta-wrap { text-align: center; margin: 28px 0 16px; }
.pricing-cta { display: inline-flex; align-items: center; justify-content: center; padding: 16px 48px; font-size: 17px; font-weight: 700; line-height: 1; border-radius: 12px; background: #2e7d32; color: #fff; text-decoration: none; border: none; cursor: pointer; transition: background 0.2s; }
.pricing-cta:hover { background: #256b29; }
.pricing-footnote { font-size: 12px; color: #999; max-width: 600px; margin: 0 auto; }

body.dark .pricing-card { background: #1a1a1a; border-color: #333; }
body.dark .pricing-card-featured { border-color: #2e7d32; }
body.dark .pricing-currency, body.dark .pricing-amount, body.dark .pricing-cents { color: #e0e0e0; }
body.dark .pricing-card-featured .pricing-currency,
body.dark .pricing-card-featured .pricing-amount,
body.dark .pricing-card-featured .pricing-cents { color: #4caf50; }
body.dark .btn-outline { color: #e0e0e0; border-color: #555; }
body.dark .btn-outline:hover { border-color: #4caf50; color: #4caf50; }

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

/* === LOGIN MODAL === */
.login-modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.login-modal-overlay.open { display: flex; }
.login-modal { background: #fff; border-radius: 20px; padding: 40px 32px; max-width: 400px; width: 90%; text-align: center; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.login-modal-close { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 28px; color: #999; cursor: pointer; line-height: 1; }
.login-modal-close:hover { color: #333; }
.login-modal-icon { height: 60px; margin-bottom: 16px; }
.login-modal h2 { font-family: 'Fraunces', serif; font-size: 24px; font-weight: 800; font-variation-settings: 'SOFT' 50; margin-bottom: 4px; }
.login-modal-sub { color: #777; font-size: 14px; margin-bottom: 24px; }
.login-modal .google-btn-wrap { margin-bottom: 12px; }
.login-modal .btn-apple { width: 100%; margin-bottom: 16px; }
.login-modal .login-legal { font-size: 11px; color: #999; }
.login-modal .login-legal a { color: #2e7d32; }

body.dark .login-modal { background: #1a1a1a; }
body.dark .login-modal-close { color: #666; }
body.dark .login-modal-close:hover { color: #ccc; }
body.dark .login-modal h2 { color: #e0e0e0; }

/* === DOWNLOAD BANNER === */
.download-banner { background: #111; padding: 60px 24px; text-align: center; }
.download-inner { max-width: 600px; margin: 0 auto; }
.download-banner h2 { font-family: 'Fraunces', serif; font-size: 32px; font-weight: 800; font-variation-settings: 'SOFT' 50; color: #fff; margin-bottom: 8px; }
.download-banner p { color: #888; font-size: 15px; margin-bottom: 32px; }
.store-buttons { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.store-btn { display: inline-flex; align-items: center; gap: 12px; background: #222; border: 1px solid #444; border-radius: 12px; padding: 12px 24px; text-decoration: none; color: #fff; transition: background 0.2s, border-color 0.2s; }
.store-btn:hover { background: #333; border-color: #2e7d32; text-decoration: none; }
.store-text { display: flex; flex-direction: column; text-align: left; }
.store-label { font-size: 10px; color: #aaa; line-height: 1.2; }
.store-name { font-size: 18px; font-weight: 600; line-height: 1.2; }

/* === FOOTER === */
.footer {
  padding: 32px 24px;
  text-align: center;
  font-size: 13px;
  color: #999;
}
.footer-links { margin-top: 8px; display: flex; justify-content: center; gap: 16px; }
.footer-links a { color: #2e7d32; font-size: 12px; }

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
  }
  .hero-text h1 { font-size: 36px; }
  .plantao { font-size: 42px; }
  .hero-sub { margin: 0 auto 32px; }
  .stats { justify-content: center; }
  .login-card {
    width: 100%;
    min-width: auto;
    max-width: 400px;
  }
  .features-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
}
