/* «Работа ТРУ» — rabota-t.ru */
:root {
  --bg: #f2f5fa;
  --surface: #ffffff;
  --text: #10203a;
  --muted: #5d6f88;
  --border: #dfe6f0;
  --primary: #1f7ae0;
  --primary-dark: #155bb5;
  --primary-soft: #e7f1fd;
  --accent: #ff6b2c;
  --accent-dark: #e5551a;
  --tg: #2aabee;
  --tg-dark: #1f8fd0;
  --green: #12b76a;
  --green-soft: #e6f7ef;
  --danger: #e5484d;
  --navy: #0d1b2a;
  --navy-2: #14283f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 32, 58, .06);
  --shadow-hover: 0 10px 28px rgba(16, 32, 58, .13);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.55; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -.02em; margin: .3em 0 .4em; }
h2 { font-size: clamp(20px, 3vw, 26px); font-weight: 800; letter-spacing: -.01em; margin: 1.2em 0 .6em; }
h3 { margin: 0; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 860px; }
.container-wide { max-width: 1360px; }
.container-auth { max-width: 460px; }

/* ---------------- header ---------------- */
.site-header {
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.logo { display: inline-flex; align-items: center; gap: 6px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.logo:hover { color: var(--text); }
.logo-badge {
  background: linear-gradient(135deg, var(--accent), #ff8f2c); color: #fff;
  padding: 1px 9px 2px; border-radius: 8px; font-size: 18px;
  box-shadow: 0 2px 8px rgba(255, 107, 44, .35);
}
.main-nav { display: flex; gap: 4px; flex: 1; }
.nav-link { padding: 8px 14px; border-radius: 10px; color: var(--text); font-weight: 600; font-size: 15px; }
.nav-link:hover { background: var(--primary-soft); color: var(--primary-dark); }
.header-auth { display: flex; gap: 8px; align-items: center; }
.inline-form { display: inline; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid transparent; border-radius: 11px; cursor: pointer;
  font-family: var(--font); font-weight: 700; font-size: 15px;
  padding: 10px 18px; transition: .15s; white-space: nowrap; text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-accent { background: linear-gradient(135deg, var(--accent), #ff8f2c); color: #fff; box-shadow: 0 4px 14px rgba(255, 107, 44, .35); }
.btn-accent:hover { filter: brightness(1.06); color: #fff; }
.btn-tg { background: var(--tg); color: #fff; }
.btn-tg:hover { background: var(--tg-dark); color: #fff; }
.btn-outline { border-color: var(--border); background: var(--surface); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--primary-soft); color: var(--primary-dark); }
.btn-ghost-light { background: rgba(255,255,255,.12); color: #fff; }
.btn-ghost-light:hover { background: rgba(255,255,255,.22); color: #fff; }
.btn-danger { background: transparent; color: var(--danger); border-color: transparent; }
.btn-danger:hover { background: #fdecec; }
.btn-sm { padding: 7px 13px; font-size: 14px; }
.btn-xs { padding: 4px 9px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 26px; font-size: 16px; border-radius: 13px; }
.btn-block { width: 100%; }

/* ---------------- hero ---------------- */
.hero {
  background: radial-gradient(1200px 500px at 70% -10%, #1f4a7a 0%, var(--navy-2) 45%, var(--navy) 100%);
  color: #fff; padding: 64px 0 56px; text-align: center;
}
.hero-title { font-size: clamp(30px, 5vw, 48px); font-weight: 800; letter-spacing: -.03em; margin: 0 0 14px; }
.hero-tru {
  background: linear-gradient(135deg, var(--accent), #ffb02c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-subtitle { color: #b9c7d9; font-size: clamp(15px, 2vw, 18px); margin: 0 auto 30px; max-width: 640px; }
.hero-search {
  display: flex; gap: 10px; max-width: 680px; margin: 0 auto;
  background: #fff; padding: 8px; border-radius: 16px; box-shadow: 0 18px 50px rgba(0,0,0,.35);
}
.hero-search input {
  flex: 1; border: 0; outline: 0; font-size: 16px; padding: 10px 14px;
  font-family: var(--font); background: transparent; color: var(--text); min-width: 0;
}
.hero-search-page { box-shadow: var(--shadow); border: 1px solid var(--border); margin: 20px 0 34px; }
.hero-stats { display: flex; gap: 44px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.stat-label { color: #8fa3ba; font-size: 14px; }

/* ---------------- ticker ---------------- */
.ticker-section { background: var(--navy); border-top: 1px solid #24384f; display: flex; align-items: stretch; overflow: hidden; }
.ticker-label {
  flex-shrink: 0; display: flex; align-items: center; padding: 12px 18px;
  background: linear-gradient(135deg, var(--accent), #ff8f2c);
  color: #fff; font-weight: 800; font-size: 14px; white-space: nowrap; z-index: 2;
}
.ticker { overflow: hidden; flex: 1; display: flex; align-items: center; }
.ticker-track { display: flex; gap: 12px; padding: 10px 12px; width: max-content; animation: ticker-scroll 60s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item {
  color: #d7e3f0; font-size: 14px; white-space: nowrap;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  padding: 6px 14px; border-radius: 999px;
}
.ticker-item:hover { background: rgba(255,255,255,.16); color: #fff; }
.ticker-item b { color: #fff; font-weight: 700; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------------- sections & cards ---------------- */
.section { padding: 44px 0; }
.section-alt { background: linear-gradient(180deg, #eaf0f8, var(--bg)); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-more { font-weight: 700; font-size: 15px; }
.grid { display: grid; gap: 16px; margin-top: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); position: relative;
  transition: box-shadow .18s, transform .18s, border-color .18s;
}
.grid .card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); border-color: #c8d6ea; }

.badge { display: inline-block; font-size: 12.5px; font-weight: 800; border-radius: 8px; padding: 3px 9px; }
.badge-top { position: absolute; top: -9px; right: 14px; background: linear-gradient(135deg, var(--accent), #ff8f2c); color: #fff; box-shadow: 0 3px 10px rgba(255,107,44,.4); }
.badge-salary { background: var(--green-soft); color: #0b7a48; font-size: 14px; }

.chip {
  display: inline-block; background: var(--primary-soft); color: var(--primary-dark);
  font-size: 13px; font-weight: 600; padding: 3px 11px; border-radius: 999px;
}
.chip:hover { background: #d5e7fb; }
.chip-static { background: #eef2f8; color: var(--muted); }

/* vacancy card */
.vacancy-card { display: flex; flex-direction: column; gap: 10px; }
.vacancy-card--top { border-color: #ffcdb2; background: linear-gradient(180deg, #fff9f5, #fff); }
.vacancy-title { font-size: 16.5px; font-weight: 700; line-height: 1.35; }
.vacancy-title a { color: var(--text); }
.vacancy-title a:hover { color: var(--primary); }
.vacancy-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vacancy-excerpt { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.vacancy-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--border); padding-top: 12px; flex-wrap: wrap; }
.channel-ref { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.channel-ref:hover { color: var(--primary); }
.vacancy-date { color: #93a5bb; font-size: 13px; }

/* vacancy page */
.vacancy-full { padding: 28px; }
.vacancy-full-title { margin-top: 0; }
.vacancy-meta-lg { margin-bottom: 18px; }
.vacancy-text { white-space: pre-line; font-size: 16px; border-top: 1px solid var(--border); padding-top: 18px; word-break: break-word; }
.vacancy-cta { margin-top: 24px; }
.vacancy-warning { color: var(--muted); font-size: 13.5px; margin-top: 14px; background: #fff8f0; border: 1px solid #ffe4c7; padding: 10px 14px; border-radius: 10px; }
.channel-box { margin-top: 18px; }
.channel-box-label { font-size: 12px; color: #93a5bb; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.related { margin-top: 34px; }

/* avatars & channels */
.avatar {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  background: linear-gradient(135deg, var(--primary), #6aa9f0); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-xs { width: 22px; height: 22px; font-size: 11px; }
.avatar-lg { width: 76px; height: 76px; font-size: 30px; }
.channel-card { display: flex; flex-direction: column; gap: 12px; }
.channel-card--top { border-color: #ffcdb2; background: linear-gradient(180deg, #fff9f5, #fff); }
.channel-head { display: flex; gap: 13px; align-items: center; flex-wrap: wrap; }
.channel-title { font-size: 16.5px; font-weight: 700; }
.channel-title a { color: var(--text); }
.channel-title a:hover { color: var(--primary); }
.channel-username { color: #93a5bb; font-size: 13.5px; }
.channel-desc { color: var(--muted); font-size: 14px; margin: 0; flex: 1; }
.channel-stats { display: flex; gap: 14px; color: var(--muted); font-size: 13.5px; flex-wrap: wrap; }
.channel-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.channel-hero { padding: 26px; margin-bottom: 26px; }
.channel-hero .channel-head { align-items: center; }
.channel-hero .btn-tg { margin-left: auto; }
.channel-hero-title { margin: 0; font-size: clamp(22px, 3vw, 30px); }
.channel-hero-desc { color: var(--muted); border-top: 1px solid var(--border); padding-top: 14px; margin-bottom: 0; }

/* site card */
.site-card { display: flex; flex-direction: column; gap: 10px; }
.site-title { font-size: 17px; font-weight: 800; }
.site-desc { color: var(--muted); font-size: 14px; margin: 0; flex: 1; }
.site-meta { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------- filters & forms ---------------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 6px; align-items: center; }
.filters-compact { margin: 0; }
.filters input, .filters select, .auth-form input, .auth-form select, .row-form input, .row-form select {
  font-family: var(--font); font-size: 14.5px; color: var(--text);
  border: 1.5px solid var(--border); border-radius: 10px; padding: 9px 12px;
  background: var(--surface); outline: none; transition: border-color .15s;
}
.filters input:focus, .filters select:focus, .auth-form input:focus, .auth-form select:focus { border-color: var(--primary); }
.filters input[type="search"] { min-width: 200px; }

.auth-card { padding: 28px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; }
.label-hint { color: #93a5bb; font-weight: 500; font-size: 13px; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: #93a5bb; font-size: 13px; margin: 18px 0 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-switch { color: var(--muted); font-size: 14px; margin-top: 16px; }
.tg-hint { background: var(--primary-soft); border-radius: 10px; padding: 10px 14px; font-size: 14px; color: var(--primary-dark); }
.form-error { background: #fdecec; color: #b3261e; border: 1px solid #f6c8c5; border-radius: 10px; padding: 11px 15px; font-size: 14.5px; }
.form-success { background: var(--green-soft); color: #0b7a48; border: 1px solid #bfe9d4; border-radius: 10px; padding: 11px 15px; font-size: 14.5px; }

/* ---------------- misc ---------------- */
.breadcrumbs { color: #93a5bb; font-size: 13.5px; margin-bottom: 4px; }
.breadcrumbs a { color: var(--muted); }
.page-lead { color: var(--muted); font-size: 16px; margin-top: 0; max-width: 760px; }
.empty-note { color: var(--muted); background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 26px; text-align: center; margin-top: 18px; }
.count-badge { background: var(--primary-soft); color: var(--primary-dark); border-radius: 999px; font-size: 15px; padding: 2px 12px; vertical-align: middle; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 30px; }
.page-link { font-weight: 700; background: var(--surface); border: 1.5px solid var(--border); padding: 8px 16px; border-radius: 10px; }
.page-link:hover { border-color: var(--primary); }
.page-current { color: var(--muted); font-size: 14px; }
.inline-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 30px; }
.inline-cta p { margin: 0; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); font-size: 13px; }

/* cta */
.cta-section { background: radial-gradient(900px 400px at 30% 120%, #1f4a7a, var(--navy)); color: #fff; padding: 56px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-inner h2 { margin: 0 0 8px; }
.cta-inner p { color: #b9c7d9; margin: 0; max-width: 520px; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* cabinet */
.cabinet-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 20px; margin-top: 20px; }
@media (max-width: 900px) { .cabinet-grid { grid-template-columns: 1fr; } }

/* status */
.status { display: inline-block; font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 2px 10px; }
.status-ok { background: var(--green-soft); color: #0b7a48; }
.status-wait { background: #fff4e0; color: #9a6700; }
.status-no { background: #fdecec; color: #b3261e; }

/* ---------------- admin ---------------- */
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; margin: 14px 0 22px; }
.admin-nav a { padding: 8px 15px; border-radius: 9px; font-weight: 700; font-size: 14.5px; color: var(--muted); }
.admin-nav a:hover { background: var(--primary-soft); color: var(--primary-dark); }
.admin-nav a.active { background: var(--primary); color: #fff; }
.admin-toolbar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { text-align: center; padding: 18px 10px; }
.stat-card .stat-num { color: var(--text); font-size: 26px; display: block; }
.stat-card .stat-label { color: var(--muted); }
.stat-card--warn { border-color: #ffd9a8; background: #fff8ee; }
.table-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: #93a5bb; padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 11px 14px; border-bottom: 1px solid #edf1f7; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: #f7fafd; }
.row-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ---------------- footer ---------------- */
.site-footer { background: var(--navy); color: #b9c7d9; margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; padding: 44px 20px 26px; }
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col a { color: #b9c7d9; font-size: 14.5px; }
.footer-col a:hover { color: #fff; }
.footer-title { font-weight: 800; color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.logo-footer { color: #fff; font-size: 20px; }
.footer-tagline { font-size: 14px; margin: 6px 0 0; max-width: 340px; }
.footer-legal { border-top: 1px solid #23374d; padding-top: 18px; padding-bottom: 24px; }
.footer-legal p { font-size: 12.5px; color: #7d92aa; margin: 0; }

@media (max-width: 860px) {
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .header-inner { gap: 10px; }
  .main-nav { order: 3; width: 100%; justify-content: center; border-top: 1px solid var(--border); padding-top: 6px; }
  .hero { padding: 44px 0 40px; }
  .hero-search { flex-direction: column; }
  .hero-stats { gap: 26px; }
  .channel-hero .btn-tg { margin-left: 0; }
}
