/* Telegram Mini App — light thematic B2B. Logo untouched. */

:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #eef2f5;
  --input: #ffffff;
  --text: #0b1220;
  --text-soft: #2c3645;
  --hint: #5a6573;
  --line: rgba(11, 18, 32, 0.1);
  --line-strong: rgba(11, 18, 32, 0.18);
  --accent: #4f7d5c;
  --accent-deep: #2f5a3d;
  --accent-ink: #0b1220;
  --cta: #0b1220;
  --cta-text: #ffffff;
  --cta-hover: #1a2436;
  --accent-soft: rgba(79, 125, 92, 0.16);
  --font: "Onest", "Manrope", system-ui, sans-serif;
  --display: "Syne", "Onest", system-ui, sans-serif;
  --gap: 16px;
  --radius: 14px;
  --ease: 0.28s ease;
  --tap: 54px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --tg-vh: var(--tg-viewport-stable-height, 100dvh);
  --tabs-h: 60px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: var(--tg-vh);
  min-height: 100dvh;
  background: var(--bg);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body {
  margin: 0;
  min-height: 100dvh;
  min-height: var(--tg-vh);
  max-width: 100vw;
  font-family: var(--font);
  background:
    radial-gradient(ellipse 90% 45% at 80% -10%, rgba(107, 155, 184, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 40% at 10% 0%, rgba(79, 125, 92, 0.14), transparent 50%),
    linear-gradient(180deg, #f7f9fb 0%, var(--bg) 55%);
  color: var(--text) !important;
  line-height: 1.45;
  padding:
    calc(8px + var(--safe-top))
    calc(16px + var(--safe-right))
    calc(48px + var(--safe-bottom))
    calc(16px + var(--safe-left));
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body > * {
  position: relative;
  z-index: 1;
}

#app-main {
  padding-bottom: 24px;
  min-height: calc(var(--tg-vh) - 140px);
}

.top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0 4px;
}

.top .lang-host {
  margin-left: auto;
}

.lang-switcher {
  position: relative;
  display: inline-block;
  z-index: 40;
}

.lang-switcher__toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 9px 0 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.lang-switcher__globe {
  display: inline-flex;
  color: var(--accent-deep);
}

.lang-switcher__current {
  min-width: 1.5em;
  text-align: center;
}

.lang-switcher__chevron {
  font-size: 0.65rem;
  color: var(--hint);
}

.lang-switcher__menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 176px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(11, 18, 32, 0.14);
  max-height: min(70vh, 360px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.lang-switcher.is-open .lang-switcher__menu {
  display: block;
}

.lang-switcher__option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.lang-switcher__option:hover,
.lang-switcher__option.is-on {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.lang-switcher__opt-short {
  min-width: 2.2em;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--hint);
}

.lang-switcher__option.is-on .lang-switcher__opt-short {
  color: var(--accent-deep);
}

.top img {
  border-radius: 10px;
  flex-shrink: 0;
}

.top strong {
  display: block;
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 550;
  letter-spacing: -0.02em;
}

.top span {
  font-size: 0.72rem;
  color: var(--hint);
  font-weight: 600;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0 18px;
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 8px 0;
  background: rgba(247, 248, 244, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.tab {
  min-height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  color: var(--text-soft);
  font: inherit;
  font-weight: 650;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
  -webkit-text-fill-color: var(--text-soft);
}

.tab.is-on {
  color: var(--cta-text);
  -webkit-text-fill-color: var(--cta-text);
  background: var(--cta);
  border-color: var(--cta);
  box-shadow: 0 6px 14px rgba(13, 15, 18, 0.14);
}

.panel {
  display: none;
  padding-bottom: 16px;
}

.panel.is-on {
  display: block;
}

.eyebrow {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 650;
  color: var(--accent-deep);
}

h1 {
  margin: 8px 0 0;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 550;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.lead {
  margin: 8px 0 0;
  color: var(--hint);
  font-size: 0.92rem;
  line-height: 1.45;
}

.field {
  display: block;
  margin-top: var(--gap);
}

.field span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  color: var(--hint);
  font-weight: 600;
}

.field input,
.field textarea,
.field .select,
.select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--input);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  color-scheme: light;
  -webkit-text-fill-color: var(--text);
  transition: border-color var(--ease), box-shadow var(--ease);
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath stroke='%235C6758' stroke-width='1.5' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.field input:focus,
.field textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--accent-deep);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.svc-list {
  display: grid;
  gap: var(--gap);
  margin-top: var(--gap);
}

.svc-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: start;
  min-height: 88px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease);
}

.svc-card.is-on {
  border-color: rgba(95, 122, 86, 0.55);
  background: var(--accent-soft);
}

.svc-card input {
  margin-top: 3px;
  accent-color: var(--accent-deep);
}

.svc-card__title {
  display: block;
  font-weight: 650;
  font-size: 0.9rem;
}

.svc-card__hint {
  display: block;
  margin-top: 4px;
  color: var(--hint);
  font-size: 0.76rem;
  line-height: 1.35;
}

.svc-card__price {
  color: var(--accent-deep);
  font-weight: 700;
  font-size: 0.8rem;
  white-space: nowrap;
}

.extras-wrap {
  margin-top: var(--gap);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0 12px 12px;
}

.extras-wrap summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 4px;
  font-weight: 650;
  color: var(--text-soft);
}

.extras-wrap summary::-webkit-details-marker {
  display: none;
}

.toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  margin-top: var(--gap);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-soft);
  font-weight: 550;
  font-size: 0.88rem;
  transition: border-color var(--ease), background var(--ease);
}

.toggle:has(input:checked) {
  border-color: rgba(95, 122, 86, 0.45);
  background: var(--accent-soft);
}

.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle__ui {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #d5dbd1;
  border: 1px solid var(--line);
  position: relative;
  flex-shrink: 0;
}

.toggle__ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(26, 34, 28, 0.18);
  transition: transform var(--ease);
}

.toggle input:checked + .toggle__ui {
  background: var(--cta);
  border-color: var(--cta);
}

.toggle input:checked + .toggle__ui::after {
  transform: translateX(18px);
  background: var(--cta-text);
}

.total {
  margin-top: var(--gap);
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(26, 34, 28, 0.05);
}

.total__label {
  margin: 0;
  color: var(--hint);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 650;
}

.total__sum {
  margin: 6px 0 0;
  font-family: var(--display);
  font-size: 1.9rem;
  font-weight: 550;
  color: var(--accent-deep);
}

.total__meta {
  margin: 2px 0 0;
  color: var(--hint);
  font-size: 0.85rem;
}

.total__insure {
  display: none;
  margin: 12px 0 0;
  padding: 10px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(155, 176, 145, 0.35), #e8ece4);
  border: 1px solid rgba(95, 122, 86, 0.45);
  color: var(--text);
  font-weight: 650;
  font-size: 0.86rem;
}

.total.is-insured .total__insure {
  display: block;
}

.total__lines {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.total__lines li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  font-size: 0.86rem;
  color: var(--text-soft);
  border-bottom: 1px solid var(--line);
}

.total__lines li:last-child {
  border-bottom: 0;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--tap);
  margin-top: 12px;
  border: 1.5px solid var(--cta);
  border-radius: var(--radius);
  background: var(--cta);
  color: var(--cta-text) !important;
  -webkit-text-fill-color: var(--cta-text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 10px 22px rgba(13, 15, 18, 0.16);
  transition: background var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.btn:hover {
  background: var(--cta-hover);
  border-color: var(--accent-deep);
}

.btn--ghost {
  background: var(--surface);
  color: var(--text) !important;
  border: 1.5px solid rgba(26, 34, 28, 0.28);
  -webkit-text-fill-color: var(--text);
  box-shadow: 0 6px 14px rgba(13, 15, 18, 0.05);
}

.btn--sm {
  min-height: 48px;
  margin-top: 10px;
  font-size: 0.9rem;
}

.mini-usp {
  margin: 14px 0 4px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(95, 122, 86, 0.4);
  background: linear-gradient(135deg, rgba(155, 176, 145, 0.32), rgba(232, 236, 228, 0.95));
  display: grid;
  gap: 4px;
}

.mini-usp strong {
  color: var(--text);
  font-size: 0.95rem;
}

.mini-usp span {
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.4;
}

.steps {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: var(--gap);
}

.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.num {
  display: inline-flex;
  min-width: 32px;
  height: 28px;
  padding: 0 6px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--cta);
  color: var(--cta-text);
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.steps h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 550;
}

.steps p {
  margin: 6px 0 0;
  color: var(--hint);
  font-size: 0.86rem;
}

.orders {
  display: grid;
  gap: var(--gap);
  margin-top: 18px;
}

.order {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.order__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.order__id {
  font-weight: 700;
  color: var(--text);
}

.order__status {
  color: var(--accent-deep);
  font-weight: 650;
}

.order__insure {
  margin: 10px 0 0;
  color: var(--accent-deep);
  font-weight: 650;
  font-size: 0.88rem;
}

.order__insure--off {
  color: var(--hint);
  font-weight: 550;
}

.orders-banner {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #eef3ea;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.4;
}

.order--focus {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
}

.player {
  margin-top: 12px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #e8ece4;
}

.player--placeholder {
  padding: 20px 16px 28px;
  text-align: center;
}

.player__label {
  margin: 0 0 8px;
  padding: 10px 12px 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hint);
}

.player--placeholder .player__label {
  padding: 0;
}

.player__placeholder {
  margin: 0;
  color: var(--hint);
  font-size: 0.9rem;
}

.player video {
  width: 100%;
  display: block;
  min-height: 160px;
  max-height: 220px;
  object-fit: cover;
  background: #d5dbd1;
}

.player__bar {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: #eef1ea;
}

.player__bar button {
  flex: 1;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text-soft);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
}

.player__bar button.is-on {
  border-color: var(--accent-deep);
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.order__note {
  margin: 10px 0 0;
  color: var(--hint);
  font-size: 0.82rem;
}

dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 16px;
  width: min(920px, calc(100% - 32px));
  max-height: calc(var(--tg-vh) - 48px);
  overflow: auto;
}

dialog::backdrop {
  background: rgba(26, 34, 28, 0.45);
}

dialog h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 550;
}

.dialog-actions {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
