/* ============================================================
   ZhumysBAR — Production stylesheet (brand redesign)
   Drop-in replacement for public/css/main.css
   ------------------------------------------------------------
   • Keeps EVERY original selector & id — JS keeps working as-is.
   • Re-skins green/blue palette → brand navy + teal (from logo).
   • Font Arial → Golos Text (imported below, no HTML change needed).
   • WhatsApp green, urgent red, live-dot green kept (semantic).
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600;700;800;900&display=swap");

:root {
  /* ---- neutral scale (cool, matches blue/teal brand) ---- */
  --bg:        #f2f5f7;
  --surface:   #ffffff;
  --ink:       #16202a;
  --ink-2:     #38444f;
  --muted:     #65717c;
  --faint:     #96a2ad;
  --line:      #e3e8ed;
  --line-2:    #eef2f5;

  /* ---- brand navy (from logo) — primary ---- */
  --brand:      #00557f;
  --brand-700:  #003e5e;
  --brand-soft: #e1edf4;
  --brand-tint: #eef4f9;

  /* ---- brand teal (from logo) — secondary ---- */
  --teal:       #13868c;
  --teal-700:   #0d6a6f;
  --teal-soft:  #dcedee;

  /* ---- amber accent (gig / day-work) ---- */
  --accent:      #d97706;
  --accent-700:  #b45309;
  --accent-soft: #fef3c7;

  /* ---- semantic ---- */
  --danger:   #dc2626;
  --wa:       #25d366;
  --live:     #10b981;

  --r-sm: 10px;
  --r:    14px;
  --r-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(16,38,56,.05);
  --shadow:    0 8px 26px rgba(16,38,56,.08);
  --shadow-lg: 0 16px 44px rgba(16,38,56,.13);
}

* { box-sizing: border-box; }

/* clip (а не hidden) — режет горизонтальную прокрутку, но НЕ ломает position: sticky */
html, body { overflow-x: clip; }

body {
  font-family: "Golos Text", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  /* футер прижат к низу окна даже на коротких страницах */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.page { width: 100%; }
.site-footer { margin-top: auto; }

/* ============================ HEADER ============================ */
.site-header {
  background: var(--surface);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.brand-mark { height: 42px; display: flex; align-items: center; }
.brand-mark img { height: 42px; width: auto; display: block; }
.brand-text h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
  line-height: 1.1;
}
.brand-text h1 b { color: var(--teal); font-weight: 800; }
.brand-text p {
  margin: 1px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
}

.site-header .lang {
  margin-left: auto;
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}
.site-header .lang button {
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 13px;
  border-radius: 999px;
  transition: .15s;
}
.site-header .lang button.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* ============================ LAYOUT ============================ */
.page {
  max-width: 1200px;
  margin: 28px auto;
  padding: 20px;
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 24px;
  align-items: start;
}

@media (min-width: 901px) {
  .chat-card {
    position: sticky;
    /* отступ ниже липкой шапки сайта (~72px), чтобы верх чата не заезжал под неё */
    top: 88px;
    max-height: calc(100vh - 108px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
  }
}

/* Home page — chat shown alongside feed (per brand redesign mockup).
   /chat remains a dedicated chat-only view via .chat-mode below. */

/* /chat page — only chat */
html.chat-mode .main-card { display: none; }
html.chat-mode .docs-section { display: none; }
html.chat-mode #extraLinksBar { display: none; }
html.chat-mode .page { grid-template-columns: 1fr; max-width: 900px; }
html.chat-mode .chat-card { position: static !important; max-height: none !important; }

/* ============================ DOCS ============================ */
.docs-section {
  background: var(--surface);
  padding: 48px 20px;
  border-top: 1px solid var(--line);
}

.docs-inner { max-width: 1200px; margin: 0 auto; }

.docs-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 8px;
  color: var(--ink);
}

.docs-subtitle {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 28px;
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.docs-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  background: var(--brand-tint);
}

.docs-card-cta {
  border: 2px dashed #bcd0e0;
  background: var(--brand-tint);
}

.docs-card-name {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ink);
}

.docs-card-city {
  font-size: 13px;
  color: var(--teal-700);
  font-weight: 700;
  margin-bottom: 10px;
}

.docs-list {
  margin: 0 0 14px;
  padding-left: 18px;
  font-size: 14px;
  color: var(--ink-2);
}

.docs-list li {
  margin-bottom: 4px;
  font-size: 14px;
  color: var(--ink-2);
}

.docs-wa {
  display: inline-block;
  background: var(--wa);
  color: white;
  padding: 9px 16px;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .docs-grid { grid-template-columns: 1fr; }
}

/* ============================ FOOTER ============================ */
.site-footer {
  background: #102532;
  color: #aab8c4;
  text-align: center;
  padding: 32px 20px;
  font-size: 14px;
  margin-top: 40px;
}

.site-footer a { color: #8fd0d4; text-decoration: none; }

.footer-cities {
  margin: 18px 0 6px;
  font-size: 13px;
  line-height: 2;
  color: #7e8f9c;
}
.footer-cities a {
  color: #8fd0d4;
  margin: 0 8px;
  white-space: nowrap;
}

.footer-social {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  margin-top: 16px;
}
.fs-link {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff !important;
  transition: transform 0.15s, box-shadow 0.15s;
}
.fs-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}
.fs-wa { background: var(--wa); }
.fs-mail { background: #1e3645; }
.fs-ig {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

/* ============================ CARDS / TYPO ============================ */
.main-card,
.chat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.container { position: relative; }

h1 { font-size: 34px; font-weight: 800; letter-spacing: -.025em; margin: 0 0 18px; color: var(--ink); }
h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-top: 28px; margin-bottom: 14px; color: var(--ink); }

p, li { font-size: 17px; line-height: 1.55; }

.lang-switcher {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}

.lang-switcher button {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  padding: 8px 14px;
  transition: 0.2s;
}

.lang-switcher button:hover { background: var(--brand-soft); color: var(--brand-700); }

/* ============================ HERO ============================ */
/* Базовая линейная иконка (как в эталоне редизайна) */
svg.ic {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

/* Бейдж над заголовком: «Тегін · тіркеусіз · түйіндемесіз» */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--brand-soft);
  color: var(--brand-700);
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  animation: eyebrowPulse 2s infinite;
}
@keyframes eyebrowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,85,127,.5); }
  70% { box-shadow: 0 0 0 6px rgba(0,85,127,0); }
}

.tagline {
  font-size: 27px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
}
/* inline brand spans in tagline (index.html uses inline color) — harmonise */
.tagline span { color: var(--brand) !important; }

.desc {
  font-size: 16px;
  color: var(--ink-2);
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.desc .b-line { display: flex; align-items: center; gap: 11px; font-weight: 500; }
.desc .chk {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--teal-soft);
  color: var(--teal);
  display: grid;
  place-items: center;
}
.desc .chk svg { width: 16px; height: 16px; stroke-width: 2.6; }
.desc .wa-note { color: var(--teal-700); font-weight: 600; }

/* ============================ ACTION BUTTONS ============================ */
.buttons {
  display: flex;
  gap: 12px;
  margin: 24px 0;
}

.btn {
  flex: 1;
  background: var(--brand);
  color: white;
  border: none;
  padding: 15px 14px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  border-radius: var(--r);
  transition: background .15s, transform .15s, box-shadow .15s;
}

.btn:hover { background: var(--brand-700); transform: translateY(-1px); box-shadow: var(--shadow); opacity: 1; }

/* offer = teal, service = dark teal, gig = amber (kept distinct, on-brand) */
.btn-blue  { background: var(--teal); }
.btn-blue:hover { background: var(--teal-700); }
.btn-green { background: var(--teal-700); }
.btn-green:hover { background: #0a5256; }

/* Кнопки-плитки (2×2, как в эталоне): иконка + заголовок + подпись */
.actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 24px 0;
}
.tile {
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  padding: 15px 16px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  font: inherit;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #d6dce4; }
.tile:active { transform: translateY(0) scale(.98); }

/* Выбранная плитка — заливается фирменным синим (синий «переезжает» на нажатую) */
.tile.on { background: var(--brand); border-color: var(--brand); }
.tile.on:hover { background: var(--brand-700); border-color: var(--brand-700); }
.tile.on .tile-title { color: #fff; }
.tile.on .tile-sub { color: rgba(255,255,255,.82); }
.tile.on .tile-ic { background: rgba(255,255,255,.18) !important; color: #fff !important; }
.tile-ic {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--brand-soft);
  color: var(--brand);
}
.tile-ic svg { width: 21px; height: 21px; }
.tile-txt { min-width: 0; }
.tile-title { display: block; font-size: 15.5px; font-weight: 700; color: var(--ink); }
.tile-sub { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; margin-top: 1px; }

.tile.t-green .tile-ic { background: var(--teal-soft); color: var(--teal); }
.tile.t-amber .tile-ic { background: var(--accent-soft); color: var(--accent); }

/* Шапка чат-карточки: «Қала чаты» + колокольчик */
.chat-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.chat-card .chat-head h2,
.chat-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.chat-head h2 svg { width: 19px; height: 19px; color: var(--brand); }
.bell {
  margin-left: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
}
.bell svg { width: 17px; height: 17px; }
.bell:hover { color: var(--brand); border-color: var(--brand-soft); background: var(--brand-soft); }

.features { margin-top: 16px; padding-left: 20px; }
.features li { margin-bottom: 8px; }

/* ============================ CHAT ============================ */
.chat-card h2 { margin-top: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }

.chat-subtitle {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 14px;
}

#username,
#input {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  outline: none;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
#input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

#username { margin-bottom: 12px; }

#users { list-style: none; padding: 0; margin: 0 0 14px; }
#users li { font-size: 15px; margin-bottom: 6px; color: var(--ink); }

#messages {
  max-height: 320px;
  min-height: 220px;
  overflow-y: auto;
  background: var(--bg);
  padding: 12px;
  list-style-type: none;
  border-radius: var(--r);
  margin: 0 0 14px;
  border: 1px solid var(--line);
}

/* Телефон: чат компактнее, не занимает пол-экрана */
@media (max-width: 600px) {
  #messages { max-height: 240px; min-height: 150px; }
}

#messages li {
  background: var(--surface);
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 10px;
  font-size: 15px;
  box-shadow: var(--shadow-sm);
  word-break: break-word;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.chat-avatar-sm { width: 22px; height: 22px; font-size: 11px; flex-shrink: 0; }

.msg-body { flex: 1; min-width: 0; }

.msg-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}

.msg-name { font-weight: 700; font-size: 14px; color: var(--ink); text-decoration: none; }
.msg-name:hover { text-decoration: underline; }

.msg-time { font-size: 12px; color: var(--faint); margin-left: auto; }

.msg-reply-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--faint);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  display: none;
}
li:hover .msg-reply-btn { display: inline-block; }

#unreadBadge { display:none; background:var(--danger); color:#fff; font-size:11px; font-weight:700; padding:2px 7px; border-radius:12px; margin-left:6px; vertical-align:middle; }
#chatSearchBar { width:100%; max-width:100%; padding:8px 12px; border:1px solid var(--line); border-radius:10px; font-size:16px; margin-bottom:8px; box-sizing:border-box; font-family:inherit; }
#pinnedBar { display:none; background:var(--accent-soft); border-left:3px solid var(--accent); border-radius:8px; padding:8px 36px 8px 12px; margin-bottom:8px; font-size:13px; position:relative; }
#pinnedBar strong { color:var(--accent-700); }
#pinnedUnpin { position:absolute; right:8px; top:50%; transform:translateY(-50%); background:none; border:none; cursor:pointer; color:var(--faint); font-size:16px; }
#typingIndicator { font-size:12px; color:var(--faint); min-height:18px; font-style:italic; margin-top:4px; }

.msg-reactions { display:flex; flex-wrap:wrap; gap:4px; margin-top:4px; }
.r-btn { background:var(--bg); border:1px solid var(--line); border-radius:12px; padding:2px 8px; font-size:13px; cursor:pointer; }
.r-btn:hover, .r-btn.mine { background:var(--brand-soft); border-color:var(--brand); }
.r-add { background:none; border:none; color:var(--faint); font-size:15px; cursor:pointer; display:none; padding:0 3px; }
li:hover .r-add { display:inline-block; }
.r-picker { display:none; position:absolute; background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:6px; gap:4px; box-shadow:var(--shadow); z-index:100; flex-wrap:wrap; }
.r-picker.open { display:flex; }
.r-picker button { background:none; border:none; font-size:20px; cursor:pointer; border-radius:6px; padding:3px; }
.r-picker button:hover { background:var(--bg); }
.msg-del { background:none; border:none; color:var(--danger); font-size:12px; cursor:pointer; display:none; padding:0 4px; }
li:hover .msg-del { display:inline-block; }

.msg-quote {
  background: var(--brand-tint);
  border-left: 3px solid var(--brand);
  border-radius: 6px;
  padding: 5px 10px;
  margin-bottom: 5px;
  font-size: 13px;
  color: var(--ink-2);
}
.msg-quote b { color: var(--brand); }

/* Gradient avatars */
.chat-avatar { background: linear-gradient(135deg, #2f7fb0, #00557f) !important; }

/* Stats strip */
#chatStatsStrip {
  display: flex; align-items: center; gap: 16px;
  padding: 9px 14px; background: var(--bg);
  border-bottom: 1px solid var(--line); font-size: 13px; flex-wrap: wrap;
}
#chatStatsStrip .cs-stat { display:flex; align-items:center; gap:6px; color:var(--muted); }
#chatStatsStrip strong { color:var(--ink); }
#liveDot {
  width:8px; height:8px; border-radius:50%; background:var(--live); display:inline-block;
  animation: livePulse 2s infinite;
}
@keyframes livePulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(16,185,129,.5); }
  70% { box-shadow: 0 0 0 7px rgba(16,185,129,0); }
}

/* Role badges — rebranded (employer navy, seeker teal) */
.msg-role {
  font-size: 10px; font-weight: 700; padding: 2px 7px;
  border-radius: 100px; letter-spacing: .02em; text-transform: uppercase;
}
.msg-role.seeker { background: var(--teal-soft); color: var(--teal-700); }
.msg-role.employer { background: var(--brand-soft); color: var(--brand-700); }

/* WA pill (kept green, semantic) */
.msg-wa {
  display: inline-flex !important; align-items: center; gap: 4px;
  font-size: 12px !important; color: #059669 !important;
  background: #d1fae5 !important; padding: 3px 10px !important;
  border-radius: 100px !important; text-decoration: none;
  font-weight: 600; margin-top: 4px;
}
.msg-wa:hover { background: #a7f3d0 !important; }

/* Day divider */
.msg-day-divider {
  display: flex !important; align-items: center; gap: 10px;
  color: var(--faint); font-size: 12px; font-weight: 500;
  margin: 6px 0 !important;
  background: none !important; box-shadow: none !important;
  padding: 0 !important; border: none !important;
  animation: none !important;
}
.msg-day-divider::before, .msg-day-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
#messages li { animation: msgIn 0.3s ease-out; }

/* Room tabs pill style */
#chatRoomsBar .filter-btn {
  border-radius: 100px !important;
  font-size: 13px !important;
  padding: 7px 14px !important;
  border: 1px solid var(--line) !important;
  background: var(--bg) !important;
  color: var(--muted) !important;
  font-weight: 600 !important;
  transition: all .15s !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}
#chatRoomsBar .filter-btn:hover { background: var(--surface) !important; color: var(--ink) !important; border-color: #cdd5dc !important; }
#chatRoomsBar .filter-btn.active { background: var(--ink) !important; color: #fff !important; border-color: var(--ink) !important; }

/* Role selector in modal */
.role-selector { display:flex; gap:8px; margin-bottom:12px; }
.role-sel-btn {
  flex:1; padding:10px 8px; border:1.5px solid var(--line); border-radius:var(--r-sm);
  background:var(--surface); cursor:pointer; font-size:13px; font-weight:600; color:var(--muted);
  transition: all .15s;
}
.role-sel-btn.active { border-color: var(--brand); background:var(--brand-soft); color:var(--brand-700); }

/* === Compact city selector === */
.city-sel-wrap { position: relative; margin-bottom: 10px; }

.city-sel-btn {
  width: 100%; display: flex; align-items: center; gap: 10px;
  background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--r);
  padding: 10px 14px; cursor: pointer; transition: all .15s; text-align: left;
}
.city-sel-btn:hover { background: var(--surface); border-color: #cdd5dc; }
.city-sel-icon { font-size: 20px; flex-shrink: 0; }
.city-sel-info { flex: 1; min-width: 0; }
.city-sel-name { font-size: 15px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.city-sel-name svg { color: var(--faint); flex-shrink: 0; }
.city-sel-meta { font-size: 12px; color: var(--muted); margin-top: 1px; display: flex; align-items: center; gap: 5px; }

.city-sheet {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); z-index: 200; overflow: hidden;
  animation: sheetIn .18s ease-out;
}
.city-sheet.open { display: block; }
@keyframes sheetIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }

.city-sheet-header { padding: 12px 14px 8px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.city-sheet-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 14px; border: none; background: none; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--ink-2); text-align: left; transition: background .1s;
}
.city-sheet-item:hover { background: var(--bg); }
.city-sheet-item.active { background: var(--teal-soft); color: var(--teal-700); }
.city-sheet-item .cs-count { margin-left: auto; font-size: 11px; background: var(--bg); padding: 2px 8px; border-radius: 100px; font-weight: 700; color: var(--muted); }
.city-sheet-item.active .cs-count { background: var(--teal-700); color: #fff; }
.city-sheet-add {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 10px 14px; border: none; border-top: 1px solid var(--line-2);
  background: none; cursor: pointer; font-size: 13px; color: var(--brand);
  font-weight: 600; text-align: left;
}
.city-sheet-add:hover { background: var(--bg); }

#replyPreview {
  display: none;
  background: var(--brand-tint);
  border-left: 3px solid var(--brand);
  border-radius: 6px;
  padding: 7px 12px;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--ink-2);
  position: relative;
}
#replyPreview b { color: var(--brand); }

#replyCancel {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--muted);
}

.msg-text { font-size: 15px; color: var(--ink); word-break: break-word; }

.chat-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: var(--teal-soft);
  border-radius: var(--r-sm);
  border: 1px solid #bfe0e2;
}
.chat-user-info .cu-name { flex: 1; font-size: 14px; font-weight: 700; color: var(--teal-700); }
.chat-user-info .cu-change {
  font-size: 13px; color: var(--muted); cursor: pointer;
  text-decoration: underline; background: none; border: none; padding: 0;
}

.chat-register-overlay {
  position: fixed; inset: 0;
  background: rgba(16,38,56,0.55);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}

.chat-register-box {
  background: var(--surface);
  border-radius: 20px;
  padding: 32px 28px;
  width: 320px;
  box-shadow: var(--shadow-lg);
}
.chat-register-box h3 { margin: 0 0 6px; font-size: 20px; font-weight: 800; }
.chat-register-box .crb-sub { color: var(--muted); font-size: 14px; margin: 0 0 20px; line-height: 1.4; }
.chat-register-box input {
  width: 100%; padding: 12px 14px; font-size: 16px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  margin-bottom: 12px; box-sizing: border-box; outline: none; font-family: inherit;
}
.chat-register-box input:focus { border-color: var(--brand); }
.chat-register-box .crb-err { color: var(--danger); font-size: 13px; margin-bottom: 10px; display: none; }
.chat-register-box .crb-btn {
  width: 100%; background: var(--brand); color: #fff; border: none;
  border-radius: var(--r-sm); padding: 13px; font-size: 16px; cursor: pointer; font-weight: 700;
}
.chat-register-box .crb-btn:hover { background: var(--brand-700); }

#form { display: flex; gap: 10px; }
#form button {
  background: var(--brand);
  color: white; border: none; border-radius: var(--r);
  padding: 12px 18px; cursor: pointer; font-size: 15px; font-weight: 700; white-space: nowrap;
}
#form button:hover { background: var(--brand-700); }

/* ============================ LEAD FORMS ============================ */
.lead-box {
  display: none;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
}
.lead-box h2 { margin-top: 0; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }

.lead-box input,
.lead-box textarea,
.lead-box select {
  width: 100%;
  margin-bottom: 12px;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  resize: vertical;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.lead-box input:focus,
.lead-box textarea:focus,
.lead-box select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.show-more-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 11px;
  background: var(--brand-tint);
  color: var(--brand-700);
  border: 1px solid var(--brand-soft);
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
.show-more-btn:hover { background: var(--brand-soft); }

/* ============================ FEED CARDS ============================ */
.job-card {
  border: 1px solid var(--line);
  padding: 14px 16px;
  border-radius: var(--r);
  margin-bottom: 12px;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(16,38,56,.07);
  transition: box-shadow 0.2s, transform 0.2s, border-color .2s;
}
.job-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: #d9dfe5;
}
.job-card h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }

/* Внутренности карточки вакансии — как в эталоне редизайна */
.job-top { display: flex; align-items: flex-start; gap: 13px; }
.job-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  background: var(--brand-soft);
  color: var(--brand-700);
}
.job-main { flex: 1; min-width: 0; }
.job-title { font-size: 16.5px; font-weight: 700; color: var(--ink); margin: 0 0 5px; letter-spacing: -.01em; }
.job-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--muted); font-weight: 500; }
.job-meta span { display: inline-flex; align-items: center; gap: 5px; }
.job-meta svg { width: 15px; height: 15px; color: var(--faint); flex-shrink: 0; }
.job-salary { font-size: 17px; font-weight: 800; color: var(--brand-700); white-space: nowrap; letter-spacing: -.01em; }

.job-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 7px;
}
.tag.amber { color: var(--accent); background: var(--accent-soft); border-color: #f3dcbe; }

.job-desc {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.job-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}
.job-date { font-size: 12.5px; color: var(--faint); display: inline-flex; align-items: center; gap: 5px; font-weight: 500; }
.job-date svg { width: 14px; height: 14px; }
.job-actions { display: inline-flex; align-items: center; gap: 14px; }
.more-link { color: var(--brand); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.more-link:hover { color: var(--brand-700); text-decoration: underline; }

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: 0.15s;
}
.share-btn:hover { color: var(--teal); border-color: var(--teal); background: var(--teal-soft); }
.share-btn svg.ic { width: 17px; height: 17px; }

/* Платное продвижение: выделенная карточка + бейдж «⭐ Топ» */
.job-card-promoted {
  border: 1.5px solid var(--accent);
  box-shadow: 0 4px 14px rgba(217,119,6,.13);
}
.promo-badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-700);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  padding: 2px 9px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  background: var(--brand);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 10px;
  transition: background .15s;
  border: none;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.wa-btn:hover { background: var(--brand-700); }
.wa-btn svg { width: 16px; height: 16px; stroke: none; fill: currentColor; flex-shrink: 0; }

.job-card.urgent { border-color: #f0d6b3; box-shadow: 0 0 0 1px #f6e6cf inset; }
.job-card.urgent .job-logo { background: var(--accent-soft); color: var(--accent); }
.job-card.urgent .job-salary { color: var(--accent); }
.job-card.urgent .wa-btn { background: var(--accent); }
.job-card.urgent .wa-btn:hover { background: #bf6716; }

/* Строка «N вакансий найдено» */
.count { font-size: 13px; color: var(--muted); margin: 0 0 14px; font-weight: 500; }
.count b { color: var(--ink); }

/* Поиск в ленте */
.feed-search {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  outline: none;
  margin-bottom: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.feed-search::placeholder { color: var(--faint); }
.feed-search:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.filter-btn-sm { font-size: 12.5px; padding: 5px 12px; }

/* Телефоны: плитки-кнопки в одну колонку (как в мобильном эталоне),
   низ карточки переносится, чтобы кнопка WhatsApp не вылезала за край */
@media (max-width: 520px) {
  .actions { grid-template-columns: 1fr; }
  .tile { padding: 14px 16px; gap: 13px; }
  .tile-ic { width: 42px; height: 42px; }
  .tile-title { font-size: 15.5px; }

  .job-foot { flex-wrap: wrap; row-gap: 10px; }
  .job-actions { width: 100%; justify-content: space-between; gap: 8px; }
  .wa-btn { padding: 9px 13px; font-size: 13px; }
  /* На телефоне в карточках кнопка короче: «🟢 WhatsApp» вместо «Написать в WhatsApp» */
  .wa-card-btn .wa-label { display: none; }
  .wa-card-btn::after { content: "WhatsApp"; font-weight: 700; }
  .share-btn { width: 34px; height: 34px; }
}

/* ============================ CITY PICKER ============================ */
.city-picker { position: relative; margin-bottom: 10px; }
.city-picker-tags {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 7px 10px;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  background: var(--surface);
  font-size: 15px;
}
.city-picker-tags:hover { border-color: var(--teal); }
.city-picker-ph { color: var(--faint); font-size: 15px; }
.city-tag {
  background: var(--teal-soft);
  color: var(--teal-700);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.city-tag-x { cursor: pointer; font-size: 15px; line-height: 1; color: var(--muted); }
.city-tag-x:hover { color: var(--danger); }
.city-picker-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  max-height: 240px;
  overflow-y: auto;
  z-index: 999;
}
.city-picker-dropdown.open { display: block; }
.city-group-label {
  padding: 8px 12px 4px;
  font-size: 12px;
  color: #475569;
  font-weight: 700;
  text-transform: uppercase;
}
.city-option { padding: 9px 14px; cursor: pointer; font-size: 15px; color: var(--ink); }
.city-option:hover { background: var(--teal-soft); color: var(--teal-700); }
.city-option.selected { background: var(--teal-soft); color: var(--teal-700); font-weight: 600; }
.city-search-wrap {
  position: sticky;
  top: 0;
  background: var(--surface);
  padding: 8px;
  border-bottom: 1px solid var(--line);
  z-index: 1;
}
.city-search {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}
.city-search:focus { border-color: var(--teal); }
.city-badge {
  display: inline-block;
  background: var(--teal-soft);
  color: var(--teal-700);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-date { font-size: 12px; color: var(--faint); margin-bottom: 6px; }

/* ============================ FILTERS ============================ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

/* Город / Категория — выпадающие списки в один ряд */
.filter-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.filter-row .filter-bar { flex: 1; margin-bottom: 0; min-width: 0; }
.filter-row .filter-bar:empty { flex: 0; }

/* На телефоне списки в столбик — полные подписи видны целиком */
@media (max-width: 600px) {
  .filter-row { flex-direction: column; gap: 8px; }
}

.filter-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2365717c' stroke-width='2.5' stroke-linecap='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 38px 11px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  text-overflow: ellipsis;
}
.filter-select:hover { border-color: #cdd5dc; }
.filter-select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.filter-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: 0.2s;
}
.filter-btn:hover { background: var(--bg); border-color: #cdd5dc; }
.filter-btn.active {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

/* ============================ SECTION TABS ============================ */
.section-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--line);
}

.section-tab {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 10px 22px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  color: var(--muted);
  margin-bottom: -2px;
  transition: 0.2s;
  font-family: inherit;
}
.section-tab:hover { color: var(--brand); }
.section-tab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* ============================ EXTRA LINKS ============================ */
.extra-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.extra-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--bg);
  color: var(--ink-2);
  text-decoration: none;
  border-radius: var(--r);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border: none;
}
.extra-link:hover { background: var(--brand-soft); color: var(--brand-700); }

.lead-ok {
  display: none;
  margin-top: 10px;
  font-weight: 700;
  color: var(--teal-700);
  font-size: 16px;
}

/* ============================ RESPONSIVE ============================ */
@media (max-width: 900px) {
  .site-header .header-inner { padding: 10px 12px; }
  .brand-mark, .brand-mark img { height: 34px; }
  .brand-text h1 { font-size: 17px; }
  .brand-text p { font-size: 11.5px; }

  /* На узких экранах чат не скрываем — он встаёт ниже ленты (одна колонка) */
  .page {
    grid-template-columns: 1fr;
    margin: 16px auto;
    padding: 12px;
  }

  .main-card, .chat-card { min-width: 0; max-width: 100%; }

  .section-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    border-bottom: none;
    margin-bottom: 12px;
  }
  .section-tab {
    padding: 12px 10px;
    font-size: 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--bg);
    margin-bottom: 0;
    white-space: normal;
    line-height: 1.2;
  }
  .section-tab.active {
    background: var(--brand);
    color: white;
    border-color: var(--brand);
  }

  .buttons { flex-direction: column; }

  .actions { gap: 10px; }
  .tile { padding: 12px 12px; gap: 10px; }
  .tile-ic { width: 38px; height: 38px; }
  .tile-title { font-size: 14.5px; }
  .tile-sub { font-size: 12px; }

  #form { flex-direction: column; }
  #form button { width: 100%; }

  h1 { font-size: 28px; }
  .tagline { font-size: 22px; }
  .desc { font-size: 15px; line-height: 1.7; }

  #messages { overflow-x: hidden; }
  .msg-header { min-width: 0; }
}

/* ============================ GIG (day-work) ============================ */
.btn-orange { background: var(--accent); color: white; }
.btn-orange:hover { background: var(--accent-700); }
.btn-red { background: var(--danger); color: white; }
.btn-red:hover { background: #991b1b; }

.gig-form-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--bg);
  padding: 4px;
  border-radius: var(--r);
  margin-bottom: 14px;
}
.gig-form-tab {
  padding: 11px 8px;
  text-align: center;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s;
  user-select: none;
  border: none;
  background: transparent;
  line-height: 1.3;
  font-family: inherit;
}
.gig-form-tab.active { background: var(--surface); box-shadow: var(--shadow-sm); }
.gig-form-tab.active.seek { color: var(--accent); }
.gig-form-tab.active.urgent { color: var(--danger); }
.gig-panel { display: none; }
.gig-panel.active { display: block; }

.sched-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.sched-chip {
  padding: 7px 12px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  transition: 0.15s;
}
.sched-chip:hover { background: var(--bg); }
.sched-chip.selected { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-700); font-weight: 600; }
.sched-chips-hint { font-size: 12px; color: var(--muted); margin-bottom: 6px; }

.gig-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.gig-chip {
  padding: 7px 12px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.gig-chip:hover { background: var(--bg); }
.gig-chip.selected { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-700); }
.gig-chip.selected.urgent { background: #fee2e2; border-color: var(--danger); color: #991b1b; }

.when-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.when-btn {
  padding: 10px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.when-btn:hover { border-color: var(--accent); }
.when-btn.selected { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-700); }
.when-btn.selected.urgent { background: #fee2e2; border-color: var(--danger); color: #991b1b; }

.urgent-banner {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 13px;
  color: #991b1b;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gig-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: box-shadow 0.15s, transform .15s;
}
.gig-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.gig-card.urgent { border-left-color: var(--danger); background: linear-gradient(to right, #fef2f2, #fff); }
.gig-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}
.gig-badge.gig { background: var(--accent-soft); color: var(--accent-700); }
.gig-badge.urgent { background: #fee2e2; color: #991b1b; }
.gig-badge.seek { background: #fed7aa; color: #9a3412; }
