/* EcoCycle PWA — design tokens + screens (mirrors the supplied UI reference). */

:root {
  --green-900: #14603a;
  --green-700: #1e7a4c;
  --green-600: #2a9459;
  --green-500: #33a765;
  --green-100: #e6f4ec;
  --green-50: #f1f9f4;

  --ink: #16241c;
  --ink-2: #3c4d43;
  --muted: #7c8d83;
  --line: #e9efea;
  --page: #f6f9f7;
  --card: #ffffff;

  --blue: #2f80ed;
  --amber: #f0a81e;
  --violet: #8b5cf6;
  --slate: #64748b;
  --red: #e8483f;

  --r-lg: 20px;
  --r-md: 16px;
  --r-sm: 12px;
  --shadow: 0 1px 2px rgba(16, 40, 28, 0.04), 0 6px 18px rgba(16, 40, 28, 0.06);
  --shadow-sm: 0 1px 2px rgba(16, 40, 28, 0.06);
  --tab-h: 64px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: #e9efea;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

a {
  color: var(--green-700);
}

h1,
h2,
h3,
p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ------------------------------------------------------------------ shell */

.app {
  position: relative;
  width: min(430px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--page);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(16, 40, 28, 0.06);
}

@media (min-width: 900px) {
  .app {
    margin: 28px auto;
    min-height: calc(100dvh - 56px);
    border-radius: 28px;
  }
  .tabbar {
    bottom: 28px;
    border-radius: 0 0 28px 28px;
  }
}

.boot {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.boot-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(160deg, var(--green-500), var(--green-700));
  animation: pulse 1.1s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.9);
    opacity: 0.6;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
}

.screen {
  min-height: 100dvh;
  padding: 0 18px calc(var(--tab-h) + 28px + env(safe-area-inset-bottom));
  animation: fade 0.18s ease-out;
}

.screen.no-tabs {
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
}

/* Map screen fills the viewport so the place card sits above the tab bar. */
.map-screen {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

/* ---------------------------------------------------------------- top bars */

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) 0 14px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(var(--page) 72%, rgba(246, 249, 247, 0));
}

.topbar .avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--green-100);
  display: grid;
  place-items: center;
  color: var(--green-700);
  flex: none;
  overflow: hidden;
}

.topbar .greet {
  min-width: 0;
  flex: 1;
}

.topbar h1 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.topbar p {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  flex: none;
}

.icon-btn.ghost {
  background: transparent;
  box-shadow: none;
}

.icon-btn:active {
  transform: scale(0.94);
}

.page-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

/* ------------------------------------------------------------- hero (home) */

.stat-card {
  position: relative;
  border-radius: var(--r-lg);
  padding: 18px 20px 16px;
  color: #fff;
  background: linear-gradient(135deg, #1c7a4b 0%, #2c9c5c 100%);
  box-shadow: 0 10px 24px rgba(30, 122, 76, 0.24);
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -50px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
}

.stat-card .label {
  font-size: 13px;
  opacity: 0.86;
}

.stat-card .value {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 2px 0 10px;
}

.stat-card .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
}

.stat-card .delta {
  font-weight: 600;
  background: rgba(255, 255, 255, 0.16);
  padding: 3px 9px;
  border-radius: 999px;
}

.stat-card .leaf {
  position: absolute;
  right: 20px;
  top: 18px;
  opacity: 0.95;
}

/* ---------------------------------------------------------- quick actions */

.actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 16px 0 22px;
}

.action {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 12px 4px;
  border-radius: var(--r-md);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.action .ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--green-100);
  color: var(--green-700);
}

.action:active {
  transform: scale(0.96);
}

/* --------------------------------------------------------- section header */

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 2px 12px;
}

.section-head h2 {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.section-head .link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--green-700);
}

/* ------------------------------------------------------------ cat tiles */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.cat-tile {
  border-radius: var(--r-md);
  padding: 16px 8px 12px;
  display: grid;
  justify-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  border: 1px solid transparent;
  transition: border-color 0.15s, transform 0.1s;
}

.cat-tile .ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}

.cat-tile[aria-pressed='true'] {
  border-color: var(--green-500);
}

.cat-tile:active {
  transform: scale(0.97);
}

/* ------------------------------------------------------------ list rows */

.card {
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}

.row-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px;
  text-align: left;
  border-radius: var(--r-md);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.row-card:active {
  background: #fbfdfc;
}

.row-card + .row-card {
  margin-top: 10px;
}

.row-card .ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
}

.row-card .body {
  flex: 1;
  min-width: 0;
}

.row-card .body strong {
  display: block;
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.1px;
}

.row-card .body span {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-card .chev {
  color: #b6c4bb;
  flex: none;
}

.next-card {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px;
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  width: 100%;
  text-align: left;
}

.next-card .ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--green-100);
  color: var(--green-700);
  display: grid;
  place-items: center;
  flex: none;
}

.next-card strong {
  display: block;
  font-size: 14px;
}

.next-card span {
  font-size: 12.5px;
  color: var(--muted);
}

/* -------------------------------------------------------------- tab bar */

.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(430px, 100%);
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--line);
  z-index: 60;
}

.tabbar button {
  display: grid;
  place-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
  color: #93a49a;
  padding-top: 9px;
}

.tabbar button[aria-current='page'] {
  color: var(--green-700);
}

/* ------------------------------------------------------------- form bits */

.field {
  margin-bottom: 20px;
}

.field > label,
.field-label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.1px;
  margin: 0 2px 9px;
}

.select-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--card);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-sm);
  font-size: 14.5px;
  font-weight: 600;
  width: 100%;
  text-align: left;
}

.datestrip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: none;
}

.datestrip::-webkit-scrollbar {
  display: none;
}

.day {
  flex: none;
  width: 46px;
  padding: 9px 0 8px;
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 3px;
  justify-items: center;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.day b {
  font-size: 15px;
  color: var(--ink);
  font-weight: 700;
}

.day[aria-pressed='true'] {
  background: var(--green-600);
  color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 14px rgba(42, 148, 89, 0.3);
}

.day[aria-pressed='true'] b {
  color: #fff;
}

.day[disabled] {
  opacity: 0.4;
  box-shadow: none;
}

.chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 13px 10px;
  border-radius: var(--r-sm);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  border: 1.5px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.chip[aria-pressed='true'] {
  border-color: var(--green-600);
  color: var(--green-700);
  background: var(--green-50);
}

.chip:active {
  transform: scale(0.98);
}

.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip-row .chip {
  flex: none;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  box-shadow: none;
  background: var(--card);
  border: 1px solid var(--line);
}

.search {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  height: 44px;
  border-radius: var(--r-sm);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  color: var(--muted);
  margin-bottom: 12px;
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: none;
  font-size: 14px;
  color: var(--ink);
}

textarea,
.input {
  width: 100%;
  padding: 14px;
  border-radius: var(--r-sm);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  border: 1px solid transparent;
  outline: none;
  font-size: 14px;
  resize: none;
}

textarea:focus,
.input:focus {
  border-color: var(--green-500);
}

textarea::placeholder,
.input::placeholder {
  color: #a9b7ae;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1f8350, #2fa463);
  color: #fff;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.1px;
  box-shadow: 0 8px 18px rgba(31, 131, 80, 0.26);
}

.btn:active {
  transform: translateY(1px);
}

.btn[disabled] {
  opacity: 0.55;
  box-shadow: none;
}

.btn.ghost {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.btn.danger {
  background: #fdeceb;
  color: var(--red);
  box-shadow: none;
}

.btn.sm {
  padding: 9px 14px;
  width: auto;
  font-size: 12.5px;
  border-radius: 10px;
}

/* ------------------------------------------------------------- welcome */

.welcome {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #eaf7ef 0%, #f6fbf7 42%, #ffffff 100%);
  padding: 0;
}

.welcome .hero {
  padding: max(20px, env(safe-area-inset-top)) 26px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand .mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(160deg, var(--green-500), var(--green-700));
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 8px 18px rgba(30, 122, 76, 0.25);
  flex: none;
}

.brand .name {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.7px;
  line-height: 1.05;
}

.brand .tag {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

.welcome h2 {
  font-size: 30px;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 30px 0 12px;
  max-width: 17ch;
}

.welcome .sub {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 30ch;
}

.art {
  flex: 1;
  min-height: 300px;
  position: relative;
  display: grid;
  place-items: center;
  margin-top: -40px;
}

.art svg {
  width: min(112%, 440px);
  height: auto;
}

.welcome .cta {
  padding: 0 26px calc(26px + env(safe-area-inset-bottom));
  display: grid;
  gap: 14px;
}

.link-alt {
  text-align: center;
  font-size: 13.5px;
  color: var(--green-700);
  font-weight: 600;
}

/* -------------------------------------------------------------- sign in */

.auth {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 24px calc(28px + env(safe-area-inset-bottom));
}

.auth .brand {
  padding: max(20px, env(safe-area-inset-top)) 0 0;
}

.auth h2 {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin: 30px 0 6px;
}

.auth .sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.auth form {
  display: grid;
  gap: 14px;
}

.error {
  background: #fdeceb;
  color: #b3261e;
  font-size: 13px;
  padding: 11px 13px;
  border-radius: 10px;
}

.hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* -------------------------------------------------------------- history */

.seg {
  display: grid;
  grid-auto-flow: column;
  gap: 6px;
  padding: 5px;
  background: var(--card);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.seg button {
  padding: 9px 8px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}

.seg button[aria-selected='true'] {
  background: linear-gradient(135deg, #1f8350, #2fa463);
  color: #fff;
  box-shadow: 0 4px 10px rgba(31, 131, 80, 0.24);
}

.hist {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px;
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  width: 100%;
  text-align: left;
}

.hist + .hist {
  margin-top: 10px;
}

.hist .ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
}

.hist .body {
  flex: 1;
  min-width: 0;
}

.hist .body strong {
  font-size: 14.5px;
  font-weight: 650;
  display: block;
}

.hist .body span {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}

.hist .right {
  text-align: right;
  flex: none;
}

.hist .right b {
  font-size: 13.5px;
  font-weight: 700;
}

.badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 5px;
  background: var(--green-100);
  color: var(--green-700);
}

.badge.grey {
  background: #eef1ef;
  color: var(--muted);
}

.badge.amber {
  background: #fdf3e2;
  color: #b8790a;
}

.badge.blue {
  background: #e8f1fe;
  color: var(--blue);
}

.badge.red {
  background: #fdeceb;
  color: var(--red);
}

/* ------------------------------------------------------------------ map */

.map {
  position: relative;
  height: calc(100dvh - 132px - var(--tab-h) - env(safe-area-inset-bottom));
  min-height: 320px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #e7ede8;
  box-shadow: var(--shadow-sm);
}

.map-stage {
  position: relative;
  flex: 1;
  min-height: 0;
}

/* Track screen has no tab bar, and the driver + status cards must stay
   on screen, so the map takes a fixed share of the viewport instead. */
.screen.no-tabs > .map {
  height: 46dvh;
}

.map-stage .map {
  position: absolute;
  inset: 0;
  height: 100%;
  min-height: 0;
  border-radius: var(--r-md);
}

.map .leaflet-container {
  background: #e7ede8;
  font: inherit;
}

.place-list {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 178px;
  z-index: 500;
  max-height: 45%;
  overflow: auto;
  display: grid;
  gap: 8px;
}

.btn-link {
  color: var(--green-700);
  font-size: 13px;
  font-weight: 650;
  padding: 2px;
}

.pin {
  width: 26px;
  height: 26px;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  background: var(--green-600);
  border: 2.5px solid #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.pin.ewaste {
  background: var(--red);
}
.pin.tps {
  background: var(--blue);
}

.place-card {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 500;
  background: #fff;
  border-radius: var(--r-md);
  box-shadow: 0 12px 30px rgba(16, 40, 28, 0.16);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.place-card .top {
  display: flex;
  gap: 12px;
  align-items: center;
}

.place-card .thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  flex: none;
  background: linear-gradient(140deg, #cfe6d7, #a9d3b8);
  display: grid;
  place-items: center;
  color: var(--green-700);
}

.place-card strong {
  font-size: 14.5px;
  display: block;
}

.place-card .meta {
  font-size: 12px;
  color: var(--green-700);
  font-weight: 600;
  margin-top: 2px;
}

.place-card .addr {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.leaflet-popup-content-wrapper {
  border-radius: 12px;
}

.leaflet-popup-content {
  margin: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
}

.callout {
  background: var(--green-700);
  color: #fff;
  border-radius: 10px;
  padding: 7px 11px;
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
}

.callout::before {
  display: none;
}

/* -------------------------------------------------------------- tracking */

.driver {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 13px 14px;
  margin-top: 14px;
}

.driver .pic {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-700);
  display: grid;
  place-items: center;
  flex: none;
}

.driver strong {
  font-size: 14.5px;
  display: block;
}

.driver span {
  font-size: 12.5px;
  color: var(--muted);
}

.status-card {
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 14px;
  margin-top: 10px;
}

.status-card .head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-card .head .ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--green-100);
  color: var(--green-700);
  display: grid;
  place-items: center;
}

.status-card strong {
  font-size: 14.5px;
  display: block;
}

.status-card span {
  font-size: 12.5px;
  color: var(--muted);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 16px;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 16%;
  right: 16%;
  top: 11px;
  height: 2px;
  background: var(--line);
}

.timeline .step {
  display: grid;
  justify-items: center;
  gap: 7px;
  font-size: 10.5px;
  color: var(--muted);
  text-align: center;
  position: relative;
}

.timeline .dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  color: #fff;
  z-index: 1;
}

.timeline .step.done .dot {
  background: var(--green-600);
  border-color: var(--green-600);
}

.timeline .step.done {
  color: var(--ink-2);
}

.timeline .step small {
  display: block;
  color: #9aab9f;
  font-size: 10px;
}

/* -------------------------------------------------------------- profile */

.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 6px 0 18px;
}

.profile-head .pic {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-700);
  display: grid;
  place-items: center;
  flex: none;
}

.profile-head strong {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.3px;
  display: block;
}

.profile-head span {
  font-size: 13px;
  color: var(--muted);
}

.points-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, #1c7a4b, #2c9c5c);
  color: #fff;
  box-shadow: 0 10px 22px rgba(30, 122, 76, 0.24);
  width: 100%;
  text-align: left;
  margin-bottom: 18px;
}

.points-card .body {
  flex: 1;
}

.points-card .body small {
  font-size: 12px;
  opacity: 0.85;
  display: block;
}

.points-card .body b {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: block;
}

.points-card .body span {
  font-size: 11.5px;
  opacity: 0.85;
  display: block;
}

.menu {
  margin-bottom: 18px;
}

.menu .ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--green-50);
  color: var(--green-700);
  flex: none;
}

.menu .body strong {
  font-size: 14.5px;
  font-weight: 650;
}

.menu .body span {
  font-size: 12.5px;
  color: var(--muted);
}

/* --------------------------------------------------------------- sheets */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 30, 20, 0.42);
  z-index: 200;
  display: grid;
  align-items: end;
  animation: fade 0.15s ease-out;
}

.sheet {
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  max-height: 82dvh;
  overflow: auto;
  animation: rise 0.2s ease-out;
}

@keyframes rise {
  from {
    transform: translateY(18px);
  }
}

.sheet h3 {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.sheet .sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

.sheet .row-card {
  box-shadow: none;
  background: var(--page);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-h) + 22px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: #16241c;
  color: #fff;
  font-size: 13px;
  font-weight: 550;
  padding: 11px 18px;
  border-radius: 999px;
  z-index: 300;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
  animation: rise 0.18s ease-out;
  max-width: min(90vw, 380px);
  text-align: center;
}

@media (min-width: 900px) {
  .toast {
    bottom: calc(var(--tab-h) + 50px);
  }
}

.empty {
  text-align: center;
  padding: 44px 20px;
  color: var(--muted);
  font-size: 13.5px;
}

.empty .ico {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--green-50);
  color: var(--green-500);
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
}

/* ------------------------------------------------------------ superadmin */

.admin {
  padding: 0 16px calc(28px + env(safe-area-inset-bottom));
}

.admin .admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: max(14px, env(safe-area-inset-top)) 0 14px;
  position: sticky;
  top: 0;
  background: var(--page);
  z-index: 20;
}

.admin .admin-head h1 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.admin .admin-head span {
  font-size: 11.5px;
  color: var(--muted);
  display: block;
  margin-top: 1px;
}

.pill {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-700);
}

.kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.kpi {
  background: var(--card);
  border-radius: 14px;
  padding: 13px;
  box-shadow: var(--shadow-sm);
}

.kpi small {
  font-size: 11px;
  color: var(--muted);
  display: block;
}

.kpi b {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.6px;
}

.panel {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 14px;
  margin-bottom: 14px;
}

.panel > h3 {
  font-size: 13.5px;
  font-weight: 750;
  letter-spacing: -0.1px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 92px;
}

.bars .bar {
  flex: 1;
  background: linear-gradient(180deg, var(--green-500), var(--green-700));
  border-radius: 3px 3px 1px 1px;
  min-height: 2px;
  position: relative;
}

.bars .bar span {
  position: absolute;
  bottom: -16px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 8.5px;
  color: var(--muted);
}

.btn.sm.ghost {
  background: var(--page);
  box-shadow: none;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.table th {
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
  font-weight: 700;
  padding: 0 6px 8px;
  white-space: nowrap;
}

.table td {
  padding: 9px 6px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

/* Secondary line in a cell (address, time slot) — one line, ellipsis. */
.table td .sub {
  display: block;
  max-width: 13ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table .scroll {
  overflow-x: auto;
  margin: 0 -4px;
  padding: 0 4px;
}

.table .btn.sm {
  padding: 7px 11px;
  font-size: 12px;
}

.table th:last-child,
.table td:last-child {
  text-align: right;
}

.seg.admin-seg {
  margin-bottom: 14px;
}

.seg.admin-seg button {
  font-size: 12.5px;
}

.filters {
  display: flex;
  gap: 7px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filters button {
  flex: none;
  font-size: 11.5px;
  font-weight: 650;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
}

.filters button[aria-pressed='true'] {
  background: var(--green-700);
  border-color: var(--green-700);
  color: #fff;
}

.admin-login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(180deg, #10331f, #1e7a4c);
}

.admin-login .box {
  width: min(400px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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