:root {
  --bg: #07111f;
  --bg-soft: #101b2c;
  --panel: rgba(15, 28, 47, 0.86);
  --panel-strong: rgba(18, 33, 56, 0.98);
  --border: rgba(177, 204, 243, 0.14);
  --text: #ecf4ff;
  --muted: #9eb3d3;
  --accent: #ff8b5f;
  --accent-strong: #ffc370;
  --teal: #6ae0c4;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --nav-height: 86px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 139, 95, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(106, 224, 196, 0.16), transparent 24%),
    linear-gradient(180deg, #07101c 0%, #0a1526 100%);
  color: var(--text);
}

body {
  padding: 18px 14px calc(var(--nav-height) + 18px);
}

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

.app-shell {
  width: min(960px, 100%);
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.topbar__eyebrow,
.stat-card__label,
.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.topbar h1,
.hero-card h2,
.panel h2,
.match-card h3,
.conversation__header h3,
.profile-card h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.04em;
}

.topbar h1 {
  font-size: clamp(2rem, 6vw, 3rem);
}

.topbar__subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

.hero-card,
.panel,
.drawer .panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  padding: 22px;
  margin-bottom: 18px;
  background:
    linear-gradient(135deg, rgba(255, 139, 95, 0.14), transparent 42%),
    linear-gradient(220deg, rgba(106, 224, 196, 0.12), transparent 48%),
    var(--panel-strong);
}

.hero-card h2 {
  margin-top: 12px;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
}

.hero-card p {
  color: var(--muted);
}

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

.stat-card,
.profile-card,
.candidate-card,
.match-card,
.thread-card,
.message-bubble,
.empty-state,
.status-banner {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
}

.stat-card {
  padding: 18px;
}

.stat-card strong {
  display: block;
  margin: 10px 0 6px;
  font-size: 1.8rem;
}

.panel {
  padding: 20px;
}

.panel__title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chip--accent {
  color: #fff3ea;
  background: rgba(255, 139, 95, 0.16);
  border-color: rgba(255, 139, 95, 0.22);
}

button,
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

button:hover,
.primary-link:hover {
  transform: translateY(-1px);
}

.primary-button,
.primary-link {
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #111;
  font-weight: 800;
}

.secondary-button {
  border: 1px solid rgba(106, 224, 196, 0.28);
  background: rgba(106, 224, 196, 0.12);
  color: #dffcf6;
}

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

.status-banner,
.empty-state {
  padding: 18px;
  color: var(--muted);
}

.tab-shell {
  display: grid;
  gap: 18px;
}

.drawer {
  margin-bottom: 18px;
}

.hidden {
  display: none !important;
}

.profile-card {
  padding: 18px;
}

.profile-card__top {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.profile-card__avatar,
.match-card__avatar,
.thread-card__avatar,
.mini-avatar {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.mini-avatar {
  width: 54px;
  height: 54px;
  border-radius: 16px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

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

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

.profile-form label:nth-child(5),
.profile-form label:nth-child(9),
.profile-form button {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.candidate-card {
  overflow: hidden;
}

.candidate-card__photo {
  width: 100%;
  aspect-ratio: 16 / 12;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.candidate-card__body {
  padding: 18px;
}

.candidate-card__headline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.candidate-card__meta,
.match-card__meta,
.conversation__header p,
.thread-card__message {
  color: var(--muted);
}

.candidate-card__privacy {
  color: #ffd7c9;
}

.action-row {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.action-row button {
  flex: 1;
}

.match-list,
.thread-list,
.message-list {
  display: grid;
  gap: 12px;
}

.match-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  padding: 16px;
}

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

.match-card__top,
.thread-card__top,
.conversation__identity {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.match-card__badge,
.thread-card__badge {
  min-width: 36px;
  justify-content: center;
}

.thread-card {
  width: 100%;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  padding: 14px;
  text-align: left;
  border: 1px solid var(--border);
  color: var(--text);
}

.thread-card.is-active {
  border-color: rgba(255, 139, 95, 0.36);
  background: rgba(255, 139, 95, 0.1);
}

.thread-card__avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
}

.thread-card__message,
.match-card__bio,
.message-bubble__time,
.status-banner,
.hero-card p,
.stat-card p {
  margin: 0;
}

.panel--chat {
  padding-bottom: 14px;
}

.chat-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
}

.conversation__panel {
  display: grid;
  gap: 14px;
}

.conversation__header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.message-list {
  min-height: 320px;
  max-height: 56vh;
  overflow-y: auto;
  padding-right: 6px;
}

.message-bubble {
  max-width: 78%;
  padding: 12px 14px;
}

.message-bubble--mine {
  margin-left: auto;
  background: linear-gradient(135deg, rgba(255, 139, 95, 0.24), rgba(255, 195, 112, 0.14));
}

.message-bubble--their {
  background: rgba(255, 255, 255, 0.05);
}

.message-bubble__body {
  margin: 0 0 8px;
  color: var(--text);
}

.message-bubble__time {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 24px));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(9, 17, 31, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.bottom-nav__item {
  min-height: 56px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.bottom-nav__item.is-active {
  background: linear-gradient(135deg, rgba(255, 139, 95, 0.18), rgba(106, 224, 196, 0.12));
  color: var(--text);
}

@media (max-width: 900px) {
  .hero-card,
  .chat-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    padding-inline: 10px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-card__stats,
  .profile-form,
  .chat-form {
    grid-template-columns: 1fr;
  }

  .match-card {
    grid-template-columns: 1fr;
  }

  .action-row {
    flex-direction: column;
  }

  .bottom-nav__item {
    min-height: 52px;
  }
}
