:root {
  --ink: #15372f;
  --forest: #123f34;
  --green: #1c7c64;
  --lime: #cce85a;
  --paper: #f5f5ef;
  --muted: #71807a;
  --line: #e4e7df;
  --shadow: 0 18px 50px rgba(21, 55, 47, .08);
}

body {
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.5 "DM Sans", sans-serif;
}

.topbar {
  z-index: 1030;
  background: rgba(245, 245, 239, .9);
  backdrop-filter: blur(14px);
  border-color: rgba(21, 55, 47, .08) !important;
}

.brand {
  color: var(--ink);
  font: 700 20px Manrope, sans-serif;
  text-decoration: none;
  white-space: nowrap;
}

.brand strong { color: var(--green); }
.brand-mark {
  width: 35px;
  height: 35px;
  border-radius: 10px;
  background: var(--forest);
}
.brand-mark span {
  width: 4px;
  border-radius: 3px;
  background: var(--lime);
}
.brand-mark span:nth-child(1) { height: 7px; }
.brand-mark span:nth-child(2) { height: 13px; }
.brand-mark span:nth-child(3) { height: 18px; }

.btn {
  border-radius: 11px;
  font: 600 14px "DM Sans", sans-serif;
}
.btn-primary {
  --bs-btn-bg: var(--forest);
  --bs-btn-border-color: var(--forest);
  --bs-btn-hover-bg: #195345;
  --bs-btn-hover-border-color: #195345;
  --bs-btn-active-bg: #0d342b;
  box-shadow: 0 8px 18px rgba(18, 63, 52, .16);
}
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }

.eyebrow {
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hero h1 {
  font: 800 clamp(40px, 6vw, 68px)/.98 Manrope, sans-serif;
  letter-spacing: -.055em;
}
.hero h1 em { color: var(--green); font-style: normal; }
.hero-copy { max-width: 520px; color: var(--muted); font-size: 17px; }
.hero-decoration { position: relative; width: min(100%, 300px); aspect-ratio: 1.28; }
.hero-decoration span { position: absolute; border-radius: 50%; border: 1px solid rgba(28, 124, 100, .2); }
.hero-decoration span:nth-child(1) { inset: 0; background: radial-gradient(circle at 35% 35%, var(--lime), #7dba69); }
.hero-decoration span:nth-child(2) { width: 38%; aspect-ratio: 1; right: -4%; top: -6%; background: var(--forest); border: 15px solid var(--paper); }
.hero-decoration span:nth-child(3) { width: 19%; aspect-ratio: 1; left: -3%; bottom: 5%; background: #fff; border: 12px solid var(--paper); }

.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.stat-card strong { font: 800 25px Manrope, sans-serif; }
.stat-card div span { color: var(--muted); font-size: 13px; }
.stat-icon { width: 43px; height: 43px; border-radius: 12px; font-size: 19px; font-weight: 700; flex: 0 0 auto; }
.mint { background: #e3f3e9; color: #278568; }
.blue { background: #e5eff8; color: #3e719e; }
.amber { background: #fff0cf; color: #a66d00; }
.violet { background: #ede8f7; color: #7155a1; }

.content-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.section-heading, .results-footer { border-color: var(--line) !important; }
.section-heading { border-bottom: 1px solid var(--line); }
h2 { font: 800 23px Manrope, sans-serif; letter-spacing: -.025em; }
.input-group-text { color: var(--muted); background: #fff; border-color: var(--line); }
.form-control, .form-select { border-color: var(--line); }
.form-control:focus, .form-select:focus { border-color: var(--green); box-shadow: 0 0 0 .25rem rgba(28, 124, 100, .12); }

.table { --bs-table-bg: transparent; --bs-table-hover-bg: #fbfcf9; }
.table th { color: #84908b; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; background: #fafaf7; }
.table > :not(caption) > * > * { padding: 17px 20px; color: inherit; border-color: #eff0eb; }
.line-number { font-weight: 700; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #38a375; box-shadow: 0 0 0 3px #e3f4ec; flex: 0 0 auto; }
.status-dot.inactive { background: #aeb6b2; box-shadow: 0 0 0 3px #eef0ef; }
.subtext { color: #87918d; font-size: 11px; }
.device-pill { background: #edf5f1; color: #39715f; border-radius: 20px; font-size: 12px; font-weight: 600; }
.map-link { color: var(--green); font-size: 11px; text-decoration: none; }
.icon-btn { width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: #66736e; font-size: 19px; }
.icon-btn:hover { background: #edf3f0; color: var(--green); }

.empty-state > span { width: 62px; height: 62px; border-radius: 18px; background: #e6f1ec; color: var(--green); font-size: 27px; }
.empty-state h3 { font: 700 18px Manrope, sans-serif; }
.empty-state p, .results-footer, footer { color: var(--muted); }
.results-footer { border-top: 1px solid var(--line); font-size: 12px; }
.text-btn { border: 0; background: none; color: #a55858; }
footer { font-size: 12px; }

.modal-backdrop.show { opacity: .58; }
.modal-content { border: 0; border-radius: 20px; box-shadow: 0 30px 90px rgba(7, 32, 26, .28); }
.modal-content form { padding: 28px; }
.form-grid label > span { font-size: 12px; font-weight: 700; }
.app-toast { width: auto; color: #fff; background: var(--forest); border-radius: 10px; box-shadow: var(--shadow); }

@media (max-width: 575.98px) {
  .brand { font-size: 17px; }
  .hero h1 { font-size: 43px; }
  .hero-copy { font-size: 15px; }
  .stat-card strong { font-size: 21px; }
  .stat-icon { width: 36px; height: 36px; }
  .modal-content form { padding: 22px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
