:root {
  color-scheme: light;
  --red: #e30613;
  --red-dark: #b80510;
  --navy: #08152d;
  --navy-2: #102a52;
  --blue: #123b70;
  --ink: #102033;
  --muted: #5c6b80;
  --line: #e4e8ef;
  --paper: #f4f7fb;
  --card: #ffffff;
  --text: #f4f7fb;
  --header: 76px;
  --radius: 16px;
  --shadow: 0 18px 40px rgba(4, 10, 24, 0.18);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(820px 420px at 110% -8%, rgba(227, 6, 19, 0.32), transparent 58%),
    radial-gradient(680px 360px at -12% 8%, rgba(18, 59, 112, 0.85), transparent 62%),
    linear-gradient(180deg, #08152d 0%, #0c2348 46%, #08152d 100%);
  font-family: Manrope, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; }
h1, h2, h3, .brand-name, .hero-title, .code-value, .partner-id, .ladder strong {
  font-family: Oswald, "Arial Narrow", Impact, sans-serif;
  font-weight: 500;
  letter-spacing: 0.03em;
}
a { color: var(--red); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header);
  padding: 0.7rem 1.25rem;
  background: rgba(8, 21, 45, 0.94);
  border-bottom: 1px solid rgba(244, 247, 251, 0.12);
  backdrop-filter: blur(10px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
  text-decoration: none;
  min-width: 0;
}
.brand img {
  width: 92px;
  height: auto;
  background: #fff;
  border-radius: 8px;
  padding: 4px 6px;
}
.brand-copy { display: grid; line-height: 1.05; }
.brand-name { color: #fff; font-size: 1.15rem; }
.brand-copy em {
  font-style: normal;
  color: #f4f7fb;
  font-family: Manrope, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  font-weight: 700;
}
.nav { display: flex; gap: 0.35rem; align-items: center; }
.nav a {
  color: #f4f7fb;
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
}
.nav a:hover { border-color: rgba(244, 247, 251, 0.25); }
.nav a.on { border-color: var(--red); box-shadow: inset 0 -2px 0 var(--red); }
.header-end { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; }
.lang-slot { display: flex; align-items: center; }
.top:has(.lang-slot) .header-end { margin-left: 0.75rem; }
.top:has(.lang-slot) .lang-slot { margin-left: auto; }
.lang-switch { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; font-weight: 800; letter-spacing: 0.06em; }
.lang-switch a { color: #f4f7fb; text-decoration: none; opacity: 0.55; }
.lang-switch a.on { opacity: 1; color: #fff; box-shadow: inset 0 -2px 0 var(--red); }
.auth-card .lang-switch, .share-card .lang-switch { display: flex; justify-content: flex-end; margin: 0 0 0.8rem; }
.auth-card .lang-switch a, .share-card .lang-switch a { color: var(--navy); }
.auth-card .lang-switch a.on, .share-card .lang-switch a.on { color: var(--red); opacity: 1; }
.who { color: #d5deea; font-size: 0.92rem; font-weight: 700; }
.nav-toggle, .menu-button { display: none; }
.top form { margin: 0; }
.top .logout, .top .logout:hover {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(244, 247, 251, 0.35);
  text-transform: none;
  letter-spacing: 0;
  min-height: 40px;
}
.compat-copy {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
button.text, .logout {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(244, 247, 251, 0.35);
  min-height: 40px;
  padding: 0.4rem 0.8rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
}

main { padding: 1.4rem 1.25rem 2.5rem; max-width: 1280px; margin: 0 auto; }
.heading, .heading-actions { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-end; }
.heading-actions { flex-wrap: wrap; }
.heading h1, main > h1, .page-title { margin: 0.15rem 0 0; font-size: clamp(2rem, 4vw, 3.1rem); line-height: 0.95; }
.kicker, .subtitle { margin: 0; color: #c5d0e0; }
.kicker { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; }

button, .button, .logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  color: white;
  border: 0;
  border-radius: 8px;
  min-height: 44px;
  padding: 0.7rem 1rem;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .button:hover { background: var(--red-dark); }
button.secondary, .button.secondary, button.secondary:hover { background: var(--navy); color: #fff; }
button.ghost, .button.ghost, a.ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid rgba(8, 21, 45, 0.22);
  text-transform: none;
  letter-spacing: 0;
}
.heading-actions button.secondary, .heading-actions .button.secondary { margin: 0; }
.card .button.secondary, .card button.secondary { margin-top: 0.75rem; }
.actions a, button.inline, .text-link {
  background: transparent;
  color: var(--red);
  padding: 0 0.35rem;
  min-height: 0;
  text-transform: none;
  letter-spacing: 0;
}

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.85rem; margin: 1rem 0; }
.card {
  background: var(--card);
  color: var(--ink);
  border: 1px solid rgba(8, 21, 45, 0.08);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
  box-shadow: var(--shadow);
}
.card p { margin: 0 0 0.4rem; }
.card h2, .card h3 { margin: 0 0 0.7rem; color: var(--navy); }
.card .muted, .muted { color: var(--muted); }
.kpi { min-height: 118px; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(180deg, #fff, #f7f9fc); }
.kpi p { color: var(--muted); font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; }
.kpi strong { font-family: Oswald, sans-serif; font-size: 1.85rem; font-weight: 500; color: var(--navy); letter-spacing: 0.02em; }
.kpi-accent { box-shadow: inset 0 3px 0 var(--red), var(--shadow); }

.narrow { max-width: 640px; }
label { display: block; margin: 0.85rem 0; font-weight: 650; color: var(--ink); }
input:not([type="checkbox"]), select, textarea {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.75rem 0.8rem;
  border: 1px solid #cfd6e2;
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 7rem; }
.check { display: flex; align-items: center; gap: 0.55rem; font-weight: 600; }
.check input { width: auto; margin: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.7rem 0.55rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: #415066; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td a { font-weight: 700; }
.table-wrap { overflow-x: auto; }
table.metrics { min-width: 1040px; }
table.metrics th, table.metrics td { white-space: nowrap; }
table.metrics th a { color: #415066; text-decoration: none; }
table.metrics thead th { position: sticky; top: 0; background: #f4f7fb; z-index: 1; }
table.metrics tbody tr:hover { background: #f7f9fc; }
table.metrics td:first-child, table.metrics th:first-child,
table.metrics td:nth-child(2), table.metrics th:nth-child(2) {
  position: sticky;
  background: #fff;
}
table.metrics th:first-child, table.metrics th:nth-child(2) { background: #f4f7fb; z-index: 2; }
table.metrics td:first-child, table.metrics th:first-child { left: 0; min-width: 3.2rem; }
table.metrics td:nth-child(2), table.metrics th:nth-child(2) { left: 3.4rem; }
code { word-break: break-all; }

.pill { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px; border: 1px solid var(--line); background: #f4f6f8; font-size: 0.78rem; white-space: nowrap; font-weight: 700; }
.pill-phase-1 { background: #f4f6f8; }
.pill-phase-2 { background: #eef3fb; border-color: #d5e1f2; color: #123b70; }
.pill-phase-3 { background: #f3f7f4; border-color: #d5e6db; }
.pill-phase-4 { background: #fbf6ef; border-color: #eadcC8; }
.pill-active, .pill-account { background: #eef6f1; border-color: #d3e6d8; color: #145c32; }
.pill-paused, .pill-muted, .pill-ineligible { background: #f3f4f6; color: #5c6b80; }
.pill-eligible { background: #fff6f6; border-color: #f0d0d4; color: #8d1020; }

.partner-controls form { display: grid; gap: 0.75rem; }
.partner-controls .control-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: end; }
.partner-controls label { margin: 0; min-width: 9.5rem; flex: 1; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.partner-controls label.search { flex: 1.6; min-width: 16rem; }
.partner-controls label.show-line { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; min-width: 16rem; text-transform: none; letter-spacing: 0; font-size: 0.95rem; color: var(--ink); }
.partner-controls label.show-line select { width: auto; margin: 0; }
.partner-controls .toolbar-actions { display: flex; gap: 0.6rem; align-items: center; }
.partner-controls a.reset-filters { color: var(--navy); font-size: 0.82rem; font-weight: 800; letter-spacing: 0.06em; text-decoration: none; }
.quick-filters { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.9rem 0 0.35rem; }
.quick-filters a { color: var(--navy); text-decoration: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 0.35rem 0.75rem; font-size: 0.9rem; font-weight: 650; }
.quick-filters a.on { background: var(--red); border-color: var(--red); color: #fff; }
.partner-range { margin: 0 0 0.45rem; color: var(--muted); }
.pager { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; margin-top: 0.9rem; }
.pager a, .pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 2.2rem; min-height: 2.2rem; padding: 0.25rem 0.55rem; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--navy); background: white; font-weight: 700; }
.pager span.on, .pager a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.pager span.disabled { color: #93a0b3; }
.filters { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.filters a { color: var(--navy); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.7rem; background: #fff; }
.filters a.on { background: var(--navy); color: #fff; }
.actions { white-space: nowrap; }
.actions form { display: inline; }
form.confirm { display: flex; gap: 0.75rem; align-items: center; }
.error { background: #fde8ea; color: #6d1020; padding: 0.7rem 0.8rem; border-radius: 8px; }
.notice { background: #e8f6ee; color: #145c32; padding: 0.7rem 0.8rem; border-radius: 8px; }

.auth-body { display: grid; min-height: 100vh; }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem 2rem; }
.auth-card { width: min(460px, 100%); background: #fff; color: var(--ink); border-radius: 20px; padding: 1.6rem 1.4rem 1.4rem; box-shadow: var(--shadow); }
.auth-card .logo-lockup { display: block; width: 168px; margin: 0 auto 0.8rem; background: #fff; }
.auth-card h1 { margin: 0.2rem 0; text-align: center; font-size: 2rem; color: var(--navy); }
.auth-card .badge, .role-badge { display: table; margin: 0.35rem auto 0.8rem; padding: 0.15rem 0.55rem; border-radius: 999px; background: var(--navy); color: #fff; font-size: 0.72rem; letter-spacing: 0.14em; font-weight: 800; }
.auth-card p.lead { text-align: center; color: var(--muted); }
.auth-switch { margin-top: 1.1rem; padding-top: 0.9rem; border-top: 1px solid var(--line); text-align: center; }
.auth-switch p { margin: 0 0 0.55rem; color: var(--muted); }
.auth-links { display: flex; justify-content: center; gap: 1rem; margin-top: 0.8rem; }
.auth-links a { color: var(--navy); font-weight: 700; }

.hero { display: grid; gap: 0.35rem; margin-bottom: 1rem; }
.hero-person { display: flex; gap: 0.9rem; align-items: center; }
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  flex: 0 0 auto;
}
.avatar-lg { width: 88px; height: 88px; }
.avatar-placeholder {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(8, 21, 45, 0.08);
}
.avatar-placeholder img { width: 72%; height: auto; }
.photo-manager { display: grid; justify-items: start; gap: 0.2rem; }
.photo-manager .avatar-lg { width: 128px; height: 128px; margin-bottom: 0.6rem; }
.share-photo-placeholder { object-fit: contain; background: #fff; padding: 1.5rem; aspect-ratio: 1; }
.hero-title { font-size: clamp(2.4rem, 6vw, 4.2rem); margin: 0; line-height: 0.92; text-transform: uppercase; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.code-card { background: linear-gradient(135deg, #08152d, #123b70 62%, #7a1024); color: #fff; }
.code-card .kicker, .code-card p { color: #d5deea; }
.code-value { margin: 0.2rem 0; font-size: clamp(2.4rem, 6vw, 3.6rem); color: var(--navy); line-height: 1; }
.code-card .code-value { color: #fff; }
.code-card .button, .code-card button { background: var(--red); }
.code-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.2rem 0 0.55rem; }
.code-card .code-actions button { margin: 0; }
.code-card .share-copy,
.code-card .share-copy:hover {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(244, 247, 251, 0.55);
}
.brand-k { color: var(--red); }
.share-body { min-height: 100vh; }
.share-shell { min-height: 100vh; display: grid; place-items: center; padding: 1.25rem 1rem 2rem; }
.share-card {
  width: min(440px, 100%);
  background: #fff;
  color: var(--ink);
  border-radius: 20px;
  padding: 1.15rem 1.1rem 1.25rem;
  box-shadow: var(--shadow);
}
.share-card .logo-lockup { display: block; width: 132px; margin: 0 auto 0.85rem; background: #fff; }
.share-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 14px;
  background: var(--navy);
}
.share-card h1 { margin: 0.85rem 0 0.35rem; color: var(--navy); font-size: clamp(1.8rem, 5vw, 2.35rem); line-height: 1.02; }
.share-card p { margin: 0 0 0.45rem; }
.share-code-label {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.share-code { margin: 0.1rem 0 0.8rem; color: var(--navy); font-family: Oswald, sans-serif; font-size: 2rem; letter-spacing: 0.04em; line-height: 1; }
.share-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.share-actions .button, .share-actions button { margin: 0; text-transform: none; letter-spacing: 0; }
.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.ladder li { display: grid; grid-template-columns: 5.5rem 1fr auto; gap: 0.6rem; align-items: center; padding: 0.65rem 0.7rem; border-radius: 12px; background: #f6f8fb; }
.ladder-current { background: #fff5f6; box-shadow: inset 3px 0 0 var(--red); }
.ladder-done { background: #f3f7f4; }
.ladder em { font-style: normal; color: var(--muted); font-size: 0.85rem; }
.detail-grid, .partner-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 0.9rem; }
.stack { display: grid; gap: 0.9rem; }
.profile-list { display: grid; grid-template-columns: 9rem 1fr; gap: 0.35rem 0.8rem; }
.profile-list dt { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.profile-list dd { margin: 0; font-weight: 700; }
.campaign-overview { display: grid; gap: 0.7rem; margin: 0.2rem 0 1rem; min-width: 0; }
.campaign-heading { display: grid; gap: 0.1rem; }
.campaign-heading h2 { margin: 0; color: #fff; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.campaign-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: stretch;
  min-width: 0;
}
.campaign-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 0;
  margin: 0;
  padding: 0.7rem;
}
.campaign-card .kicker { color: var(--muted); }
.campaign-card h2 { margin: 0; font-size: 1.28rem; line-height: 1.05; }
.campaign-copy { display: grid; gap: 0.4rem; min-width: 0; }
.campaign-copy > p { margin: 0; }
.campaign-link { display: grid; gap: 0.15rem; min-width: 0; }
.campaign-link span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.campaign-link input.campaign-url {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0.28rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f7fb;
  color: var(--muted);
  font-family: Manrope, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.campaign-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; margin: 0.15rem 0 0; }
.campaign-actions button,
.campaign-actions .button { min-height: 40px; padding: 0.4rem 0.75rem; font-size: 0.82rem; }
.campaign-actions .button.secondary,
.campaign-actions button.secondary { margin-top: 0; }
.campaign-preview { margin: 0; min-width: 0; }
.campaign-preview img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  background: var(--navy);
}
.campaign-soon {
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
  border: 1px dashed #c5d0e0;
  box-shadow: none;
  pointer-events: none;
  user-select: none;
}
.campaign-soon-mark {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background:
    radial-gradient(140px 90px at 82% 18%, rgba(227, 6, 19, 0.22), transparent 70%),
    linear-gradient(145deg, #08152d, #123b70);
}
.soon-state {
  width: fit-content;
  margin-top: 0.15rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: #e7edf6;
  color: #415066;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.progress { height: 0.7rem; background: #e4e8ef; border-radius: 999px; overflow: hidden; margin: 0.35rem 0 0.8rem; }
.progress > span { display: block; height: 100%; background: var(--red); }
.social-platform { display: flex; gap: 0.45rem; align-items: center; }
.social-platform::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 99px; background: var(--navy); }
.order-cards { display: none; }
.order-card { border: 1px solid var(--line); border-radius: 12px; padding: 0.75rem; margin-top: 0.55rem; }
.order-card strong { color: var(--navy); }

@media (max-width: 1024px) {
  .detail-grid, .partner-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .campaign-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .menu-button {
    display: inline-flex;
    margin-left: auto;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(244, 247, 251, 0.3);
    min-height: 40px;
    text-transform: none;
    letter-spacing: 0;
  }
  .top:has(.lang-slot) .menu-button { margin-left: 0; }
  .top:has(.lang-slot) .lang-slot { margin-left: auto; }
  .nav, .header-end { display: none; }
  .lang-slot { display: flex; }
  .nav-toggle:checked ~ .nav,
  .nav-toggle:checked ~ .header-end { display: flex; }
  .top { flex-wrap: wrap; }
  .nav, .header-end { width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 0.4rem; }
  .heading { flex-direction: column; align-items: flex-start; }
  .ladder li { grid-template-columns: 1fr; }
  table.metrics td:nth-child(2), table.metrics th:nth-child(2) { position: static; }
}
@media (max-width: 700px) {
  .campaign-grid { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  main { padding: 1rem 0.8rem 2rem; }
  .cards { grid-template-columns: 1fr; }
  .brand img { width: 74px; }
  .desktop-orders { display: none; }
  .order-cards { display: block; }
  .auth-card { padding: 1.2rem 1rem; }
}
