:root {
  --page: #14171a;
  --surface: #1d2226;
  --surface-soft: #101315;
  --text: #f3f5f4;
  --text-soft: #aab2b7;
  --muted: #757f86;
  --line: #353d43;
  --line-soft: #2c343a;
  --blue: #6f8994;
  --blue-dark: #d9e3e6;
  --green: #49a66a;
  --red: #d85f45;
  --amber: #d99b13;
  --yellow: #ffc52f;
  --radius: 8px;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    radial-gradient(circle at 16% 0, rgba(255, 197, 47, 0.12), transparent 28%),
    radial-gradient(circle at 96% 18%, rgba(111, 137, 148, 0.18), transparent 32%),
    var(--page);
  background-size: 34px 34px, 34px 34px, auto, auto, auto;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

.cookie-consent {
  position: fixed;
  right: clamp(12px, 3vw, 28px);
  bottom: clamp(12px, 3vw, 28px);
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: min(760px, calc(100% - 24px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 55px rgba(29, 29, 31, 0.16);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.cookie-consent-hidden {
  opacity: 0;
  transform: translateY(10px);
}

.cookie-consent-text {
  min-width: 0;
}

.cookie-consent-text strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1rem;
}

.cookie-consent-text p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.94rem;
  line-height: 1.45;
}

.cookie-consent-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.cookie-consent-actions .button {
  min-width: 116px;
}

.page-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 56px;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  min-height: 82px;
  padding: 10px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.95);
  box-shadow: 0 12px 30px rgba(32, 33, 36, 0.08);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 1 390px;
  justify-content: flex-start;
  min-width: 0;
  font-weight: 760;
}

.brand-logo-only {
  padding: 0;
}

.brand-logo {
  display: block;
  width: min(390px, 34vw);
  height: auto;
  max-height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0, 113, 227, 0.12));
}

.nav-actions,
.hero-actions,
.dashboard-actions,
.verification-actions,
.filter-chips,
.admin-actions,
.admin-inline-form,
.message-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.nav-actions {
  justify-content: flex-start;
  flex-wrap: nowrap;
  min-width: 0;
  max-width: min(700px, 66vw);
  padding: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--surface-soft);
  cursor: grab;
  scrollbar-width: none;
  scroll-behavior: auto;
  touch-action: pan-y;
  user-select: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.nav-actions::-webkit-scrollbar {
  display: none;
}

.nav-actions.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.nav-actions > *,
.nav-actions .admin-inline-form,
.nav-actions .admin-inline-form > * {
  flex: 0 0 auto;
}

.nav-actions .button {
  min-height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  box-shadow: none;
  font-size: 0.92rem;
}

.nav-actions .button-ghost,
.nav-actions .button-secondary {
  border-color: transparent;
  background: transparent;
}

.nav-actions .button-ghost:hover,
.nav-actions .button-secondary:hover {
  border-color: var(--line);
  background: #fff;
}

.nav-actions .button.nav-active,
.nav-actions .button.nav-active:hover {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.page-content {
  padding-top: 24px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 16px;
  align-items: stretch;
}

.hero-copy,
.hero-card,
.form-card,
.dashboard-card,
.messages-panel,
.composer-card,
.stat-card,
.admin-card,
.person-card,
.verification-card,
.maintenance-card,
.message-card,
.message-item,
.ad-card,
.empty-state,
.dialogs-panel {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-copy {
  min-height: 380px;
  padding: clamp(28px, 5vw, 56px);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 22px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffd84d, #ff9f1c);
  color: #111;
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(255, 180, 0, 0.26);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-btn:hover,
.hero-btn:focus-visible {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 36px rgba(255, 180, 0, 0.34);
  outline: none;
}

.hero-stats-card {
  justify-content: center;
  gap: 0;
  min-height: 380px;
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.hero-stat {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  min-height: 190px;
  padding: 30px 32px;
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.055), rgba(21, 143, 91, 0.045));
}

.hero-stat + .hero-stat {
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(135deg, rgba(21, 143, 91, 0.06), rgba(0, 113, 227, 0.035));
}

.hero-stat::before {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 42px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 10px 24px rgba(0, 113, 227, 0.18);
}

.hero-stat + .hero-stat::before {
  background: var(--green);
  box-shadow: 0 10px 24px rgba(21, 143, 91, 0.18);
}

.hero-stat span {
  flex: 0 1 230px;
  color: var(--text-soft);
  font-size: 1.02rem;
  line-height: 1.35;
  font-weight: 720;
}

.hero-stat strong {
  flex: 0 0 auto;
  min-width: 72px;
  color: var(--blue);
  font-size: clamp(2.9rem, 7vw, 5.2rem);
  line-height: 0.9;
  font-weight: 860;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.hero-stat + .hero-stat strong {
  color: var(--green);
}

.hero-copy h1,
.form-card h1,
.dashboard-card h1,
.messages-panel h1,
.verification-card h1,
.maintenance-card h1,
.section-intro h1 {
  margin: 10px 0 14px;
  color: var(--text);
  font-size: clamp(2.1rem, 5.8vw, 4.6rem);
  line-height: 1.02;
  font-weight: 820;
  letter-spacing: 0;
}

.hero-copy p,
.form-card p,
.dashboard-card p,
.messages-panel p,
.composer-card p,
.verification-card p,
.maintenance-card p,
.section-intro p,
.person-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.62;
}

.hero-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
}

.hero-card h2,
.form-card h2,
.dashboard-card h2,
.messages-panel h2,
.admin-card h2,
.composer-card h2 {
  margin: 0 0 14px;
  font-size: 1.35rem;
  line-height: 1.2;
}

.hero-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-card li {
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text-soft);
}

.eyebrow,
.role-badge,
.ad-city-badge,
.ad-type-badge,
.ad-status-badge,
.admin-action-badge,
.filter-chip,
.skill-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 720;
  line-height: 1;
}

.eyebrow {
  min-height: 34px;
  color: var(--blue-dark);
  border-color: #c8def8;
  background: #f2f7ff;
  text-transform: uppercase;
}

.role-admin,
.admin-action-success,
.ad-status-active {
  color: var(--green);
  border-color: #bfe6d2;
  background: #f2fbf6;
}

.ad-city-badge {
  color: #0b5cab;
  border-color: #c8def8;
  background: #f2f7ff;
}

.admin-action-danger,
.ad-status-pending {
  color: var(--red);
  border-color: #f4c6cc;
  background: #fff5f6;
}

.button,
.admin-button,
.message-complaint-button,
.message-delete-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  max-width: 100%;
  padding: 0 16px;
  border: 1px solid var(--blue);
  border-radius: var(--radius);
  color: #fff;
  background: var(--blue);
  font-size: 0.95rem;
  font-weight: 720;
  line-height: 1.1;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.button:hover,
.admin-button:hover,
.message-complaint-button:hover,
.message-delete-button:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
}

.button-secondary,
.button-ghost,
.filter-chip,
.admin-button,
.message-delete-button {
  color: var(--text);
  border-color: var(--line);
  background: #fff;
}

.button-secondary:hover,
.button-ghost:hover,
.filter-chip:hover,
.admin-button:hover,
.message-delete-button:hover {
  color: var(--blue-dark);
  border-color: #b9d7fa;
  background: #f7fbff;
}

.button-success,
.button-success:hover {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.button-success:hover {
  filter: brightness(0.94);
}

.button:disabled,
.button-secondary:disabled,
.button-ghost:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.adm-shortcut-button {
  min-width: 70px;
}

.form-section,
.dashboard,
.verification-layout,
.maintenance-page {
  display: flex;
  justify-content: center;
}

.form-card,
.dashboard-card,
.verification-card,
.maintenance-card {
  width: min(100%, 620px);
  padding: clamp(22px, 4vw, 36px);
}

.profile-form-card {
  width: min(100%, 820px);
}

form {
  min-width: 0;
}

label {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--text-soft);
  font-size: 0.94rem;
  font-weight: 700;
}

input,
select,
textarea,
.admin-select,
.admin-text-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  color: var(--text);
  background: #fff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

textarea {
  min-height: 132px;
  padding: 13px 14px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
.admin-select:focus,
.admin-text-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.14);
}

input[type="file"] {
  padding: 11px;
}

.toggle-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.toggle-field input[type="checkbox"] {
  width: 19px;
  min-width: 19px;
  min-height: 19px;
  margin: 0;
  accent-color: var(--blue);
}

.form-split {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: 14px 16px;
}

.field-hint,
.admin-log-meta,
.skills-empty,
.complaint-type-item span,
small {
  color: var(--muted);
  line-height: 1.5;
}

.dashboard {
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.dashboard-card {
  width: min(100%, 860px);
}

.dashboard-actions {
  margin-top: 22px;
}

.ads-toolbar {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}

.ads-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ads-search-form input {
  min-height: 42px;
}

.dashboard-grid,
.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: min(100%, 860px);
}

.stat-card {
  padding: 20px;
}

.stat-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 680;
}

.stat-card strong {
  display: block;
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  font-weight: 820;
}

.stat-card-highlight {
  border-color: #c8def8;
  background: #f7fbff;
}

.profile-card {
  width: min(100%, 920px);
}

.profile-header,
.profile-editor-header,
.profile-header-main,
.person-card-header,
.ad-card-top,
.messages-header,
.dialogs-header,
.chat-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-header-spread,
.ad-card-top,
.dialogs-header {
  justify-content: space-between;
  align-items: flex-start;
}

.profile-header-main {
  min-width: 0;
}

.profile-avatar-large,
.avatar-fallback,
.person-avatar,
.dialog-avatar {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--surface-soft);
}

.profile-avatar-large {
  width: 102px;
  height: 102px;
}

.dialog-avatar {
  width: 46px;
  height: 46px;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  color: var(--blue-dark);
  background: #f2f7ff;
  font-size: 1.25rem;
  font-weight: 820;
  text-transform: uppercase;
}

.profile-header h1,
.profile-editor-header h1,
.person-card h2,
.admin-card h2,
.composer-card h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1.15;
  font-weight: 780;
}

.profile-header p,
.profile-editor-header p,
.person-card-header p {
  margin: 0;
  color: var(--muted);
}

.profile-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.profile-meta-item,
.profile-about,
.skills-card,
.settings-card,
.complaint-type-item,
.verification-link-box,
.complaint-info-card,
.complaint-prefill-box,
.person-skills-card {
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.profile-meta-item span,
.profile-about span,
.skills-card > span,
.verification-link-box span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 720;
}

.profile-meta-item strong {
  color: var(--text);
  font-size: 1.02rem;
}

.profile-about,
.skills-card,
.settings-card,
.compact-about,
.person-skills-card,
.complaint-info-card,
.complaint-prefill-box {
  margin-top: 14px;
}

.profile-about p {
  margin: 0;
  color: var(--text-soft);
}

.skills-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-chip {
  color: var(--blue-dark);
  border-color: #c8def8;
  background: #f7fbff;
}

.contact-visible {
  border-color: #cfe9da;
  background: #f7fcf9;
}

.contact-hidden {
  border-color: #f4c6cc;
  background: #fff8f8;
}

.profile-settings-link {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.people-section,
.admin-layout {
  display: grid;
  gap: 16px;
}

.section-intro {
  display: grid;
  gap: 8px;
  padding: 2px 0;
}

.section-intro h1 {
  font-size: clamp(2rem, 4.5vw, 3.8rem);
}

.people-grid,
.ads-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ads-row-list {
  display: grid;
  gap: 12px;
  width: 100%;
}

.ad-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 20px;
  align-items: center;
  min-height: 116px;
  padding: 18px 20px 18px 22px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, #fbfbfd);
  box-shadow: 0 10px 28px rgba(29, 29, 31, 0.05);
  overflow: hidden;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.ad-row::before {
  content: "";
  position: absolute;
  inset: 14px auto 14px 0;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: var(--blue);
}

.ad-row:hover {
  transform: translateY(-1px);
  border-color: #cfe2f8;
  box-shadow: 0 16px 38px rgba(29, 29, 31, 0.08);
}

.ad-row-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.ad-row-heading {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.ad-row h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.22;
  font-weight: 820;
  overflow-wrap: anywhere;
}

.ad-row p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ad-row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.84rem;
}

.ad-row-date,
.ad-row-author {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-weight: 650;
}

.ad-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  min-width: 150px;
}

.ad-row-actions .button {
  min-height: 38px;
  border-radius: 999px;
  padding: 0 14px;
}

.ad-author-summary {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.ad-author-skills,
.ad-author-bio {
  display: grid;
  gap: 6px;
}

.ad-author-skills > span,
.ad-author-bio > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}

.ad-author-bio p {
  color: var(--muted);
  font-size: 0.92rem;
}

.own-ads-card {
  display: grid;
  gap: 14px;
}

.person-card,
.ad-card {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 22px;
  overflow: hidden;
}

.person-card p,
.ad-card p,
.message-card p,
.message-item p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.58;
}

.complaint-type-list {
  display: grid;
  gap: 12px;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.flash,
.admin-warning-box {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid #c8def8;
  border-radius: var(--radius);
  background: #f2f7ff;
  color: var(--blue-dark);
  font-weight: 700;
}

.flash-success {
  border-color: #bfe6d2;
  background: #f2fbf6;
  color: var(--green);
}

.flash-error,
.maintenance-status-on {
  border-color: #f4c6cc;
  background: #fff5f6;
  color: var(--red);
}

.flash-info {
  border-color: #c8def8;
  background: #f2f7ff;
  color: var(--blue-dark);
}

.maintenance-shell {
  width: min(660px, calc(100% - 32px));
  padding: 44px 0;
}

.maintenance-card {
  width: 100%;
}

.maintenance-status {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #bfe6d2;
  border-radius: var(--radius);
  background: #f2fbf6;
  color: var(--green);
}

.maintenance-status span {
  color: var(--muted);
}

.maintenance-admin-form {
  max-width: 660px;
}

.messages-layout,
.ads-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 16px;
  align-items: start;
}

.messages-panel,
.composer-card,
.dialogs-panel {
  padding: 24px;
}

.messages-list,
.message-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.message-card,
.message-item {
  padding: 16px;
}

.message-card strong,
.message-direction,
.admin-log-actor,
.admin-log-summary {
  color: var(--text);
  font-weight: 760;
}

.message-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.message-incoming {
  border-left: 3px solid var(--green);
}

.message-outgoing {
  border-left: 3px solid var(--blue);
}

.messages-app {
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 0.58fr);
}

.dialogs-header {
  margin-bottom: 14px;
}

.dialogs-header h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2rem);
  line-height: 1.1;
}

.new-dialog-form {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.new-dialog-form label {
  margin: 0;
}

.dialogs-list {
  display: grid;
  gap: 6px;
}

.dialog-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 70px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text);
  background: transparent;
}

.dialog-row:hover,
.dialog-row-active {
  border-color: #c8def8;
  background: #f7fbff;
}

.dialog-row-main {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.dialog-row-main strong,
.dialog-row-main small,
.dialog-row-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialog-row-main small,
.dialog-row-main span,
.dialog-row-meta {
  color: var(--muted);
  font-size: 0.86rem;
}

.dialog-row-meta {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.dialog-unread {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-size: 0.78rem;
  font-weight: 760;
}

.chat-panel {
  min-width: 0;
  padding: 0;
  overflow: hidden;
}

.chat-thread,
.chat-empty {
  display: flex;
  flex-direction: column;
  min-height: 620px;
}

.chat-empty {
  align-items: center;
  justify-content: center;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.chat-header {
  min-height: 74px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: #fff;
}

.chat-header h2 {
  margin: 0 0 3px;
  font-size: 1.15rem;
  line-height: 1.2;
}

.chat-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.chat-messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  background: #fafafa;
}

.chat-bubble {
  display: grid;
  gap: 7px;
  width: fit-content;
  max-width: min(72%, 560px);
  padding: 11px 13px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  line-height: 1.52;
}

.chat-bubble p {
  margin: 0;
  overflow-wrap: anywhere;
}

.chat-bubble small {
  color: #475569;
  font-size: 0.78rem;
}

.chat-bubble-out {
  align-self: flex-end;
  border-color: #86efac;
  background: #dcfce7;
}

.chat-bubble-in {
  align-self: flex-start;
  border-color: #93c5fd;
  background: #dbeafe;
}

.message-delete-inline {
  margin: 0;
}

.message-delete-inline button {
  padding: 0;
  border: 0;
  color: var(--red);
  background: transparent;
  font-size: 0.82rem;
}

.chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border-top: 1px solid var(--line-soft);
  background: #fff;
}

.chat-composer textarea {
  min-height: 46px;
  max-height: 150px;
}

.admin-card {
  padding: 22px;
}

.admin-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.admin-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #fff;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.85rem;
  font-weight: 760;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.message-cell {
  max-width: 360px;
  overflow-wrap: anywhere;
}

.verification-meta,
.ad-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.phone-prefix {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
}

code {
  padding: 2px 5px;
  border-radius: 6px;
  background: #f0f0f2;
  color: var(--text);
}

@media (max-width: 940px) {
  .hero,
  .messages-layout,
  .ads-layout,
  .messages-app {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: auto;
  }

  .hero-stats-card {
    min-height: 320px;
  }

  .dashboard-grid,
  .admin-stats,
  .people-grid,
  .ads-list,
  .profile-meta-grid,
  .verification-meta,
  .ad-meta-grid {
    grid-template-columns: 1fr;
  }

  .chat-thread,
  .chat-empty {
    min-height: 560px;
  }
}

@media (max-width: 700px) {
  .page-shell {
    width: min(100% - 24px, 1120px);
    padding-top: 10px;
  }

  .topbar {
    position: static;
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
  }

  .brand {
    width: 100%;
    flex-basis: auto;
    justify-content: center;
  }

  .brand-logo {
    width: min(100%, 390px);
    max-height: 112px;
  }

  .nav-actions {
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 7px;
  }

  .nav-actions > *,
  .nav-actions .admin-inline-form,
  .nav-actions .admin-inline-form > * {
    flex: 0 0 auto;
    width: auto;
  }

  .nav-actions .button {
    min-height: 44px;
    padding: 0 18px;
    font-size: 0.95rem;
  }

  .nav-actions.nav-guest {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: default;
  }

  .nav-actions.nav-guest .button {
    justify-content: center;
    min-width: 0;
    width: 100%;
    padding: 0 10px;
    white-space: nowrap;
  }

  .hero-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 22px;
  }

  .hero-btn {
    width: 100%;
    min-height: 52px;
  }

  .hero-stats-card {
    min-height: auto;
  }

  .hero-stat {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    grid-template-areas:
      "mark label"
      ". number";
    align-items: flex-start;
    min-height: 156px;
    padding: 24px;
  }

  .hero-stat::before {
    grid-area: mark;
  }

  .hero-stat span {
    grid-area: label;
    font-size: 0.98rem;
  }

  .hero-stat strong {
    grid-area: number;
    min-width: 0;
    font-size: 3.3rem;
    text-align: left;
  }

  .hero-copy,
  .hero-card,
  .form-card,
  .dashboard-card,
  .messages-panel,
  .composer-card,
  .admin-card,
  .person-card,
  .verification-card,
  .maintenance-card,
  .dialogs-panel {
    padding: 18px;
  }

  .hero-copy h1,
  .form-card h1,
  .dashboard-card h1,
  .messages-panel h1,
  .verification-card h1,
  .maintenance-card h1,
  .section-intro h1 {
    font-size: 2rem;
    line-height: 1.08;
  }

  .form-split,
  .phone-prefix {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .dashboard-actions,
  .ads-toolbar,
  .admin-actions,
  .message-actions,
  .verification-actions {
    align-items: stretch;
    width: 100%;
  }

  .hero-actions > *,
  .dashboard-actions > *,
  .ads-toolbar > *,
  .admin-actions > *,
  .message-actions > *,
  .verification-actions > * {
    width: 100%;
  }

  .ads-toolbar {
    grid-template-columns: 1fr;
  }

  .ads-search-form {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .ads-search-form .button {
    width: auto;
    white-space: nowrap;
  }

  .button,
  .admin-button,
  .message-complaint-button,
  .message-delete-button {
    width: 100%;
    white-space: normal;
    text-align: center;
  }

  .nav-actions .button,
  .nav-actions .admin-inline-form .button {
    width: auto;
    white-space: nowrap;
  }

  .cookie-consent {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .cookie-consent-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .cookie-consent-actions .button {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }

  .profile-header,
  .profile-editor-header,
  .person-card-header,
  .ad-card-top,
  .message-meta,
  .admin-card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-header-main {
    align-items: center;
    flex-direction: row;
    width: 100%;
  }

  .profile-avatar-large {
    width: 82px;
    height: 82px;
  }

  .person-avatar,
  .avatar-fallback {
    width: 58px;
    height: 58px;
  }

  .dialog-row {
    min-height: 66px;
    padding: 9px;
  }

  .ad-row {
    grid-template-columns: 1fr;
    gap: 14px;
    min-height: 0;
    padding: 16px 16px 16px 18px;
  }

  .ad-row-actions {
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
  }

  .ad-row-actions > *,
  .ad-row-actions .button {
    width: auto;
  }

  .dialogs-header {
    align-items: stretch;
    flex-direction: column;
  }

  .chat-panel {
    padding: 0;
  }

  .chat-header,
  .chat-messages {
    padding: 14px;
  }

  .chat-thread,
  .chat-empty {
    min-height: 520px;
  }

  .chat-bubble {
    max-width: 88%;
  }

  .chat-composer {
    grid-template-columns: 1fr;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }
}

@media (max-width: 370px) {
  .nav-actions.nav-guest {
    gap: 6px;
    padding: 6px;
  }

  .nav-actions.nav-guest .button {
    padding: 0 7px;
    font-size: 0.86rem;
  }
}

@media (max-width: 420px) {
  .page-shell {
    width: min(100% - 18px, 1120px);
  }

  .hero-copy,
  .hero-card,
  .form-card,
  .dashboard-card,
  .messages-panel,
  .composer-card,
  .admin-card,
  .person-card,
  .verification-card,
  .maintenance-card,
  .dialogs-panel {
    padding: 16px;
  }

  .hero-copy h1,
  .form-card h1,
  .dashboard-card h1,
  .messages-panel h1,
  .verification-card h1,
  .maintenance-card h1,
  .section-intro h1 {
    font-size: 1.82rem;
  }

  .chat-bubble {
    max-width: 94%;
  }
}

.industrial-hero {
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 18px;
}

.industrial-hero-main,
.industrial-task-card,
.industrial-section {
  border-color: var(--line);
  background: linear-gradient(180deg, rgba(36, 42, 47, 0.98), rgba(29, 34, 38, 0.98));
}

.industrial-hero-main {
  position: relative;
  min-height: 530px;
  overflow: hidden;
  padding: clamp(28px, 5vw, 58px);
}

.industrial-hero-main::before {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -82px;
  width: min(52vw, 520px);
  aspect-ratio: 1;
  opacity: 0.92;
  background: repeating-linear-gradient(135deg, var(--yellow) 0 24px, #16191b 24px 48px);
  clip-path: polygon(18% 18%, 100% 34%, 82% 88%, 0 72%);
  filter: drop-shadow(0 28px 42px rgba(0, 0, 0, 0.34));
}

.industrial-hero-main::after {
  content: "";
  position: absolute;
  right: 38px;
  bottom: 62px;
  width: 210px;
  height: 84px;
  border: 14px solid rgba(111, 137, 148, 0.42);
  border-radius: 4px;
  transform: rotate(-8deg);
}

.industrial-hero-main > * {
  position: relative;
  z-index: 1;
}

.industrial-hero-main .eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 197, 47, 0.42);
  border-radius: 999px;
  background: rgba(255, 197, 47, 0.08);
  color: var(--yellow);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.industrial-hero-main h1 {
  max-width: 720px;
  margin: 26px 0 16px;
  color: var(--text);
  font-size: clamp(2.8rem, 7.4vw, 6rem);
  line-height: 0.92;
}

.industrial-hero-main p {
  max-width: 610px;
  margin: 0;
  color: var(--text-soft);
  font-size: 1.1rem;
  line-height: 1.58;
}

.industrial-hero .hero-buttons {
  margin-top: 30px;
}

.industrial-hero .hero-btn {
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--yellow);
  color: #151514;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(255, 197, 47, 0.22);
}

.industrial-hero .hero-btn-secondary {
  border-color: var(--line);
  background: #15191c;
  color: var(--text);
  box-shadow: none;
}

.industrial-side {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
}

.industrial-side .hero-stats-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 0;
  background: var(--line);
}

.industrial-side .hero-stat {
  display: block;
  min-height: 110px;
  padding: 22px;
  background: var(--surface);
}

.industrial-side .hero-stat + .hero-stat {
  border-top: 0;
  border-left: 1px solid var(--line);
  background: var(--surface);
}

.industrial-side .hero-stat::before {
  display: none;
}

.industrial-side .hero-stat span {
  display: block;
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
}

.industrial-side .hero-stat strong {
  display: block;
  margin-top: 8px;
  color: var(--yellow);
  font-size: 2.45rem;
  line-height: 1;
}

.industrial-task-card {
  padding: 18px;
}

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

.industrial-panel-head h2,
.industrial-section h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.1rem;
}

.industrial-panel-head span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(73, 166, 106, 0.12);
  color: #75d193;
  font-size: 0.8rem;
  font-weight: 850;
}

.industrial-task-list {
  display: grid;
  gap: 10px;
}

.industrial-task {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #171b1e;
}

.industrial-task i,
.industrial-workers i {
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 4px;
  background: var(--yellow);
  box-shadow: inset 0 -10px 0 rgba(0, 0, 0, 0.18);
}

.industrial-task:nth-child(2) i,
.industrial-workers article:nth-child(1) i {
  background: var(--blue);
}

.industrial-task:nth-child(3) i,
.industrial-workers article:nth-child(3) i {
  background: var(--green);
}

.industrial-workers article:nth-child(2) i {
  background: var(--red);
}

.industrial-task strong {
  display: block;
  color: var(--text);
  font-size: 0.96rem;
}

.industrial-task span {
  display: block;
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 0.86rem;
  line-height: 1.35;
}

.industrial-task b {
  color: var(--yellow);
  white-space: nowrap;
}

.industrial-sections {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 18px;
  margin-top: 18px;
}

.industrial-section {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.industrial-section p {
  margin: 8px 0 16px;
  color: var(--text-soft);
  line-height: 1.45;
}

.industrial-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.industrial-chips span {
  min-height: 42px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #171b1e;
  color: var(--text);
  font-weight: 800;
}

.industrial-workers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.industrial-workers article {
  min-height: 156px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #171b1e;
}

.industrial-workers i {
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
}

.industrial-workers strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
}

.industrial-workers span {
  display: block;
  margin-top: 7px;
  color: var(--text-soft);
  font-size: 0.87rem;
  line-height: 1.38;
}

@media (max-width: 880px) {
  .industrial-hero,
  .industrial-sections {
    grid-template-columns: 1fr;
  }

  .industrial-workers {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .industrial-hero-main {
    min-height: 520px;
    padding: 24px;
  }

  .industrial-hero-main::before {
    right: -130px;
    bottom: -48px;
    width: 420px;
  }

  .industrial-hero-main::after {
    right: -4px;
    bottom: 82px;
    width: 170px;
  }

  .industrial-side .hero-stats-card,
  .industrial-task {
    grid-template-columns: 1fr;
  }

  .industrial-side .hero-stat + .hero-stat {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .industrial-task b {
    justify-self: start;
  }
}

.topbar {
  border-color: var(--line);
  background: rgba(29, 34, 38, 0.92);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
}

.nav-actions {
  border-color: var(--line);
  background: var(--surface-soft);
}

.nav-actions .button-ghost,
.nav-actions .button-secondary {
  color: var(--text-soft);
}

.nav-actions .button-ghost:hover,
.nav-actions .button-secondary:hover {
  color: var(--text);
  border-color: var(--line);
  background: #171b1e;
}

.nav-actions .button.nav-active,
.nav-actions .button.nav-active:hover,
.nav-actions .button {
  border-color: transparent;
}

.nav-actions .button.nav-active,
.nav-actions .button.nav-active:hover {
  color: #151514;
  background: var(--yellow);
}

.nav-actions.nav-guest .button:not(.button-ghost):not(.button-secondary) {
  color: #151514;
  background: var(--yellow);
}

.button,
.button-secondary,
.button-ghost,
.button-success,
.filter-chip,
.admin-button,
.message-complaint-button,
.message-delete-button {
  color: #151514;
  border-color: var(--yellow);
  background: var(--yellow);
  box-shadow: 0 10px 24px rgba(255, 197, 47, 0.18);
}

.button:hover,
.button-secondary:hover,
.button-ghost:hover,
.button-success:hover,
.filter-chip:hover,
.admin-button:hover,
.message-complaint-button:hover,
.message-delete-button:hover {
  color: #151514;
  border-color: var(--safety-dark, var(--amber));
  background: #ffd85a;
  filter: none;
}

.nav-actions .button,
.nav-actions .button-ghost,
.nav-actions .button-secondary,
.nav-actions.nav-guest .button:not(.button-ghost):not(.button-secondary) {
  color: #151514;
  border-color: var(--yellow);
  background: var(--yellow);
}

.nav-actions .button:hover,
.nav-actions .button-ghost:hover,
.nav-actions .button-secondary:hover,
.nav-actions .button.nav-active,
.nav-actions .button.nav-active:hover {
  color: #151514;
  border-color: var(--safety-dark, var(--amber));
  background: #ffd85a;
}

.ads-page {
  display: grid;
  gap: 16px;
}

.ads-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  align-items: stretch;
  gap: 16px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(36, 42, 47, 0.98), rgba(29, 34, 38, 0.98));
  box-shadow: var(--shadow);
}

.ads-command h1 {
  margin-bottom: 10px;
}

.ads-command-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.ads-command-stats div {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
  padding: 18px;
  background: #171b1e;
}

.ads-command-stats span {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.ads-command-stats strong {
  min-width: 0;
  color: var(--yellow);
  font-size: clamp(1.45rem, 3vw, 2.3rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.ads-page .ads-toolbar {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 19, 21, 0.82);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.ads-search-form select {
  min-height: 42px;
}

.ads-row-list {
  gap: 12px;
}

.ad-row {
  grid-template-columns: auto minmax(0, 1fr) max-content;
  gap: 16px;
  border-color: var(--line);
  background: linear-gradient(180deg, #1d2226, #171b1e);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.ad-row::before {
  display: none;
}

.ad-row:hover {
  border-color: rgba(255, 197, 47, 0.55);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.3);
}

.ad-row-marker {
  display: grid;
  place-items: center;
  align-self: stretch;
  min-width: 72px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(135deg, rgba(255, 197, 47, 0.22) 0 9px, rgba(255, 197, 47, 0.04) 9px 18px),
    #101315;
}

.ad-row-marker span {
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.ad-row-service .ad-row-marker {
  background:
    repeating-linear-gradient(135deg, rgba(111, 137, 148, 0.28) 0 9px, rgba(111, 137, 148, 0.06) 9px 18px),
    #101315;
}

.ad-row-service .ad-row-marker span {
  color: #c8d9df;
}

.ad-row h2 {
  color: var(--text);
  font-size: clamp(1.08rem, 2vw, 1.32rem);
}

.ad-row p {
  color: var(--text-soft);
  -webkit-line-clamp: 3;
}

.ad-row-date,
.ad-row-author,
.ad-city-badge,
.ad-type-badge,
.ad-status-badge,
.skill-chip {
  border-color: var(--line);
  background: #101315;
  color: var(--text-soft);
}

.ad-city-badge,
.ad-status-active {
  color: var(--yellow);
  border-color: rgba(255, 197, 47, 0.45);
  background: rgba(255, 197, 47, 0.08);
}

.ad-status-pending {
  color: #ff9f87;
  border-color: rgba(216, 95, 69, 0.48);
  background: rgba(216, 95, 69, 0.1);
}

.ad-author-summary {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #14181b;
}

.ad-author-bio p {
  color: var(--text-soft);
}

.ad-create-card {
  position: relative;
  overflow: hidden;
}

.ad-create-card::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -72px;
  width: 230px;
  aspect-ratio: 1;
  opacity: 0.16;
  background: repeating-linear-gradient(135deg, var(--yellow) 0 18px, transparent 18px 36px);
  transform: rotate(12deg);
  pointer-events: none;
}

.ad-create-card > * {
  position: relative;
  z-index: 1;
}

.ads-empty {
  padding: 24px;
  border-color: var(--line);
  background: #171b1e;
  color: var(--text-soft);
}

@media (max-width: 760px) {
  .ads-command,
  .ad-row {
    grid-template-columns: 1fr;
  }

  .ad-row-marker {
    justify-items: start;
    min-width: 0;
  }

  .ad-row-marker span {
    writing-mode: horizontal-tb;
    transform: none;
  }

  .ad-row-actions {
    justify-content: flex-start;
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .ads-command-stats,
  .ads-page .ads-toolbar,
  .ads-search-form {
    grid-template-columns: 1fr;
  }

  .ads-search-form {
    display: grid;
  }
}

input,
select,
textarea,
.admin-select,
.admin-text-input {
  color: #151514;
  caret-color: #151514;
  border-color: var(--yellow);
  background: var(--yellow);
  box-shadow: 0 10px 24px rgba(255, 197, 47, 0.12);
}

input::placeholder,
textarea::placeholder {
  color: rgba(21, 21, 20, 0.68);
  opacity: 1;
}

input:focus,
select:focus,
textarea:focus,
.admin-select:focus,
.admin-text-input:focus {
  color: #151514;
  border-color: #ffd85a;
  background: #ffd85a;
  box-shadow: 0 0 0 3px rgba(255, 197, 47, 0.28);
}

select option {
  color: #151514;
  background: var(--yellow);
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 12px;
  border: 1px solid #151514;
  border-radius: var(--radius);
  color: #151514;
  background: #ffd85a;
  font-weight: 800;
}

/* Final industrial system layer: keeps every legacy page in the new visual language. */
body {
  background-color: var(--page);
}

.page-shell {
  color: var(--text);
}

.cookie-consent,
.form-card,
.dashboard-card,
.messages-panel,
.composer-card,
.stat-card,
.admin-card,
.person-card,
.verification-card,
.maintenance-card,
.message-card,
.message-item,
.ad-card,
.empty-state,
.dialogs-panel,
.profile-meta-item,
.profile-about,
.skills-card,
.settings-card,
.complaint-type-item,
.verification-link-box,
.complaint-info-card,
.complaint-prefill-box,
.person-skills-card,
.new-dialog-form,
.table-wrap,
.maintenance-status,
.profile-settings-link {
  color: var(--text);
  border-color: var(--line);
  background: linear-gradient(180deg, #1d2226, #171b1e);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.form-card,
.dashboard-card,
.messages-panel,
.composer-card,
.admin-card,
.dialogs-panel,
.person-card,
.profile-card,
.ad-row,
.industrial-section {
  border-radius: var(--radius);
}

.form-card h1,
.dashboard-card h1,
.messages-panel h1,
.verification-card h1,
.maintenance-card h1,
.section-intro h1,
.profile-header h1,
.profile-editor-header h1,
.person-card h2,
.admin-card h2,
.composer-card h2,
.dialogs-header h1,
.chat-header h2,
.admin-log-summary,
.message-card strong,
.message-direction,
.profile-meta-item strong {
  color: var(--text);
}

.form-card p,
.dashboard-card p,
.messages-panel p,
.composer-card p,
.verification-card p,
.maintenance-card p,
.section-intro p,
.person-card p,
.ad-card p,
.message-card p,
.message-item p,
.profile-header p,
.profile-editor-header p,
.person-card-header p,
.profile-about p,
.cookie-consent-text p,
.field-hint,
.admin-log-meta,
.skills-empty,
.complaint-type-item span,
small {
  color: var(--text-soft);
}

.eyebrow,
.role-badge,
.ad-city-badge,
.ad-type-badge,
.ad-status-badge,
.admin-action-badge,
.filter-chip,
.skill-chip,
.ad-row-date,
.ad-row-author {
  color: var(--text-soft);
  border-color: var(--line);
  background: #101315;
}

.eyebrow,
.ad-city-badge,
.ad-status-active,
.role-admin,
.admin-action-success {
  color: var(--yellow);
  border-color: rgba(255, 197, 47, 0.45);
  background: rgba(255, 197, 47, 0.08);
}

.ad-status-pending,
.admin-action-danger,
.maintenance-status-on,
.flash-error {
  color: #ff9f87;
  border-color: rgba(216, 95, 69, 0.48);
  background: rgba(216, 95, 69, 0.1);
}

.flash,
.admin-warning-box,
.flash-info,
.flash-success,
.maintenance-status {
  color: var(--text);
  border-color: rgba(255, 197, 47, 0.45);
  background: rgba(255, 197, 47, 0.1);
}

.contact-visible {
  border-color: rgba(73, 166, 106, 0.5);
  background: rgba(73, 166, 106, 0.12);
}

.contact-hidden {
  border-color: rgba(216, 95, 69, 0.48);
  background: rgba(216, 95, 69, 0.1);
}

.avatar-fallback,
.person-avatar,
.profile-avatar-large,
.dialog-avatar {
  color: #151514;
  border-color: var(--line);
  background: var(--yellow);
}

.dashboard-grid,
.admin-stats,
.profile-meta-grid,
.verification-meta,
.ad-meta-grid {
  align-items: stretch;
}

.stat-card {
  border-color: var(--line);
  background:
    linear-gradient(135deg, rgba(255, 197, 47, 0.08), transparent 42%),
    linear-gradient(180deg, #1d2226, #171b1e);
}

.stat-card-highlight {
  border-color: rgba(255, 197, 47, 0.45);
  background:
    linear-gradient(135deg, rgba(255, 197, 47, 0.14), transparent 52%),
    #171b1e;
}

.stat-card span,
.profile-meta-item span,
.profile-about span,
.skills-card > span,
.verification-link-box span,
.ad-author-skills > span,
.ad-author-bio > span,
.admin-table th,
.message-meta,
.dialog-row-main small,
.dialog-row-main span,
.dialog-row-meta,
.chat-header p,
.chat-empty {
  color: var(--muted);
}

.stat-card strong {
  color: var(--yellow);
}

.admin-table {
  color: var(--text);
  background: #171b1e;
}

.admin-table th {
  color: var(--yellow);
  border-color: var(--line);
  background: #101315;
}

.admin-table td {
  color: var(--text-soft);
  border-color: var(--line);
  background: #171b1e;
}

.admin-table tr:hover td {
  background: #1f2529;
}

.dialogs-list,
.message-list,
.messages-list,
.ads-row-list {
  color: var(--text);
}

.dialog-row {
  color: var(--text);
  border-color: transparent;
  background: transparent;
}

.dialog-row:hover,
.dialog-row-active {
  color: var(--text);
  border-color: rgba(255, 197, 47, 0.45);
  background: rgba(255, 197, 47, 0.08);
}

.dialog-unread {
  color: #151514;
  background: var(--yellow);
}

.chat-header,
.chat-composer {
  border-color: var(--line);
  background: #171b1e;
}

.chat-messages {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    #101315;
  background-size: 28px 28px;
}

.chat-bubble {
  color: var(--text);
  border-color: var(--line);
  background: #1d2226;
}

.chat-bubble small {
  color: var(--muted);
}

.chat-bubble-out {
  border-color: rgba(255, 197, 47, 0.48);
  background: rgba(255, 197, 47, 0.12);
}

.chat-bubble-in {
  border-color: rgba(111, 137, 148, 0.58);
  background: rgba(111, 137, 148, 0.14);
}

.message-incoming {
  border-left-color: var(--green);
}

.message-outgoing {
  border-left-color: var(--yellow);
}

.message-delete-inline button {
  color: #ff9f87;
}

code {
  color: var(--yellow);
  background: #101315;
  border: 1px solid var(--line);
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--yellow);
}

.toggle-field {
  color: var(--text);
}

/* Mobile App Style system layer. */
:root {
  --page: #0f1115;
  --surface: #181c22;
  --surface-soft: #12161b;
  --surface-2: #202630;
  --text: #f7f8f4;
  --text-soft: #aeb6c0;
  --muted: #7f8994;
  --line: #303945;
  --line-soft: #27313c;
  --blue: #8ea4b0;
  --blue-dark: #dbe7ec;
  --green: #4fc27a;
  --red: #e66d55;
  --amber: #d99b13;
  --yellow: #ffc83d;
  --yellow-2: #ffdc6b;
  --radius: 18px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
}

body {
  background:
    radial-gradient(circle at 18% -8%, rgba(255, 200, 61, 0.18), transparent 26%),
    radial-gradient(circle at 92% 10%, rgba(79, 194, 122, 0.12), transparent 26%),
    var(--page);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  padding: 16px 0 92px;
}

.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 76px;
  padding: 10px 12px;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(24, 28, 34, 0.88);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.brand-logo {
  width: min(300px, 30vw);
  max-height: 58px;
  filter: none;
}

.nav-actions {
  justify-self: end;
  border-color: var(--line);
  background: #0f1318;
}

.nav-actions .button,
.nav-actions .button-ghost,
.nav-actions .button-secondary {
  min-height: 42px;
  border-radius: 999px;
}

.button,
.button-secondary,
.button-ghost,
.button-success,
.filter-chip,
.admin-button,
.message-complaint-button,
.message-delete-button,
input[type="file"]::file-selector-button {
  min-height: 48px;
  border-radius: 999px;
  color: #151514;
  border-color: var(--yellow);
  background: var(--yellow);
  box-shadow: 0 14px 30px rgba(255, 200, 61, 0.2);
  font-weight: 900;
}

.button:hover,
.button-secondary:hover,
.button-ghost:hover,
.button-success:hover,
.filter-chip:hover,
.admin-button:hover,
.message-complaint-button:hover,
.message-delete-button:hover {
  color: #151514;
  border-color: var(--yellow-2);
  background: var(--yellow-2);
}

input,
select,
textarea,
.admin-select,
.admin-text-input {
  color: #151514;
  caret-color: #151514;
  border-color: var(--yellow);
  border-radius: 16px;
  background: var(--yellow);
  box-shadow: 0 10px 24px rgba(255, 200, 61, 0.12);
}

input:focus,
select:focus,
textarea:focus,
.admin-select:focus,
.admin-text-input:focus {
  color: #151514;
  border-color: var(--yellow-2);
  background: var(--yellow-2);
  box-shadow: 0 0 0 4px rgba(255, 200, 61, 0.24);
}

input::placeholder,
textarea::placeholder {
  color: rgba(21, 21, 20, 0.68);
}

.form-card,
.dashboard-card,
.messages-panel,
.composer-card,
.stat-card,
.admin-card,
.person-card,
.verification-card,
.maintenance-card,
.message-card,
.message-item,
.ad-card,
.empty-state,
.dialogs-panel,
.profile-meta-item,
.profile-about,
.skills-card,
.settings-card,
.complaint-type-item,
.verification-link-box,
.complaint-info-card,
.complaint-prefill-box,
.person-skills-card,
.new-dialog-form,
.table-wrap,
.maintenance-status,
.profile-settings-link,
.ad-row,
.ads-command,
.ads-page .ads-toolbar,
.industrial-section,
.industrial-task-card {
  border-color: var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(32, 38, 48, 0.96), rgba(24, 28, 34, 0.98));
  box-shadow: var(--shadow);
}

.app-home {
  display: grid;
  gap: 16px;
}

.app-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0f1318;
  color: var(--text-soft);
  font-weight: 800;
}

.app-search i,
.app-quick-actions i {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(255, 200, 61, 0.14);
  color: var(--yellow);
  font-style: normal;
  font-weight: 900;
}

.app-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(340px, 0.72fr);
  gap: 16px;
}

.app-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(32, 38, 48, 0.96), rgba(24, 28, 34, 0.98));
  box-shadow: var(--shadow);
}

.app-hero-main {
  position: relative;
  min-height: 440px;
  padding: clamp(24px, 5vw, 46px);
  overflow: hidden;
}

.app-hero-main::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -80px;
  width: min(46vw, 430px);
  aspect-ratio: 1;
  border-radius: 40px;
  background: linear-gradient(135deg, rgba(255, 200, 61, 0.88), rgba(255, 220, 107, 0.74));
  opacity: 0.9;
  transform: rotate(-10deg);
}

.app-hero-main > * {
  position: relative;
  z-index: 1;
}

.app-hero-main h1 {
  max-width: 700px;
  margin: 22px 0 14px;
  color: var(--text);
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: 0.94;
}

.app-hero-main p {
  max-width: 610px;
  margin: 0;
  color: var(--text-soft);
  font-size: 1.08rem;
  line-height: 1.58;
}

.app-hero-main .hero-buttons {
  margin-top: 28px;
}

.app-hero-main .hero-btn-secondary {
  border-color: var(--line);
  background: #12161b;
  color: var(--text);
  box-shadow: none;
}

.app-quick-stack {
  display: grid;
  gap: 12px;
}

.app-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
}

.app-stats div {
  padding: 20px;
  background: var(--surface);
}

.app-stats span {
  display: block;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.app-stats strong {
  display: block;
  margin-top: 8px;
  color: var(--yellow);
  font-size: 2.2rem;
  line-height: 1;
}

.app-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.app-quick-actions a {
  display: grid;
  gap: 10px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #12161b;
}

.app-quick-actions strong,
.app-task strong,
.app-worker-list strong {
  display: block;
  color: var(--text);
}

.app-quick-actions span,
.app-task p,
.app-worker-list span {
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.38;
}

.app-sections {
  display: grid;
  grid-template-columns: minmax(0, 0.68fr) minmax(320px, 0.32fr);
  gap: 16px;
}

.app-feed {
  display: grid;
  gap: 12px;
}

.app-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.app-section-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.3rem;
}

.app-section-head span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.app-task {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
}

.app-task i,
.app-worker-list i {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: var(--yellow);
  box-shadow: inset 0 -10px 0 rgba(0, 0, 0, 0.16);
}

.app-task:nth-child(3) i,
.app-worker-list article:nth-child(2) i {
  background: var(--green);
}

.app-worker-list article:nth-child(3) i {
  background: var(--red);
}

.app-task p {
  margin: 4px 0 0;
}

.app-task b {
  color: var(--yellow);
  white-space: nowrap;
}

.app-workers {
  padding: 16px;
}

.app-worker-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.app-worker-list article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #12161b;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 12px;
  z-index: 50;
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  width: min(430px, calc(100% - 24px));
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(24, 28, 34, 0.94);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.38);
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
}

.bottom-nav a {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 54px;
  border-radius: 18px;
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 850;
}

.bottom-nav a:first-child {
  color: #151514;
  background: var(--yellow);
}

.nav-actions .button,
.nav-actions .button-ghost,
.nav-actions .button-secondary {
  color: var(--text-soft);
  border-color: var(--line);
  background: #12161b;
  box-shadow: none;
}

.nav-actions .button:hover,
.nav-actions .button-ghost:hover,
.nav-actions .button-secondary:hover {
  color: var(--text);
  border-color: rgba(255, 200, 61, 0.45);
  background: rgba(255, 200, 61, 0.12);
}

.nav-actions .button.nav-active,
.nav-actions .button.nav-active:hover,
.nav-actions .button[aria-current="page"],
.nav-actions .button[aria-current="page"]:hover {
  color: #151514;
  border-color: var(--yellow);
  background: var(--yellow);
  box-shadow: 0 12px 28px rgba(255, 200, 61, 0.2);
}

.bottom-nav a,
.bottom-nav a:first-child {
  color: var(--text-soft);
  background: transparent;
}

.bottom-nav a:hover {
  color: var(--text);
  background: rgba(255, 200, 61, 0.12);
}

.bottom-nav a.nav-active,
.bottom-nav a.nav-active:hover,
.bottom-nav a[aria-current="page"],
.bottom-nav a[aria-current="page"]:hover {
  color: #151514;
  background: var(--yellow);
}

@media (max-width: 900px) {
  .topbar,
  .app-hero-grid,
  .app-sections {
    grid-template-columns: 1fr;
  }

  .brand-logo {
    width: min(300px, 72vw);
  }

  .nav-actions {
    width: 100%;
    justify-self: stretch;
  }

  .bottom-nav {
    display: grid;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .topbar {
    border-radius: 22px;
  }

  .app-hero-main {
    min-height: 480px;
    padding: 24px;
  }

  .app-hero-main::after {
    right: -120px;
    bottom: -74px;
    width: 380px;
  }

  .app-stats,
  .app-quick-actions,
  .app-task {
    grid-template-columns: 1fr;
  }

  .app-task b {
    justify-self: start;
  }
}
