:root {
  --ink: #111015;
  --cream: #f3efe8;
  --sand: #e4dbc9;
  --ocean: #0f4c5c;
  --ember: #c05640;
  --mist: #cbd4db;
  --midnight: #0b1320;
  --accent: #d9a441;
  --line: rgba(17, 16, 21, 0.18);
  --shadow: 0 20px 50px rgba(17, 16, 21, 0.18);
  --radius: 20px;
  --side-nav-width: 190px;
  --side-nav-gap: 72px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: "Garamond", "Palatino Linotype", "Book Antiqua", serif;
  color: var(--ink);
  background: radial-gradient(circle at 15% 10%, #f7f2e8 0%, #efe7d7 35%, #e7e1d0 100%);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

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

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(243, 239, 232, 0.85);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 16px;
}

.brand {
  font-family: "Copperplate", "Times New Roman", serif;
  letter-spacing: 3px;
  font-size: 20px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 15px;
}

.nav-link-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.nav-badge-link {
  display: inline-block;
  min-width: 18px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--ember);
  color: var(--cream);
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-badge-link:hover {
  border-color: var(--ink);
}

.nav-badge-link.zero {
  background: rgba(17, 16, 21, 0.12);
  color: var(--ink);
  border-color: rgba(17, 16, 21, 0.2);
}

.nav-badge-icon {
  font-size: 12px;
  line-height: 1;
}

.nav-badge-count {
  font-size: 11px;
  line-height: 1;
}

.nav-badge-link.pulse {
  animation: navPulse 1.6s ease-in-out infinite;
  box-shadow: 0 0 0 rgba(192, 86, 64, 0.4);
}

@keyframes navPulse {
  0% { box-shadow: 0 0 0 0 rgba(192, 86, 64, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(192, 86, 64, 0); }
  100% { box-shadow: 0 0 0 0 rgba(192, 86, 64, 0); }
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  border-color: var(--ink);
}

.hero {
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(192, 86, 64, 0.28), rgba(15, 76, 92, 0.1));
  right: -120px;
  top: -80px;
  filter: blur(2px);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.05;
  margin-bottom: 20px;
}

.hero p {
  font-size: 18px;
  max-width: 520px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  font-size: 15px;
  background: var(--cream);
  transition: 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(17, 16, 21, 0.2);
}

.button.primary {
  background: var(--ink);
  color: var(--cream);
}

.section {
  padding: 60px 0;
}

.section-title {
  font-size: 26px;
  margin-bottom: 18px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.card {
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.ribbon {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ocean);
  color: var(--cream);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.panel {
  padding: 22px;
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(15, 76, 92, 0.12), rgba(217, 164, 65, 0.15));
  border: 1px solid rgba(15, 76, 92, 0.18);
}

.panel ul {
  margin: 0;
  padding-left: 18px;
}

.footer {
  margin-top: auto;
  padding: 30px 0 40px;
  border-top: 1px solid var(--line);
  background: rgba(243, 239, 232, 0.75);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.footer small {
  color: rgba(17, 16, 21, 0.7);
}

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

.badge {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
}

.city-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.city-pill.type {
  background: rgba(15, 76, 92, 0.12);
  border-color: rgba(15, 76, 92, 0.35);
}

.city-pill.economy {
  background: rgba(217, 164, 65, 0.18);
  border-color: rgba(217, 164, 65, 0.4);
}

.city-pill.culture {
  background: rgba(192, 86, 64, 0.16);
  border-color: rgba(192, 86, 64, 0.35);
}

.city-bars {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.city-bar {
  display: grid;
  grid-template-columns: 90px 1fr 36px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.city-bar .label {
  font-weight: 700;
}

.city-bar .track {
  height: 10px;
  border-radius: 999px;
  background: rgba(17, 16, 21, 0.08);
  border: 1px solid var(--line);
  overflow: hidden;
}

.city-bar .track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0f4c5c, #d9a441);
}

.city-bar .value {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.badge.selected {
  background: rgba(17, 16, 21, 0.12);
  border-color: var(--ink);
}

.badge.edu-anaokulu { background: rgba(217, 164, 65, 0.2); border-color: rgba(217, 164, 65, 0.45); }
.badge.edu-ilkokul { background: rgba(15, 76, 92, 0.15); border-color: rgba(15, 76, 92, 0.35); }
.badge.edu-ortaokul { background: rgba(192, 86, 64, 0.18); border-color: rgba(192, 86, 64, 0.35); }
.badge.edu-lise { background: rgba(17, 16, 21, 0.12); border-color: rgba(17, 16, 21, 0.35); }
.badge.edu-universite { background: rgba(74, 110, 78, 0.18); border-color: rgba(74, 110, 78, 0.35); }
.badge.edu-mezun { background: rgba(90, 90, 90, 0.18); border-color: rgba(90, 90, 90, 0.35); }

.member-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  background: rgba(15, 76, 92, 0.15);
  border: 1px solid var(--line);
}

.avatar.mother { background: rgba(192, 86, 64, 0.2); }
.avatar.father { background: rgba(15, 76, 92, 0.2); }
.avatar.daughter { background: rgba(217, 164, 65, 0.2); }
.avatar.son { background: rgba(74, 110, 78, 0.2); }

.profile-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(15, 76, 92, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-weight: bold;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notif-item {
  padding: 8px 0 8px 12px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item.unread {
  background: rgba(15, 76, 92, 0.08);
  border-radius: 8px;
  padding: 8px;
}

.notif-item.type-message {
  background: rgba(15, 76, 92, 0.06);
  border-radius: 8px;
  padding: 8px;
}

.notif-item.type-friend {
  background: rgba(217, 164, 65, 0.12);
  border-radius: 8px;
  padding: 8px;
}

.notif-item.type-general {
  background: rgba(17, 16, 21, 0.06);
  border-radius: 8px;
  padding: 8px;
}

.notif-item.unread.type-message { background: rgba(15, 76, 92, 0.12); }
.notif-item.unread.type-friend { background: rgba(217, 164, 65, 0.18); }
.notif-item.unread.type-general { background: rgba(17, 16, 21, 0.12); }

.notif-item.type-message::before,
.notif-item.type-friend::before,
.notif-item.type-general::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 999px;
  background: var(--line);
}

.notif-item.type-message::before { background: rgba(15, 76, 92, 0.8); }
.notif-item.type-friend::before { background: rgba(217, 164, 65, 0.9); }
.notif-item.type-general::before { background: rgba(17, 16, 21, 0.7); }

.notif-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0;
}

.notif-tag {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.6);
}

.notif-tag.type-general { background: rgba(17, 16, 21, 0.08); }
.notif-tag.type-message { background: rgba(15, 76, 92, 0.12); }
.notif-tag.type-friend { background: rgba(217, 164, 65, 0.2); }

.notif-tag.state-unread { border-color: rgba(15, 76, 92, 0.6); }
.notif-tag.state-read { border-color: rgba(74, 110, 78, 0.5); }

.notif-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  margin-right: 6px;
  font-size: 13px;
  line-height: 1;
}

.notif-icon.type-message { color: var(--ocean); }
.notif-icon.type-friend { color: var(--accent); }
.notif-icon.type-general { color: var(--ink); }

.bar-row {
  margin-bottom: 12px;
}

.bar {
  height: 12px;
  background: rgba(17, 16, 21, 0.08);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0f4c5c, #d9a441);
  transition: width 0.4s ease;
}

.bar-row:hover .bar > span {
  filter: brightness(1.1);
}

.timeline {
  border-left: 2px solid var(--line);
  padding-left: 18px;
  display: grid;
  gap: 16px;
}

.timeline-item {
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
}

.quote {
  border-left: 4px solid var(--ember);
  padding-left: 16px;
  font-style: italic;
}

.search-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  margin-bottom: 14px;
}

.profession-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.profession-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: 0.2s ease;
}

.profession-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(17, 16, 21, 0.16);
}

.profession-card input {
  display: none;
}

.profession-card.selected {
  border-color: var(--ink);
  background: rgba(217, 164, 65, 0.2);
}

.progress {
  width: 100%;
  height: 12px;
  background: rgba(17, 16, 21, 0.08);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, rgba(192, 86, 64, 0.9), rgba(217, 164, 65, 0.9));
  width: 0%;
}

.progress.edu-anaokulu > span { background: linear-gradient(90deg, #d9a441, #f2c35b); }
.progress.edu-ilkokul > span { background: linear-gradient(90deg, #0f4c5c, #4d7c89); }
.progress.edu-ortaokul > span { background: linear-gradient(90deg, #c05640, #e08b75); }
.progress.edu-lise > span { background: linear-gradient(90deg, #111015, #4a4a4a); }
.progress.edu-universite > span { background: linear-gradient(90deg, #4a6e4e, #6c8f70); }
.progress.edu-mezun > span { background: linear-gradient(90deg, #5a5a5a, #8c8c8c); }

.progress.change > span { background: linear-gradient(90deg, #0f4c5c, #d9a441); }

.progress.approve > span { background: linear-gradient(90deg, #4a6e4e, #7aa07f); }
.progress.reject > span { background: linear-gradient(90deg, #c05640, #e08b75); }

.progress.split {
  display: flex;
  gap: 0;
}

.progress.split .seg {
  height: 100%;
  display: block;
}

.progress.split .seg.approve {
  background: linear-gradient(90deg, #4a6e4e, #7aa07f);
}

.progress.split .seg.reject {
  background: linear-gradient(90deg, #c05640, #e08b75);
}

.notice {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.notice .icon {
  font-weight: bold;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 76, 92, 0.15);
  border: 1px solid var(--line);
}

.notice.success {
  background: rgba(74, 110, 78, 0.12);
  border-color: rgba(74, 110, 78, 0.35);
}

.notice.success .icon {
  background: rgba(74, 110, 78, 0.25);
}

.timeline-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.timeline-item {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
  text-align: center;
  font-size: 13px;
}

.timeline-item.active {
  border-color: rgba(15, 76, 92, 0.6);
  background: rgba(15, 76, 92, 0.12);
}

.timeline-item.done {
  border-color: rgba(74, 110, 78, 0.6);
  background: rgba(74, 110, 78, 0.12);
}

.flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.flow-step {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.flow-step strong {
  display: block;
  margin-bottom: 6px;
}

.flow-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 76, 92, 0.15);
  border: 1px solid var(--line);
  margin-bottom: 8px;
  font-weight: bold;
}

.faq-item {
  cursor: pointer;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-answer {
  display: none;
  margin-top: 8px;
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-toggle {
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
}

.flow-step {
  animation: floatIn 0.6s ease both;
}

.flow-step:nth-child(1) { animation-delay: 0.05s; }
.flow-step:nth-child(2) { animation-delay: 0.12s; }
.flow-step:nth-child(3) { animation-delay: 0.19s; }
.flow-step:nth-child(4) { animation-delay: 0.26s; }

.friend-item {
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.friend-item.selected {
  border-color: var(--ink);
  background: rgba(217, 164, 65, 0.18);
}

.friend-item.online::before {
  content: "●";
  color: #2e9a4f;
  font-size: 12px;
  margin-right: 6px;
  display: inline-block;
}

.friend-name .match {
  background: rgba(15, 76, 92, 0.2);
  border-radius: 6px;
  padding: 0 4px;
}

.friend-preview {
  color: rgba(17, 16, 21, 0.75);
}

.friend-time {
  color: rgba(17, 16, 21, 0.6);
  margin-left: auto;
}

.chat-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 12px;
  opacity: 0.8;
}

.chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(15, 76, 92, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-weight: bold;
  font-size: 12px;
}

.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.presence-item {
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.6);
}

.presence-item.online {
  border-color: rgba(74, 110, 78, 0.6);
  background: rgba(74, 110, 78, 0.12);
}

.presence-item.online::before {
  content: "●";
  color: #2e9a4f;
  font-size: 12px;
  margin-right: 6px;
  display: inline-block;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 16, 21, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  width: min(560px, 92%);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 16px;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.modal-close {
  border: 1px solid var(--line);
  background: transparent;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
}

.chat-minimized {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
  z-index: 1000;
}

.chat-min-actions {
  display: flex;
  gap: 6px;
}

.chat-min-actions button {
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--cream);
  cursor: pointer;
}

.chat-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.chat-link-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chat-link {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chat-link-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(15, 76, 92, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-weight: bold;
  font-size: 11px;
}

.chat-link-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-link-avatar.online {
  box-shadow: 0 0 0 2px #2e9a4f;
}


.chat-link-name {
  line-height: 1;
}

.chat-link-badge {
  color: var(--ember);
  margin-left: 6px;
}

.chat-link-close {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  color: #8d2f2f;
  font-weight: bold;
}

@keyframes floatIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    padding-top: 60px;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

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

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


  .home-hero-content {
    text-align: center;
  }
  .home-hero-actions {
    justify-content: center;
  }
  .home-hero-badges {
    justify-content: center;
  }
}


/* Side nav for logged-in users */
.side-nav ~ main,
body.has-side-nav main {
  width: calc(100% - (var(--side-nav-width) + var(--side-nav-gap)));
  margin-left: calc(var(--side-nav-width) + var(--side-nav-gap));
  padding-left: 0;
  position: relative;
  z-index: 1;
}

.side-nav ~ main .section > .container,
body.has-side-nav main .section > .container {
  width: min(1080px, calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
  transform: translateX(22px);
}

.side-nav {
  position: fixed;
  left: 0;
  top: 96px;
  width: var(--side-nav-width);
  padding: 24px 12px 16px;
  background: rgba(243, 239, 232, 0.92);
  border-right: 1px solid var(--line);
  height: calc(100vh - 96px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9;
  font-size: 14px;
  overflow-y: auto;
}

.side-nav-title {
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-size: 12px;
  color: rgba(17, 16, 21, 0.6);
  margin-bottom: 6px;
}

.side-nav-title-spaced {
  margin-top: 10px;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
}

.side-nav a:hover {
  border-color: var(--ink);
}

.side-nav-group {
  width: 100%;
  justify-content: space-between;
  display: flex;
  align-items: center;
  gap: 6px;
}

.side-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--ember);
  color: var(--cream);
  font-size: 11px;
  border: 1px solid transparent;
}

.side-badge.zero {
  background: rgba(17, 16, 21, 0.12);
  color: var(--ink);
  border-color: rgba(17, 16, 21, 0.2);
}

.side-badge.pulse {
  animation: navPulse 1.6s ease-in-out infinite;
  box-shadow: 0 0 0 rgba(192, 86, 64, 0.4);
}

.side-badge-icon {
  font-size: 12px;
  line-height: 1;
}

.side-badge-count {
  font-size: 11px;
  line-height: 1;
}

@media (max-width: 900px) {
  .side-nav ~ main,
  body.has-side-nav main {
    width: 100%;
    margin-left: 0;
    padding-left: 0;
  }
  .side-nav ~ main .section > .container,
  body.has-side-nav main .section > .container {
    transform: none;
  }
  .side-nav {
    position: static;
    width: auto;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
}


.side-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 14px;
}

.side-nav a.active {
  background: linear-gradient(90deg, rgba(26, 75, 141, 0.16), rgba(255, 255, 255, 0));
  border-color: var(--ink);
  font-weight: 700;
  border-left: 4px solid var(--ink);
  padding-left: 6px;
}

.side-nav a.active .side-icon {
  color: #1a4b8d;
}

/* Admin layout (left navigation + right content) */
.admin-layout {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 100vh;
}

.admin-side-nav {
  position: sticky;
  top: 0;
  align-self: flex-start;
  width: 280px;
  min-width: 280px;
  max-height: 100vh;
  overflow-y: auto;
  padding: 22px 16px 18px;
  border-right: 1px solid var(--line);
  background: rgba(243, 239, 232, 0.9);
}

.admin-side-brand {
  font-family: "Copperplate", "Times New Roman", serif;
  font-size: 30px;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.admin-side-meta {
  font-size: 13px;
  color: rgba(17, 16, 21, 0.7);
  margin-bottom: 14px;
}

.admin-side-section {
  margin-bottom: 14px;
}

.admin-side-title {
  font-size: 12px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: rgba(17, 16, 21, 0.62);
  margin-bottom: 6px;
  font-weight: 700;
}

.admin-side-link {
  display: block;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 15px;
  margin-bottom: 4px;
}

.admin-side-link:hover {
  border-color: var(--ink);
}

.admin-side-link.active {
  border-color: var(--ink);
  font-weight: 700;
  background: linear-gradient(90deg, rgba(26, 75, 141, 0.16), rgba(255, 255, 255, 0));
}

.admin-main {
  flex: 1;
  min-width: 0;
}

.admin-main .section {
  padding-top: 28px;
}

.admin-content-container {
  width: min(1200px, 94%);
  margin-left: 0;
  margin-right: auto;
  padding-left: 16px;
}

.admin-filter-card {
  margin-bottom: 16px;
}

.admin-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.admin-filter-grid label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: rgba(17, 16, 21, 0.8);
}

.admin-input {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.75);
}

.admin-filter-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-list-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 1020px;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
}

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

.admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: rgba(243, 239, 232, 0.96);
}

.admin-table tbody tr:hover {
  background: rgba(15, 76, 92, 0.05);
}

.admin-sub {
  font-size: 12px;
  color: rgba(17, 16, 21, 0.68);
  word-break: break-word;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 4px 4px 0;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(17, 16, 21, 0.2);
  background: rgba(17, 16, 21, 0.07);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.35px;
}

.admin-badge.is-ok {
  background: rgba(74, 110, 78, 0.2);
  border-color: rgba(74, 110, 78, 0.4);
}

.admin-badge.is-danger {
  background: rgba(192, 86, 64, 0.2);
  border-color: rgba(192, 86, 64, 0.4);
}

.admin-badge.is-soft {
  background: rgba(15, 76, 92, 0.16);
  border-color: rgba(15, 76, 92, 0.35);
}

.admin-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-pagination {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}


.admin-stack-form {
  display: grid;
  gap: 10px;
  min-width: 520px;
}

.admin-stack-form .admin-filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.admin-page-pill {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

@media (max-width: 980px) {
  .admin-layout {
    flex-direction: column;
  }

  .admin-side-nav {
    position: static;
    width: 100%;
    min-width: 0;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .admin-content-container {
    width: min(1100px, 94%);
    margin: 0 auto;
    padding-left: 0;
  }

  .admin-list-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
}

.life-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
  background:
    radial-gradient(circle at top left, rgba(201, 146, 61, 0.14), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 242, 230, 0.92));
}

.life-hero-main h3 {
  margin: 0 0 6px;
}

.life-kicker {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(17, 16, 21, 0.62);
  margin-bottom: 8px;
}

.life-subline {
  margin: 0;
  color: rgba(17, 16, 21, 0.72);
}

.life-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.life-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.life-hero-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
}

.life-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.life-stat-card {
  min-height: 132px;
}

.life-stat-label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(17, 16, 21, 0.58);
  margin-bottom: 10px;
}

.life-stat-value {
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.1;
  font-weight: 600;
  margin-bottom: 10px;
}

.life-stat-note {
  color: rgba(17, 16, 21, 0.66);
  font-size: 13px;
}

.life-dashboard-grid {
  align-items: start;
  margin-bottom: 16px;
}

.life-meter {
  margin-bottom: 12px;
}

.life-meter .meter-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a85f3b, #d4a13c);
}

.life-meter.good .meter-fill {
  background: linear-gradient(90deg, #2f7d56, #57b26f);
}

.life-meter.mid .meter-fill {
  background: linear-gradient(90deg, #b97a1e, #d9b14a);
}

.life-meter.risk .meter-fill {
  background: linear-gradient(90deg, #9d3c3c, #d36454);
}

.life-next-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  color: rgba(17, 16, 21, 0.8);
}

.dashboard-split {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  gap: 18px;
}

.life-module-card {
  min-height: 150px;
}

.compact-news-list .news-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(17, 16, 21, 0.08);
}

.compact-news-list .news-item:last-child {
  border-bottom: 0;
}

.profile-summary-grid {
  margin-top: 0;
}

.profile-hero-card {
  margin-bottom: 14px;
}

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

.stat-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.75);
}

.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(17, 16, 21, 0.65);
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
}

.meter {
  margin-top: 8px;
}

.meter-track {
  height: 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(17, 16, 21, 0.08);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  display: block;
  background: linear-gradient(90deg, #0f4c5c, #d9a441);
}

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

.news-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.module-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.74);
}

.module-card h3 {
  margin: 0 0 6px;
}

.scene-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(217, 164, 65, 0.2), transparent 32%),
    linear-gradient(135deg, rgba(15, 76, 92, 0.14), rgba(255, 255, 255, 0.78));
}

.scene-hero::after {
  content: "";
  position: absolute;
  inset: auto -40px -40px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(192, 86, 64, 0.18), transparent 70%);
  pointer-events: none;
}

.scene-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.62)),
    linear-gradient(135deg, rgba(15, 76, 92, 0.08), rgba(217, 164, 65, 0.08));
}

.spotlight-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.68)),
    radial-gradient(circle at top right, rgba(217, 164, 65, 0.14), transparent 45%);
}

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

.panel-kicker {
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(17, 16, 21, 0.54);
}

.story-card {
  position: relative;
  overflow: hidden;
}

.story-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, rgba(15, 76, 92, 0.8), rgba(217, 164, 65, 0.9));
}

.story-card-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.story-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 76, 92, 0.1);
  border: 1px solid rgba(15, 76, 92, 0.22);
  color: rgba(17, 16, 21, 0.72);
  font-size: 11px;
  letter-spacing: 0.9px;
  text-transform: uppercase;
}

.tone-panel .life-meter + .life-meter {
  margin-top: 14px;
}

.decision-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.68)),
    radial-gradient(circle at top right, rgba(192, 86, 64, 0.14), transparent 50%);
}

.dashboard-hero .life-hero-main h3,
.family-hero .life-hero-main h3,
.chat-hero .life-hero-main h3 {
  max-width: 14ch;
}

.news-panel .news-item strong {
  display: block;
  margin-bottom: 4px;
}

.profile-page .profile-intro-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.68)),
    radial-gradient(circle at top right, rgba(15, 76, 92, 0.12), transparent 48%);
  padding: 22px;
}

.profile-page .profile-intro-card > p {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(17, 16, 21, 0.08);
}

.profile-page .scene-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.66)),
    radial-gradient(circle at top left, rgba(217, 164, 65, 0.11), transparent 44%);
  padding: 22px;
}

.profile-page .panel {
  box-shadow: 0 16px 42px rgba(17, 16, 21, 0.12);
  border-radius: 22px;
}

.profile-page .panel > p:first-child,
.profile-page .panel > .card > strong:first-child {
  letter-spacing: 0.3px;
}

.profile-page .panel > p:first-child {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 17px;
}

.profile-page .card + .card,
.profile-page .panel .card + .card {
  margin-top: 12px;
}

.profile-page table {
  background: rgba(255, 255, 255, 0.48);
  border-radius: 14px;
  overflow: hidden;
  table-layout: auto;
}

.profile-page td,
.profile-page th {
  font-size: 14px;
  vertical-align: top;
}

.profile-page .badge-list {
  gap: 10px;
}

.profile-page .city-bars {
  margin-top: 14px;
}

.profile-page .module-detail-row {
  align-items: flex-start;
}

.profile-page .module-detail-row strong {
  max-width: 52%;
}

.chat-hero {
  margin-bottom: 14px;
}

.chat-dashboard-split {
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
  gap: 20px;
}

@media (max-width: 980px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .life-stat-grid,
  .dashboard-split {
    grid-template-columns: 1fr;
  }

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

  .life-hero-side {
    min-width: 0;
  }

  .profile-page .panel,
  .profile-page .profile-intro-card,
  .profile-page .scene-panel {
    padding: 18px;
  }

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

.map-layer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.city-map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.city-map-canvas-wrap h3 {
  margin-top: 0;
}

.city-map-canvas {
  position: relative;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 76, 92, 0.08), rgba(217, 164, 65, 0.08));
}

.city-map-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.city-map-label {
  position: absolute;
  transform: translate(-50%, -50%);
  min-width: 64px;
  max-width: 120px;
  padding: 3px 6px;
  border-radius: 8px;
  border: 1px solid rgba(17, 16, 21, 0.18);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 4px 10px rgba(17, 16, 21, 0.12);
  line-height: 1.1;
  text-align: center;
}

.city-map-label strong {
  display: block;
  font-size: 11px;
  margin: 0;
}

.city-map-label.above::after,
.city-map-label.below::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
}

.city-map-label.above::after {
  bottom: -5px;
  border-top: 5px solid rgba(255, 255, 255, 0.9);
}

.city-map-label.below::after {
  top: -5px;
  border-bottom: 5px solid rgba(255, 255, 255, 0.9);
}

.city-map-badges {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.city-map-node-badges {
  position: absolute;
  transform: translate(10px, -50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.city-node-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(17, 16, 21, 0.2);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(17, 16, 21, 0.12);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.city-node-badge.score::before {
  content: "Sk";
  margin-right: 3px;
  font-size: 9px;
  color: rgba(15, 76, 92, 0.9);
}

.city-node-badge.pop::before {
  content: "Nu";
  margin-right: 3px;
  font-size: 9px;
  color: rgba(192, 86, 64, 0.9);
}

.map-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.map-legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  font-size: 12px;
}

.city-map-svg {
  width: 100%;
  height: auto;
  min-height: 360px;
  display: block;
}

.city-map-gridlines line {
  stroke: rgba(17, 16, 21, 0.12);
  stroke-width: 0.2;
}

.city-node {
  cursor: pointer;
}

.city-node-core,
.city-node-ring {
  opacity: 0;
  transform-origin: center;
  animation: nodeIn 0.45s ease-out forwards;
  animation-delay: var(--node-delay, 0s);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.city-node-ring {
  opacity: 0.25;
  stroke: rgba(17, 16, 21, 0.3);
  stroke-width: 0.35;
}

.city-node-core {
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 0.35;
}

.city-node:hover .city-node-core {
  transform: scale(1.1);
  filter: brightness(1.08);
}

.city-node:hover .city-node-ring {
  transform: scale(1.2);
}

.city-node.is-alert .city-node-ring {
  animation: nodeIn 0.45s ease-out forwards, nodePulse 2s ease-in-out infinite;
  animation-delay: var(--node-delay, 0s), calc(var(--node-delay, 0s) + 0.45s);
}

.city-map-tile {
  border: 1px solid var(--line);
  border-left-width: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  padding: 12px;
}

.city-map-tile.is-hovered {
  box-shadow: 0 0 0 2px rgba(15, 76, 92, 0.35), 0 8px 18px rgba(17, 16, 21, 0.16);
}

.city-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.city-map-head h3 {
  margin: 0;
  font-size: 18px;
}

.city-map-score {
  color: #fff;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
}

.city-map-meta {
  margin: 6px 0 10px;
  color: rgba(17, 16, 21, 0.72);
  font-size: 13px;
}

.city-map-density {
  margin-bottom: 10px;
  font-size: 13px;
}

.city-map-pop {
  margin-top: 4px;
  height: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(17, 16, 21, 0.08);
}

.city-map-pop span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0f4c5c, #d9a441);
}

.city-map-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
  font-size: 12px;
}

@keyframes nodeIn {
  from { opacity: 0; transform: scale(0.2); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes nodePulse {
  0% { opacity: 0.22; }
  50% { opacity: 0.45; transform: scale(1.12); }
  100% { opacity: 0.22; }
}

@media (max-width: 980px) {
  .city-map-node-badges {
    transform: translate(6px, -50%);
  }
  .city-node-badge.pop {
    display: none;
  }
}
.module-hero {
  margin-bottom: 16px;
}

.module-stat-grid {
  margin-bottom: 16px;
}

.module-split {
  align-items: start;
}

.module-detail-card {
  margin-bottom: 14px;
}

.module-detail-list {
  display: grid;
  gap: 10px;
}

.module-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(17, 16, 21, 0.08);
}

.module-detail-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.module-detail-row span {
  color: rgba(17, 16, 21, 0.64);
}

.module-detail-row strong {
  text-align: right;
}

.module-bullet-list {
  display: grid;
  gap: 10px;
}

.module-bullet-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(17, 16, 21, 0.08);
}

.module-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

@media (max-width: 980px) {
  .module-detail-row {
    flex-direction: column;
    gap: 4px;
  }

  .module-detail-row strong {
    text-align: left;
  }
}
.card-success {
  border: 1px solid rgba(46, 160, 100, 0.35);
  background: rgba(46, 160, 100, 0.08);
}

.card-error {
  border: 1px solid rgba(200, 80, 80, 0.35);
  background: rgba(200, 80, 80, 0.08);
}

.family-member-grid,
.social-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.family-member-card,
.social-person-card {
  min-height: 180px;
}

.compact-detail-list .module-detail-row {
  gap: 12px;
}

.message-layout {
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.message-thread-item {
  display: block;
  text-decoration: none;
  color: inherit;
}

.message-feed-card {
  max-height: 420px;
  overflow: auto;
  display: grid;
  gap: 10px;
}

.message-bubble {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(17, 16, 21, 0.08);
  background: rgba(255, 255, 255, 0.74);
  line-height: 1.55;
  box-shadow: 0 8px 20px rgba(17, 16, 21, 0.06);
}

.message-bubble.mine {
  background: rgba(201, 146, 61, 0.12);
  margin-left: 18px;
}

.message-bubble.theirs {
  background: rgba(15, 76, 92, 0.08);
  margin-right: 18px;
}

.message-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(17, 16, 21, 0.12);
  background: rgba(255, 255, 255, 0.9);
}

.relocation-estimate-card {
  margin-bottom: 10px;
  border: 2px solid rgba(80, 140, 200, 0.35);
  background: rgba(80, 140, 200, 0.08);
}

.relocation-budget-badge {
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
}

@media (max-width: 980px) {
  .message-layout {
    grid-template-columns: 1fr;
  }
}
.chat-dashboard-split {
  align-items: start;
}

.chat-feed-card,
.chat-presence-card {
  max-height: 420px;
  overflow: auto;
  padding-right: 6px;
  scroll-padding-bottom: 18px;
}

.chat-feed-card {
  display: grid;
  gap: 10px;
}

.chat-presence-card {
  display: grid;
  gap: 8px;
}

.chat-feed-card::-webkit-scrollbar,
.chat-presence-card::-webkit-scrollbar {
  width: 10px;
}

.chat-feed-card::-webkit-scrollbar-thumb,
.chat-presence-card::-webkit-scrollbar-thumb {
  background: rgba(15, 76, 92, 0.24);
  border-radius: 999px;
}

.chat-feed-card::-webkit-scrollbar-track,
.chat-presence-card::-webkit-scrollbar-track {
  background: rgba(17, 16, 21, 0.06);
}

.vote-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.vote-request-card {
  min-height: 220px;
}

@media (max-width: 720px) {
  .life-hero-side .button {
    width: 100%;
  }

  .profile-page .module-detail-row strong {
    max-width: 100%;
  }

  .profile-page .profile-intro-card > p {
    padding: 9px 10px;
  }

  .message-bubble.mine,
  .message-bubble.theirs {
    margin-left: 0;
    margin-right: 0;
  }

  .chat-feed-card,
  .chat-presence-card {
    max-height: 360px;
  }

  .friend-item {
    padding: 10px 12px;
  }
}
.auth-split {
  align-items: start;
}

.table-scroll {
  overflow-x: auto;
}
.admin-dashboard-hero {
  margin-bottom: 14px;
}

.admin-hero-stats {
  margin-bottom: 14px;
}

.admin-stat-grid-wide {
  margin-bottom: 14px;
}

.admin-sparkline {
  width: 100%;
  height: auto;
  border: 1px solid rgba(17, 16, 21, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.75);
}
.admin-inline-form {
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

@media (max-width: 980px) {
  .admin-inline-form {
    grid-template-columns: 1fr;
  }
}

/* Theme refresh: cinematic product-style interface */
:root {
  --ink: #e7edf7;
  --cream: #0d1524;
  --sand: #151e30;
  --ocean: #65d0ff;
  --ember: #ff8c69;
  --mist: #95a6bf;
  --midnight: #060b16;
  --accent: #ffb65c;
  --line: rgba(187, 205, 232, 0.14);
  --shadow: 0 24px 80px rgba(3, 8, 18, 0.45);
  --radius: 24px;
}

body.theme-cosmic-life {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(80, 118, 255, 0.18), transparent 28%),
    radial-gradient(circle at 85% 18%, rgba(255, 164, 114, 0.12), transparent 24%),
    linear-gradient(180deg, #050913 0%, #0a1220 38%, #0c1526 100%);
  min-height: 100vh;
}

body.theme-cosmic-life::before,
body.theme-cosmic-life::after {
  content: "";
  position: fixed;
  border-radius: 999px;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}

body.theme-cosmic-life::before {
  width: 320px;
  height: 320px;
  left: -90px;
  top: 140px;
  background: rgba(92, 129, 255, 0.18);
}

body.theme-cosmic-life::after {
  width: 380px;
  height: 380px;
  right: -140px;
  top: 40px;
  background: rgba(255, 155, 98, 0.12);
}

.site-shell,
.site-shell main,
.admin-main,
.header,
.side-nav,
.admin-side-nav {
  position: relative;
  z-index: 1;
}

.brand,
.admin-side-brand,
.hero h1,
.section-title,
.life-hero-main h3,
.card h3,
.module-card h3,
.stat-value,
.life-stat-value {
  font-family: "Fraunces", "Georgia", serif;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  gap: 2px;
}

.brand {
  font-size: 22px;
  letter-spacing: 0.18em;
  color: #f3f7ff;
}

.brand-subtitle {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(231, 237, 247, 0.56);
}

.header {
  background: rgba(7, 13, 25, 0.68);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 40px rgba(2, 6, 15, 0.18);
}

.nav {
  padding: 20px 0;
  gap: 20px;
}

.nav-links {
  gap: 10px;
  justify-content: flex-end;
}

.nav-links a {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(240, 245, 255, 0.86);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(106, 156, 255, 0.12);
}

.side-nav,
.admin-side-nav {
  background:
    linear-gradient(180deg, rgba(9, 16, 30, 0.94), rgba(8, 13, 25, 0.9)),
    radial-gradient(circle at top, rgba(106, 156, 255, 0.08), transparent 40%);
  border-color: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
}

.side-nav-title,
.admin-side-title,
.admin-side-meta {
  color: rgba(231, 237, 247, 0.58);
}

.side-nav a,
.admin-side-link {
  color: rgba(239, 244, 255, 0.86);
}

.side-nav a:hover,
.admin-side-link:hover,
.admin-side-link.active,
.side-nav a.active {
  border-color: rgba(101, 208, 255, 0.2);
  background: linear-gradient(90deg, rgba(101, 208, 255, 0.12), rgba(255, 255, 255, 0.02));
}

.section {
  padding: 72px 0;
}

.hero {
  padding: 92px 0 54px;
}

.hero::after {
  width: 420px;
  height: 420px;
  right: -140px;
  top: -70px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 166, 110, 0.22), rgba(70, 126, 255, 0.08));
  filter: blur(4px);
}

.hero-grid {
  gap: 30px;
  align-items: stretch;
}

.hero h1 {
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
  max-width: 760px;
  margin-bottom: 18px;
}

.hero p {
  font-size: 18px;
  max-width: 640px;
  color: rgba(231, 237, 247, 0.78);
}

.ribbon {
  background: rgba(255, 182, 92, 0.14);
  color: #ffd39a;
  border: 1px solid rgba(255, 182, 92, 0.2);
  letter-spacing: 0.16em;
  font-weight: 700;
}

.button {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #f7fbff;
  padding: 12px 20px;
  font-weight: 700;
}

.button.primary {
  background: linear-gradient(135deg, #ff9468, #ffbd64);
  color: #140f10;
  border-color: transparent;
}

.button.ghost {
  background: transparent;
}

.button:hover {
  box-shadow: 0 16px 30px rgba(2, 8, 18, 0.28);
}

.card,
.panel,
.timeline-item,
.flow-step,
.stat-box,
.module-card,
.news-item,
.module-bullet-item,
.profession-card,
.friend-item,
.presence-item,
.message-bubble,
.city-map-tile,
.modal,
.chat-minimized,
.notice {
  background: linear-gradient(180deg, rgba(17, 25, 42, 0.84), rgba(11, 18, 31, 0.86));
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  color: var(--ink);
  backdrop-filter: blur(20px);
}

.card-success,
.card-error {
  background: linear-gradient(180deg, rgba(17, 25, 42, 0.88), rgba(11, 18, 31, 0.9));
}

.life-kicker,
.stat-label,
.life-stat-label,
.module-detail-row span,
.life-stat-note,
.admin-sub,
.life-subline,
.news-item small,
.footer small {
  color: rgba(231, 237, 247, 0.62);
}

.section-title {
  font-size: clamp(28px, 3.2vw, 42px);
  margin-bottom: 22px;
}

.life-hero,
.admin-dashboard-hero,
.profile-hero-card,
.module-hero {
  background:
    radial-gradient(circle at top left, rgba(255, 183, 101, 0.12), transparent 36%),
    linear-gradient(135deg, rgba(18, 29, 48, 0.96), rgba(11, 18, 30, 0.92));
  border-color: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.life-chip,
.badge,
.city-pill,
.admin-badge,
.module-bullet-item,
.nav-badge-link,
.side-badge,
.notif-tag,
.chat-link,
.map-legend-pill,
.phone-pill {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #edf5ff;
}

.nav-badge-link,
.side-badge {
  background: rgba(255, 140, 105, 0.16);
}

.meter-track,
.progress,
.bar,
.city-bar .track,
.city-map-pop {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.07);
}

.meter-fill,
.bar > span,
.progress > span,
.city-bar .track span,
.city-map-pop span {
  background: linear-gradient(90deg, #67d2ff, #ffb75d);
}

.table-scroll,
.admin-table-wrap {
  border-radius: 20px;
}

.admin-input,
.search-input,
.message-textarea {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: #f4f8ff;
}

.admin-input::placeholder,
.search-input::placeholder,
.message-textarea::placeholder {
  color: rgba(231, 237, 247, 0.38);
}

.admin-table {
  background: rgba(11, 17, 30, 0.84);
  border-color: rgba(255, 255, 255, 0.08);
}

.admin-table th {
  background: rgba(14, 22, 38, 0.96);
  color: rgba(241, 246, 255, 0.72);
}

.admin-table tbody tr:hover {
  background: rgba(101, 208, 255, 0.06);
}

.footer {
  background: rgba(7, 13, 25, 0.78);
  border-top-color: rgba(255, 255, 255, 0.06);
}

.landing-hero-copy {
  display: grid;
  align-content: center;
}

.hero-mini-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-mini-points span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(239, 244, 255, 0.78);
  font-size: 13px;
}

.landing-visual {
  display: grid;
  gap: 18px;
  position: relative;
}

.story-ribbon {
  display: inline-flex;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(101, 208, 255, 0.08);
  border: 1px solid rgba(101, 208, 255, 0.16);
  color: #92e2ff;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
}

.phone-frame {
  border-radius: 32px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(6, 12, 22, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.phone-frame-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.phone-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.phone-pill.warm {
  background: rgba(255, 182, 92, 0.14);
  color: #ffd89f;
}

.phone-stage {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 320px;
  padding: 24px 18px 18px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(10, 17, 28, 0.96), rgba(14, 24, 40, 0.82));
}

.phone-stage-orb {
  position: absolute;
  width: 180px;
  height: 180px;
  right: -30px;
  top: -30px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(255, 179, 99, 0.42), rgba(255, 179, 99, 0));
  filter: blur(18px);
}

.phone-stage-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.65), transparent 92%);
}

.phone-stage-card {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
}

.phone-stage-card strong {
  font-size: 16px;
}

.phone-stage-card span {
  color: rgba(231, 237, 247, 0.66);
  font-size: 13px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.metric-tile {
  padding: 14px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.metric-tile span {
  display: block;
  color: rgba(231, 237, 247, 0.58);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.metric-tile strong {
  font-size: 18px;
}

.feature-glow-grid {
  gap: 20px;
}

.feature-glow-card {
  position: relative;
  overflow: hidden;
}

.feature-glow-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -60px auto;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(101, 208, 255, 0.14), transparent 68%);
}

.feature-step-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 148, 104, 0.24), rgba(101, 208, 255, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 800;
}

.landing-story-split {
  align-items: stretch;
}

.landing-story-card,
.landing-quote-card {
  min-height: 100%;
}

.landing-story-card h3 {
  font-size: clamp(24px, 2.8vw, 34px);
  margin: 14px 0 12px;
}

.landing-story-card p,
.landing-quote {
  color: rgba(231, 237, 247, 0.76);
}

.landing-timeline-row {
  margin-top: 18px;
}

.landing-quote-card {
  display: grid;
  align-content: center;
  gap: 12px;
}

.quote-mark {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 72px;
  line-height: 0.8;
  color: rgba(255, 183, 101, 0.9);
}

.landing-quote {
  margin: 0;
  font-size: 20px;
  line-height: 1.7;
}

.landing-quote-meta {
  color: rgba(231, 237, 247, 0.5);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
}

@media (max-width: 980px) {
  .nav {
    align-items: flex-start;
  }

  .hero {
    padding-top: 72px;
  }

  .metric-strip {
    grid-template-columns: 1fr;
  }

  .brand-subtitle {
    letter-spacing: 0.1em;
  }
}

.register-page .dashboard-split > div,
.register-page .module-detail-card,
.register-page .table-scroll {
  min-width: 0;
}

.register-page .register-form label {
  display: block;
}

.register-page .register-form .admin-input {
  display: block;
  max-width: 100%;
}

@media (max-width: 720px) {
  .register-page .container {
    width: calc(100% - 24px);
  }

  .register-page .dashboard-split,
  .register-page .dashboard-split > div,
  .register-page .module-detail-card,
  .register-page .module-detail-card > .card,
  .register-page .register-form,
  .register-page .register-form label,
  .register-page .register-form input,
  .register-page .register-form select {
    width: 100%;
    max-width: 100%;
    min-width: 0 !important;
  }

  .register-page .module-detail-card > .card small,
  .register-page .life-subline,
  .register-page .life-stat-note {
    display: block;
    overflow-wrap: anywhere;
  }

  .register-page .module-detail-card {
    padding: 18px;
  }

  .register-page .register-form {
    max-width: 100%;
  }
}
.login-page .dashboard-split > div,
.login-page .module-detail-card,
.login-page .auth-split > div,
.chat-page .dashboard-split > div,
.chat-page .scene-panel,
.chat-page .chat-feed-card,
.chat-page .chat-presence-card,
.chat-page .modal,
.chat-page .chat-minimized {
  min-width: 0;
}

.login-page .login-form label,
.chat-page #pmForm label {
  display: block;
}

.login-page .login-form .admin-input,
.chat-page #pmBody,
.chat-page #memberSearch {
  display: block;
  max-width: 100%;
}

.chat-page .chat-min-actions {
  flex-wrap: wrap;
}

.chat-page .friend-item {
  min-width: 0;
}

.chat-page .friend-name,
.chat-page .friend-time,
.chat-page .message-bubble,
.chat-page .chat-link {
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .login-page .module-detail-card,
  .chat-page .module-detail-card,
  .chat-page .modal {
    padding: 18px;
  }

  .chat-page .chat-minimized {
    left: 12px;
    right: 12px;
    bottom: 12px;
    justify-content: space-between;
  }

  .chat-page .modal {
    width: min(560px, calc(100% - 20px));
  }
}
.admin-input:-webkit-autofill,
.admin-input:-webkit-autofill:hover,
.admin-input:-webkit-autofill:focus,
input.admin-input:-webkit-autofill,
input.admin-input:-webkit-autofill:hover,
input.admin-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f4f8ff;
  caret-color: #f4f8ff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-box-shadow: 0 0 0 1000px rgba(24, 32, 48, 0.96) inset;
  box-shadow: 0 0 0 1000px rgba(24, 32, 48, 0.96) inset;
  transition: background-color 9999s ease-in-out 0s;
}

select.admin-input {
  color-scheme: dark;
}

select.admin-input option,
select.admin-input optgroup {
  color: #111827;
  background: #f4f6fb;
}

select.admin-input option:checked,
select.admin-input option:hover,
select.admin-input option:focus {
  color: #0f1726;
  background: #d7deec;
}

.profile-shell,
.family-page {
  overflow-x: clip;
}

.profile-page .profile-company-form,
.profile-page .profile-table-scroll,
.family-page .dashboard-split > div,
.family-page .module-detail-card,
.family-page .family-member-card {
  min-width: 0;
}

.profile-page .profile-company-label {
  display: block;
}

.profile-page .profile-table-scroll {
  margin-top: 8px;
}

.profile-page .profile-table-scroll table {
  min-width: 640px;
}

@media (max-width: 720px) {
  .profile-page .member-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .profile-page .profile-company-form {
    display: grid !important;
    grid-template-columns: 1fr;
  }

  .profile-page .profile-company-label,
  .profile-page .profile-company-label .admin-input,
  .profile-page .profile-table-scroll,
  .profile-page .profile-table-scroll table,
  .family-page .dashboard-split,
  .family-page .dashboard-split > div,
  .family-page .family-member-grid,
  .family-page .family-member-card {
    width: 100%;
    max-width: 100%;
    min-width: 0 !important;
  }

  .profile-page .profile-company-label {
    flex: initial !important;
  }

  .profile-page .profile-table-scroll table {
    min-width: 560px;
  }

  .family-page .module-detail-card,
  .family-page .family-member-card {
    padding: 18px;
  }

  .family-page .member-header {
    align-items: flex-start;
  }
}

.dashboard-page,
.module-page {
  overflow-x: clip;
}

.dashboard-page .dashboard-grid,
.dashboard-page .dashboard-split,
.dashboard-page .module-grid,
.module-page .dashboard-split,
.module-page .module-detail-card,
.module-page .module-bullet-item,
.module-page .module-card {
  min-width: 0;
}

.dashboard-page .stat-box,
.module-page .life-stat-card,
.module-page .module-card,
.module-page .module-bullet-item,
.module-page .module-detail-row strong,
.module-page .life-subline {
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .dashboard-page .stats-grid,
  .dashboard-page .module-grid,
  .module-page .module-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-page .scene-panel,
  .module-page .module-detail-card {
    padding: 18px;
  }

  .dashboard-page .stat-box,
  .module-page .module-card {
    min-width: 0;
  }
}