/* ==========================================================
   Green Track - Main Stylesheet
   Minimal green + white theme
   ========================================================== */

:root {
  --primary: #0f5c4e;
  --primary-dark: #0b4d3d;
  --primary-light: #e7f4ec;
  --accent: #075c4d;
  --bg: #f7f9f8;
  --white: #ffffff;
  --border: #e3e8e5;
  --text: #22292a;
  --text-muted: #6b7876;
  --danger: #c0392b;
  --warning: #c58c1b;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(20, 40, 30, 0.06), 0 1px 2px rgba(20, 40, 30, 0.08);
  --sidebar-w: 240px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    "Segoe UI",
    -apple-system,
    BlinkMacSystemFont,
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  line-height: 1.25;
  margin: 0 0 0.5em;
  font-weight: 700;
  color: #16241c;
}
h1 {
  font-size: 1.9rem;
}
h2 {
  font-size: 1.5rem;
}
h3 {
  font-size: 1.2rem;
}
p {
  margin: 0 0 1em;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--primary);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease;
}
.btn:hover {
  background: var(--primary-dark);
  color: #fff;
  text-decoration: none;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}
.btn-secondary {
  background: #edf2ef;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: #e1e8e3;
  color: var(--text);
}
.btn-danger {
  background: var(--danger);
}
.btn-danger:hover {
  background: #a33324;
}
.btn-block {
  width: 100%;
}
.btn-icon {
  padding: 8px 10px;
}

/* ---------- Forms ---------- */
label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.88rem;
  color: #33403a;
}
.form-group {
  margin-bottom: 18px;
}
.form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.form-row .form-group {
  flex: 1;
  min-width: 200px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
input[type="tel"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.92rem;
  font-family: inherit;
  background: var(--white);
  color: var(--text);
}
textarea {
  resize: vertical;
  min-height: 90px;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.required::after {
  content: " *";
  color: var(--danger);
}

/* ---------- Alerts ---------- */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  border: 1px solid transparent;
}
.alert-success {
  background: #e7f6ed;
  color: #175c33;
  border-color: #bfe7cd;
}
.alert-error {
  background: #fbeae8;
  color: #9a2e20;
  border-color: #f2c6c0;
}
.alert-info {
  background: #eaf3fb;
  color: #1e5a8a;
  border-color: #c9e1f5;
}

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 14px;
  color: #1d2b23;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.badge-healthy {
  background: #e1f5e9;
  color: #157a3d;
}
.badge-growing {
  background: #e7f0fb;
  color: #1f5fa8;
}
.badge-attention {
  background: #fdf2de;
  color: #93650f;
}
.badge-damaged {
  background: #fce7de;
  color: #a0431c;
}
.badge-dead {
  background: #f4e1e1;
  color: #8a2a22;
}
.badge-pending {
  background: #f2ecfb;
  color: #5b3aa6;
}
.badge-approved {
  background: #e1f5e9;
  color: #157a3d;
}
.badge-rejected {
  background: #f4e1e1;
  color: #8a2a22;
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
thead th {
  background: #f1f6f3;
  color: #33413b;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
tbody tr:hover {
  background: #fafdfb;
}
tbody tr:last-child td {
  border-bottom: none;
}
.thumb {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
}

/* ==========================================================
   PUBLIC LAYOUT
   ========================================================== */
.public-navbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.public-navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--primary-dark);
}
.brand .leaf {
  font-size: 1.4rem;
}
.public-nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}
.public-nav-links a {
  color: #33413b;
  font-weight: 600;
  font-size: 0.92rem;
}
.public-nav-links a:hover {
  color: var(--primary);
  text-decoration: none;
}

.hero {
  background: #ffffff;
  padding: 70px 0 0;
  color: var(--text);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 48px;
  align-items: center;
  padding-bottom: 64px;
}
.hero-copy {
  text-align: left;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 5px 14px;
  border: 1px solid #c9e3d2;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 600;
}
.hero-eyebrow span {
  color: var(--primary);
}
.hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: 4rem;
  letter-spacing: -1px;
  line-height: 1.1;
  color: #16241c;
  margin: 0 0 0.45em;
}
.hero h1 span {
  color: var(--primary);
}
.hero p {
  max-width: 560px;
  margin: 0 0 1.8em;
  color: #3f4b45;
  font-size: 1.05rem;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-actions .btn {
  min-height: 46px;
  padding: 12px 26px;
  border-radius: 8px;
  font-size: 0.92rem;
}
.hero-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(15, 92, 78, 0.18);
}
.hero-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #ffffff;
}
.hero-secondary {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary-dark);
}
.hero-secondary:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}
.hero-secondary span {
  font-size: 1.2rem;
  line-height: 0;
  margin-right: 4px;
}

.team-card {
  background: #fff;
  color: var(--text);
  border-radius: 18px;
  padding: 22px 24px 18px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(20, 40, 30, 0.1);
}
.team-card-head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}
.team-card-head img {
  width: 96px;
  height: auto;
  flex-shrink: 0;
}
.team-card-head strong {
  display: block;
  font-size: 0.92rem;
  color: #16241c;
}
.team-card-head span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.team-card h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: 1.1rem;
  margin: 10px 0 8px;
  color: #16241c;
}
.team-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.team-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--border);
}
.team-list strong {
  display: block;
  font-size: 0.9rem;
}
.team-list small {
  color: var(--text-muted);
  font-size: 0.78rem;
}
.team-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.hero-stats {
  background: var(--primary-light);
  border-top: 1px solid #d7e9dd;
  padding: 26px 0;
}
.hero .stats-strip {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
  gap: 10px;
}
.hero .stat-box {
  background: transparent;
  border: 0;
  box-shadow: none;
  text-align: center;
}
.hero .stat-box .num {
  color: var(--primary);
  font-family: Georgia, "Times New Roman", serif;
}
.hero .stat-box .label {
  color: #3f4b45;
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero {
    padding-top: 40px;
  }
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 50px 0;
}
.stat-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  text-align: center;
}
.stat-box .num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}
.stat-box .label {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.features {
  padding: 20px 0 70px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.feature-card .icon {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.public-footer {
  border-top: 1px solid var(--border);
  padding: 26px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.impact-banner-wrap {
  margin-top: 40px;
  margin-bottom: 40px;
}

.impact-banner {
  background: linear-gradient(135deg, #0b4d3d 0%, #0f5c4e 100%);
  border-radius: 28px;
  padding: 42px 44px;
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 34px;
  color: #edf8f3;
  box-shadow: 0 20px 45px rgba(11, 77, 61, 0.22);
}

.impact-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.impact-kicker {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.impact-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.impact-kicker-copy {
  display: flex;
  flex-direction: column;
}

.impact-kicker-copy small {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: rgba(237, 248, 243, 0.78);
}

.impact-kicker-copy strong {
  font-size: 1.05rem;
  margin-top: 2px;
  color: #fff;
}

.impact-banner h3 {
  color: #ffffff;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.07;
  margin-bottom: 18px;
  max-width: 680px;
}

.impact-banner p {
  color: rgba(237, 248, 243, 0.92);
  font-size: 1.02rem;
  max-width: 700px;
  margin-bottom: 24px;
}

.impact-targets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.impact-target {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 14px 14px 12px;
}

.impact-target span {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(237, 248, 243, 0.8);
  margin-bottom: 6px;
}

.impact-target strong {
  display: block;
  font-size: 0.86rem;
  line-height: 1.35;
  color: #fff;
}

.impact-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}

.impact-quote {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 28px 24px 18px;
  margin-bottom: 26px;
}

.quote-num {
  display: inline-block;
  font-size: 2.8rem;
  line-height: 1;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 14px;
}

.impact-quote p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.02rem;
  line-height: 1.55;
}

.impact-partners {
  padding-top: 8px;
}

.impact-partners h4 {
  color: rgba(237, 248, 243, 0.78);
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  margin-bottom: 16px;
}

.partner-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-weight: 600;
  color: #f6faf8;
}

.partner-list span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 980px) {
  .impact-banner {
    grid-template-columns: 1fr;
    padding: 30px 24px;
  }

  .impact-targets {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .impact-banner {
    border-radius: 20px;
  }

  .impact-kicker {
    align-items: flex-start;
  }

  .impact-badge {
    width: 50px;
    height: 50px;
    font-size: 1.7rem;
  }

  .impact-banner h2 {
    font-size: 2.1rem;
  }
}

/* Auth pages */
.auth-wrap {
  width: min(1100px, 100%);
  min-height: calc(100vh - 66px);
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 40px 16px;
  margin: 0 auto;
}
.auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 500px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px 30px;
}
.auth-image {
  flex: 1;
  display: block;
}
.auth-image img {
  width: 100%;
  height: 100%;

  border-radius: 0 10px 10px 0;
}
.auth-card h1 {
  font-size: 1.5rem;
  text-align: center;
}
.auth-sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.9rem;
}
.auth-foot {
  text-align: center;
  margin-top: 18px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.role-picker {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}
.role-option {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}
.role-option input {
  display: none;
}
.role-option.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* ==========================================================
   AUTHENTICATED APP LAYOUT
   ========================================================== */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
}
.sidebar-brand {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--primary-dark);
  border-bottom: 1px solid var(--border);
}
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 10px;
}
.sidebar-section {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 16px 10px 6px;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #3a4842;
  font-weight: 600;
  font-size: 0.89rem;
  margin-bottom: 2px;
}
.sidebar-nav a:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
  text-decoration: none;
}
.sidebar-nav a.active {
  background: var(--primary);
  color: #fff;
}
.sidebar-nav .icon {
  width: 20px;
  text-align: center;
}
.sidebar-user {
  border-top: 1px solid var(--border);
  padding: 14px 16px;
  font-size: 0.82rem;
}
.sidebar-user .name {
  font-weight: 700;
  color: var(--text);
}
.sidebar-user .role {
  color: var(--text-muted);
  text-transform: capitalize;
}
.sidebar-user a {
  display: block;
  margin-top: 8px;
  font-weight: 600;
  color: var(--danger);
  font-size: 0.82rem;
}

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 28px 32px 60px;
  width: calc(100% - var(--sidebar-w));
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 10px;
}
.topbar h1 {
  margin: 0;
}
.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.menu-toggle {
  display: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}

/* ---------- Dashboard widgets ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}
.stat-card .icon {
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 6px;
}
.stat-card .num {
  font-size: 1.7rem;
  font-weight: 800;
}
.stat-card .label {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.dash-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 180px;
  margin-top: 10px;
}
.chart-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}
.chart-bar {
  width: 100%;
  background: var(--primary);
  border-radius: 6px 6px 0 0;
  transition: background 0.15s;
}
.chart-bar-col:hover .chart-bar {
  background: var(--primary-dark);
}
.chart-bar-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.activity-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.86rem;
}
.activity-item:last-child {
  border-bottom: none;
}
.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 6px;
  flex-shrink: 0;
}
.activity-time {
  color: var(--text-muted);
  font-size: 0.76rem;
}

/* ---------- Filters bar ---------- */
.filters-bar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 18px;
}
.filters-bar form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
}
.filters-bar .form-group {
  margin-bottom: 0;
  min-width: 160px;
  flex: 1;
}

/* ---------- Grid cards (biodiversity) ---------- */
.record-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.record-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.record-card img {
  height: 150px;
  width: 100%;
  object-fit: cover;
  background: var(--primary-light);
}
.record-card-body {
  padding: 14px;
}
.record-card-body h3 {
  font-size: 0.98rem;
  margin-bottom: 2px;
}
.record-card-body .sub {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 8px;
  font-style: italic;
}

/* ---------- Progress bar ---------- */
.progress {
  background: #eaf0ec;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}
.progress-bar {
  background: var(--primary);
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s;
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  gap: 6px;
  margin-top: 18px;
  justify-content: center;
}
.pagination a,
.pagination span {
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 0.84rem;
  color: var(--text);
  background: var(--white);
}
.pagination a:hover {
  background: var(--primary-light);
  text-decoration: none;
}
.pagination .current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.tabs a {
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
}
.tabs a.active {
  color: var(--primary);
  border-color: var(--primary);
}
.tabs a:hover {
  text-decoration: none;
  color: var(--primary);
}

/* ---------- Misc ---------- */
.text-muted {
  color: var(--text-muted);
}
.text-center {
  text-align: center;
}
.mt-0 {
  margin-top: 0;
}
.mb-0 {
  margin-bottom: 0;
}
.flex {
  display: flex;
}
.items-center {
  align-items: center;
}
.gap-8 {
  gap: 8px;
}
.gap-16 {
  gap: 16px;
}
.justify-between {
  justify-content: space-between;
}
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
}
.empty-state .icon {
  font-size: 2.4rem;
  margin-bottom: 10px;
}
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}
.tree-photo-lg {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.map-embed {
  width: 100%;
  height: 480px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 992px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-grid {
    grid-template-columns: 1fr;
  }
  .features,
  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 18px rgba(0, 0, 0, 0.15);
  }
  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 20px 16px 50px;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .features,
  .stats-strip {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 1.9rem;
    letter-spacing: -0.7px;
  }
  .hero {
    padding: 16px 0 42px;
  }
  .hero-eyebrow {
    max-width: calc(100% - 20px);
    font-size: 0.7rem;
  }
  .hero p {
    font-size: 1rem;
    line-height: 1.55;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    max-width: 300px;
    margin: 0 auto;
  }
  .public-nav-links {
    display: none;
  }
  .auth-wrap {
    padding: 24px 16px;
  }
  .auth-image {
    display: none;
  }
}

/* Landing hero: mobile overrides (kept last so they win) */
@media (max-width: 640px) {
  .hero h1 {
    font-size: 2rem;
    letter-spacing: -0.5px;
  }
  .hero-copy {
    text-align: left;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    max-width: none;
    margin: 0;
  }
  .hero-eyebrow {
    max-width: 100%;
  }
  .team-card-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
.role-picker {
  flex-wrap: wrap;
}
.role-option {
  min-width: 120px;
}
.new-species-box {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: var(--primary-light);
}

/* Team card refinements */
.hero-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}
.team-card {
  max-width: 420px;
  justify-self: end;
  width: 100%;
  text-align: left;
}
.team-card-head img {
  width: 120px;
  max-width: 40%;
  height: auto;
}
.team-list li,
.team-list li div {
  text-align: left;
}
@media (max-width: 860px) {
  .team-card {
    justify-self: stretch;
    max-width: none;
  }
}
