:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #f1f3f6;
  --ink: #070b11;
  --muted: #7b8494;
  --muted-2: #a0a7b4;
  --line: #dfe4eb;
  --accent: #0a0f17;
  --blue: #1685ff;
  --green: #10953b;
  --orange: #ff9f0a;
  --shadow: 0 16px 38px rgba(29, 38, 57, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #e9edf4;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(246, 248, 251, 0.92), rgba(236, 241, 247, 0.92)),
    #e8edf4;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sprite {
  display: none;
}

.app-shell {
  position: relative;
  width: min(100%, 480px);
  min-height: 100svh;
  margin: 0 auto;
  padding: 18px 14px 96px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 30% 3%, rgba(255, 255, 255, 0.88) 0 22%, transparent 42%),
    var(--bg);
}

.topbar {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 8px;
  margin-top: 0;
}

.greeting {
  text-align: center;
  min-width: 0;
}

.greeting h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1.08;
  font-weight: 800;
}

.greeting p {
  margin: 4px 0 0;
  color: #2f3440;
  font-size: 16px;
  line-height: 1.25;
}

.icon-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
}

.icon-button:focus-visible,
.primary-button:focus-visible,
.auth-form input:focus-visible,
.inline-form button:focus-visible {
  outline: 3px solid rgba(22, 133, 255, 0.28);
  outline-offset: 2px;
}

.topbar .icon-button svg {
  width: 28px;
  height: 28px;
}

.bell span {
  position: absolute;
  top: 3px;
  right: 1px;
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border: 3px solid var(--bg);
  border-radius: 999px;
  color: #fff;
  background: #ff3333;
  font-size: 13px;
  font-weight: 800;
}

.search-panel,
.location-panel,
.category-rail {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 22px rgba(30, 41, 59, 0.04);
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 46px;
  align-items: center;
  gap: 4px;
  margin-top: 18px;
  padding: 8px 8px 8px 13px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.search-box svg {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
  font-weight: 500;
}

.search-box input::placeholder {
  color: #9ca3b3;
  opacity: 1;
}

.filter-button svg {
  width: 26px;
  height: 26px;
}

.location-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 9px 12px;
}

.address {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.solid-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
}

.solid-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke-width: 0;
}

.address-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
}

.address-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.near-me {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: fit-content;
  font-size: 14px;
  font-weight: 700;
}

.near-me svg {
  width: 24px;
  height: 24px;
}

.category-rail {
  margin-top: 12px;
  padding: 9px;
  overflow: hidden;
}

.category-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 52px;
  gap: 5px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.category-list::-webkit-scrollbar {
  display: none;
}

.category-button {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 76px;
  padding: 8px 4px;
  border-radius: 12px;
  color: var(--ink);
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.category-button svg {
  width: 28px;
  height: 28px;
}

.category-button span {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.1;
}

.category-button.active {
  color: #fff;
  background: linear-gradient(145deg, #111821, #03070c);
  box-shadow: 0 12px 20px rgba(6, 9, 15, 0.18);
}

.category-button.active svg {
  stroke-width: 2.2;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 20px 2px 10px;
}

.section-heading h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.1;
  font-weight: 800;
}

.view-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: max-content;
  font-size: 14px;
  font-weight: 600;
}

.view-all svg {
  width: 20px;
  height: 20px;
  transform: rotate(-90deg);
}

.shop-list {
  display: grid;
  gap: 10px;
}

.shop-card {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr) 92px;
  gap: 8px;
  align-items: stretch;
  min-height: 162px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 22px rgba(30, 41, 59, 0.05);
}

.shop-image {
  width: 100%;
  height: 100%;
  min-height: 148px;
  object-fit: cover;
  border-radius: 13px;
  background: #d8dde5;
}

.shop-info {
  min-width: 0;
  padding: 8px 0 6px;
}

.shop-name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
  font-size: 17px;
  line-height: 1.15;
  font-weight: 800;
}

.shop-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.verified {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
}

.verified svg {
  width: 12px;
  height: 12px;
  stroke-width: 3;
}

.meta-line {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  margin-top: 7px;
  color: #747d8d;
  font-size: 13px;
  line-height: 1.2;
}

.rating-star {
  display: inline-flex;
  color: var(--orange);
}

.rating-star svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  stroke: currentColor;
}

.review-count {
  color: #7d8797;
}

.dot {
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #8c96a6;
}

.address-line {
  margin: 7px 0 0;
  overflow: hidden;
  color: #3b4250;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hours-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
  margin-top: 7px;
  color: #7b8494;
  font-size: 12px;
  line-height: 1.2;
}

.hours-line svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.hours-line strong {
  color: var(--green);
  font-weight: 800;
  white-space: nowrap;
}

.hours-line.warning strong,
.hours-line.warning svg {
  color: var(--orange);
}

.hours-line span {
  white-space: nowrap;
}

.chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.chip {
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 999px;
  color: #11151c;
  background: #eef0f4;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.queue-box {
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: center;
  gap: 6px;
  padding: 8px 0 6px 8px;
  border-left: 1px solid var(--line);
}

.wait-panel {
  display: grid;
  place-items: center;
  min-height: 72px;
  padding: 7px 6px;
  border-radius: 12px;
  background: #f0f0f1;
  text-align: center;
}

.queue-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
}

.queue-count svg {
  width: 21px;
  height: 21px;
}

.wait-label {
  margin-top: 6px;
  color: #8991a1;
  font-size: 10px;
  line-height: 1.1;
}

.wait-time {
  margin-top: 3px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.05;
}

.queue-action,
.time-action {
  width: 100%;
  min-height: 34px;
  padding: 7px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
}

.queue-action {
  color: #fff;
  background: linear-gradient(145deg, #111821, #03070c);
  white-space: nowrap;
}

.time-action {
  border: 1px solid #a9b1be;
  background: #fff;
}

.empty-state {
  padding: 28px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: #5d6675;
  text-align: center;
  font-weight: 600;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: min(100%, 480px);
  min-height: 76px;
  padding: 10px 14px 8px;
  border-top: 1px solid rgba(211, 217, 226, 0.75);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -16px 30px rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.bottom-nav::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 132px;
  height: 4px;
  border-radius: 999px;
  background: #05070b;
  transform: translateX(-50%);
}

.nav-item {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 5px;
  min-width: 0;
  color: #7d8797;
  font-size: 9px;
  font-weight: 600;
}

.nav-item svg {
  width: 27px;
  height: 27px;
}

.nav-item span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item.active {
  color: #05070b;
}

.nav-primary {
  margin-top: -22px;
  color: #05070b;
  font-weight: 700;
}

.nav-primary svg {
  width: 50px;
  height: 50px;
  padding: 14px;
  border-radius: 999px;
  color: #fff;
  background: #05070b;
  box-shadow: 0 10px 24px rgba(6, 9, 15, 0.28);
}

.auth-body {
  display: grid;
  place-items: start center;
  padding: 20px 14px;
}

.auth-shell {
  width: min(100%, 440px);
  min-height: calc(100svh - 40px);
  display: grid;
  align-content: center;
  gap: 22px;
}

.auth-brand {
  justify-self: center;
  color: var(--ink);
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.auth-panel {
  width: 100%;
  padding: 24px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.auth-panel h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 900;
  text-align: center;
}

.auth-panel p {
  margin: 10px auto 0;
  max-width: 30ch;
  color: #596273;
  text-align: center;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 500;
}

.alert {
  margin-top: 18px;
  padding: 12px 13px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 700;
}

.alert-error {
  border: 1px solid #fecaca;
  color: #9f1239;
  background: #fff1f2;
}

.alert-success {
  border: 1px solid #bbf7d0;
  color: #166534;
  background: #f0fdf4;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.auth-form label {
  display: grid;
  gap: 7px;
}

.auth-form label > span {
  color: #2d3442;
  font-size: 14px;
  font-weight: 800;
}

.auth-form label em {
  color: #8b94a3;
  font-style: normal;
  font-weight: 600;
}

.auth-form input {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: #fff;
  font-size: 16px;
  font-weight: 650;
}

.auth-form input::placeholder {
  color: #a4acba;
}

.role-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #f1f4f8;
}

.role-switch label {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 11px;
  color: #667085;
  font-weight: 800;
  cursor: pointer;
}

.role-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-switch input:checked + span {
  color: #fff;
  background: linear-gradient(145deg, #111821, #03070c);
  box-shadow: 0 8px 18px rgba(6, 9, 15, 0.16);
}

.role-switch span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 11px;
}

.primary-button {
  min-height: 52px;
  margin-top: 4px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #111821, #03070c);
  font-size: 16px;
  font-weight: 850;
}

.auth-switch {
  margin-top: 18px !important;
}

.auth-switch a,
.inline-form button {
  color: var(--blue);
  font-weight: 850;
}

.otp-input {
  text-align: center;
  font-size: 28px !important;
  letter-spacing: 0;
}

.inline-form {
  display: grid;
  margin-top: 16px;
}

.inline-form button {
  justify-self: center;
  padding: 10px;
  border-radius: 10px;
}

.dashboard-panel {
  display: grid;
  gap: 14px;
}

.dashboard-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-top h1,
.dashboard-top p {
  text-align: left;
}

.dashboard-top p {
  margin-left: 0;
}

.small-icon-link {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.dashboard-stat {
  display: grid;
  gap: 5px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #f8fafc;
}

.dashboard-stat span {
  color: #7a8494;
  font-size: 13px;
  font-weight: 750;
}

.dashboard-stat strong {
  font-size: 18px;
  line-height: 1.2;
}

.dashboard-stat small,
.muted-note {
  color: #697386;
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 430px) {
  .app-shell {
    padding-inline: 12px;
  }

  .shop-card {
    grid-template-columns: 92px minmax(0, 1fr) 88px;
    gap: 7px;
    min-height: 158px;
  }

  .shop-image {
    min-height: 144px;
  }

  .queue-box {
    padding-left: 7px;
  }

  .wait-panel {
    min-height: 70px;
  }

  .chip {
    padding-inline: 7px;
  }

}

@media (max-width: 374px) {
  .location-panel {
    grid-template-columns: 1fr;
  }

  .near-me {
    justify-content: flex-start;
  }

  .shop-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .queue-box {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) 1fr 1fr;
    align-items: center;
    gap: 8px;
    padding: 10px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .wait-panel {
    min-height: 64px;
  }

}

@media (min-width: 560px) {
  body {
    padding: 26px 0;
  }

  .app-shell {
    min-height: calc(100svh - 52px);
    border-radius: 34px;
    box-shadow: 0 26px 80px rgba(15, 23, 42, 0.2);
  }

  .bottom-nav {
    bottom: 26px;
    border-radius: 0 0 34px 34px;
  }
}
