:root {
  --bg: #f7f4eb;
  --text: #18202a;
  --muted: #6d7480;
  --card: rgba(255, 255, 255, 0.92);
  --line: #e6dfcc;
  --primary: #0f5c61;
  --primary-soft: #d9eff1;
  --warn: #a95f00;
  --ok: #24793d;
  --shadow: 0 20px 50px rgba(15, 92, 97, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 15% 10%, #fff9e8 0%, var(--bg) 50%),
    linear-gradient(150deg, #fffcf3 0%, #f7f4eb 100%);
  min-height: 100vh;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
  margin: 0;
}

.bg-shape {
  position: fixed;
  border-radius: 999px;
  z-index: -1;
}

.bg-one {
  width: 300px;
  height: 300px;
  background: #caefea;
  top: -140px;
  right: -120px;
}

.bg-two {
  width: 220px;
  height: 220px;
  background: #ffe3bb;
  bottom: -100px;
  left: -80px;
}

.phone-shell {
  width: min(100%, 540px);
  margin: 0 auto;
  min-height: 100vh;
  padding: 16px 14px 92px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

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

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.brand h1 {
  font-size: 20px;
}

.muted {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.quick-card,
.panel,
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.quick-card,
.panel {
  padding: 14px;
}

.quick-card p {
  margin: 8px 0 0;
  color: #5f656f;
}

#dashboardContent {
  margin-top: 12px;
}

.hidden {
  display: none;
}

.primary {
  border: 0;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  padding: 9px 12px;
  font-weight: 600;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}

.login-grid {
  display: grid;
  gap: 10px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.stats-grid {
  margin-top: 12px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(140px, 1fr);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.stats-grid::-webkit-scrollbar {
  height: 6px;
}

.stats-grid::-webkit-scrollbar-thumb {
  background: #d8d3c6;
  border-radius: 999px;
}

.stat {
  padding: 12px;
}

.stat h4 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
}

.stat p {
  margin: 0;
  font-size: 22px;
  font-family: "Space Grotesk", sans-serif;
}

.panel {
  margin-top: 12px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 10px;
}

.chip {
  font-size: 11px;
  border-radius: 999px;
  padding: 4px 10px;
  background: #fff5e5;
  color: var(--warn);
  white-space: nowrap;
}

.chip.success {
  background: #e9faee;
  color: var(--ok);
}

.requests-list,
.zone-list {
  display: grid;
  gap: 10px;
}

.request-item,
.zone-item {
  border: 1px solid #eee7d8;
  background: #fffdf7;
  border-radius: 12px;
  padding: 10px;
}

.request-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.request-meta,
.zone-item p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 10px;
  width: min(100% - 20px, 440px);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 6px;
  backdrop-filter: blur(10px);
}

.nav-item {
  border: 0;
  background: transparent;
  color: #64707a;
  border-radius: 10px;
  padding: 8px 4px;
  font-size: 13px;
}

.nav-item.active {
  background: var(--primary-soft);
  color: #0b4b4f;
  font-weight: 600;
}

@media (min-width: 768px) {
  body {
    padding: 20px;
  }

  .phone-shell {
    width: min(100%, 980px);
    min-height: calc(100vh - 40px);
    border: 1px solid #ddd5c4;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    padding: 20px 20px 20px;
  }

  .stats-grid {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
  }

  .bottom-nav {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 14px;
  }
}

@media (min-width: 1100px) {
  .phone-shell {
    width: min(100%, 1240px);
    padding: 24px;
  }

  .topbar {
    margin-bottom: 18px;
  }

  #dashboardContent {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 14px;
  }

  #dashboardContent .quick-card,
  #dashboardContent .stats-grid {
    grid-column: 1 / -1;
  }

  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

  #loginPanel {
    max-width: 760px;
  }

  .panel {
    margin-top: 0;
  }

  .bottom-nav {
    display: none;
  }
}

@media (max-width: 420px) {
  .row {
    grid-template-columns: 1fr;
  }
}
