/* ============================================================================
   Объявления: лента, страница объявления, «Разместить», «Мои объявления».
   Общие стили для нескольких страниц — поэтому не scoped, а с префиксом rq-
   ============================================================================ */

.rq-page {
    padding-top: 48px;
    padding-bottom: 80px;
}

.rq-narrow { max-width: 920px; }

.rq-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 24px;
    margin-bottom: 28px;
}

.rq-title {
    margin: 0;
    font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.rq-title--sm { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.25rem); }

.rq-lead {
    margin: 10px 0 0;
    max-width: 620px;
    font-size: 16px;
    color: var(--muted);
}

.rq-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rq-actions .btn { min-height: 46px; padding-inline: 20px; }
.rq-actions .btn:disabled, .rq-btns .btn:disabled { opacity: .5; cursor: default; }

.rq-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
}

.rq-back:hover { color: var(--ink); }

.rq-muted { color: var(--muted); }
.rq-small { font-size: 14px; }

/* ---------- Фильтры ленты ---------- */

.rq-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
}

.rq-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rq-filters .field { min-width: 200px; height: 46px; }
.rq-filters .dd { width: 240px; max-width: 100%; }
.rq-filters .btn { min-height: 46px; }

.rq-switch {
    display: inline-flex;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
}

.rq-switch a {
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
}

.rq-switch a:hover { color: var(--ink); }

.rq-switch .rq-switch--on {
    background: var(--chip);
    color: var(--on-chip);
}

/* ---------- Карточки ---------- */

.rq-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.rq-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--ink);
    transition: border-color .15s ease, transform .15s ease;
}

a.rq-card:hover { border-color: var(--muted); color: var(--ink); }

.rq-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    color: var(--muted);
}

.rq-card__title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.rq-card__desc {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rq-card__foot {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--muted);
}

.rq-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rq-facts {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
}

.rq-facts--wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.rq-facts div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.rq-facts dt {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
}

.rq-facts dd { margin: 0; font-size: 15px; overflow-wrap: anywhere; }

.rq-badge {
    flex-shrink: 0;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: var(--surface-2);
    color: var(--muted);
    white-space: nowrap;
}

.rq-badge--new { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.rq-badge--ok { background: color-mix(in srgb, #2E9E5B 16%, transparent); color: #2E9E5B; }

.rq-count {
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 12px;
    font-weight: 700;
}

/* ---------- Панели, формы, сообщения ---------- */

.rq-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.rq-panel__title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.rq-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
}

.rq-side {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rq-text {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    white-space: pre-line;
}

.rq-f {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    font-size: 14px;
    font-weight: 500;
}

.rq-hint { font-size: 13px; font-weight: 400; color: var(--muted); }

.rq-two, .rq-three { display: grid; gap: 14px; }
.rq-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rq-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.rq-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* «от — до»: всегда в одну строку, даже на телефоне */
.rq-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

textarea.field { resize: vertical; min-height: 64px; line-height: 1.5; padding-block: 12px; }

.rq-error {
    margin: 0;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--danger) 10%, transparent);
    color: var(--danger);
    font-size: 14px;
}

.rq-ok {
    margin: 0;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, #2E9E5B 12%, transparent);
    color: #2E9E5B;
    font-size: 14px;
    font-weight: 500;
}

.rq-note {
    margin: 0;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: var(--surface-2);
    font-size: 14px;
    line-height: 1.5;
}

.rq-msg {
    margin: 0;
    padding: 10px 14px;
    border-left: 3px solid var(--line);
    font-size: 15px;
    line-height: 1.5;
    white-space: pre-line;
}

.rq-contacts {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border-radius: var(--radius);
    background: color-mix(in srgb, #2E9E5B 8%, transparent);
}

.rq-contacts__links { display: flex; flex-wrap: wrap; gap: 8px; }
.rq-contacts__links .btn { gap: 8px; }

.rq-empty {
    padding: 40px 32px;
    border: 1px dashed var(--line);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.rq-empty p { margin: 0; color: var(--muted); max-width: 560px; line-height: 1.5; }

.rq-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.btn--danger,
.btn--danger:hover {
    border-color: var(--danger);
    background: var(--danger);
    color: #fff;
}

/* ---------- Кандидаты ---------- */

.rq-cands {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rq-cand {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.rq-cand--off { opacity: .65; }
.rq-cand--ok { border-color: color-mix(in srgb, #2E9E5B 45%, var(--line)); }

.rq-cand__photo {
    width: 72px;
    aspect-ratio: 4 / 5;
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface-2);
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--muted);
}

.rq-cand__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.rq-cand__body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

.rq-cand__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 12px;
}

.rq-cand__name { font-size: 17px; font-weight: 700; color: var(--ink); }
a.rq-cand__name:hover { text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }

.rq-cand__meta { font-size: 14px; color: var(--muted); }

/* ---------- Адаптив ---------- */

@media (max-width: 960px) {
    .rq-layout { grid-template-columns: minmax(0, 1fr); }
    .rq-side { position: static; }
    .rq-facts--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .rq-page { padding-top: 24px; }
    .rq-list { grid-template-columns: minmax(0, 1fr); }
    .rq-panel { padding: 20px; }
    .rq-two, .rq-three { grid-template-columns: minmax(0, 1fr); }
    .rq-filters, .rq-filters .field { width: 100%; }
    .rq-filters .field { min-width: 0; flex: 1 1 140px; }
    .rq-actions .btn { flex: 1 1 auto; }
}

.linkish {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: var(--accent);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Кто заказчик ---------- */

.rq-customer { gap: 10px; }

.rq-customer__label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
}

.rq-customer__name { font-size: 17px; }

.rq-customer__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
}

.rq-customer__link:hover { text-decoration: underline; text-underline-offset: 3px; }

.rq-ig { color: var(--ink); font-weight: 500; }
