/* ══════════════════════════════════════
   LilyHR — Shared CSS
   ══════════════════════════════════════ */

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

:root {
  --lily: #2D6A4F;
  --lily-mid: #40916C;
  --lily-light: #B7E4C7;
  --lily-pale: #D8F3DC;
  --lily-faint: #F0FAF3;
  --ink: #1B2D27;
  --mist: #F7FAF8;
  --stone: #6B7C74;
  --border: #D4E8DC;
  --white: #FFFFFF;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3 { font-family: 'Cormorant Garamond', serif; }

em { font-style: italic; color: var(--lily-mid); }

/* ── LAYOUT ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ── SECTION HEADERS ── */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.section-header.center-dark { text-align: center; }

.section-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lily-mid);
  margin-bottom: 12px;
}

.section-eyebrow.light { color: var(--lily-light); }

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 300;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-title.light { color: white; }

.section-sub {
  font-size: 15px;
  color: var(--stone);
  line-height: 1.7;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: 9px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-lg { padding: 14px 28px; font-size: 15px; }

.btn-primary {
  background: var(--lily);
  color: white;
}
.btn-primary:hover { background: var(--lily-mid); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--mist); }

.btn-outline {
  background: transparent;
  color: var(--lily);
  border: 1px solid var(--lily-light);
}
.btn-outline:hover { background: var(--lily-faint); }

.btn-outline-light {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.35);
}
.btn-outline-light:hover { background: rgba(255,255,255,0.1); }

.btn-white {
  background: white;
  color: var(--lily);
}
.btn-white:hover { background: var(--lily-pale); }

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(27,45,39,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: background 0.3s;
}

.nav.scrolled {
  background: rgba(27,45,39,0.98);
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 300;
  color: white;
  text-decoration: none;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.nav-logo span { color: var(--lily-light); font-style: italic; }

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

.nav-links a {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover { color: white; }
.nav-links a.active { color: var(--lily-light); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-actions .btn-ghost {
  color: rgba(255,255,255,0.65);
  border-color: rgba(255,255,255,0.15);
}

.nav-actions .btn-ghost:hover { color: white; background: rgba(255,255,255,0.06); }

/* Prominent Log In button in nav */
.btn-nav-signin {
  background: rgba(255,255,255,0.12);
  color: white;
  border: 1.5px solid rgba(255,255,255,0.6);
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.01em;
}
.btn-nav-signin:hover {
  background: rgba(255,255,255,0.22);
  border-color: white;
  color: white;
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.nav-mobile {
  padding: 16px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid rgba(255,255,255,0.07);
  max-height: calc(100vh - 70px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-mobile a {
  padding: 10px 12px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 15px;
  border-radius: 8px;
  transition: background 0.15s;
}

.nav-mobile a:hover { background: rgba(255,255,255,0.07); color: white; }

.mob-auth { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; flex-direction: column; gap: 8px; }
.mob-auth .btn { width: 100%; text-align: center; justify-content: center; display: block; padding: 12px 20px; font-size: 15px; border-radius: 10px; cursor: pointer; font-weight: 600; }
.mob-auth .btn-primary { background: var(--lily); color: white; border: none; }
.mob-auth .btn-primary:hover { background: var(--lily-mid); }
.mob-auth .btn-ghost { background: transparent; color: rgba(255,255,255,0.75); border: 1.5px solid rgba(255,255,255,0.25); }
.mob-auth .btn-ghost:hover { background: rgba(255,255,255,0.07); color: white; }
.mob-auth .btn-nav-signin { background: rgba(255,255,255,0.12); color: white; border: 1.5px solid rgba(255,255,255,0.5); width: 100%; text-align: center; display: block; padding: 12px 20px; font-size: 15px; border-radius: 10px; cursor: pointer; font-weight: 600; }

/* ── PAGE HERO (interior pages) ── */
.page-hero {
  background: var(--ink);
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 80% 50%, rgba(45,106,79,0.25) 0%, transparent 70%);
}

.page-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.page-hero .section-eyebrow { color: var(--lily-light); }

.page-hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 4.5vw, 58px);
  font-weight: 300;
  color: white;
  line-height: 1.1;
  margin-bottom: 20px;
}

.page-hero p {
  font-size: 17px;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  max-width: 560px;
}

/* ── FOOTER ── */
.footer {
  background: var(--ink);
  padding: 72px 0 40px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 300;
  color: white;
  margin-bottom: 14px;
}

.footer-logo span { color: var(--lily-light); font-style: italic; }

.footer-brand p {
  font-size: 13.5px;
  color: rgba(255,255,255,0.4);
  line-height: 1.6;
  margin-bottom: 12px;
}

.footer-legal {
  font-size: 12px !important;
  color: rgba(255,255,255,0.25) !important;
  line-height: 1.6 !important;
  margin-top: 16px !important;
}

.footer-heading {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 16px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-col a:hover { color: white; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── UTILITY ── */
.hidden { display: none !important; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.pill-green { background: var(--lily-pale); color: var(--lily); }
.pill-dark { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6); }

/* ── MOBILE ── */
@media (max-width: 768px) {
  .container { padding: 0 18px; }

  /* Nav */
  .nav-links, .nav-actions { display: none; }
  .nav-hamburger { display: block; }
  .nav-inner { padding: 0 18px; gap: 0; justify-content: space-between; }

  /* Page hero */
  .page-hero { padding: 100px 0 48px; }
  .page-hero h1 { font-size: 34px; }
  .page-hero p { font-size: 15px; }

  /* Section headings */
  .section-title { font-size: 28px; }
  .section-sub { font-size: 14px; }

  /* Buttons */
  .btn-lg { padding: 12px 22px; font-size: 14px; }

  /* Footer */
  .footer { padding: 48px 0 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .section-title { font-size: 26px; }
}

/* ══════════════════════════════════════
   AUTH MODAL
   ══════════════════════════════════════ */
#auth-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 20px 0;
}

#auth-modal.open { display: flex; }

.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(27,45,39,0.7);
  backdrop-filter: blur(4px);
}

.auth-box {
  position: relative;
  z-index: 1;
  background: white;
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  margin: auto 16px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 24px 80px rgba(0,0,0,0.25);
  animation: authSlideIn 0.25s ease;
}

@keyframes authSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: none;
  font-size: 16px;
  color: var(--stone);
  cursor: pointer;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.auth-close:hover { background: var(--mist); }

.auth-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 300;
  color: var(--ink);
  margin-bottom: 6px;
}
.auth-logo span { color: var(--lily-mid); font-style: italic; }

.auth-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 300;
  color: var(--ink);
  margin-bottom: 4px;
}

.auth-sub {
  font-size: 13px;
  color: var(--stone);
  margin-bottom: 24px;
  line-height: 1.5;
}

.auth-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 16px;
}
.auth-google:hover { background: var(--mist); border-color: #ccc; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

.auth-divider {
  text-align: center;
  position: relative;
  margin: 14px 0;
}
.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: var(--border);
}
.auth-divider span {
  position: relative;
  background: white;
  padding: 0 12px;
  font-size: 12px;
  color: var(--stone);
}

.auth-tabs {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  margin-bottom: 20px;
}
.auth-tab {
  flex: 1;
  padding: 9px;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--stone);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}
.auth-tab.active { background: var(--lily); color: white; }
.auth-tab:not(.active):hover { background: var(--mist); }

.auth-panel { display: none; }
.auth-panel.active { display: block; }

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}
.auth-field label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lily);
}
.auth-field input {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--mist);
  outline: none;
  transition: border-color 0.15s;
}
.auth-field input:focus {
  border-color: var(--lily-mid);
  box-shadow: 0 0 0 3px rgba(64,145,108,0.1);
}

.auth-forgot {
  text-align: right;
  margin-bottom: 14px;
  margin-top: -8px;
}
.auth-forgot a { font-size: 12px; color: var(--lily-mid); text-decoration: none; }
.auth-forgot a:hover { text-decoration: underline; }

.auth-submit {
  width: 100%;
  padding: 13px;
  background: var(--lily);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 12px;
}
.auth-submit:hover { background: var(--lily-mid); }

.auth-terms {
  font-size: 12px;
  color: var(--stone);
  text-align: center;
  line-height: 1.5;
  margin-top: 8px;
}
.auth-terms a { color: var(--lily-mid); text-decoration: none; }

.auth-msg {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 8px;
  line-height: 1.4;
}
.auth-msg.error   { background: #FDEAEA; color: #C0392B; }
.auth-msg.success { background: var(--lily-pale); color: var(--lily); }
.auth-msg.hidden  { display: none; }

/* ══════════════════════════════════════
   NAV AVATAR (logged-in state)
   ══════════════════════════════════════ */
.nav-avatar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 5px 10px 5px 5px;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,0.12);
  transition: background 0.15s;
}
.nav-avatar-btn:hover { background: rgba(255,255,255,0.07); }

.nav-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--lily-mid);
  color: white;
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.nav-user-info { display: flex; flex-direction: column; }

.nav-user-name {
  font-size: 13px;
  font-weight: 500;
  color: white;
  line-height: 1.2;
}

.nav-user-plan {
  font-size: 10px;
  color: var(--lily-light);
  line-height: 1;
  letter-spacing: 0.04em;
}

@media (max-width: 768px) {
  .auth-box { padding: 28px 20px; }
  .nav-user-info { display: none; }
}

/* ══════════════════════════════════════
   NAV ACCOUNT DROPDOWN
   ══════════════════════════════════════ */
.nav-account-wrap {
  position: relative;
}

.nav-account-wrap:hover .nav-dropdown,
.nav-account-wrap.open .nav-dropdown {
  display: block;
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.14);
  width: 220px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 300;
  animation: dropIn 0.15s ease;
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-dropdown-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
}

.nav-dropdown-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-dropdown-email {
  font-size: 11px;
  color: var(--stone);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-dropdown-plan {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--lily);
  background: var(--lily-pale);
  padding: 2px 8px;
  border-radius: 10px;
}

.nav-dropdown-items {
  padding: 6px 0;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13.5px;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.1s;
}

.nav-dropdown-item:hover { background: var(--mist); }

.nav-dropdown-item.danger { color: #C0392B; }
.nav-dropdown-item.danger:hover { background: #fdeaea; }

.nav-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.nav-dropdown-icon { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }

@media (max-width: 768px) {
  .nav-account-wrap .nav-dropdown { right: -10px; }
}
