:root {
  color-scheme: light;
  --ink: #141821;
  --muted: #697386;
  --line: #d9e0ea;
  --surface: #fffdf8;
  --soft: #f4f7f9;
  --accent: #0f8b8d;
  --accent-strong: #075f61;
  --warm: #ffbd00;
  --hot: #f04438;
  --night: #121622;
  --danger: #d64545;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background:
    linear-gradient(180deg, rgba(12, 18, 29, 0.08), rgba(12, 18, 29, 0.62)),
    url("/assets/aul-landscape.svg"),
    linear-gradient(160deg, #17314a 0%, #0f8b8d 54%, #f5c15c 100%);
  background-position: center top, center top, center;
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-size: cover, max(1220px, 100vw) auto, cover;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 189, 0, 0.42) 0 9%, transparent 9% 18%, rgba(240, 68, 56, 0.3) 18% 24%, transparent 24%),
    radial-gradient(circle at 84% 12%, rgba(255, 255, 255, 0.2), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 42%);
  mix-blend-mode: screen;
}

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

button {
  min-height: 48px;
  border: 1px solid rgba(20, 24, 33, 0.16);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 14px;
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

button:hover {
  border-color: var(--accent);
}

.primary,
button.active {
  border-color: #141821;
  background: linear-gradient(135deg, var(--warm), #ff8a00);
  color: #141821;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(255, 189, 0, 0.26);
}

.app-shell {
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 0 calc(36px + env(safe-area-inset-bottom));
  position: relative;
  z-index: 1;
}

.hero {
  min-height: 154px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  align-self: stretch;
  width: min(36vw, 360px);
  min-width: 180px;
  border-radius: 0 0 20px 20px;
  background: url("/assets/aul-landscape.svg") center 62% / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 18px 42px rgba(0, 0, 0, 0.22);
  opacity: 0.96;
}

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

.logo {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 16px;
  background:
    linear-gradient(135deg, #141821 0 48%, var(--warm) 48% 52%, #141821 52%),
    #141821;
  color: var(--warm);
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

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

h1 {
  margin-bottom: 4px;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1;
  text-transform: uppercase;
}

h2 {
  font-size: 22px;
  margin-bottom: 18px;
}

h3 {
  font-size: 16px;
  margin: 24px 0 10px;
}

.hero p,
.hero .muted {
  color: rgba(255, 255, 255, 0.76);
}

.muted,
small {
  color: var(--muted);
}

.top-actions,
.roles,
.radio-row,
.row,
.inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.roles {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px 0 14px;
  background: rgba(18, 22, 34, 0.88);
  backdrop-filter: blur(10px);
  overflow-x: auto;
}

.roles button {
  flex: 0 0 auto;
}

.taxi-roles {
  position: static;
  padding: 0;
  margin-bottom: 14px;
  background: transparent;
  backdrop-filter: none;
}

.taxi-roles button {
  flex: 1 1 0;
  min-width: 132px;
}

.service-nav,
.bottom-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.service-nav {
  margin-bottom: 14px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(18, 22, 34, 0.58);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
}

.service-nav button,
.bottom-tabs button {
  min-width: 0;
  padding: 0 8px;
}

.service-nav .tab-icon {
  display: none;
}

.bottom-tabs {
  display: none;
}

.notice {
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.88);
  padding: 12px 14px;
  box-shadow: 0 10px 28px rgba(18, 22, 34, 0.1);
}

.notice.error {
  border-color: #f0b6b6;
  background: #fff1f1;
  color: var(--danger);
}

.content {
  margin-top: 8px;
}

.install-panel {
  margin-top: 14px;
}

.download-shell {
  width: min(1120px, calc(100% - 24px));
}

.download-hero {
  min-height: calc(100svh - 36px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.62fr);
  align-items: center;
  gap: 28px;
  color: #fff;
}

.download-copy {
  display: grid;
  gap: 18px;
}

.download-copy h2 {
  max-width: 720px;
  margin: 0;
  color: #fff;
  font-size: clamp(34px, 7vw, 72px);
  line-height: 0.95;
  text-transform: uppercase;
}

.download-copy p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.55;
}

.download-badges,
.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.download-badges span {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(18, 22, 34, 0.58);
  color: #fff;
  padding: 9px 12px;
  font-weight: 800;
}

.download-button,
.secondary-link {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 18px;
  text-decoration: none;
  font-weight: 900;
}

.download-button {
  background: linear-gradient(135deg, var(--warm), #ff8a00);
  color: #141821;
  box-shadow: 0 16px 34px rgba(255, 189, 0, 0.28);
}

.secondary-link {
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(18, 22, 34, 0.52);
  color: #fff;
}

.phone-preview {
  justify-self: center;
  width: min(310px, 82vw);
  aspect-ratio: 9 / 18.5;
  border: 10px solid #101522;
  border-radius: 34px;
  background: #101522;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.36);
  padding: 12px;
}

.phone-bar {
  width: 82px;
  height: 5px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.phone-screen {
  height: calc(100% - 17px);
  display: grid;
  align-content: start;
  gap: 10px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(12, 18, 29, 0.2), rgba(12, 18, 29, 0.82)),
    url("/assets/aul-landscape.svg") center top / cover no-repeat;
  padding: 22px 16px;
  color: #fff;
}

.phone-screen strong {
  font-size: 28px;
  text-transform: uppercase;
}

.phone-screen span,
.phone-screen small {
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.92);
  color: #141821;
  padding: 12px;
  font-weight: 900;
}

.phone-screen small {
  margin-top: auto;
  color: var(--accent-strong);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.install-card {
  min-height: 100%;
}

.install-timeline {
  display: grid;
  gap: 12px;
}

.install-timeline div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.install-timeline strong {
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #141821;
  color: var(--warm);
}

.install-timeline span {
  line-height: 1.45;
}

.qr-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: center;
  gap: 18px;
}

.qr-placeholder {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  gap: 6px;
  border: 2px dashed rgba(20, 24, 33, 0.24);
  border-radius: 14px;
  background: #fffdf8;
  text-align: center;
}

.qr-placeholder span {
  font-size: 36px;
  font-weight: 900;
}

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

.two {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.94);
  padding: 18px;
  box-shadow: 0 20px 48px rgba(18, 22, 34, 0.18);
  backdrop-filter: blur(10px);
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  color: #344054;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(20, 24, 33, 0.14);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  padding: 11px 12px;
}

textarea {
  resize: vertical;
}

.radio-row {
  align-items: stretch;
  margin: 10px 0 14px;
}

.radio-row label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  border: 1px solid rgba(20, 24, 33, 0.14);
  border-radius: 8px;
  padding: 12px;
}

.radio-row input {
  width: auto;
}

.order-card,
.driver-card,
.mini-order,
.application {
  border: 1px solid rgba(20, 24, 33, 0.12);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(18, 22, 34, 0.08);
}

.row {
  justify-content: space-between;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: #141821;
  padding: 3px 10px;
  color: var(--warm);
  font-weight: 700;
  font-size: 13px;
}

.counter-box {
  border-left: 4px solid var(--warm);
  background: #fff3c2;
  padding: 12px;
}

.stars {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.stars button {
  padding: 0 6px;
  color: #9a6b00;
}

.success {
  color: var(--accent-strong);
  font-weight: 700;
}

.driver-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.driver-card {
  display: grid;
  gap: 10px;
}

.product-card,
.mini-order {
  display: grid;
  gap: 8px;
  background: #fffdf8;
}

.product-card {
  border: 1px solid rgba(20, 24, 33, 0.12);
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 12px 28px rgba(18, 22, 34, 0.1);
}

.category-filter {
  display: flex;
  gap: 8px;
  margin: -4px 0 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.category-filter button {
  flex: 0 0 auto;
  min-height: 42px;
}

.soft-badge {
  border-color: rgba(15, 139, 141, 0.2);
  background: rgba(15, 139, 141, 0.1);
  color: var(--accent-strong);
}

.inline-form {
  align-items: stretch;
}

.inline-form input {
  min-width: 0;
}

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

.list > div,
.application {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.list span,
.application span {
  display: grid;
  gap: 3px;
}

.compact > div {
  min-height: 44px;
  border-bottom: 1px solid var(--line);
}

.tariff-editor {
  display: grid;
  gap: 8px;
}

.tariff-editor > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px minmax(0, 1fr);
  gap: 8px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.chips span {
  border: 1px solid rgba(20, 24, 33, 0.12);
  border-radius: 999px;
  background: #fff3c2;
  padding: 8px 11px;
  font-weight: 750;
}

@media (max-width: 780px) {
  .app-shell {
    width: min(100% - 14px, 1180px);
    padding-top: calc(10px + env(safe-area-inset-top));
    padding-bottom: calc(108px + env(safe-area-inset-bottom));
  }

  .hero {
    align-items: flex-start;
    flex-direction: column;
    min-height: 142px;
  }

  .hero::after {
    width: 100%;
    min-width: 0;
    height: 96px;
    border-radius: 14px;
    background-position: center 58%;
  }

  .two,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 14px;
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 20px;
  }

  .roles {
    margin-left: -7px;
    margin-right: -7px;
    padding-left: 7px;
    padding-right: 7px;
  }

  .roles button {
    min-width: 132px;
  }

  .service-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bottom-tabs {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 5;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 16px;
    background: rgba(18, 22, 34, 0.9);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px);
  }

  .bottom-tabs button {
    min-height: 58px;
    display: grid;
    place-items: center;
    gap: 2px;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 253, 248, 0.94);
    font-size: 12px;
    font-weight: 800;
  }

  .bottom-tabs .tab-icon {
    display: grid;
    place-items: center;
    min-width: 30px;
    min-height: 24px;
    border-radius: 999px;
    background: rgba(15, 139, 141, 0.12);
    color: var(--accent-strong);
    font-size: 10px;
    line-height: 1;
  }

  .bottom-tabs button.active .tab-icon {
    background: rgba(20, 24, 33, 0.16);
    color: #141821;
  }

  .radio-row,
  .inline-form,
  .list > div,
  .application {
    flex-direction: column;
    align-items: stretch;
  }

  .tariff-editor > div {
    grid-template-columns: 1fr;
  }

  .download-hero,
  .download-grid,
  .qr-panel {
    grid-template-columns: 1fr;
  }

  .download-hero {
    min-height: auto;
    padding: 8px 0 14px;
  }

  .download-copy h2 {
    font-size: 38px;
  }

  .download-copy p {
    font-size: 16px;
  }

  .phone-preview {
    width: min(250px, 78vw);
  }

  .qr-placeholder {
    width: min(180px, 100%);
    justify-self: center;
  }
}
