* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #101010;
  color: #171717;
}

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

button {
  border: 0;
  cursor: pointer;
}

.phone-shell {
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  background: radial-gradient(circle at top, #313131, #070707 65%);
}

.app-frame {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background: #f5f5f5;
  position: relative;
  overflow: hidden;
}

.header-host {
  position: fixed;
  top: 0;
  left: 50%;
  width: 100%;
  max-width: 430px;
  transform: translateX(-50%);
  z-index: 20;
}

.app-header {
  padding: 18px 18px 14px;
  color: #151515;
  background: linear-gradient(135deg, #ffd21f, #ffb700);
  box-shadow: 0 10px 35px rgba(0, 0, 0, .18);
}

.app-header.dark {
  color: #fff;
  background: linear-gradient(135deg, #111, #2a2a2a);
}

.app-header.map {
  color: #fff;
  background: linear-gradient(135deg, #111827, #374151);
}

.app-header.admin {
  color: #fff;
  background: linear-gradient(135deg, #4c1d95, #111827);
}

.app-header.service {
  color: #fff;
  background: linear-gradient(135deg, #065f46, #111827);
}

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

.brand-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -.04em;
}

.brand-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 700;
  opacity: .78;
}

.header-pill {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .35);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.dark .header-pill,
.map .header-pill,
.admin .header-pill,
.service .header-pill {
  background: rgba(255, 255, 255, .12);
}

.body-host {
  min-height: 100vh;
  padding: 110px 14px 94px;
  overflow-y: auto;
}

.body-host.auth-mode {
  padding-bottom: 24px;
}

.screen {
  animation: enter .22s ease-out;
}

@keyframes enter {
  from {
    transform: translateY(8px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.card {
  background: #fff;
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .08);
  margin-bottom: 14px;
}

.card.yellow {
  background: linear-gradient(135deg, #ffcf24, #ffbd00);
}

.card.black {
  color: #fff;
  background: linear-gradient(135deg, #161616, #292929);
}

.auth-screen {
  position: relative;
}

.auth-hidden {
  display: none;
}

.corner-link {
  position: absolute;
  top: -90px;
  right: 4px;
  z-index: 30;
  width: auto;
  border-radius: 999px;
  padding: 8px 10px;
  background: #111;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}

.session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, .08);
}

.session-row strong {
  display: block;
  font-size: 13px;
}

.session-row span {
  display: block;
  margin-top: 3px;
  color: #555;
  font-size: 11px;
  font-weight: 800;
}

.session-row .btn {
  width: auto;
  border-radius: 999px;
  padding: 9px 11px;
  font-size: 11px;
}

.card h2,
.card h3,
.card p {
  margin-top: 0;
}

.card h2 {
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -.05em;
}

.card h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.card p {
  color: #555;
  line-height: 1.4;
}

.card.black p,
.card.yellow p {
  color: inherit;
  opacity: .8;
}

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

.stat {
  border-radius: 18px;
  padding: 14px;
  background: #f1f1f1;
}

.stat strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 5px;
  color: #666;
  font-size: 12px;
  font-weight: 800;
}

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

.btn {
  width: 100%;
  border-radius: 18px;
  padding: 15px 16px;
  font-weight: 900;
  background: #111;
  color: #fff;
}

.btn.yellow {
  background: #ffc400;
  color: #151515;
}

.btn.ghost {
  background: #ededed;
  color: #151515;
}

.btn.red {
  background: #dc2626;
  color: #fff;
}

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

.input {
  width: 100%;
  border: 1px solid #dedede;
  border-radius: 16px;
  padding: 14px;
  background: #fafafa;
  outline: none;
}

.input:focus {
  border-color: #ffbf00;
  background: #fff;
}

.quote-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid #eee;
}

.quote-item:last-child {
  border-bottom: 0;
}

.quote-title {
  font-weight: 900;
}

.quote-meta {
  margin-top: 4px;
  color: #777;
  font-size: 12px;
}

.price {
  font-size: 20px;
  font-weight: 900;
}

.map-box {
  height: 360px;
  border-radius: 8px;
  background: #dbeafe;
  position: relative;
  overflow: hidden;
  border: 1px solid #d4d4d4;
}

.geo-map {
  width: 100%;
  height: 100%;
}

.request-map {
  width: 100%;
  height: 280px;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
  overflow: hidden;
  background: #dbeafe;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 10px;
}

.quote-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.quote-actions .btn,
.inline-form .btn {
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 13px;
}

.map-status {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 500;
  border-radius: 8px;
  padding: 9px 10px;
  background: #111;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .2);
}

.leaflet-container {
  font: inherit;
}

.matrix-box {
  padding: 12px;
  border-radius: 18px;
  background: #151515;
  color: #ffe066;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  overflow-x: auto;
}

.binary-line {
  white-space: nowrap;
}

.event-list {
  display: grid;
  gap: 8px;
}

.event-item {
  padding: 10px;
  border-radius: 14px;
  background: #f3f4f6;
  font-size: 12px;
}

.admin-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  background: #f3f4f6;
}

.admin-row-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 900;
}

.admin-row-meta {
  color: #555;
  font-size: 12px;
  line-height: 1.35;
}

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

.admin-row-actions .btn {
  border-radius: 8px;
  padding: 10px;
  font-size: 12px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: 430px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px 12px 14px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(18px);
  border-top: 1px solid rgba(0, 0, 0, .06);
  z-index: 25;
}

.bottom-nav[hidden] {
  display: none;
}

[hidden] {
  display: none !important;
}

.nav-item {
  padding: 12px 6px;
  border-radius: 16px;
  background: transparent;
  color: #555;
  font-size: 12px;
  font-weight: 900;
}

.nav-item.active {
  background: #111;
  color: #fff;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  max-width: 390px;
  width: calc(100% - 28px);
  transform: translateX(-50%);
  border-radius: 18px;
  padding: 14px 16px;
  background: #111;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .25);
  z-index: 40;
  display: none;
}

.toast.show {
  display: block;
  animation: enter .2s ease-out;
}
