:root {
  --red: #dc2626;
  --black: #111111;
  --dark: #18181b;
  --light: #f8fafc;
  --white: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --line-strong: #dbe1ea;
  --red-soft: rgba(220, 38, 38, 0.08);
  --red-line: rgba(220, 38, 38, 0.22);
  --soft-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
  --card-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
  --hover-shadow: 0 20px 56px rgba(15, 23, 42, 0.1);
  --radius: 22px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--light);
  color: var(--text);
  font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  overflow-x: hidden;
}

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

button {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  min-height: 78px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.78);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.055);
  backdrop-filter: blur(22px);
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  width: 88px;
  height: auto;
  object-fit: contain;
  display: block;
}

.desktop-nav {
  display: flex;
  grid-column: 1 / -1;
  justify-content: start;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
  width: 100%;
}

.nav-link,
.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav-link {
  position: relative;
  border-radius: 999px;
  padding: 10px 17px;
}

.unread-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border: 2px solid var(--white);
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.nav-link.active,
.nav-link:hover {
  background: #f1f5f9;
  color: var(--black);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.is-hidden {
  display: none !important;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 10px;
}

.search-header-button,
.auth-header-button,
.profile-chip {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--black);
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.055);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.search-header-button:hover,
.auth-header-button:hover,
.profile-chip:hover {
  border-color: var(--red-line);
  background: #fffafa;
  box-shadow: 0 14px 34px rgba(220, 38, 38, 0.08);
  transform: translateY(-1px);
}

.search-header-button {
  border-radius: 999px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 800;
}

.auth-header-button {
  border-radius: 999px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 800;
}

.auth-header-button.primary {
  border-color: var(--red);
  background: var(--red);
  color: var(--white);
  box-shadow: 0 14px 30px rgba(220, 38, 38, 0.18);
}

.auth-header-button.primary:hover {
  background: #b91c1c;
  color: var(--white);
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
}

.profile-chip span,
.avatar,
.profile-photo,
.company-logo {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  font-weight: 900;
}

.profile-chip span {
  width: 36px;
  height: 36px;
  background: var(--red);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.profile-chip strong {
  display: none;
}

main {
  min-height: calc(100vh - 76px);
}

.view {
  display: none;
}

.active-view {
  display: block;
}

.hero,
.section-block,
.search-section,
.page-hero,
.messages-shell,
.profile-layout,
.company-profile,
.access-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  gap: 44px;
  align-items: center;
  padding: 72px 0 36px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.section-title span,
.page-hero span,
.company-hero span,
.access-page > div span {
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 18px;
  color: var(--black);
  font-size: clamp(32px, 8vw, 76px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  color: var(--black);
  font-size: clamp(20px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: 0;
}

h3 {
  font-weight: 800;
}

p {
  color: var(--muted);
  font-weight: 400;
  line-height: 1.72;
}

.hero-subtitle {
  max-width: 640px;
  margin-bottom: 0;
  font-size: 20px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.primary-button,
.secondary-button {
  min-height: 52px;
  border-radius: 999px;
  padding: 0 24px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.primary-button {
  border: 0;
  background: var(--red);
  color: var(--white);
  box-shadow: 0 16px 34px rgba(220, 38, 38, 0.2);
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--black);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.primary-button:hover {
  background: #b91c1c;
  box-shadow: 0 20px 44px rgba(220, 38, 38, 0.25);
}

.secondary-button:hover {
  border-color: var(--red-line);
  background: #fffafa;
}

.hero-visual {
  position: relative;
  min-height: 380px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 20% 20%, rgba(220, 38, 38, 0.14), transparent 32%),
    linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: var(--soft-shadow);
  overflow: hidden;
}

.visual-window {
  position: absolute;
  inset: 52px 24px 54px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 26px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(14px);
}

.visual-topbar {
  display: flex;
  gap: 6px;
}

.visual-topbar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d9d9d9;
}

.visual-search,
.visual-job,
.visual-progress {
  margin-top: 22px;
}

.visual-search {
  height: 44px;
  border-radius: 999px;
  background: var(--light);
}

.visual-job {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  background: var(--white);
}

.visual-job small,
.visual-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.visual-progress {
  height: 10px;
  border-radius: 999px;
  background: #ececec;
  overflow: hidden;
}

.visual-progress span {
  display: block;
  width: 82%;
  height: 100%;
  border-radius: inherit;
  background: var(--red);
}

.visual-card {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--card-shadow);
}

.candidate-card {
  top: 22px;
  left: 18px;
}

.message-card {
  right: 18px;
  bottom: 24px;
  display: grid;
  gap: 2px;
}

.avatar,
.company-logo {
  width: 44px;
  height: 44px;
}

.company-logo {
  background: var(--red);
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.18);
}

.search-section {
  padding: 22px 0 44px;
}

.job-search {
  display: grid;
  gap: 18px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 28px;
  padding: 20px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.job-search .primary-button {
  align-self: end;
}

label {
  display: grid;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  color: var(--black);
  outline: none;
  font-size: 15px;
  font-weight: 500;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

input,
select {
  min-height: 52px;
  padding: 0 16px;
}

textarea {
  resize: vertical;
  min-height: 132px;
  padding: 16px;
  line-height: 1.65;
}

input::placeholder,
textarea::placeholder {
  color: #94a3b8;
  font-size: 15px;
  font-weight: 400;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--red-line);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(220, 38, 38, 0.42);
  background: #ffffff;
  box-shadow: 0 0 0 5px rgba(220, 38, 38, 0.09);
}

.section-block {
  padding: 54px 0;
}

.section-title {
  margin-bottom: 24px;
}

.section-title.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.result-count {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.category-grid,
.companies-grid,
.jobs-grid {
  display: grid;
  gap: 18px;
}

.category-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.category-card,
.company-card,
.job-card,
.info-card,
.profile-card,
.access-card,
.conversation-panel,
.chat-panel {
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--card-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.category-card {
  display: flex;
  min-height: 96px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  padding: 20px;
  color: var(--black);
  cursor: pointer;
  font-weight: 800;
  text-align: left;
}

.category-card span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  background: var(--light);
  color: var(--red);
}

.category-card:hover,
.company-card:hover,
.job-card:hover {
  border-color: var(--red-line);
  box-shadow: var(--hover-shadow);
  transform: translateY(-3px);
}

.job-detail-shell {
  display: grid;
  gap: 20px;
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 88px;
}

.job-detail-card {
  display: grid;
  gap: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(24px, 5vw, 42px);
  background: var(--white);
  box-shadow: var(--card-shadow);
}

.job-detail-head {
  display: flex;
  align-items: center;
  gap: 18px;
}

.job-detail-head h1 {
  margin: 4px 0;
  font-size: clamp(32px, 6vw, 58px);
  line-height: 1;
}

.company-plan-row,
.job-commercial-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.company-plan-row {
  margin: 10px 0 12px;
}

.job-commercial-badges:empty {
  display: none;
}

.plan-badge,
.verified-badge,
.featured-badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1;
}

.plan-badge {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
}

.plan-badge[data-plan="pro"] {
  border-color: rgba(37, 99, 235, 0.18);
  background: #eff6ff;
  color: #1d4ed8;
}

.plan-badge[data-plan="premium"],
.featured-badge {
  border: 1px solid rgba(220, 38, 38, 0.2);
  background: var(--red-soft);
  color: var(--red);
}

.verified-badge {
  border: 1px solid rgba(5, 150, 105, 0.2);
  background: #ecfdf5;
  color: #047857;
}

.job-detail-card section {
  display: grid;
  gap: 10px;
}

.job-detail-card h2 {
  font-size: 20px;
}

.job-detail-card p {
  color: var(--muted);
  font-weight: 600;
  line-height: 1.8;
}

#detailDescription {
  white-space: pre-line;
}

.company-about-section {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  background: var(--light);
}

#detailCompanyDescription {
  margin-bottom: 0;
  white-space: pre-line;
}

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

.requirements-list li {
  position: relative;
  border-bottom: 1px solid var(--line);
  padding: 0 0 10px 22px;
  color: var(--text);
  font-weight: 600;
  line-height: 1.6;
}

.requirements-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.requirements-list li::before {
  position: absolute;
  top: 0.68em;
  left: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  content: "";
}

.companies-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.company-card {
  display: grid;
  gap: 12px;
  padding: 22px;
  color: var(--black);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.company-card p {
  margin-bottom: 0;
}

.company-card strong {
  font-size: 17px;
}

.company-card-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.company-card-empty {
  cursor: default;
}

.company-card-empty:hover {
  border-color: rgba(17, 17, 17, 0.08);
  box-shadow: var(--card-shadow);
  transform: none;
}

.jobs-grid {
  grid-template-columns: 1fr;
}

.job-card {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.job-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.job-card h3 {
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags span {
  border-radius: 999px;
  padding: 8px 11px;
  background: var(--light);
  color: var(--dark);
  font-size: 13px;
  font-weight: 700;
}

.match-block {
  display: grid;
  gap: 8px;
}

.match-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.match-label strong {
  color: var(--red);
}

.match-bar {
  height: 8px;
  border-radius: 999px;
  background: #ededed;
  overflow: hidden;
}

.match-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--red);
}

.job-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.save-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 44px;
  padding: 0 16px;
  background: var(--white);
  color: var(--black);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.save-button.active {
  border-color: rgba(229, 9, 20, 0.25);
  background: rgba(229, 9, 20, 0.08);
  color: var(--red);
}

.save-button:hover {
  border-color: var(--red-line);
  background: var(--red-soft);
  transform: translateY(-1px);
}

.page-hero {
  padding: 68px 0 28px;
}

.page-hero.compact h1 {
  max-width: 800px;
  font-size: clamp(2rem, 6vw, 4.2rem);
}

.messages-shell {
  display: grid;
  gap: 20px;
  padding-bottom: 72px;
}

.conversation-panel,
.chat-panel {
  overflow: hidden;
}

.panel-head,
.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 20px;
}

.panel-head h2 {
  font-size: 20px;
}

.panel-head span {
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--red);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 900;
}

.conversation-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  width: 100%;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
  background: var(--white);
  color: var(--black);
  cursor: pointer;
  text-align: left;
}

.conversation-list {
  display: grid;
}

.conversation-item.active,
.conversation-item:hover {
  background: #f8fafc;
}

.conversation-item small,
.conversation-item em,
.chat-head small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  font-style: normal;
}

.chat-head {
  justify-content: flex-start;
}

.chat-head #chatJobDetailButton {
  margin-left: auto;
  white-space: nowrap;
}

.candidate-preview {
  display: grid;
  gap: 12px;
  margin: 16px 20px 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: #ffffff;
}

.candidate-preview > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-photo.small {
  width: 48px;
  height: 48px;
  font-size: 0.85rem;
}

.candidate-preview p {
  color: var(--muted);
  font-weight: 600;
  line-height: 1.6;
}

.chat-body {
  display: grid;
  gap: 14px;
  min-height: 360px;
  padding: 22px;
  background: linear-gradient(180deg, #ffffff, #fafafa);
}

.bubble {
  max-width: min(86%, 520px);
  border-radius: 18px;
  padding: 14px 16px;
}

.bubble span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.bubble p {
  margin-bottom: 0;
  color: var(--black);
}

.bubble time {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: right;
}

.bubble.candidate {
  background: #f1f5f9;
}

.bubble.company {
  margin-left: auto;
  background: var(--red-soft);
}

.compose-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 16px;
  background: var(--white);
}

.profile-layout,
.company-profile,
.access-page {
  display: grid;
  gap: 24px;
  padding: 58px 0 80px;
}

.profile-card,
.info-card,
.access-card {
  padding: 26px;
}

.profile-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

.profile-overview-copy {
  min-width: 0;
}

.profile-overview-copy p {
  margin: 8px 0 6px;
  color: var(--muted);
}

.profile-overview-actions {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-overview-actions > button {
  width: auto;
}

.logout-profile-button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  background: var(--white);
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.logout-profile-button:hover {
  border-color: var(--red-line);
  background: var(--red-soft);
  color: var(--red);
}

.profile-photo {
  width: 88px;
  height: 88px;
  background: var(--red);
  font-size: 1.35rem;
  box-shadow: 0 18px 36px rgba(220, 38, 38, 0.2);
}

.profile-card h1,
.company-hero h1,
.access-page h1 {
  font-size: clamp(32px, 7vw, 64px);
}

.profile-card h1 {
  font-size: clamp(26px, 4vw, 42px);
}

.resume-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.profile-stats,
.company-stats {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.profile-stats article,
.company-stats article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--white);
  box-shadow: var(--card-shadow);
}

.profile-stats strong,
.company-stats strong {
  display: block;
  color: var(--red);
  font-size: 36px;
  letter-spacing: 0;
}

.profile-stats span,
.company-stats span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.profile-content {
  display: grid;
  gap: 18px;
}

.profile-editor {
  padding: 0;
  overflow: hidden;
}

.profile-editor summary {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 26px;
  cursor: pointer;
  list-style: none;
  transition: background 180ms ease;
}

.profile-editor summary::-webkit-details-marker {
  display: none;
}

.profile-editor summary:hover {
  background: #fffafa;
}

.profile-editor summary > span:first-child {
  display: grid;
  gap: 5px;
}

.profile-editor summary strong {
  color: var(--black);
  font-size: 20px;
  font-weight: 800;
}

.profile-editor summary small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.profile-editor-chevron {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 180ms ease, border-color 180ms ease;
}

.profile-editor[open] summary {
  border-bottom: 1px solid var(--line);
}

.profile-editor[open] .profile-editor-chevron {
  border-color: var(--red);
  transform: rotate(225deg);
}

.profile-editor-content {
  padding: 26px;
}

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

.profile-activity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.profile-activity-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.profile-activity-copy strong,
.profile-activity-copy span {
  overflow-wrap: anywhere;
}

.profile-activity-copy span {
  color: var(--muted);
  font-weight: 700;
}

.profile-activity-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.compact-button {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.82rem;
}

.empty-list {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 400;
}

.company-hero {
  display: grid;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 30px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--card-shadow);
}

.company-logo.large {
  width: 86px;
  height: 86px;
  font-size: 1.6rem;
}

.mini-job-list {
  display: grid;
  gap: 12px;
}

.candidate-inbox {
  display: grid;
  gap: 10px;
}

.mini-job-list div,
.company-job-row,
.candidate-row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}

.candidate-row-card {
  align-items: center;
  flex-wrap: wrap;
}

.candidate-row-card div {
  display: grid;
  gap: 4px;
}

.candidate-row-card small {
  color: var(--muted);
  font-weight: 700;
}

.candidate-row-card strong:last-child {
  color: var(--red);
  white-space: nowrap;
}

.application-status-actions {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.candidate-profile-button {
  flex: 0 0 auto;
}

.remove-candidate-button {
  min-height: 38px;
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: 999px;
  padding: 0 14px;
  background: #ffffff;
  color: var(--red);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.remove-candidate-button:hover {
  border-color: rgba(220, 38, 38, 0.35);
  background: var(--red-soft);
  transform: translateY(-1px);
}

.status-action {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 0 12px;
}

.status-action.active,
.status-action:hover {
  border-color: var(--red-line);
  background: var(--red-soft);
  color: var(--red);
}

.mini-job-list span {
  color: var(--muted);
  font-weight: 700;
}

.delete-job-button {
  min-height: 38px;
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: 999px;
  padding: 0 14px;
  background: #fff5f5;
  color: var(--red);
  cursor: pointer;
  font-weight: 900;
}

.delete-job-button:hover {
  border-color: rgba(220, 38, 38, 0.35);
  background: #fee2e2;
  transform: translateY(-1px);
}

.access-page {
  grid-template-columns: 1fr;
  align-items: start;
}

.access-card {
  display: grid;
  gap: 20px;
}

.field-note {
  margin-left: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.entity-form {
  display: grid;
  gap: 20px;
}

.company-selector-row {
  display: grid;
  gap: 14px;
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.secondary-button.subtle {
  min-height: 44px;
  background: #ffffff;
  color: var(--muted);
  box-shadow: none;
}

.secondary-button.subtle:hover {
  color: var(--black);
  border-color: rgba(220, 38, 38, 0.3);
  background: #fff5f5;
}

.text-danger-button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}

.text-danger-button:hover {
  color: var(--red);
}

.link-button {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--red);
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 900;
}

.link-button:hover {
  color: #991b1b;
}

.legal-note {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
  text-align: center;
}

.legal-note button {
  border: 0;
  background: transparent;
  color: var(--red);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 0;
}

.auth-status-panel {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: var(--radius);
  padding: 26px;
  background: var(--white);
  box-shadow: var(--card-shadow);
}

.auth-status-panel h2 {
  margin-bottom: 6px;
}

.auth-status-panel div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.auth-status-panel span {
  color: var(--muted);
  font-weight: 700;
}

.role-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border-radius: 999px;
  padding: 6px;
  background: var(--light);
}

.role-option {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}

.role-option.active {
  background: var(--white);
  color: var(--red);
  box-shadow: 0 8px 18px rgba(17, 17, 17, 0.08);
}

.access-card p {
  margin-bottom: 0;
}

.application-dialog {
  width: min(520px, calc(100% - 28px));
  border: 0;
  border-radius: 24px;
  padding: 0;
  background: transparent;
}

.application-dialog::backdrop {
  background: rgba(17, 17, 17, 0.46);
  backdrop-filter: blur(6px);
}

.dialog-card {
  position: relative;
  display: grid;
  gap: 20px;
  border-radius: 28px;
  padding: 28px;
  background: var(--white);
  box-shadow: 0 30px 90px rgba(17, 17, 17, 0.24);
}

.dialog-card > span {
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dialog-card h2,
.dialog-card p {
  margin-bottom: 0;
}

.candidate-profile-dialog {
  width: min(620px, calc(100% - 28px));
}

.candidate-profile-detail {
  gap: 22px;
}

.candidate-profile-heading {
  display: flex;
  align-items: center;
  gap: 16px;
}

.candidate-profile-heading .profile-photo {
  width: 70px;
  height: 70px;
  flex: 0 0 auto;
}

.candidate-profile-heading h2 {
  font-size: 26px;
}

.candidate-profile-heading p,
.candidate-profile-detail section p {
  color: var(--muted);
  line-height: 1.7;
}

.candidate-profile-context {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: var(--light);
}

.candidate-profile-context span,
.candidate-profile-context small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.candidate-profile-detail section {
  display: grid;
  gap: 8px;
}

.candidate-profile-detail section h3 {
  margin: 0;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--black);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(360px, calc(100% - 36px));
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(17, 17, 17, 0.94);
  color: var(--white);
  box-shadow: 0 18px 50px rgba(17, 17, 17, 0.22);
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.legal-pages {
  display: contents;
}

.legal-view .section-block {
  color: var(--muted);
  font-weight: 500;
  line-height: 1.8;
  padding-top: 0;
}

.legal-copy {
  display: grid;
  gap: 18px;
  max-width: 900px;
}

.legal-copy h2 {
  color: var(--black);
  font-size: 1.12rem;
  margin: 18px 0 0;
}

.legal-copy p {
  margin: 0;
}

.legal-copy ul {
  display: grid;
  gap: 8px;
  margin: -6px 0 4px;
  padding-left: 24px;
}

.legal-copy li::marker {
  color: var(--red);
}

.legal-copy a {
  color: var(--red);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.legal-copy a:hover {
  color: #991b1b;
}

.contact-panel {
  display: grid;
  gap: 18px;
  max-width: 900px;
}

.contact-option {
  display: grid;
  justify-items: start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  background: var(--white);
  box-shadow: var(--card-shadow);
}

.contact-option > span {
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-option h2,
.contact-option p {
  margin: 0;
}

.contact-option h2 {
  color: var(--black);
  font-size: 22px;
}

.contact-option p {
  color: var(--muted);
  line-height: 1.7;
}

.report-option {
  border-color: var(--red-line);
  background: #fffafa;
}

.report-email-link {
  justify-self: start;
  text-decoration: none;
}

.admin-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 80px;
}

.admin-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.admin-heading > div {
  display: grid;
  gap: 8px;
}

.admin-heading span,
.admin-section-heading span {
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-heading h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
}

.admin-heading p,
.admin-section-heading h2 {
  margin: 0;
}

.admin-heading p {
  color: var(--muted);
}

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

.admin-stats article {
  display: grid;
  gap: 10px;
  min-height: 116px;
  align-content: space-between;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  background: var(--white);
  box-shadow: var(--card-shadow);
}

.admin-stats span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.admin-stats strong {
  color: var(--black);
  font-size: 32px;
}

.admin-section {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.admin-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  cursor: pointer;
  list-style: none;
  transition: background 180ms ease;
}

.admin-section-heading::-webkit-details-marker {
  display: none;
}

.admin-section-heading:hover {
  background: #fffafa;
}

.admin-section-heading > div {
  display: grid;
  gap: 5px;
}

.admin-section-heading h2 {
  font-size: 20px;
}

.admin-section-chevron {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 180ms ease, border-color 180ms ease;
}

.admin-section[open] .admin-section-heading {
  border-bottom: 1px solid var(--line);
}

.admin-section[open] .admin-section-chevron {
  border-color: var(--red);
  transform: rotate(225deg);
}

.admin-section-content {
  display: grid;
}

.admin-search {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: #fafafa;
}

.admin-search input {
  background: var(--white);
}

.admin-search-result {
  margin: 0;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.admin-list {
  display: grid;
}

.admin-list > .empty-list {
  padding: 22px;
}

.admin-row {
  display: grid;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.admin-row:last-child {
  border-bottom: 0;
}

.admin-row-main {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.admin-row-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-row-main p,
.admin-row-main small {
  margin: 0;
  color: var(--muted);
}

.admin-row-main p {
  line-height: 1.55;
}

.admin-status {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 9px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 11px;
  font-weight: 800;
}

.admin-status.published,
.admin-status.resolved,
.admin-status.verified {
  border-color: rgba(22, 163, 74, 0.2);
  background: #f0fdf4;
  color: #15803d;
}

.admin-status.paused,
.admin-status.pending {
  border-color: rgba(220, 38, 38, 0.18);
  background: var(--red-soft);
  color: var(--red);
}

.admin-status.admin,
.admin-status.reviewing {
  border-color: rgba(37, 99, 235, 0.18);
  background: #eff6ff;
  color: #1d4ed8;
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-action {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  background: var(--white);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.admin-action:hover {
  border-color: var(--red-line);
  color: var(--black);
}

.admin-action.success {
  border-color: rgba(22, 163, 74, 0.22);
  color: #15803d;
}

.admin-action.danger {
  border-color: rgba(220, 38, 38, 0.2);
  color: var(--red);
}

.admin-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (min-width: 700px) {
  .contact-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .admin-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .admin-row-actions {
    justify-content: flex-end;
  }
}

.site-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 28px 16px 36px;
}

.site-footer button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 8px 10px;
}

.site-footer button:hover {
  color: var(--red);
}

@media (min-width: 700px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
  }

  .desktop-nav {
    grid-column: auto;
    justify-content: center;
    overflow: visible;
  }

  .profile-chip strong {
    display: inline;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
    padding-top: 72px;
  }

  .job-search {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
  }

  .job-search .primary-button {
    width: 100%;
  }

  .category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .companies-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .jobs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .messages-shell {
    grid-template-columns: minmax(260px, 0.38fr) minmax(0, 1fr);
  }

  .compose-bar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .profile-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .profile-overview-actions {
    grid-column: auto;
    justify-content: flex-end;
  }

  .profile-stats,
  .company-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .company-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .access-page {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  }

  .auth-actions {
    grid-template-columns: 1fr 1fr;
  }

}

@media (min-width: 1020px) {
  .job-search {
    grid-template-columns: minmax(180px, 1.2fr) repeat(4, minmax(125px, 0.75fr)) auto;
  }

  .jobs-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 699px) {
  body {
    padding-bottom: 72px;
  }

  .site-header {
    grid-template-columns: 1fr auto;
    min-height: 68px;
    padding: 10px 14px;
    backdrop-filter: none;
  }

  .desktop-nav {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 25;
    display: grid;
    grid-column: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    width: 100%;
    border-top: 1px solid var(--line);
    padding: 8px max(10px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
    overflow: visible;
  }

  body.is-admin .desktop-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.is-admin .nav-link {
    padding-inline: 3px;
    font-size: 11px;
  }

  .nav-link {
    min-width: 0;
    padding: 10px 6px;
    text-align: center;
  }

  .brand img {
    width: 64px;
    height: auto;
  }

  .header-actions {
    gap: 6px;
  }

  .profile-chip {
    padding-right: 4px;
  }

  .profile-chip strong,
  .search-header-button {
    display: none;
  }

  .auth-header-button {
    min-height: 38px;
    padding: 0 12px;
    font-size: 12px;
  }

  h1 {
    letter-spacing: 0;
  }

  .hero {
    gap: 28px;
    padding-top: 38px;
  }

  .hero-subtitle {
    font-size: 17px;
  }

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

  .hero-actions .primary-button,
  .hero-actions .secondary-button {
    width: 100%;
  }

  .search-section {
    padding-bottom: 28px;
  }

  .job-search {
    gap: 14px;
    border-radius: 20px;
    padding: 16px;
  }

  .section-block {
    padding: 38px 0;
  }

  .section-title.split {
    align-items: flex-start;
    flex-direction: column;
  }

  .companies-grid {
    grid-template-columns: 1fr;
  }

  .company-card {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .company-card p {
    grid-column: 2;
  }

  .job-card,
  .info-card,
  .profile-card,
  .access-card {
    border-radius: 18px;
    padding: 20px;
  }

  .profile-overview-actions {
    width: 100%;
  }

  .profile-overview-actions > button {
    flex: 1 1 100%;
    width: 100%;
  }

  .profile-editor summary {
    min-height: 80px;
    padding: 18px 20px;
  }

  .profile-editor-content {
    padding: 20px;
  }

  .profile-activity-row {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-activity-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-activity-actions button {
    width: 100%;
  }

  .job-detail-head,
  .chat-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .chat-head #chatJobDetailButton {
    width: 100%;
    margin-left: 0;
  }

  .company-job-row {
    align-items: stretch;
    flex-direction: column;
  }

  .company-job-row button {
    width: 100%;
  }

  .job-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .job-actions .primary-button,
  .job-actions .save-button {
    width: 100%;
  }

  .hero,
  .section-block,
  .search-section,
  .page-hero,
  .messages-shell,
  .profile-layout,
  .company-profile,
  .access-page {
    width: min(100% - 22px, 1160px);
  }

  .hero-visual {
    min-height: 280px;
  }

  .candidate-card {
    max-width: calc(100% - 36px);
  }
}

@media (max-width: 430px) {
  .auth-header-button {
    padding: 0 10px;
  }

  .header-actions {
    gap: 4px;
  }

  .hero-visual {
    min-height: 250px;
  }

  .visual-window {
    inset: 42px 14px 46px;
    padding: 14px;
  }

  .message-card {
    right: 10px;
    bottom: 12px;
  }
}

@media (max-width: 699px) {
  .admin-shell {
    width: min(100% - 22px, 1180px);
    padding-top: 34px;
  }

  .admin-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-heading > button {
    width: 100%;
  }

  .admin-search {
    padding: 16px;
  }

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

  .admin-action {
    width: 100%;
  }
}
