/* ========================================================
   Saudia Service — Telegram Mini App
   Warm chocolate + sunlit gold palette (v2 of the design).
   ======================================================== */

:root {
  /* base — warm taupe / desert dusk */
  --bg-page:   #2a1f15;
  --bg-card:   #382818;
  --bg-raised: #43321f;
  --bg-deeper: #1a130c;

  /* lines */
  --line-08: rgba(214,184,123,0.10);
  --line-12: rgba(214,184,123,0.16);
  --line-20: rgba(214,184,123,0.24);
  --line-30: rgba(214,184,123,0.34);
  --line-50: rgba(214,184,123,0.52);

  /* gold — brighter, sunlit */
  --gold:       #d6b87b;
  --gold-light: #e8cf99;
  --copper:     #a07e44;

  /* text */
  --cream:     #f3e8d2;
  --cream-dim: #d6c8aa;
  --muted:     #b6a585;
  --dim:       #7a6951;

  /* type */
  --serif: "Cormorant Garamond", "Source Serif 4", Georgia, serif;
  --sans:  "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--cream);
  background: var(--bg-page);
  min-height: 100vh;
  overflow-x: hidden;
}

#app {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
}

/* ============ BACKGROUND LAYERS ============ */

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Mosque photos — three real photos (Kaaba day, Haram night, Nabawi).
   Each screen reveals exactly one of them. */
.bg-layer .bg-photo {
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  height: 70%;
  object-fit: cover;
  object-position: 50% 35%;
  opacity: 0;
  filter: saturate(0.7) brightness(0.85) contrast(1.05);
  transition: opacity .4s ease;
  z-index: 1;
}

/* HOME — Kaaba (day) */
#app[data-screen="home"] .bg-layer .bg-kaaba-day {
  opacity: 0.36;
  object-position: 50% 30%;
}

/* UMRA category list — Haram at night (atmospheric, pilgrims) */
#app[data-category="umra"][data-screen="category"] .bg-layer .bg-haram-night {
  opacity: 0.34;
  object-position: 50% 30%;
}

/* UMRA package detail — Kaaba (day) close-up */
#app[data-screen="package"] .bg-layer .bg-kaaba-day {
  opacity: 0.32;
  object-position: 50% 55%;
}

/* MEXMONXONALAR (Mecca-related) — Haram at night */
#app[data-category="hotels"] .bg-layer .bg-haram-night {
  opacity: 0.34;
  object-position: 50% 20%;
}

/* VIZALAR — Masjid an-Nabawi */
#app[data-category="visa"][data-screen="category"] .bg-layer .bg-nabawi,
#app[data-screen="visa"] .bg-layer .bg-nabawi {
  opacity: 0.36;
  object-position: 50% 40%;
}

/* TRANSFERLAR — Kaaba (day) */
#app[data-category="transfer"] .bg-layer .bg-kaaba-day {
  opacity: 0.32;
  object-position: 50% 65%;
}

/* ALOQA — Nabawi (different crop) */
#app[data-category="contact"] .bg-layer .bg-nabawi {
  opacity: 0.34;
  object-position: 50% 60%;
}

/* large blurred logo watermark — same prominence on every screen */
.bg-layer .logo-blur {
  position: absolute;
  left: 50%; top: 38%;
  transform: translate(-50%, -50%) scale(2.4);
  width: 280px;
  height: auto;
  opacity: 0.22;
  filter: saturate(0.85) brightness(1.15) blur(0.5px);
  z-index: 2;
}

/* warm dusk gradient wash on top of the photo */
.bg-layer::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(120,82,42,0.30) 0%, transparent 60%),
    linear-gradient(180deg, rgba(54,40,26,0.40) 0%, rgba(42,31,21,0.65) 35%, rgba(42,31,21,0.85) 60%, var(--bg-page) 95%);
  z-index: 3;
}

/* sand grain texture overlay (paper-like) */
.bg-layer::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.85  0 0 0 0 0.72  0 0 0 0 0.48  0 0 0 0.05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  mix-blend-mode: overlay;
  z-index: 4;
}

/* foreground content */
#content { position: relative; z-index: 10; padding-bottom: 100px; }
#app[data-screen="home"] #content { padding-bottom: 28px; }

/* ============ HOME ============ */

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 28px 28px;
}
.brand .mark {
  width: 118px;
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.55));
}
.brand .wordmark {
  margin-top: 22px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: 0.46em;
  text-transform: uppercase;
  padding-left: 0.46em;
  text-shadow: 0 1px 14px rgba(0,0,0,0.7);
}
.brand .hairline {
  width: 40px;
  height: 1px;
  background: var(--gold);
  opacity: 0.40;
  margin: 18px auto 0;
}
.brand .arabic {
  margin-top: 12px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.04em;
  font-weight: 400;
}

/* restaurant-menu style category list */
.menu {
  margin: 36px 0 0;
  padding: 0 28px;
  border-top: 1px solid var(--line-12);
}
.menu .row {
  width: 100%;
  display: grid;
  grid-template-columns: 38px 1fr 22px;
  align-items: center;
  gap: 0 18px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line-12);
  background: transparent;
  border-left: none;
  border-right: none;
  border-top: none;
  text-align: left;
  cursor: pointer;
  transition: background .25s ease;
  color: inherit;
  font-family: inherit;
}
.menu .row:active {
  background: linear-gradient(180deg, transparent, rgba(214,184,123,0.06));
}
.menu .num {
  display: grid;
  place-items: center;
  color: var(--gold);
}
.menu .num svg {
  width: 26px;
  height: 26px;
  display: block;
}
.menu .label .t {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.1;
  color: var(--cream);
  margin: 0;
}
.menu .label .d {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin: 4px 0 0;
}
.menu .chev {
  color: var(--gold);
  opacity: 0.55;
  display: grid;
  place-items: center;
}

.home-foot {
  padding: 36px 28px 28px;
  text-align: center;
}
.home-foot .small {
  font-family: var(--serif);
  font-style: italic;
  font-size: 12.5px;
  color: var(--dim);
  letter-spacing: 0.01em;
}
.home-foot .small::before,
.home-foot .small::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--line-30);
  vertical-align: middle;
  margin: 0 12px;
}

/* ============ TOPBAR (internal screens) ============ */

.topbar {
  height: 56px;
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  border-bottom: 1px solid var(--line-12);
}
.topbar .iconbtn {
  display: grid;
  place-items: center;
  color: var(--gold);
  width: 56px;
  height: 56px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.topbar .title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 19px;
  color: var(--cream);
  text-align: center;
  letter-spacing: 0.02em;
}

.crumb {
  padding: 22px 28px 6px;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
}
.crumb b {
  color: var(--cream);
  font-weight: 500;
  letter-spacing: 0.28em;
}
.crumb .sep {
  color: var(--dim);
  margin: 0 8px;
}

.page-title {
  padding: 6px 28px 22px;
  border-bottom: 1px solid var(--line-12);
}
.page-title h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 34px;
  line-height: 1.05;
  margin: 0;
  color: var(--cream);
  letter-spacing: 0.005em;
}
.page-title .meta {
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 300;
  letter-spacing: 0.02em;
}

/* ============ VISA LIST ============ */

.visa-list { padding: 0 28px; }
.visa {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 0 16px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line-12);
}
.visa .ico {
  color: var(--gold);
  display: grid;
  place-items: center;
}
.visa .meta .n {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 19px;
  color: var(--cream);
  margin: 0;
  line-height: 1.1;
}
.visa .meta .d {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin: 3px 0 0;
}
.visa .price {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--cream);
  font-size: 19px;
  text-align: right;
  line-height: 1;
}
.visa .price span {
  display: block;
  font-family: var(--sans);
  font-size: 9.5px;
  color: var(--dim);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-top: 5px;
}

.info-note {
  margin: 28px 28px 0;
  padding: 18px 18px;
  border-top: 1px solid var(--line-12);
  border-bottom: 1px solid var(--line-12);
}
.info-note .eyebrow {
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 400;
  margin-bottom: 8px;
}
.info-note .t {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: 14px;
  color: var(--cream-dim);
  line-height: 1.5;
  margin: 0;
}

/* ============ PACKAGE LIST ============ */

.pkg-list {
  padding: 16px 22px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pkg-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 18px;
  padding: 22px 22px;
  border: 1px solid var(--line-20);
  border-radius: 14px;
  background: rgba(56, 40, 24, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  text-align: left;
  color: inherit;
  font-family: inherit;
  width: 100%;
  transition: background .25s ease, border-color .25s ease;
}
.pkg-row:active {
  background: rgba(67, 50, 31, 0.65);
  border-color: var(--line-30);
}
.pkg-row.vip {
  border-color: var(--line-30);
  background: rgba(67, 50, 31, 0.50);
}
.pkg-row.vip::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 24px;
  width: 2px;
  height: 32px;
  background: var(--gold);
  opacity: 0.85;
  border-radius: 1px;
}
.pkg-row .tier {
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin: 0;
}
.pkg-row.vip .tier { color: var(--gold-light); }
.pkg-row.eco .tier,
.pkg-row.std .tier { color: var(--copper); }

.pkg-row h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 25px;
  line-height: 1.05;
  color: var(--cream);
  margin: 8px 0 6px;
  letter-spacing: 0.005em;
}
.pkg-row .sub {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin: 0;
}
.pkg-row .right {
  text-align: right;
  align-self: start;
  padding-top: 22px;
  min-width: 96px;
}
.pkg-row .days {
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 8px;
}
.pkg-row .more {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  opacity: 0.75;
}
.pkg-row .more::before {
  content: "";
  display: block;
  flex: 1;
  height: 1px;
  background: var(--line-20);
}

/* visa list specifics */
.pkg-row.visa-row {
  grid-template-columns: 40px 1fr auto;
  gap: 4px 16px;
  align-items: start;
  padding: 20px 22px;
}
.pkg-row.visa-row .vrow-ico {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--gold);
  padding-top: 2px;
}
.pkg-row.visa-row .vrow-ico svg {
  display: block;
}
.pkg-row.visa-row > div:nth-of-type(1) { grid-column: 2; grid-row: 1; }
.pkg-row.visa-row .right { grid-column: 3; grid-row: 1; }
.pkg-row.visa-row .more { grid-column: 1 / -1; }

.pkg-row.visa-row .tier {
  color: var(--copper);
  font-size: 9.5px;
  letter-spacing: 0.28em;
}

.pkg-row .visa-price {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  color: var(--cream);
  line-height: 1;
  white-space: nowrap;
  margin-top: 4px;
}

/* visa detail: warning lines + price block */
.warn-list {
  padding: 4px 28px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.warn {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(148, 90, 50, 0.12);
  border: 1px solid rgba(184, 115, 51, 0.25);
  border-radius: 8px;
  color: var(--cream-dim);
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.4;
}
.warn .ico {
  color: var(--copper);
  flex: 0 0 18px;
  padding-top: 2px;
}

.visa-price-block {
  padding: 22px 28px 4px;
  margin-top: 8px;
  border-bottom: 1px solid var(--line-12);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.visa-price-block .lbl {
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
}
.visa-price-block .v {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 34px;
  color: var(--cream);
  line-height: 1;
  margin-top: 8px;
}
.visa-price-block .v em {
  font-style: normal;
  font-family: var(--sans);
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-left: 6px;
}

/* ============ PACKAGE DETAIL ============ */

.detail-head {
  padding: 22px 28px 28px;
  border-bottom: 1px solid var(--line-12);
}
.detail-head .crumb {
  padding: 0;
  margin-bottom: 16px;
}
.detail-head h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 40px;
  line-height: 1;
  color: var(--cream);
  margin: 0;
  letter-spacing: 0.005em;
}
.detail-head .hairline {
  width: 36px;
  height: 1px;
  background: var(--gold);
  margin: 18px 0 16px;
}
.detail-head .lede {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 14px;
  color: var(--cream-dim);
  line-height: 1.55;
  margin: 0;
  max-width: 28ch;
}

.feat-list { padding: 8px 28px 0; }
.feat {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: start;
  gap: 0 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-12);
}
.feat .ico {
  color: var(--gold);
  padding-top: 2px;
  display: grid;
  place-items: center;
}
.feat .ft {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 17px;
  color: var(--cream);
  margin: 0;
  line-height: 1.15;
}
.feat .fd {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 11.5px;
  color: var(--muted);
  margin: 4px 0 0;
  letter-spacing: 0.02em;
  line-height: 1.45;
}
.feat .fv {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--cream-dim);
  text-align: right;
  padding-top: 4px;
  letter-spacing: 0.02em;
}

/* Gold italic note shared between Umra packages and visa detail. */
.pkg-note {
  margin: 18px 28px 0;
  padding: 16px 18px;
  background: rgba(214,184,123,0.06);
  border: 1px solid var(--line-25);
  border-radius: 10px;
  color: var(--gold-light);
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.45;
  text-align: center;
}

/* Visa detail headline: gold SVG icon + serif title in one row. */
.title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.title-row .title-icon {
  flex: 0 0 36px;
  color: var(--gold);
}
.title-row h1 {
  margin: 0;
}

.cta-wrap { padding: 28px 28px 32px; }
.cta {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 18px 18px;
  background: transparent;
  color: var(--gold);
  font-family: var(--sans);
  border: 1px solid var(--gold);
  border-radius: 1px;
  cursor: pointer;
  text-decoration: none;
  transition: background .25s ease, color .25s ease;
}
.cta:active {
  background: rgba(214,184,123,0.07);
  color: var(--gold-light);
}
.cta .cta-eyebrow {
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--muted);
}
.cta .cta-main {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 19px;
  letter-spacing: 0.01em;
  color: var(--gold);
  text-transform: none;
}
/* simple single-line CTA (other screens) */
.cta.cta-simple {
  flex-direction: row;
  gap: 14px;
  padding: 18px 18px;
  font-size: 11px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ============ PLACEHOLDER (Mexmonxonalar / Transferlar / Contact) ============ */

.placeholder {
  text-align: center;
  padding: 48px 28px 24px;
  color: var(--muted);
}
.placeholder h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--cream);
  margin: 0 0 12px;
  font-size: 26px;
}
.placeholder p {
  margin: 0 0 24px;
  line-height: 1.6;
  font-size: 13px;
  font-family: var(--serif);
  font-style: italic;
  color: var(--cream-dim);
}

/* ============ TRANSFER CARDS ============ */

.transfer-list {
  padding: 16px 22px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.transfer-card {
  background: rgba(56, 40, 24, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--line-20);
  border-radius: 14px;
  padding: 20px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.transfer-head {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 4px 14px;
  align-items: start;
}
.transfer-head .vrow-ico {
  width: 40px; height: 40px;
  color: var(--gold);
  display: grid; place-items: center;
  padding-top: 2px;
}
.transfer-head h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.1;
  color: var(--cream);
  margin: 6px 0 6px;
}
.transfer-head .tier {
  font-size: 9.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--copper);
  margin: 0;
  font-weight: 500;
}
.transfer-head .sub {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin: 0;
  line-height: 1.4;
}

.transfer-feats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--line-12);
}
.transfer-feat {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-top: 8px;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--cream);
  line-height: 1.3;
}
.transfer-feat .ico {
  color: var(--gold);
  flex: 0 0 16px;
  padding-top: 3px;
}

.transfer-extras {
  padding-top: 6px;
  border-top: 1px dashed var(--line-12);
}
.transfer-extras .eyebrow {
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.transfer-extra {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--cream-dim);
  padding: 4px 0;
  position: relative;
  padding-left: 14px;
  line-height: 1.35;
}
.transfer-extra::before {
  content: "·";
  position: absolute;
  left: 4px;
  color: var(--gold);
  font-size: 18px;
  line-height: 1;
  top: 2px;
}

/* ============ TRANSFER ORDER FORM ============ */

.modal .select-wrap {
  position: relative;
}
.modal .select-wrap select {
  width: 100%;
  background: rgba(26, 19, 12, 0.7);
  border: 1px solid var(--line-12);
  border-radius: 6px;
  padding: 14px 38px 14px 16px;
  color: var(--cream);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.modal .select-wrap select:focus {
  border-color: var(--gold);
  background: rgba(26, 19, 12, 0.9);
}
.modal .select-wrap .select-caret {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  color: var(--gold);
  pointer-events: none;
  opacity: 0.8;
}

.route-grid {
  display: grid;
  grid-template-columns: 1fr 20px 1fr;
  align-items: end;
  gap: 8px;
}
.route-cell__lbl {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.route-cell .select-wrap select {
  padding: 12px 30px 12px 12px;
  font-size: 15px;
}
.route-arrow {
  text-align: center;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--gold);
  padding-bottom: 10px;
}

/* Individual / Guruh segmented tabs at the top of the order modal */
.tabs-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line-12);
  margin-bottom: 22px;
}
.tabs-switch .tab-btn {
  background: transparent;
  border: none;
  padding: 14px 8px 12px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  transition: color .2s ease;
}
.tabs-switch .tab-btn:hover { color: var(--cream-dim); }
.tabs-switch .tab-btn.active { color: var(--gold); }
.tabs-switch .tab-btn.active::after {
  content: "";
  position: absolute;
  left: 22%; right: 22%;
  bottom: -1px;
  height: 1px;
  background: var(--gold);
}

/* Hide group-only fields unless the form is in group mode */
form[data-mode="individual"] .group-only { display: none; }

/* Small "(ixtiyoriy)" hint next to optional field labels */
.modal .field label .opt {
  color: var(--muted);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.18em;
  margin-left: 4px;
}

/* ============ LEAD MODAL ============ */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 10, 6, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 1;
  transition: opacity .25s ease;
}
.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border-top: 1px solid var(--line-25);
  border-radius: 22px 22px 0 0;
  padding: 28px 24px calc(28px + env(safe-area-inset-bottom));
  transform: translateY(0);
  transition: transform .3s ease;
  max-height: 92vh;
  overflow-y: auto;
}
.modal-overlay.hidden .modal { transform: translateY(100%); }

.modal-head {
  text-align: center;
  margin-bottom: 22px;
}
.modal-head .eyebrow {
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 400;
}
.modal-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  color: var(--cream);
  margin: 6px 0 0;
  letter-spacing: 0.005em;
}
.modal-head .hairline {
  width: 30px;
  height: 1px;
  background: var(--gold);
  opacity: 0.4;
  margin: 14px auto 0;
}

.modal .field {
  margin-bottom: 18px;
}
.modal .field label {
  display: block;
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 400;
}
.modal .field input,
.modal .field textarea {
  width: 100%;
  background: rgba(26, 19, 12, 0.7);
  border: 1px solid var(--line-12);
  border-radius: 6px;
  padding: 14px 16px;
  color: var(--cream);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  outline: none;
  transition: border-color .2s ease, background .2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.modal .field textarea {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  min-height: 88px;
  resize: vertical;
  font-weight: 300;
}
.modal .field input::placeholder,
.modal .field textarea::placeholder {
  color: var(--muted-dim, #6b5d48);
}
.modal .field input:focus,
.modal .field textarea:focus {
  border-color: var(--gold);
  background: rgba(26, 19, 12, 0.9);
}
.modal .field .err {
  display: none;
  margin-top: 6px;
  font-size: 11px;
  color: #d68b6a;
  letter-spacing: 0.02em;
}
.modal .field.invalid .err { display: block; }
.modal .field.invalid input,
.modal .field.invalid textarea { border-color: #d68b6a; }

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.modal-actions .btn-secondary {
  flex: 0 0 auto;
  padding: 16px 22px;
  background: transparent;
  border: 1px solid var(--line-20);
  border-radius: 1px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 500;
}
.modal-actions .btn-primary {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 18px;
  background: transparent;
  border: 1px solid var(--gold);
  border-radius: 1px;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 500;
  transition: background .25s ease, color .25s ease;
}
.modal-actions .btn-primary:active {
  background: rgba(214,184,123,0.07);
  color: var(--gold-light);
}
.modal-actions .btn-primary[disabled] {
  opacity: 0.5;
  cursor: wait;
}

.modal-status {
  text-align: center;
  padding: 12px 4px 4px;
}
.modal-status .glyph {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
}
.modal-status h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  color: var(--cream);
  margin: 0 0 8px;
}
.modal-status p {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 24px;
  letter-spacing: 0.02em;
  line-height: 1.5;
}
.modal-status.error .glyph { border-color: #d68b6a; color: #d68b6a; }
.modal-status.error h3 { color: #ecc7ba; }

/* ============ BOTTOM NAV ============ */

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(72px + env(safe-area-inset-bottom));
  background: rgba(42,31,21,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-12);
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding: 12px 8px calc(0px + env(safe-area-inset-bottom));
  z-index: 50;
}
.bottom-nav.hidden { display: none; }

.tab {
  position: relative;
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px 4px 0;
  color: var(--muted);
  cursor: pointer;
  flex: 1;
  font-family: inherit;
}
.tab svg { display: block; }
.tab .lbl {
  font-family: var(--sans);
  font-size: 8.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 400;
}
.tab.active { color: var(--gold); }
.tab.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 1px;
  background: var(--gold);
}
