/* ==========================================================================
   СменаGo · JobForge — TMA styles
   Нативный мобильный App-Shell: тема Telegram, safe-area, bottom nav
   ========================================================================== */

/* ---------- Дизайн-токены ---------- */
:root {
  --tg-bg: var(--tg-theme-bg-color, #F8FAFC);
  --tg-text: var(--tg-theme-text-color, #0F172A);
  --tg-hint: var(--tg-theme-hint-color, #64748B);
  --tg-button: var(--tg-theme-button-color, #2563EB);
  --tg-button-text: var(--tg-theme-button-text-color, #FFFFFF);
  --tg-secondary-bg: var(--tg-theme-secondary-bg-color, #FFFFFF);

  --accent: var(--tg-button);
  --accent-ink: var(--tg-button-text);
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);

  --surface: var(--tg-secondary-bg);
  --surface-2: color-mix(in srgb, var(--tg-text) 4.5%, transparent);
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);
  --track: color-mix(in srgb, var(--tg-text) 10%, transparent);

  --green: #10B981;
  --green-ink: #047857;
  --green-soft: rgba(16, 185, 129, 0.12);
  --red: #EF4444;

  --r-xl: 24px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 30px -18px rgba(15, 23, 42, 0.35);
  --shadow-nav: 0 -1px 0 rgba(15, 23, 42, 0.06), 0 -12px 30px -20px rgba(15, 23, 42, 0.35);

  --nav-h: calc(56px + env(safe-area-inset-bottom, 0px));
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

[data-theme="dark"] {
  --tg-bg: var(--tg-theme-bg-color, #0B1120);
  --tg-text: var(--tg-theme-text-color, #F1F5F9);
  --tg-hint: var(--tg-theme-hint-color, #94A3B8);
  --tg-secondary-bg: var(--tg-theme-secondary-bg-color, #151E31);
  --tg-button: var(--tg-theme-button-color, #3B82F6);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-nav: 0 -1px 0 rgba(255, 255, 255, 0.06);
  --green-soft: rgba(16, 185, 129, 0.16);
  --green-ink: #6EE7B7;
}

/* ---------- База ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  background: var(--tg-bg);
  color: var(--tg-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior-y: none;
  touch-action: manipulation;
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 16px));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(120% 55% at 50% -12%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 62%);
}

[hidden] { display: none !important; }

input,
textarea {
  -webkit-user-select: text;
  user-select: text;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
}

h1, h2, h3, p, ul { margin: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 22px;
  height: 22px;
  display: block;
  flex: none;
}

.icon--xs { width: 14px; height: 14px; }

/* ---------- Шапка ---------- */
.app-header {
  position: relative;
  z-index: 5;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 4px;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
}

.avatar {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
}

.brand-mark {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #2563EB 0%, #059669 55%, #10B981 100%);
  box-shadow:
    0 4px 14px rgba(37, 99, 235, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 0 0 2px rgba(255, 255, 255, 0.9);
  transition: transform 0.1s ease;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 12px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.3), transparent 48%);
  pointer-events: none;
}

.brand-s {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  filter:
    drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15))
    drop-shadow(0 0 6px rgba(255, 255, 255, 0.55));
}

@media (hover: hover) {
  .brand-mark:hover { transform: scale(1.03); }
}

.brand-mark:active {
  transform: scale(0.94) rotate(-2deg);
  transition: transform 0.1s ease;
}

.brand-copy {
  flex: 1;
  min-width: 0;
  line-height: 1.1;
}

.brand-name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.7px;
  color: var(--tg-text);
  white-space: nowrap;
}

.brand-go { color: #2563EB; }

[data-theme="dark"] .brand-go { color: #60A5FA; }

.brand-tagline {
  margin-top: 1px;
  font-size: 10px;
  font-weight: 500;
  color: var(--tg-hint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: 560px;
  margin: 4px auto 0;
}

.greeting {
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.2;
  color: var(--tg-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.city-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  transition: opacity 0.15s, transform 0.12s;
}

[data-theme="dark"] .city-btn { color: var(--tg-hint); }

.city-btn .icon { width: 12px; height: 12px; }
.city-btn:active { opacity: 0.6; transform: scale(0.97); }

.shift-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.16), rgba(16, 185, 129, 0.07));
  border: 1px solid rgba(16, 185, 129, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 2px 8px rgba(16, 185, 129, 0.14);
  color: var(--green-ink);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.shift-badge b { font-weight: 800; }

.shift-badge .dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}

.shift-badge .dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: radar 2s ease-out infinite;
}

[data-theme="dark"] .shift-badge {
  border-color: rgba(16, 185, 129, 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 10px rgba(16, 185, 129, 0.12);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent); }
  50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 6%, transparent); }
}

@keyframes radar {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
}

/* ---------- Экраны ---------- */
#views-container {
  position: relative;
  z-index: 1;
}

.view { display: none; }

.view.is-active {
  display: block;
}

.view.is-entering {
  animation: viewIn 0.22s var(--ease);
}

@keyframes viewIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.section {
  max-width: 560px;
  margin: 0 auto;
  padding: 4px 16px 8px;
}

.section--tight { padding-top: 0; }

.page-head { padding: 8px 0 14px; }

.page-head--row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.page-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.7px;
  line-height: 1.2;
}

.page-sub {
  margin-top: 4px;
  color: var(--tg-hint);
  font-size: 12.5px;
}

.text-btn {
  flex: none;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--tg-hint);
  font-size: 12px;
  font-weight: 700;
  transition: color 0.15s, background 0.15s;
}

.text-btn.is-danger { color: var(--red); background: rgba(239, 68, 68, 0.08); }
.text-btn:active { background: var(--surface-2); }

/* ---------- Лента категорий ---------- */
.rail-wrap {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--tg-bg) 86%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.rail {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 12px 10px 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-padding-left: 16px;
}

.rail::-webkit-scrollbar { display: none; }

.rail-controls {
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 8px;
}

.rail-arrow {
  position: relative;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.9);
  color: #1D4ED8;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform 0.12s ease, opacity 0.15s ease;
}

.rail-arrow .icon { width: 15px; height: 15px; }
.rail-arrow:active { transform: scale(0.9); }
.rail-arrow[disabled] { opacity: 0.35; pointer-events: none; }

.rail-arrow::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
}

[data-theme="dark"] .rail-arrow {
  background: rgba(21, 30, 49, 0.92);
  border-color: rgba(255, 255, 255, 0.1);
  color: #93C5FD;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

@media (hover: hover) {
  .rail,
  .quick-chips { cursor: grab; }

  .rail.is-dragging,
  .quick-chips.is-dragging { cursor: grabbing; }
}

@media (min-width: 592px) {
  .rail-wrap {
    max-width: 560px;
    margin: 0 auto;
  }

  .rail {
    max-width: none;
    margin: 0;
  }
}

.cat-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px 0 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 2px 0 #E2E8F0, 0 3px 8px rgba(15, 23, 42, 0.04);
  font-size: 13px;
  font-weight: 650;
  color: #334155;
  white-space: nowrap;
  transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease),
              background 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease);
}

.cat-icon {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 14px;
  line-height: 1;
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 1px 2px rgba(15, 23, 42, 0.06);
}

.cat-icon--all {
  background: linear-gradient(145deg, #EEF2FF 0%, #E0E7FF 100%);
  border-color: #C7D2FE;
}

.cat-icon--courier {
  background: linear-gradient(145deg, #FFF7ED 0%, #FFEDD5 100%);
  border-color: #FED7AA;
}

.cat-icon--warehouse {
  background: linear-gradient(145deg, #EFF6FF 0%, #DBEAFE 100%);
  border-color: #BFDBFE;
}

.cat-icon--driver {
  background: linear-gradient(145deg, #FEFCE8 0%, #FEF08A 100%);
  border-color: #FDE68A;
}

.cat-icon--food {
  background: linear-gradient(145deg, #FFF1F2 0%, #FFE4E6 100%);
  border-color: #FECDD3;
}

.cat-icon--vahta {
  background: linear-gradient(145deg, #ECFDF5 0%, #D1FAE5 100%);
  border-color: #A7F3D0;
}

/* ---------- Быстрые чипсы ---------- */
.quick-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 2px 0 8px;
  padding: 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.quick-chips::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px 0 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  font-size: 12px;
  font-weight: 650;
  color: #475569;
  white-space: nowrap;
  transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease),
              background 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease);
}

.chip-icon {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 11px;
  line-height: 1;
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 1px 2px rgba(15, 23, 42, 0.06);
}

.chip-icon--daily {
  background: linear-gradient(145deg, #FFFBEB 0%, #FEF3C7 100%);
  border-color: #FDE68A;
}

.chip-icon--noexp {
  background: linear-gradient(145deg, #EEF2FF 0%, #E0E7FF 100%);
  border-color: #C7D2FE;
}

.chip-icon--near {
  background: linear-gradient(145deg, #FFF1F2 0%, #FFE4E6 100%);
  border-color: #FECDD3;
}

/* Активные состояния */
.cat-chip.is-active {
  background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%);
  border-color: transparent;
  color: #FFFFFF;
  box-shadow: 0 3px 0 #020617, 0 6px 16px rgba(15, 23, 42, 0.25);
}

.cat-chip.is-active .cat-icon,
.chip.is-active .chip-icon {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 2px 6px rgba(15, 23, 42, 0.25);
}

.chip.is-active,
.chip.active,
.filter-tag.active {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  border-color: transparent;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

/* Физика нажатия */
.cat-chip:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 transparent, 0 1px 4px rgba(15, 23, 42, 0.1);
}

.chip:active {
  transform: translateY(1px) scale(0.95);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}

@media (hover: hover) {
  .cat-chip:not(.is-active):hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 0 #E2E8F0, 0 5px 12px rgba(15, 23, 42, 0.06);
  }

  .chip:not(.is-active):not(.active):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  }
}

/* Тёмная тема */
[data-theme="dark"] .cat-chip {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.03));
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--tg-text);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45), 0 3px 8px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .chip {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.03));
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--tg-text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .cat-chip.is-active {
  background: linear-gradient(180deg, #3B82F6 0%, #1D4ED8 100%);
  border-color: transparent;
  color: #FFFFFF;
  box-shadow: 0 3px 0 #173CB0, 0 6px 16px rgba(37, 99, 235, 0.35);
}

[data-theme="dark"] .chip.is-active,
[data-theme="dark"] .chip.active,
[data-theme="dark"] .filter-tag.active {
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  border-color: transparent;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

[data-theme="dark"] .cat-chip:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 transparent, 0 1px 4px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .chip:active {
  transform: translateY(1px) scale(0.95);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* ---------- Активный фильтр ---------- */
.active-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px 8px 8px 12px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 650;
}

.active-filter-icon { font-size: 13px; }

.active-filter button {
  margin-left: auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}

.active-filter .icon { width: 14px; height: 14px; }

/* ---------- Поиск и сортировка ---------- */
.search-bar-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  margin-bottom: 8px;
  padding: 0 8px 0 11px;
  background: #FFFFFF;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 12px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.18s, box-shadow 0.18s;
}

.search-bar-wrap:focus-within {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08), inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.search-icon {
  flex: none;
  font-size: 13px;
  line-height: 1;
  opacity: 0.7;
}

.search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  outline: none;
  font: inherit;
  font-size: 13px;
  color: var(--tg-text);
  -webkit-appearance: none;
  appearance: none;
}

.search-input::placeholder { color: var(--tg-hint); opacity: 0.85; }
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-decoration { display: none; }

.search-clear-btn {
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--tg-hint);
  font-size: 12px;
  font-weight: 700;
  transition: transform 0.12s ease;
}

.search-clear-btn:active { transform: scale(0.92); }

[data-theme="dark"] .search-bar-wrap {
  background: var(--tg-secondary-bg);
  border-color: var(--border);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
  margin-bottom: 8px;
}

.results-count {
  min-width: 0;
  font-size: 12px;
  color: var(--tg-hint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.results-count b {
  color: var(--tg-text);
  font-size: 13px;
  font-weight: 750;
}

.sort-wrap { position: relative; flex: none; }

.sort-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 9px 0 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--tg-hint);
  font-size: 11px;
  font-weight: 650;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.sort-chip .icon { width: 12px; height: 12px; }

.sort-chip.is-open {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--accent);
}

.sort-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  width: 232px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow:
    0 18px 36px -18px rgba(15, 23, 42, 0.45),
    0 2px 8px rgba(15, 23, 42, 0.06);
}

.sort-option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--tg-text);
}

.sort-option + .sort-option { margin-top: 2px; }
.sort-option.is-active { background: var(--accent-soft); color: var(--accent); }
.sort-option:active { background: var(--surface-2); }

[data-theme="dark"] .sort-menu {
  box-shadow:
    0 18px 36px -18px rgba(0, 0, 0, 0.85),
    0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ---------- Карточка вакансии ---------- */
.job-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.job-card {
  position: relative;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
              border-color 0.18s var(--ease);
}

.card-accent-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg,
    var(--brand, var(--accent)) 0%,
    color-mix(in srgb, var(--brand, var(--accent)) 72%, #FFFFFF) 42%,
    color-mix(in srgb, var(--brand, var(--accent)) 28%, transparent) 100%);
  box-shadow: 0 0 18px color-mix(in srgb, var(--brand, var(--accent)) 55%, transparent);
  transition: box-shadow 0.18s var(--ease);
  pointer-events: none;
}

.card-accent-bar::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 22px;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--brand, var(--accent)) 15%, transparent),
    transparent);
  pointer-events: none;
}

@media (hover: hover) {
  .job-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--brand, var(--accent)) 28%, var(--border));
    box-shadow:
      0 18px 38px -22px rgba(15, 23, 42, 0.45),
      0 0 0 1px color-mix(in srgb, var(--brand, var(--accent)) 10%, transparent),
      inset 0 1px 0 rgba(255, 255, 255, 0.75);
  }

  .job-card:hover .card-accent-bar {
    box-shadow: 0 0 26px color-mix(in srgb, var(--brand, var(--accent)) 70%, transparent);
  }

  .job-card:hover .brand-avatar {
    transform: translateY(-1px) scale(1.03);
    box-shadow:
      0 10px 22px -8px color-mix(in srgb, var(--brand, var(--accent)) 70%, transparent),
      inset 0 1px 0 rgba(255, 255, 255, 0.6);
  }
}

.job-card:active {
  transform: scale(0.985);
  border-color: color-mix(in srgb, var(--brand, var(--accent)) 24%, var(--border));
  box-shadow:
    0 8px 20px -16px rgba(15, 23, 42, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.1s ease-out, box-shadow 0.1s ease-out;
}

[data-theme="dark"] .job-card {
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

@media (hover: hover) {
  [data-theme="dark"] .job-card:hover {
    box-shadow:
      0 20px 40px -22px rgba(0, 0, 0, 0.85),
      0 0 0 1px color-mix(in srgb, var(--brand, var(--accent)) 22%, transparent),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }
}

.job-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.brand-avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 21px;
  line-height: 1;
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--brand, var(--accent)) 20%, transparent),
    color-mix(in srgb, var(--brand, var(--accent)) 9%, transparent));
  border: 1px solid color-mix(in srgb, var(--brand, var(--accent)) 26%, transparent);
  box-shadow:
    0 8px 18px -8px color-mix(in srgb, var(--brand, var(--accent)) 65%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

[data-theme="dark"] .brand-avatar {
  box-shadow:
    0 8px 20px -8px color-mix(in srgb, var(--brand, var(--accent)) 55%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.job-head {
  flex: 1;
  min-width: 0;
}

.job-topline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
}

.job-company {
  flex: 1;
  min-width: 0;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--tg-hint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.1px;
  white-space: nowrap;
}

.badge--fire { background: rgba(239, 68, 68, 0.1); color: #B91C1C; }
.badge--best { background: rgba(245, 158, 11, 0.15); color: #92400E; }
.badge--green { background: rgba(16, 185, 129, 0.12); color: #047857; }
.badge--neutral { background: var(--surface-2); color: #475569; }

[data-theme="dark"] .badge--fire { color: #FCA5A5; }
[data-theme="dark"] .badge--best { color: #FCD34D; }
[data-theme="dark"] .badge--green { color: #6EE7B7; }
[data-theme="dark"] .badge--neutral { color: var(--tg-hint); }

.job-title {
  margin-top: 2px;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.25px;
  line-height: 1.25;
}

.job-salary {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 7px;
  margin-top: 10px;
}

.job-salary-main {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.45px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.job-salary-period {
  font-size: 11.5px;
  font-weight: 550;
  color: var(--tg-hint);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.tag {
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  color: #475569;
  font-size: 10.5px;
  font-weight: 600;
}

[data-theme="dark"] .tag { color: var(--tg-hint); }

.features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 10px;
  padding: 0;
}

.features li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--tg-text);
  opacity: 0.86;
}

.features .icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: var(--green);
}

.job-legal {
  margin-top: 9px;
  font-size: 9.5px;
  line-height: 1.3;
  color: var(--tg-hint);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.job-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.job-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 3px 9px;
  font-size: 11px;
  font-weight: 550;
  color: var(--tg-hint);
}

.job-meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.btn-apply,
.apply-btn {
  flex: none;
  margin-left: auto;
  height: 48px;
  padding: 0 16px;
  border: none;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(180deg, #3B82F6 0%, #1D4ED8 100%);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 750;
  box-shadow: 0 4px 0 #173CB0, 0 8px 20px rgba(37, 99, 235, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.08s ease-out;
}

.btn-apply .icon { width: 16px; height: 16px; }

@media (hover: hover) {
  .btn-apply:hover,
  .apply-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 0 #173CB0, 0 10px 24px rgba(37, 99, 235, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
}

.btn-apply:active,
.apply-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #173CB0, 0 3px 10px rgba(37, 99, 235, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

@media (max-width: 359px) {
  .btn-apply { flex: 1 1 100%; margin-left: 0; }
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 20px;
  border-radius: 16px;
  font-size: 14.5px;
  font-weight: 750;
  transition: transform 0.12s, filter 0.2s, opacity 0.2s;
}

.btn-primary {
  background: linear-gradient(180deg, #3B82F6 0%, #1D4ED8 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 14px;
  box-shadow: 0 4px 0 #173CB0, 0 8px 20px rgba(37, 99, 235, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.08s ease-out;
}

@media (hover: hover) {
  .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 0 #173CB0, 0 10px 24px rgba(37, 99, 235, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
}

.btn-primary:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #173CB0, 0 3px 10px rgba(37, 99, 235, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary[disabled] {
  opacity: 0.55;
  pointer-events: none;
  transform: none;
  background: linear-gradient(180deg, #94A3B8 0%, #64748B 100%);
  box-shadow: 0 4px 0 #475569, 0 8px 20px rgba(15, 23, 42, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-block {
  width: 100%;
  margin-top: 14px;
}

.note {
  margin: 12px 2px 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--tg-hint);
}

/* ---------- Калькулятор ---------- */
.calc-hero {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: var(--r-xl);
  color: #fff;
  background:
    radial-gradient(120% 90% at 88% -10%, rgba(255, 255, 255, 0.22) 0%, transparent 55%),
    linear-gradient(135deg, #2563EB 0%, #1E40AF 50%, #4338CA 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 24px 48px -22px rgba(29, 78, 216, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  isolation: isolate;
}

.calc-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 230px;
  height: 230px;
  top: -120px;
  right: -70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 68%);
  filter: blur(4px);
}

.calc-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 170px;
  height: 170px;
  bottom: -95px;
  left: -45px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.5), transparent 70%);
  filter: blur(6px);
}

.calc-hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.calc-hero-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  opacity: 0.85;
}

.calc-bonus {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 6px 14px rgba(15, 23, 42, 0.16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  animation: float 3s ease-in-out infinite;
}

.calc-bonus-coin {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 32% 28%, #FDE68A 0%, #F59E0B 55%, #B45309 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.7),
    inset 0 -1px 2px rgba(120, 53, 15, 0.45),
    0 2px 4px rgba(0, 0, 0, 0.2);
  color: #7C2D12;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.calc-watermark {
  position: absolute;
  right: -8px;
  bottom: -42px;
  z-index: 0;
  font-size: 150px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -12px;
  color: rgba(255, 255, 255, 0.07);
  transform: rotate(-12deg);
  pointer-events: none;
  user-select: none;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.calc-amount {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 2px;
  font-size: 38px;
  font-weight: 850;
  letter-spacing: -1.4px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 12px rgba(15, 23, 42, 0.18);
}

.calc-currency {
  font-size: 19px;
  font-weight: 700;
  opacity: 0.82;
}

.calc-breakdown {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.calc-stat {
  padding: 8px 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.calc-stat span {
  display: block;
  font-size: 12px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.calc-stat small {
  display: block;
  margin-top: 1px;
  font-size: 9.5px;
  opacity: 0.8;
}

.panel {
  margin-top: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.control + .control {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.control-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.control-head label,
.control-head > span:first-child {
  font-size: 13.5px;
  font-weight: 650;
}

.control-value {
  flex: none;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

/* ---------- Ползунки ---------- */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg,
    var(--accent) 0 var(--p, 50%),
    var(--track) var(--p, 50%) 100%);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -10px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid var(--accent);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.22);
  transition: transform 0.12s var(--ease);
}

input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }

input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 99px;
  background: var(--track);
}

input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 99px;
  background: var(--accent);
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid var(--accent);
}

.ticks {
  display: flex;
  justify-content: space-between;
  padding: 2px 3px 0;
  color: var(--tg-hint);
  font-size: 10.5px;
  font-weight: 600;
}

.ticks span { transition: color 0.15s; }
.ticks span.is-active { color: var(--accent); }

/* ---------- Сегменты ---------- */
.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface-2);
}

.segmented button {
  height: 44px;
  border-radius: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: var(--tg-hint);
  font-size: 10.5px;
  font-weight: 650;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}

.segmented button span { font-size: 15px; line-height: 1.1; }

.segmented button.is-active {
  background: var(--surface);
  color: var(--tg-text);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.14);
}

/* ---------- Пустые состояния ---------- */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 34px 22px;
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 94%, var(--tg-bg)));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.empty-icon {
  position: relative;
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 32px;
  background: radial-gradient(circle at 50% 42%, rgba(37, 99, 235, 0.18), transparent 72%), var(--surface-2);
  box-shadow:
    0 0 0 10px rgba(37, 99, 235, 0.05),
    0 16px 32px -16px rgba(37, 99, 235, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.empty-icon--folder {
  font-size: 34px;
  box-shadow:
    0 0 0 12px rgba(37, 99, 235, 0.06),
    0 0 38px 8px rgba(37, 99, 235, 0.18),
    0 16px 32px -16px rgba(37, 99, 235, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  filter: drop-shadow(0 8px 12px rgba(37, 99, 235, 0.22));
}

[data-theme="dark"] .empty-icon {
  box-shadow:
    0 0 0 10px rgba(59, 130, 246, 0.06),
    0 16px 32px -16px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .empty-icon--folder {
  box-shadow:
    0 0 0 12px rgba(59, 130, 246, 0.08),
    0 0 38px 8px rgba(59, 130, 246, 0.18),
    0 16px 32px -16px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.empty h3 {
  font-size: 15.5px;
  font-weight: 750;
  letter-spacing: -0.2px;
}

.empty p {
  max-width: 260px;
  margin: 6px 0 16px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--tg-hint);
}

.empty .btn { height: 46px; font-size: 13.5px; }

/* ---------- Отклики ---------- */
.applied-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.applied-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s;
}

.applied-card:active { transform: scale(0.99); }

.applied-card .brand-avatar {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  font-size: 19px;
}

.applied-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.applied-company {
  font-size: 10.5px;
  font-weight: 650;
  color: var(--tg-hint);
}

.applied-title {
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.applied-meta {
  font-size: 11px;
  color: var(--tg-hint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.applied-side {
  flex: none;
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-chip {
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green-ink);
  font-size: 9.5px;
  font-weight: 750;
  white-space: nowrap;
}

.applied-side .icon {
  width: 15px;
  height: 15px;
  color: var(--tg-hint);
  opacity: 0.6;
}

/* ---------- FAQ ---------- */
.accordion {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.faq-item + .faq-item { border-top: 1px solid var(--border); }

.faq-q {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 15px 14px;
  text-align: left;
  font-size: 13.5px;
  font-weight: 650;
}

.faq-q .icon {
  width: 18px;
  height: 18px;
  margin-left: auto;
  color: var(--tg-hint);
  transition: transform 0.25s var(--ease), color 0.2s;
}

.faq-item.is-open .faq-q .icon {
  transform: rotate(180deg);
  color: var(--accent);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s var(--ease);
}

.faq-a-inner {
  padding: 0 14px 15px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--tg-hint);
}

.support-card {
  margin-top: 14px;
  padding: 20px 18px;
  text-align: center;
  border-radius: var(--r-lg);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 12%, var(--surface)),
    var(--surface));
  box-shadow:
    0 18px 36px -24px rgba(37, 99, 235, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.support-icon {
  position: relative;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #3B82F6 0%, #1D4ED8 55%, #4338CA 100%);
  box-shadow:
    0 4px 0 #173CB0,
    0 12px 24px -12px rgba(37, 99, 235, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: rotate(-3deg);
}

.support-icon .icon {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 3px rgba(15, 23, 42, 0.25));
}

.support-icon::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 0 2px var(--surface), 0 0 10px rgba(52, 211, 153, 0.8);
}

[data-theme="dark"] .support-card {
  box-shadow:
    0 18px 36px -24px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.support-card h3 {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 750;
}

.support-card p {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--tg-hint);
}

.support-card .btn { margin-top: 14px; }

.footer-note {
  margin: 18px 0 4px;
  text-align: center;
  font-size: 10.5px;
  color: var(--tg-hint);
  opacity: 0.7;
}

/* ---------- Нижняя навигация ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: calc(56px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  justify-content: center;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.05);
}

[data-theme="dark"] .bottom-nav {
  background: rgba(21, 30, 49, 0.88);
  border-top-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.bottom-nav-inner {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 560px;
  height: 56px;
}

.nav-item {
  position: relative;
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--tg-hint);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.1px;
  transition: all 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-icon {
  position: relative;
  display: grid;
  place-items: center;
  padding: 4px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  transition: all 0.18s var(--ease);
}

.nav-icon .icon { width: 21px; height: 21px; }

.nav-item.is-active,
.nav-item.active {
  color: #1D4ED8;
  font-weight: 700;
}

.nav-item.is-active .nav-icon,
.nav-item.active .nav-icon {
  background: linear-gradient(180deg, #EFF6FF 0%, #DBEAFE 100%);
  border-color: rgba(191, 219, 254, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 2px 4px rgba(37, 99, 235, 0.08);
}

.nav-item:active {
  transform: translateY(2px) scale(0.93);
  transition: transform 0.06s ease-out;
}

[data-theme="dark"] .nav-item.is-active,
[data-theme="dark"] .nav-item.active {
  color: #93C5FD;
}

[data-theme="dark"] .nav-item.is-active .nav-icon,
[data-theme="dark"] .nav-item.active .nav-icon {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.24), rgba(37, 99, 235, 0.14));
  border-color: rgba(96, 165, 250, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 2px 6px rgba(0, 0, 0, 0.25);
}

.nav-badge {
  position: absolute;
  top: -4px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  box-shadow: 0 0 0 2px var(--tg-secondary-bg);
}

[data-theme="dark"] .nav-badge {
  box-shadow: 0 0 0 2px #151E31;
}

.nav-badge.is-pop { animation: pop 0.32s var(--ease); }

@keyframes pop {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* ---------- Пикер города ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.45);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.sheet-backdrop.is-open { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  max-height: 82vh;
  max-height: 82dvh;
  display: flex;
  flex-direction: column;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--tg-secondary-bg);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -20px 50px rgba(15, 23, 42, 0.25);
  transform: translateY(110%);
  visibility: hidden;
  transition: transform 0.3s var(--ease), visibility 0.3s;
}

.sheet.is-open {
  transform: translateY(0);
  visibility: visible;
}

.sheet-grabber {
  width: 38px;
  height: 4px;
  margin: 4px auto 12px;
  border-radius: 2px;
  background: var(--border-strong);
}

.sheet-title {
  font-size: 16px;
  font-weight: 750;
  text-align: center;
}

.sheet-sub {
  margin: 4px 0 10px;
  text-align: center;
  font-size: 11.5px;
  color: var(--tg-hint);
}

.sheet-list {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  max-height: 55vh;
}

.city-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 12px;
  text-align: left;
  font-size: 14px;
  font-weight: 650;
  transition: background 0.15s, color 0.15s;
}

.city-row + .city-row { margin-top: 2px; }
.city-row:active { background: var(--surface-2); }

.city-row .count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 550;
  color: var(--tg-hint);
}

.city-row .icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
  opacity: 0;
}

.city-row.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.city-row.is-active .icon { opacity: 1; }
.city-row.is-active .count { color: var(--accent); opacity: 0.75; }

/* ---------- Шторка вакансии ---------- */
.bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 101;
  max-height: 85vh;
  max-height: 85dvh;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -20px 50px rgba(15, 23, 42, 0.28);
  transform: translateY(100%);
  visibility: hidden;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s;
}

.bottom-sheet.open {
  transform: translateY(0);
  visibility: visible;
}

[data-theme="dark"] .bottom-sheet { background: var(--tg-secondary-bg); }

.sheet-handle {
  flex: none;
  width: 38px;
  height: 4px;
  margin: 8px auto 4px;
  border-radius: 2px;
  background: var(--border-strong);
  touch-action: none;
}

.sheet-close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--tg-hint);
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.12s ease, background 0.15s;
}

.sheet-close-btn:active { transform: scale(0.92); }

.sheet-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px 20px;
}

.sheet-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 34px;
  margin-bottom: 14px;
  touch-action: none;
}

.sheet-brand-badge {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--brand, var(--accent)) 20%, transparent),
    color-mix(in srgb, var(--brand, var(--accent)) 9%, transparent));
  border: 1px solid color-mix(in srgb, var(--brand, var(--accent)) 26%, transparent);
  box-shadow:
    0 8px 18px -8px color-mix(in srgb, var(--brand, var(--accent)) 65%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.sheet-title {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.sheet-company {
  margin-top: 2px;
  font-size: 12px;
  color: var(--tg-hint);
}

.sheet-payout-card {
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 10%, var(--surface)),
    var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.sheet-payout-val {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.sheet-payout-sub {
  margin-top: 1px;
  font-size: 11.5px;
  color: var(--tg-hint);
}

.sheet-section { margin-top: 16px; }

.sheet-section h4 {
  margin: 0 0 8px;
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--tg-hint);
}

.sheet-list,
.sheet-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sheet-list li,
.sheet-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--tg-text);
  opacity: 0.9;
}

.sheet-check {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green-ink);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.sheet-legal {
  margin-top: 16px;
  font-size: 9.5px;
  line-height: 1.4;
  color: var(--tg-hint);
}

.sheet-actions {
  flex: none;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  background: #FFFFFF;
  box-shadow: 0 -10px 24px -18px rgba(15, 23, 42, 0.35);
}

[data-theme="dark"] .sheet-actions {
  background: var(--tg-secondary-bg);
  border-top-color: var(--border);
  box-shadow: 0 -10px 24px -18px rgba(0, 0, 0, 0.7);
}

.apply-btn-3d {
  width: 100%;
  height: auto;
  min-height: 50px;
  padding: 8px 12px;
  font-size: 12.5px;
  line-height: 1.15;
}

/* ---------- Чат службы заботы ---------- */
.support-chat-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 102;
  max-height: 90vh;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  background: var(--tg-secondary-bg);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -24px 60px rgba(15, 23, 42, 0.3);
  transform: translateY(105%);
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.support-chat-sheet.open {
  transform: translateY(0);
  visibility: visible;
}

.support-chat-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: #FFFFFF;
  border-radius: 24px 24px 0 0;
}

.support-chat-avatar {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #FFFFFF;
  background: linear-gradient(145deg, #3B82F6 0%, #1D4ED8 55%, #10B981 130%);
  box-shadow:
    0 4px 0 #173CB0,
    0 10px 20px -10px rgba(37, 99, 235, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.support-chat-avatar .icon { width: 22px; height: 22px; }

.support-chat-online {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #34D399;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.9);
}

.support-chat-heading { flex: 1; min-width: 0; }

.support-chat-heading h2 {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.35px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.support-chat-heading p {
  margin-top: 2px;
  color: var(--tg-hint);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.support-chat-close {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--tg-hint);
  font-size: 14px;
  font-weight: 700;
}

.support-chat-close:active { transform: scale(0.92); }

.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 14px;
  background:
    radial-gradient(90% 60% at 10% 0%, rgba(37, 99, 235, 0.07), transparent 60%),
    linear-gradient(180deg, #F8FAFC, #F1F5F9);
}

.chat-day {
  align-self: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: #E2E8F0;
  color: #475569;
  font-size: 9.5px;
  font-weight: 700;
}

.chat-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 84%;
  animation: chatBubbleIn 0.2s var(--ease);
}

.chat-row--support { align-self: flex-start; align-items: flex-start; }
.chat-row--user { align-self: flex-end; align-items: flex-end; }

.chat-bubble {
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 12.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-row--support .chat-bubble {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-bottom-left-radius: 5px;
  color: var(--tg-text);
  box-shadow: 0 3px 10px -6px rgba(15, 23, 42, 0.28);
}

.chat-row--user .chat-bubble {
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  border-bottom-right-radius: 5px;
  color: #FFFFFF;
  box-shadow: 0 6px 16px -8px rgba(37, 99, 235, 0.8);
}

.chat-row.is-pending .chat-bubble { opacity: 0.7; }
.chat-row.is-failed .chat-bubble { background: linear-gradient(135deg, #F87171, #DC2626); }

.chat-time {
  color: var(--tg-hint);
  font-size: 9px;
  font-weight: 550;
  padding: 0 3px;
}

.chat-empty {
  margin: auto 0;
  padding: 28px 16px;
  text-align: center;
  color: var(--tg-hint);
  font-size: 12px;
  line-height: 1.5;
}

.chat-empty b {
  display: block;
  margin-bottom: 4px;
  color: var(--tg-text);
  font-size: 13.5px;
}

.chat-quick {
  flex: none;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 9px 12px;
  border-top: 1px solid var(--border);
  background: #FFFFFF;
}

.chat-quick button {
  flex: none;
  max-width: 230px;
  padding: 7px 11px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border));
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-quick button:active { transform: scale(0.96); }

.chat-input-row {
  flex: none;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: #FFFFFF;
}

.chat-input-row input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-2);
  color: var(--tg-text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.chat-input-row input:focus {
  background: #FFFFFF;
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent);
}

.chat-send-btn {
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 15px;
  color: #FFFFFF;
  background: linear-gradient(180deg, #3B82F6 0%, #1D4ED8 100%);
  box-shadow:
    0 4px 0 #173CB0,
    0 10px 20px -10px rgba(37, 99, 235, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out, opacity 0.18s;
}

.chat-send-btn svg { width: 20px; height: 20px; }

.chat-send-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #173CB0, 0 3px 10px rgba(37, 99, 235, 0.3);
}

.chat-send-btn[disabled] { opacity: 0.55; pointer-events: none; }

@keyframes chatBubbleIn {
  from { opacity: 0; transform: translateY(5px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

[data-theme="dark"] .support-chat-head,
[data-theme="dark"] .chat-quick,
[data-theme="dark"] .chat-input-row { background: var(--tg-secondary-bg); }

[data-theme="dark"] .chat-messages {
  background:
    radial-gradient(90% 60% at 10% 0%, rgba(37, 99, 235, 0.14), transparent 60%),
    linear-gradient(180deg, #0F172A, #0B1120);
}

[data-theme="dark"] .chat-row--support .chat-bubble {
  background: #1E293B;
  border-color: #334155;
  color: #E2E8F0;
}

[data-theme="dark"] .chat-day { background: #1E293B; color: #94A3B8; }

[data-theme="dark"] .chat-input-row input { background: #1E293B; }
[data-theme="dark"] .chat-input-row input:focus { background: #0F172A; }

body.sheet-open { overflow: hidden; }

/* ---------- Тост ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 14px);
  z-index: 80;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.93);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.2s, transform 0.25s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Малые экраны ---------- */
@media (max-width: 359px) {
  .greeting { font-size: 15px; }
  .shift-badge { padding: 0 8px; font-size: 10.5px; }
  .job-title { font-size: 15px; }
  .job-salary-main { font-size: 18.5px; }
  .calc-amount { font-size: 32px; }
  .calc-stat span { font-size: 11px; }
}

/* ---------- Уменьшение движения ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
