/* ═══════════════════════════════════════════════════════
   EarlyBird Design System — style.css
   ═══════════════════════════════════════════════════════ */

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

/* ── Design tokens ─────────────────────────────────────── */
:root {
  --green:             #1D9E75;
  --green-hover:       #178a63;
  --amber:             #BA7517;
  --bg:                #e8f6ff;
  --white:             #FFFFFF;
  --text-primary:      #111827;
  --text-secondary:    #6B7280;
  --text-placeholder:  #9CA3AF;
  --border:            #E5E7EB;
  --shadow-card:       0 1px 3px rgba(0,0,0,0.08);
  --radius-card:       16px;
  --radius-input:      12px;
  --radius-btn:        50px;
}

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

/* ── Base ──────────────────────────────────────────────── */
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { font-weight: 700; color: var(--text-primary); }
p { color: var(--text-secondary); }
a { color: var(--green); }

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 50px;
  border: none;
  border-radius: var(--radius-btn);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, opacity 0.15s ease;
  padding: 0 24px;
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--green);
  color: var(--white);
}
.btn-primary:hover { background: var(--green-hover); }

.btn-secondary {
  background: var(--white);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg); }

.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Inputs ────────────────────────────────────────────── */
.input-wrap {
  position: relative;
  margin-bottom: 16px;
}
.input-wrap .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 16px;
  pointer-events: none;
  line-height: 1;
}
.input-field {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--text-primary);
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
}
.input-field.no-icon { padding-left: 14px; }
.input-field::placeholder { color: var(--text-placeholder); }
.input-field:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(29,158,117,0.12);
}

select.input-field { cursor: pointer; }

textarea.input-field {
  height: auto;
  padding-top: 12px;
  padding-bottom: 12px;
  resize: vertical;
  line-height: 1.5;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

/* ── Cards ─────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 16px;
}

/* ── App header ────────────────────────────────────────── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 200;
  width: 100%;
  height: 60px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.app-header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.app-header-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--green);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.app-header-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.app-header-btn {
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 20px;
  transition: background 0.15s ease;
  text-decoration: none;
}
.app-header-btn:hover { background: var(--bg); }

.back-nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
}
.back-nav-link:hover { color: var(--text-primary); }

/* ── Bottom navigation ─────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--text-placeholder);
  font-size: 10px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  height: 100%;
  cursor: pointer;
  border: none;
  background: none;
  transition: color 0.15s ease;
  padding: 0;
  letter-spacing: 0.01em;
}
.bottom-nav-item:hover { color: var(--text-secondary); }
.bottom-nav-item.active { color: var(--green); }

.bottom-nav-item .nav-icon {
  font-size: 21px;
  line-height: 1;
}

/* Center Report button — raised green square */
.bottom-nav-item.nav-report { position: relative; }
.bottom-nav-item.nav-report .nav-icon-wrap {
  width: 46px;
  height: 46px;
  background: var(--green);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-top: -14px;
  box-shadow: 0 4px 14px rgba(29,158,117,0.40);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.bottom-nav-item.nav-report:hover .nav-icon-wrap {
  background: var(--green-hover);
  box-shadow: 0 4px 18px rgba(29,158,117,0.50);
}
.bottom-nav-item.nav-report .nav-label { color: var(--text-placeholder); }
.bottom-nav-item.nav-report.active .nav-label { color: var(--green); }

/* ── Page container ────────────────────────────────────── */
.page-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px 80px;
}

/* ── Auth screens (login / signup) ─────────────────────── */
.auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: var(--bg);
}
.auth-card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 36px 28px;
  width: 100%;
  max-width: 420px;
}
.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}
.auth-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--green);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.auth-logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}
.auth-title   { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.auth-subtitle { font-size: 14px; color: var(--text-secondary); margin-bottom: 28px; }
.auth-divider {
  text-align: center;
  color: var(--text-placeholder);
  font-size: 13px;
  margin: 20px 0;
  position: relative;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}
.auth-footer a { color: var(--green); text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* ── Alerts ────────────────────────────────────────────── */
.alert {
  display: none;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.4;
}
.alert-error   { background: #FEF2F2; border: 1px solid #FCA5A5; color: #991B1B; }
.alert-success { background: #ECFDF5; border: 1px solid #6EE7B7; color: #065F46; }
.alert-info    { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E40AF; }

/* ── Badge / pill ──────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-green  { background: #E1F5EE; color: #085041; }
.badge-amber  { background: #FEF9C3; color: #854D0E; }
.badge-blue   { background: #EFF6FF; color: #1E40AF; }
.badge-grey   { background: var(--bg); color: var(--text-secondary); border: 1px solid var(--border); }

/* ── Divider ───────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ── Utility ───────────────────────────────────────────── */
.text-secondary { color: var(--text-secondary); }
.text-green     { color: var(--green); }
.text-sm        { font-size: 13px; }
.text-xs        { font-size: 12px; }
.font-bold      { font-weight: 700; }
.mt-4  { margin-top:  4px; }
.mt-8  { margin-top:  8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-4  { margin-bottom:  4px; }
.mb-8  { margin-bottom:  8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
