:root {
  --bg: #050607;
  --card: rgba(22, 25, 28, 0.72);
  --card-strong: rgba(28, 32, 35, 0.94);
  --stroke: rgba(255, 255, 255, 0.09);
  --text: rgba(255, 255, 255, 0.94);
  --muted: rgba(255, 255, 255, 0.58);
  --muted-strong: rgba(255, 255, 255, 0.72);
  --accent: #b6ff3b;
  --accent-soft: rgba(182, 255, 59, 0.16);
  --danger: #ff5c7a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);

  --radius-card: 24px;
  --radius-pill: 999px;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
}

[data-theme="light"] {
  --bg: #f4f6f8;
  --card: rgba(255, 255, 255, 0.76);
  --card-strong: rgba(255, 255, 255, 0.94);
  --stroke: rgba(12, 16, 20, 0.08);
  --text: rgba(8, 12, 16, 0.94);
  --muted: rgba(8, 12, 16, 0.58);
  --muted-strong: rgba(8, 12, 16, 0.72);
  --accent: #7fe100;
  --accent-soft: rgba(127, 225, 0, 0.16);
  --shadow: 0 24px 80px rgba(26, 35, 50, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

body.chat-open {
  overflow: hidden !important;
  height: 100vh !important;
  height: 100dvh !important;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  max-width: 520px;
  margin: 0 auto;
  padding: 20px 16px 112px;
  overflow: hidden;
}

.ambient {
  position: fixed;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.28;
  pointer-events: none;
}

.ambient-one {
  top: 72px;
  right: -88px;
  background: var(--accent);
}

.ambient-two {
  left: -96px;
  bottom: 120px;
  background: #30d5ff;
}

.glass-card {
  background: var(--card);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.hidden {
  display: none !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 8px 0 18px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
}

.badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  color: #0b0d0f;
  background: var(--accent);
  border-radius: var(--radius-pill);
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

h3 {
  margin-bottom: 12px;
  font-size: 22px;
  line-height: 1.2;
}

.screen,
.section-block,
.form-grid {
  display: grid;
  gap: var(--space-2);
}

.hero-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-card);
}

.profile-hero-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  color: #0b0d0f;
  background: var(--accent);
  border-radius: 50%;
  font-weight: 900;
  background-size: cover;
  background-position: center;
}

.avatar-large {
  width: 58px;
  height: 58px;
  font-size: 22px;
}

.avatar-small {
  width: 44px;
  height: 44px;
  font-size: 16px;
}

.avatar-modal {
  width: 86px;
  height: 86px;
  margin-bottom: 14px;
  font-size: 30px;
}

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

.profile-meta {
  margin-bottom: 0;
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.45;
}

.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  color: #0b0d0f;
  background: var(--accent);
  border-radius: var(--radius-pill);
  box-shadow: 0 0 26px var(--accent-soft);
  white-space: nowrap;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.info-card,
.action-card,
.vacancy-card,
.chat-card,
.notification-card,
.review-card,
.admin-card {
  padding: var(--space-2);
  border-radius: var(--radius-card);
}

.info-label {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.info-value {
  margin-bottom: 0;
  font-size: 15px;
  font-weight: 700;
}

.action-card,
.chat-card,
.notification-card,
.review-card,
.admin-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.action-card__icon {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  color: #0b0d0f;
  background: var(--accent);
  border-radius: var(--radius-pill);
  font-weight: 800;
}

.action-card h3,
.chat-card h3,
.notification-card h3,
.review-card h3,
.admin-card h3 {
  margin-bottom: 4px;
  font-size: 17px;
}

.action-card p,
.vacancy-card p,
.modal-card p,
.chat-card p,
.notification-card p,
.review-card p,
.admin-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.primary-button,
.ghost-button,
.danger-button {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  font-weight: 800;
}

.primary-button {
  color: #0b0d0f;
  background: var(--accent);
  border: 0;
  box-shadow: 0 0 32px var(--accent-soft);
}

.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--stroke);
}

.danger-button {
  color: #ffffff;
  background: rgba(255, 92, 122, 0.18);
  border: 1px solid rgba(255, 92, 122, 0.34);
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-1);
  margin-top: var(--space-2);
}

.vacancy-card,
.chat-card,
.notification-card,
.admin-card {
  cursor: pointer;
}

.vacancy-card h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.vacancy-price {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.vacancy-title-large {
  margin-bottom: 8px;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.vacancy-section-title {
  margin: 22px 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.vacancy-description {
  white-space: pre-wrap;
}

.vacancy-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--space-2);
}

.tag {
  padding: 8px 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.search-box input {
  height: 52px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-pill);
  outline: none;
}

.search-box button {
  min-width: 56px;
  color: #0b0d0f;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius-pill);
  font-weight: 900;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  width: min(488px, calc(100vw - 32px));
  padding: 8px;
  border-radius: 28px;
  transform: translateX(-50%);
}

.nav-button {
  position: relative;
  min-width: 0;
  height: 58px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 22px;
  font-size: 10px;
  font-weight: 700;
}

.nav-button span {
  display: block;
  margin-bottom: 3px;
  font-size: 19px;
}

.nav-button.active {
  color: #0b0d0f;
  background: var(--accent);
  box-shadow: 0 0 28px var(--accent-soft);
}

.nav-badge {
  position: absolute;
  top: 5px;
  right: 10px;
  min-width: 16px;
  width: auto;
  height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  color: #0b0d0f;
  background: var(--accent);
  border-radius: var(--radius-pill);
  font-size: 9px;
  line-height: 1;
  font-weight: 900;
}

.chat-unread-dot {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  color: #0b0d0f;
  background: var(--accent);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 900;
}

.chat-arrow {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  color: #0b0d0f;
  background: var(--accent);
  border-radius: var(--radius-pill);
  font-weight: 900;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: end center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.modal-card {
  position: relative;
  width: min(488px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 24px;
  border-radius: 32px;
  background: var(--card-strong);
  animation: modalIn 180ms ease-out;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-pill);
  font-size: 24px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  outline: none;
}

.field input,
.field select {
  height: 50px;
  padding: 0 14px;
}

.field textarea {
  min-height: 112px;
  resize: vertical;
  padding: 14px;
}

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--stroke);
}

.toggle-row input {
  width: 22px;
  height: 22px;
}

.empty-card,
.error-card {
  padding: var(--space-3);
  border-radius: var(--radius-card);
}

.empty-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke);
}

.error-card {
  border: 1px solid rgba(255, 92, 122, 0.3);
  background: rgba(255, 92, 122, 0.1);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 200;
  width: min(420px, calc(100vw - 32px));
  padding: 14px 16px;
  color: #0b0d0f;
  background: var(--accent);
  border-radius: var(--radius-pill);
  font-weight: 800;
  text-align: center;
  transform: translateX(-50%);
}

/* ========================= */
/* ЧАТ */
/* ========================= */

.chat-screen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 80 !important;
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: 520px !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  margin: 0 auto !important;
  padding: 14px 16px !important;
  background: var(--bg) !important;
  overflow: hidden !important;
}

.chat-header {
  display: flex;
  align-items: center;
  flex-shrink: 0 !important;
  gap: 12px;
  padding-bottom: 12px;
}

.chat-back {
  width: 42px;
  height: 42px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-pill);
}

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

.chat-title h2 {
  margin-bottom: 2px;
  font-size: 20px;
}

.chat-title p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.chat-profile-button {
  width: 42px;
  height: 42px;
  color: #0b0d0f;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius-pill);
  font-weight: 900;
}

.messages-scroll {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 10px 2px 12px !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  touch-action: pan-y !important;
}

.messages {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  min-height: 100% !important;
  gap: 6px !important;
  overflow: visible !important;
  padding: 0 !important;
  align-content: unset !important;
}

/* компактные сообщения */

.message {
  position: relative !important;
  width: fit-content !important;
  max-width: 74% !important;
  flex-shrink: 0 !important;
  padding: 5px 7px 4px !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  line-height: 1.2 !important;
  font-size: 12.5px !important;
  touch-action: pan-y !important;
  user-select: none !important;
  word-break: break-word !important;
}

.message.mine {
  margin-left: auto !important;
  color: #0b0d0f !important;
  background: var(--accent) !important;
}

.message.deleted {
  opacity: 0.62;
  font-style: italic;
}

.message a {
  color: inherit;
  font-weight: 800;
}

.message-body {
  white-space: pre-wrap !important;
  word-break: break-word !important;
}

.message-reply {
  margin-bottom: 4px !important;
  padding: 4px 6px !important;
  border-left: 2px solid rgba(0, 0, 0, 0.28);
  border-radius: 9px !important;
  background: rgba(255, 255, 255, 0.18);
}

.message:not(.mine) .message-reply {
  border-left-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
}

.message-reply span {
  display: block;
  margin-bottom: 2px;
  font-size: 8px !important;
  font-weight: 800;
  opacity: 0.75;
}

.message-reply p {
  margin: 0;
  font-size: 9.5px !important;
  line-height: 1.18 !important;
  opacity: 0.9;
}

.message-meta {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 3px !important;
  margin-top: 2px !important;
  min-height: 8px !important;
  font-size: 8px !important;
  line-height: 1 !important;
  opacity: 0.9 !important;
}

.message-time {
  display: inline-block !important;
  font-size: 8px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
}

.message-status {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  min-width: 8px !important;
  font-size: 8px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: -0.2em !important;
}

.message-edited {
  font-size: 8px !important;
  line-height: 1 !important;
}

.reply-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0 !important;
  gap: 8px;
  margin-top: 6px;
  padding: 8px 10px !important;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.reply-preview b {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
}

.reply-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.reply-preview button {
  width: 32px;
  height: 32px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-pill);
  font-size: 18px;
}

.chat-form {
  display: grid;
  grid-template-columns: auto 1fr auto;
  flex-shrink: 0 !important;
  gap: 8px;
  padding-top: 10px;
}

.chat-form input[type="text"] {
  height: 50px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-pill);
  outline: none;
}

.chat-form button,
.file-label {
  display: grid;
  place-items: center;
  min-width: 50px;
  height: 50px;
  color: #0b0d0f;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius-pill);
  font-weight: 900;
}

.file-label input {
  display: none;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ========================= */
/* ДОРАБОТКИ: ФИЛЬТРЫ, ЖАЛОБЫ, СРОЧНО */
/* ========================= */

.filter-card {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-2);
  border-radius: var(--radius-card);
}

.card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.card-title-row h3 {
  margin-bottom: 8px;
}

.tag-urgent {
  color: #0b0d0f !important;
  background: var(--accent) !important;
  border-color: transparent !important;
  box-shadow: 0 0 18px var(--accent-soft);
}

.urgent-card {
  border-color: rgba(182, 255, 59, 0.34) !important;
}

#typingIndicator {
  color: var(--accent);
  font-weight: 800;
}

.admin-message-history {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.admin-message-history p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.45;
}
