* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
}

a { color: var(--green); }
a:hover { color: var(--green-dark); }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(20px + env(safe-area-inset-top)) 20px 20px;
  background: var(--green);
  color: #fff;
}

.page-header h1 { margin: 0; font-size: 22px; font-weight: 800; }

.page-header__action {
  height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 16px calc(100px + env(safe-area-inset-bottom));
}

.card {
  padding: 16px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card p { margin: 0; }

.form { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; }

.field label { color: var(--text-2); font-size: 13px; font-weight: 700; }

/* 16px keeps iOS from zooming in on focus. */
.field input {
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

.button {
  height: 52px;
  border: 0;
  border-radius: var(--r-ctl);
  background: var(--green);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
}

.flash {
  padding: 12px 16px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 700;
}

.flash--alert { background: var(--red-soft); color: var(--red); }

.login {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 400px;
  margin: 0 auto;
  padding: 72px 16px 32px;
}

.login__brand {
  margin: 0;
  color: var(--green);
  font-size: 34px;
  font-weight: 800;
  text-align: center;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  height: calc(76px + env(safe-area-inset-bottom));
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #fff;
}

.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 48px;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.bottom-nav__item[aria-current="page"] { color: var(--green); font-weight: 800; }
.bottom-nav__item[aria-disabled="true"] { opacity: .45; }

.bottom-nav__add {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: 56px;
  height: 56px;
  margin-top: -26px;
  border-radius: 28px;
  background: var(--green);
  box-shadow: 0 4px 12px rgba(12, 127, 52, .35);
  color: #fff;
}
