:root {
  --ink: #17151f;
  --muted: #706b7d;
  --line: #e8e3ea;
  --panel: #ffffff;
  --soft: #f7f2f4;
  --rose: #b92856;
  --rose-dark: #841f3d;
  --teal: #0d7f7a;
  --gold: #c59a34;
  --shadow: 0 18px 50px rgba(43, 29, 45, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fffaf8;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 72px);
  background: rgba(255, 250, 248, 0.9);
  border-bottom: 1px solid rgba(232, 227, 234, 0.8);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.hero-actions,
.hero-stats,
.tag-row,
.profile-card-top,
.card-heading,
.admin-metrics {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--teal));
  border-radius: 8px;
}

.nav-links {
  gap: 18px;
  color: var(--muted);
  font-weight: 700;
}

.nav-button,
.button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.nav-button {
  padding: 10px 15px;
  color: #fff;
  background: var(--ink);
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
}

.button.primary {
  color: #fff;
  background: var(--rose);
  box-shadow: 0 12px 28px rgba(185, 40, 86, 0.24);
}

.button.secondary {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.hero {
  position: relative;
  min-height: 650px;
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
}

.hero-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(23, 21, 31, 0.88), rgba(23, 21, 31, 0.32) 54%, rgba(23, 21, 31, 0.12));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(780px, calc(100% - 40px));
  margin: 0 0 54px clamp(20px, 6vw, 86px);
  color: #fff;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #87e1dc;
}

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

.hero h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(3rem, 7vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.12rem;
  line-height: 1.7;
}

.hero-actions,
.hero-stats {
  gap: 14px;
  flex-wrap: wrap;
}

.hero-stats {
  margin-top: 28px;
}

.hero-stats span {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.section-shell,
.profile-page,
.admin-page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 58px 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 26px;
}

.section-heading h2,
.profile-toolbar h2,
.admin-hero h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

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

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

.network-card,
.insight-panel,
.admin-card,
.profile-detail,
.account-panel,
.auth-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.network-card {
  padding: 22px;
}

.network-dot {
  display: block;
  width: 12px;
  height: 12px;
  margin-bottom: 16px;
  background: var(--gold);
  border-radius: 50%;
}

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

.ad-slot {
  width: min(1180px, calc(100% - 40px));
  margin: 24px auto;
}

.ad-demo {
  display: grid;
  min-height: 90px;
  place-items: center;
  color: #5f4d2a;
  background: repeating-linear-gradient(135deg, #fff7df, #fff7df 12px, #f8e8b9 12px, #f8e8b9 24px);
  border: 1px dashed #d7ae4d;
  border-radius: 8px;
  font-weight: 900;
}

.profile-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.search-box {
  width: min(360px, 100%);
  color: var(--muted);
  font-weight: 800;
}

.search-box input,
.form-card input,
.zone-editor input,
.zone-editor select,
.zone-editor textarea {
  width: 100%;
  margin-top: 8px;
  padding: 13px 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}

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

.profile-grid .ad-slot {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0;
}

.profile-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(43, 29, 45, 0.1);
}

.profile-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.profile-card-body {
  padding: 18px;
}

.profile-card-top {
  justify-content: space-between;
  gap: 12px;
}

.profile-card h3 {
  margin-bottom: 4px;
}

.profile-card p {
  color: var(--muted);
  line-height: 1.55;
}

.match,
.status-pill {
  flex: 0 0 auto;
  padding: 7px 9px;
  color: var(--teal);
  background: #e7f7f6;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 900;
}

.tag-row {
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.tag-row span {
  padding: 7px 10px;
  color: #6b3850;
  background: #faedf2;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
}

.card-action {
  color: var(--rose);
  font-weight: 900;
}

.sidebar {
  position: sticky;
  top: 92px;
}

.sidebar .ad-slot {
  width: 100%;
  margin: 0 0 20px;
}

.insight-panel {
  padding: 22px;
}

dl {
  margin: 0;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  font-weight: 900;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  min-height: calc(100vh - 83px);
}

.auth-panel {
  align-self: center;
  width: min(520px, calc(100% - 40px));
  margin: 56px auto;
  padding: 34px;
}

.auth-panel h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

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

.form-card label,
.zone-editor label {
  color: var(--muted);
  font-weight: 850;
}

.form-note,
.alert,
.success {
  color: var(--muted);
}

.alert,
.success {
  padding: 13px 15px;
  border-radius: 8px;
}

.alert {
  background: #fff0f0;
  color: #9d2828;
}

.success {
  background: #e9f8f1;
  color: #176743;
}

.auth-image {
  min-height: 520px;
  background-position: center;
  background-size: cover;
}

.login-image {
  background-image: url("https://images.unsplash.com/photo-1511988617509-a57c8a288659?auto=format&fit=crop&w=1200&q=80");
}

.signup-image {
  background-image: url("https://images.unsplash.com/photo-1529156069898-49953e39b3ac?auto=format&fit=crop&w=1200&q=80");
}

.profile-page {
  padding-top: 42px;
}

.member-summary {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}

.member-summary img {
  width: 300px;
  height: 360px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.member-summary h1 {
  margin: 14px 0 8px;
  font-size: clamp(2.5rem, 6vw, 5.5rem);
}

.profile-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
}

.profile-detail,
.account-panel,
.admin-card {
  padding: 28px;
}

.starter-list {
  color: var(--muted);
  line-height: 1.9;
}

.admin-hero,
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
}

.admin-hero {
  align-items: end;
  margin-bottom: 24px;
}

.admin-metrics {
  gap: 10px;
  justify-content: end;
  flex-wrap: wrap;
}

.admin-metrics span {
  padding: 13px 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(43, 29, 45, 0.08);
}

.ad-control {
  display: grid;
  gap: 18px;
}

.card-heading {
  justify-content: space-between;
  gap: 16px;
}

.toggle {
  color: var(--muted);
  font-weight: 900;
}

.zone-editor {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.zone-editor legend {
  padding: 0 8px;
  font-weight: 900;
}

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

.partner-list div {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.partner-list span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(20px, 5vw, 72px);
  color: var(--muted);
  background: #17151f;
}

.site-footer p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1050px) {
  .network-grid,
  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid,
  .profile-columns,
  .admin-hero,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 720px) {
  .site-header,
  .profile-toolbar,
  .site-footer,
  .card-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    flex-wrap: wrap;
  }

  .hero {
    min-height: 600px;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .network-grid,
  .profile-grid,
  .auth-layout,
  .member-summary {
    grid-template-columns: 1fr;
  }

  .auth-image {
    min-height: 320px;
    order: -1;
  }

  .member-summary img {
    width: 100%;
    height: 420px;
  }
}
