:root {
  --bg: #fff7f5;
  --bg-soft: #ffffff;
  --surface: #ffffff;
  --surface-2: #fff2ef;
  --surface-3: #fbe7e2;
  --line: rgba(158, 27, 30, 0.16);
  --line-soft: rgba(158, 27, 30, 0.1);
  --text: #2a1111;
  --muted: #7b5350;
  --faint: #a17a73;
  --red: #a31318;
  --red-2: #d9282f;
  --red-dark: #6f0d12;
  --gold: #c9952f;
  --gold-2: #f1cf75;
  --gold-dark: #805313;
  --success: #15803d;
  --danger: #dc2626;
  --shadow: 0 22px 55px rgba(89, 18, 18, 0.12);
  --radius: 8px;
  --font-display: "Aptos Display", "Segoe UI Variable Display", "Segoe UI", Tahoma, sans-serif;
  --font-ui: "Aptos", "Segoe UI Variable Text", "Segoe UI", Tahoma, sans-serif;
  --font-number: "Aptos", "Segoe UI Variable Text", "Segoe UI", Tahoma, sans-serif;
}

html[data-theme="dark"] {
  --bg: #070707;
  --bg-soft: #101010;
  --surface: #15120d;
  --surface-2: #1d1810;
  --surface-3: #241d12;
  --line: rgba(225, 185, 82, 0.23);
  --line-soft: rgba(255, 255, 255, 0.08);
  --text: #fff9ea;
  --muted: #c8b98e;
  --faint: #8b7a55;
  --red: #d7aa3e;
  --red-2: #f2d27d;
  --red-dark: #8f6418;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-ui);
  background:
    linear-gradient(115deg, rgba(163, 19, 24, 0.1), transparent 28rem),
    linear-gradient(290deg, rgba(201, 149, 47, 0.13), transparent 24rem),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}

html[data-theme="dark"] body {
  background:
    linear-gradient(110deg, rgba(215, 170, 62, 0.13), transparent 30rem),
    linear-gradient(180deg, #060606 0%, #11100d 54%, #090909 100%);
}

a {
  color: var(--red);
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.025em;
}

body.nav-open {
  overflow: hidden;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 17rem minmax(0, 1fr);
}

.side-nav {
  position: sticky;
  top: 0;
  min-height: 100vh;
  padding: 1.25rem;
  background: linear-gradient(180deg, #ffffff, #fff0ec);
  border-right: 1px solid var(--line);
  box-shadow: 16px 0 40px rgba(89, 18, 18, 0.06);
  z-index: 20;
}

html[data-theme="dark"] .side-nav {
  background: linear-gradient(180deg, #090806, #15110b);
  box-shadow: none;
}

.mobile-topbar {
  display: none;
}

.mobile-toolbar-actions {
  display: none;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(0, 0, 0, 0.36);
  border: 0;
  z-index: 18;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 0.25rem 1.4rem;
  color: var(--text);
  text-decoration: none;
}

.brand-mark,
.avatar-mark {
  width: 2.65rem;
  height: 2.65rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--red-2), var(--red), var(--red-dark));
  box-shadow: 0 0 0 1px rgba(201, 149, 47, 0.28), 0 14px 30px rgba(163, 19, 24, 0.18);
}

.brand-logo {
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-photo {
  width: 2.65rem;
  height: 2.65rem;
  flex: 0 0 auto;
  border: 1px solid rgba(201, 149, 47, 0.42);
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
}

html[data-theme="dark"] .brand-mark,
html[data-theme="dark"] .avatar-mark {
  color: #090806;
  background: linear-gradient(135deg, var(--gold-2), var(--gold), var(--gold-dark));
}

.brand-copy strong,
.brand-copy span {
  display: block;
}

.brand-copy strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.brand-copy span {
  color: var(--faint);
  font-size: 0.8rem;
  margin-top: 0.15rem;
}

.nav-links {
  display: grid;
  gap: 0.35rem;
}

.ui-icon {
  width: 1.18rem;
  height: 1.18rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button {
  width: 2.85rem;
  padding: 0;
}

.icon-button .ui-icon {
  width: 1.35rem;
  height: 1.35rem;
}

.nav-links a,
.nav-logout button,
.btn,
.btn-muted,
.toolbar-link,
.theme-toggle,
.burger-button,
.bottom-nav a,
.bottom-menu-button {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: var(--radius);
  padding: 0.78rem 1rem;
  font: 700 0.92rem/1 var(--font-ui);
  text-decoration: none;
  cursor: pointer;
}

.nav-links a {
  justify-content: flex-start;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
}

.nav-links a .ui-icon {
  color: var(--red);
}

html[data-theme="dark"] .nav-links a .ui-icon {
  color: var(--gold-2);
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(163, 19, 24, 0.08);
}

html[data-theme="dark"] .nav-links a.active,
html[data-theme="dark"] .nav-links a:hover {
  background: rgba(215, 170, 62, 0.1);
}

.nav-tools {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.theme-toggle,
.burger-button {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.65);
}

html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .burger-button {
  background: rgba(255, 255, 255, 0.04);
}

.nav-logout {
  margin: 0;
}

.nav-logout button {
  gap: 0.55rem;
}

.nav-logout button,
.btn {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--red-2), var(--red), var(--red-dark));
  box-shadow: 0 14px 30px rgba(163, 19, 24, 0.16);
}

html[data-theme="dark"] .nav-logout button,
html[data-theme="dark"] .btn {
  color: #0a0805;
  background: linear-gradient(135deg, var(--gold-2), var(--gold), var(--gold-dark));
  box-shadow: 0 14px 30px rgba(215, 170, 62, 0.16);
}

.nav-logout button,
.form-stack .btn,
.form-grid .btn {
  width: 100%;
}

.btn-muted,
.toolbar-link {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.58);
}

html[data-theme="dark"] .btn-muted,
html[data-theme="dark"] .toolbar-link {
  background: rgba(255, 255, 255, 0.04);
}

.page {
  min-width: 0;
  padding: 1.35rem;
}

.page-inner {
  width: min(82rem, 100%);
  margin: 0 auto;
}

.topbar,
.hero,
.panel,
.metric,
.login-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .hero,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .metric,
html[data-theme="dark"] .login-shell {
  background: linear-gradient(180deg, rgba(31, 25, 16, 0.96), rgba(13, 12, 10, 0.96));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.user-chip span {
  color: var(--muted);
  font-size: 0.88rem;
}

.hero {
  padding: 1.6rem;
  margin-bottom: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.05;
}

.hero p {
  margin: 0.65rem 0 0;
  max-width: 44rem;
}

.actions,
.hero-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.metric,
.panel {
  padding: 1.1rem;
}

.label,
label {
  color: var(--muted);
  font-size: 0.86rem;
}

.label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.value {
  margin-top: 0.35rem;
  font-family: var(--font-number);
  font-size: clamp(1.2rem, 2vw, 1.42rem);
  font-weight: 850;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.015em;
  color: var(--text);
  overflow-wrap: anywhere;
}

.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.panel h2,
.panel h3 {
  margin: 0 0 0.75rem;
}

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

form {
  margin: 0;
}

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

.form-stack {
  display: grid;
  gap: 0.85rem;
}

label {
  display: grid;
  gap: 0.45rem;
}

input,
textarea,
select {
  width: 100%;
  min-height: 2.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.82rem 0.9rem;
  color: var(--text);
  font: 0.95rem/1.35 var(--font-ui);
  background: rgba(255, 255, 255, 0.72);
  outline: none;
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  background: rgba(255, 255, 255, 0.055);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 149, 47, 0.16);
}

textarea {
  min-height: 7rem;
  resize: vertical;
}

select option {
  color: #111;
}

.full {
  grid-column: 1 / -1;
}

.flash-ok,
.flash-error {
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}

.flash-ok {
  color: #14532d;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(22, 163, 74, 0.28);
}

.flash-error {
  color: #7f1d1d;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.28);
}

html[data-theme="dark"] .flash-ok {
  color: #d9ffe7;
}

html[data-theme="dark"] .flash-error {
  color: #ffe4e4;
}

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

th,
td {
  text-align: left;
  padding: 0.78rem 0.65rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

th {
  color: var(--red);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

html[data-theme="dark"] th {
  color: var(--gold-2);
}

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

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

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 0.32rem 0.62rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.status-pill.ok {
  color: var(--success);
  border-color: rgba(21, 128, 61, 0.2);
  background: rgba(34, 197, 94, 0.1);
}

.status-pill.warn {
  color: #a16207;
  border-color: rgba(217, 119, 6, 0.22);
  background: rgba(245, 158, 11, 0.1);
}

.status-pill.gold {
  color: var(--gold-dark);
  border-color: rgba(201, 149, 47, 0.24);
  background: rgba(201, 149, 47, 0.12);
}

html[data-theme="dark"] .status-pill {
  background: rgba(255, 255, 255, 0.045);
}

html[data-theme="dark"] .status-pill.ok {
  color: #bbf7d0;
}

html[data-theme="dark"] .status-pill.warn {
  color: #fde68a;
}

html[data-theme="dark"] .status-pill.gold {
  color: var(--gold-2);
}

.empty-state {
  border: 1px dashed rgba(201, 149, 47, 0.3);
  border-radius: calc(var(--radius) + 8px);
  padding: 1.1rem;
  background: rgba(255, 255, 255, 0.52);
}

html[data-theme="dark"] .empty-state {
  background: rgba(255, 255, 255, 0.04);
}

.empty-state strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
}

.empty-state p {
  margin: 0.35rem 0 0;
}

.unilevel-hero {
  position: relative;
  overflow: hidden;
}

.unilevel-hero::after {
  content: "";
  position: absolute;
  right: -5rem;
  bottom: -6rem;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 149, 47, 0.2), transparent 66%);
  pointer-events: none;
}

.unilevel-orbit {
  position: relative;
  z-index: 1;
  width: 10.5rem;
  height: 10.5rem;
  display: grid;
  place-items: center;
  justify-self: end;
  border: 1px solid rgba(201, 149, 47, 0.32);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.9) 0 38%, transparent 39%),
    conic-gradient(from 210deg, var(--red), var(--gold), var(--red-dark), var(--red));
}

html[data-theme="dark"] .unilevel-orbit {
  background:
    radial-gradient(circle at 50% 50%, rgba(18, 15, 10, 0.96) 0 38%, transparent 39%),
    conic-gradient(from 210deg, var(--gold-dark), var(--gold-2), var(--gold), var(--gold-dark));
}

.unilevel-orbit span {
  position: absolute;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0.32rem rgba(255, 255, 255, 0.3);
}

.unilevel-orbit span:nth-child(1) {
  top: 0.7rem;
}

.unilevel-orbit span:nth-child(2) {
  right: 0.7rem;
}

.unilevel-orbit span:nth-child(3) {
  bottom: 0.7rem;
}

.unilevel-orbit span:nth-child(4) {
  left: 0.7rem;
}

.unilevel-orbit strong {
  display: grid;
  place-items: center;
  width: 6.3rem;
  height: 6.3rem;
  border-radius: 50%;
  color: var(--text);
  background: var(--surface);
  font-family: var(--font-display);
  font-size: 1.8rem;
  box-shadow: inset 0 0 0 1px var(--line);
}

.unilevel-levels,
.unilevel-table-panel {
  margin-top: 1rem;
}

.unilevel-level-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem;
}

.unilevel-level-card {
  display: grid;
  gap: 0.28rem;
  min-height: 6.1rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: 0.82rem;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.58);
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

html[data-theme="dark"] .unilevel-level-card {
  background: rgba(255, 255, 255, 0.04);
}

.unilevel-level-card:hover,
.unilevel-level-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(201, 149, 47, 0.5);
  outline: none;
}

.unilevel-level-card.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--red-2), var(--red), var(--red-dark));
}

html[data-theme="dark"] .unilevel-level-card.active {
  color: #090806;
  background: linear-gradient(135deg, var(--gold-2), var(--gold), var(--gold-dark));
}

.unilevel-level-card span {
  color: inherit;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.78;
}

.unilevel-level-card strong {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
}

.unilevel-level-card small {
  color: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  opacity: 0.68;
}

/* 2026 member portal refresh: cleaner, lighter, and less dated than the old admin-card look. */
:root {
  --bg: #fbf6f3;
  --bg-soft: #fffdfb;
  --surface: #ffffff;
  --surface-2: #fff8f4;
  --surface-3: #fff0e8;
  --line: rgba(72, 43, 37, 0.12);
  --line-soft: rgba(72, 43, 37, 0.08);
  --text: #201515;
  --muted: #6f5d59;
  --faint: #9b8a84;
  --shadow: 0 18px 48px rgba(79, 44, 32, 0.075);
  --radius: 14px;
}

body {
  background:
    radial-gradient(circle at 82% 0%, rgba(201, 149, 47, 0.16), transparent 22rem),
    radial-gradient(circle at 12% 18%, rgba(163, 19, 24, 0.08), transparent 20rem),
    linear-gradient(180deg, #fffdfb 0%, #fbf4f0 58%, #fff 100%);
}

.app-shell {
  grid-template-columns: 18rem minmax(0, 1fr);
}

.side-nav {
  padding: 1.55rem 1.45rem;
  background: rgba(255, 255, 255, 0.86);
  border-right: 1px solid rgba(60, 37, 32, 0.1);
  box-shadow: 18px 0 44px rgba(84, 54, 45, 0.055);
  backdrop-filter: blur(18px);
}

.brand {
  gap: 0.95rem;
  padding: 0.25rem 0.2rem 2rem;
}

.brand-logo {
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 1rem;
  object-fit: cover;
}

.brand-copy strong {
  color: #221311;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.brand-copy span {
  color: #a07d5d;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.nav-links {
  gap: 0.48rem;
}

.nav-links a {
  min-height: 3rem;
  border-radius: 1rem;
  padding: 0.85rem 0.95rem;
  color: #3e3533;
  font-weight: 800;
}

.nav-links a .ui-icon {
  width: 1.16rem;
  height: 1.16rem;
  color: #6f5d59;
  stroke-width: 1.95;
}

.nav-links a.active,
.nav-links a:hover {
  color: #fff;
  border-color: transparent;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.16), transparent 38%),
    linear-gradient(135deg, #ee2632, #b40e19 54%, #7d0711);
  box-shadow: 0 14px 26px rgba(163, 19, 24, 0.18);
}

.nav-links a.active .ui-icon,
.nav-links a:hover .ui-icon {
  color: #fff;
}

.nav-tools {
  margin-top: 1.4rem;
}

.theme-toggle,
.burger-button,
.btn-muted,
.toolbar-link {
  border-color: rgba(72, 43, 37, 0.12);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(79, 44, 32, 0.045);
}

.btn,
.nav-logout button {
  border-radius: 1rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 36%),
    linear-gradient(135deg, #ed2431, #b70f1a 56%, #850812);
  box-shadow: 0 16px 30px rgba(163, 19, 24, 0.18);
}

.btn:hover,
.btn-muted:hover,
.toolbar-link:hover,
.theme-toggle:hover,
.nav-logout button:hover {
  transform: translateY(-1px);
}

.page {
  padding: 1.55rem 1.75rem 2.4rem;
}

.page-inner {
  width: min(89rem, 100%);
}

.topbar,
.hero,
.panel,
.metric,
.login-shell {
  border-color: rgba(72, 43, 37, 0.11);
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero {
  min-height: 13.5rem;
  padding: clamp(1.5rem, 3vw, 2.35rem);
}

.hero h1 {
  color: #211313;
  font-size: clamp(2.45rem, 4.2vw, 4rem);
  letter-spacing: -0.055em;
}

.hero p {
  max-width: 43rem;
  color: #786661;
  font-size: 1rem;
  line-height: 1.75;
}

.metrics {
  gap: 1rem;
}

.metric {
  min-height: 7rem;
  border-radius: 1.15rem;
  padding: 1.15rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 250, 246, 0.74));
}

.metric .label {
  color: #81716c;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

.metric .value {
  color: #241413;
  font-size: clamp(1.38rem, 2.2vw, 1.85rem);
}

.metric p {
  margin: 0.35rem 0 0;
  color: #8d7c76;
  font-size: 0.78rem;
  line-height: 1.35;
}

th {
  color: #a4121a;
  font-size: 0.72rem;
  letter-spacing: 0.11em;
}

td {
  color: #554846;
}

tbody tr {
  transition: background 160ms ease;
}

tbody tr:hover {
  background: rgba(163, 19, 24, 0.035);
}

.member-pagination {
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: none;
}

.unilevel-hero {
  min-height: 14rem;
  isolation: isolate;
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.82), transparent 10rem),
    linear-gradient(105deg, rgba(255, 255, 255, 0.92) 0 48%, rgba(255, 245, 235, 0.9) 49% 100%);
}

.unilevel-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.78;
  background:
    repeating-linear-gradient(162deg, transparent 0 0.85rem, rgba(201, 149, 47, 0.075) 0.9rem 0.93rem),
    radial-gradient(circle at 76% 38%, rgba(163, 19, 24, 0.08), transparent 9rem);
}

.unilevel-hero::after {
  right: 8rem;
  bottom: -7rem;
  width: 26rem;
  height: 26rem;
  background: radial-gradient(circle, rgba(201, 149, 47, 0.16), transparent 64%);
}

.unilevel-hero-copy {
  position: relative;
  z-index: 1;
}

.unilevel-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 0.78rem;
  border: 1px solid rgba(201, 149, 47, 0.3);
  border-radius: 999px;
  padding: 0.34rem 0.62rem;
  color: var(--red);
  background: rgba(201, 149, 47, 0.08);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.unilevel-hero-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.15rem;
}

.unilevel-hero-strip span {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  border: 1px solid rgba(72, 43, 37, 0.1);
  border-radius: 999px;
  padding: 0.5rem 0.68rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 10px 26px rgba(79, 44, 32, 0.055);
  font-size: 0.78rem;
  font-weight: 850;
}

.unilevel-hero-strip strong {
  color: var(--text);
}

.unilevel-orbit {
  width: 12rem;
  height: 12rem;
  margin-right: 0.5rem;
  border: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.96) 0 38%, transparent 39%),
    conic-gradient(from 214deg, #a70813, #d71928, #e6bb5d, #8b0610, #a70813);
  box-shadow: 0 24px 48px rgba(163, 19, 24, 0.17);
}

.unilevel-orbit::before,
.unilevel-orbit::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(201, 149, 47, 0.32);
  border-radius: 50%;
}

.unilevel-orbit::before {
  inset: -1.05rem;
}

.unilevel-orbit::after {
  inset: 1.5rem;
  border-color: rgba(163, 19, 24, 0.12);
}

.unilevel-orbit span {
  z-index: 1;
  width: 1.05rem;
  height: 1.05rem;
  background: linear-gradient(135deg, #fff, #f7d986);
  box-shadow: 0 0 0 0.42rem rgba(255, 255, 255, 0.54);
}

.unilevel-orbit strong {
  z-index: 2;
  width: 6.85rem;
  height: 6.85rem;
  color: #241413;
  font-size: 2rem;
  background: #fffdfb;
  box-shadow: inset 0 0 0 1px rgba(72, 43, 37, 0.08);
}

.unilevel-metrics .metric {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.95rem;
  align-items: center;
}

.metric-orb {
  width: 3.45rem;
  height: 3.45rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #b30f19;
  background: radial-gradient(circle at 35% 30%, #fff, #ffdfe0);
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.metric-orb.gold {
  color: #956411;
  background: radial-gradient(circle at 35% 30%, #fff, #fde9b0);
}

.unilevel-levels {
  padding: 1.15rem;
}

.unilevel-level-grid {
  display: flex;
  gap: 0.72rem;
  overflow-x: auto;
  padding: 0.15rem 0.1rem 0.35rem;
  scrollbar-width: thin;
}

.unilevel-level-card {
  flex: 0 0 7.35rem;
  min-height: 6.9rem;
  border-color: rgba(72, 43, 37, 0.1);
  border-radius: 1rem;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 247, 0.78));
  box-shadow: 0 12px 30px rgba(79, 44, 32, 0.055);
}

.unilevel-level-card.active {
  background:
    radial-gradient(circle at 86% 100%, rgba(242, 210, 125, 0.74), transparent 3.8rem),
    linear-gradient(135deg, #ef2734, #b60d18 58%, #8a0610);
  box-shadow: 0 18px 36px rgba(163, 19, 24, 0.2);
}

.unilevel-level-card strong {
  font-size: 1.95rem;
}

.unilevel-table-panel {
  overflow: hidden;
  padding: 0;
}

.unilevel-table-head {
  align-items: center;
  border-bottom: 1px solid rgba(72, 43, 37, 0.08);
  margin-bottom: 0;
  padding: 1.25rem 1.25rem 1rem;
}

.unilevel-table-head h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.22rem;
}

.unilevel-table-head h2 span {
  border-radius: 999px;
  padding: 0.32rem 0.62rem;
  color: #b30f19;
  background: rgba(237, 36, 49, 0.09);
  font: 900 0.75rem/1 var(--font-ui);
}

.unilevel-table-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
}

.unilevel-search {
  min-width: min(18rem, 100%);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(72, 43, 37, 0.12);
  border-radius: 1rem;
  padding: 0.2rem 0.75rem;
  background: rgba(255, 255, 255, 0.82);
}

.unilevel-search .ui-icon {
  color: #8e7d76;
}

.unilevel-search input {
  min-height: 2.45rem;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.unilevel-search input:focus {
  box-shadow: none;
}

.unilevel-table-panel .table-wrap {
  padding: 0 1.25rem;
}

.unilevel-table-panel table {
  border-collapse: separate;
  border-spacing: 0;
}

.unilevel-table-panel th,
.unilevel-table-panel td {
  padding: 0.92rem 0.7rem;
}

.unilevel-table-panel tbody tr:last-child td {
  border-bottom: 0;
}

.unilevel-table-panel .member-pagination {
  margin: 0 1.25rem 1.2rem;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 82% 0%, rgba(242, 210, 125, 0.14), transparent 24rem),
    radial-gradient(circle at 12% 18%, rgba(215, 170, 62, 0.08), transparent 20rem),
    linear-gradient(180deg, #070707 0%, #11100d 58%, #080807 100%);
}

html[data-theme="dark"] .side-nav {
  background: rgba(10, 9, 7, 0.88);
  border-right-color: rgba(242, 210, 125, 0.13);
  box-shadow: none;
}

html[data-theme="dark"] .brand-copy strong,
html[data-theme="dark"] .hero h1 {
  color: var(--text);
}

html[data-theme="dark"] .nav-links a {
  color: #d1c5a4;
}

html[data-theme="dark"] .nav-links a .ui-icon {
  color: #bda86a;
}

html[data-theme="dark"] .nav-links a.active,
html[data-theme="dark"] .nav-links a:hover {
  color: #0a0805;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.2), transparent 38%),
    linear-gradient(135deg, var(--gold-2), var(--gold), var(--gold-dark));
  box-shadow: 0 14px 26px rgba(215, 170, 62, 0.14);
}

html[data-theme="dark"] .nav-links a.active .ui-icon,
html[data-theme="dark"] .nav-links a:hover .ui-icon {
  color: #0a0805;
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .hero,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .metric,
html[data-theme="dark"] .login-shell {
  border-color: rgba(242, 210, 125, 0.16);
  background: rgba(18, 16, 12, 0.86);
}

html[data-theme="dark"] .hero p,
html[data-theme="dark"] .metric p {
  color: var(--muted);
}

html[data-theme="dark"] .metric .label,
html[data-theme="dark"] td {
  color: #c7b68f;
}

html[data-theme="dark"] .metric .value,
html[data-theme="dark"] .unilevel-orbit strong {
  color: var(--text);
}

html[data-theme="dark"] .metric {
  background: linear-gradient(145deg, rgba(31, 25, 16, 0.9), rgba(16, 14, 11, 0.84));
}

html[data-theme="dark"] .unilevel-hero {
  background:
    radial-gradient(circle at 78% 18%, rgba(242, 210, 125, 0.08), transparent 10rem),
    linear-gradient(105deg, rgba(20, 17, 12, 0.96) 0 48%, rgba(28, 22, 13, 0.92) 49% 100%);
}

html[data-theme="dark"] .unilevel-hero::before {
  background:
    repeating-linear-gradient(162deg, transparent 0 0.85rem, rgba(242, 210, 125, 0.055) 0.9rem 0.93rem),
    radial-gradient(circle at 76% 38%, rgba(242, 210, 125, 0.08), transparent 9rem);
}

html[data-theme="dark"] .unilevel-hero .eyebrow {
  color: var(--gold-2);
  border-color: rgba(242, 210, 125, 0.18);
  background: rgba(242, 210, 125, 0.08);
}

html[data-theme="dark"] .unilevel-hero-strip span {
  border-color: rgba(242, 210, 125, 0.14);
  background: rgba(12, 10, 7, 0.7);
  box-shadow: none;
}

html[data-theme="dark"] .unilevel-hero-strip strong {
  color: var(--text);
}

html[data-theme="dark"] .unilevel-orbit {
  background:
    radial-gradient(circle at 50% 50%, rgba(18, 15, 10, 0.96) 0 38%, transparent 39%),
    conic-gradient(from 214deg, var(--gold-dark), var(--gold), var(--gold-2), var(--gold-dark));
}

html[data-theme="dark"] .unilevel-orbit strong,
html[data-theme="dark"] .unilevel-level-card,
html[data-theme="dark"] .unilevel-search,
html[data-theme="dark"] .member-pagination {
  background: rgba(12, 10, 7, 0.78);
}

html[data-theme="dark"] .unilevel-level-card.active {
  color: #0a0805;
  background:
    radial-gradient(circle at 86% 100%, rgba(255, 255, 255, 0.34), transparent 3.8rem),
    linear-gradient(135deg, var(--gold-2), var(--gold), var(--gold-dark));
}

html[data-theme="dark"] .unilevel-table-head h2 span {
  color: var(--gold-2);
  background: rgba(242, 210, 125, 0.08);
}

.profile-hero {
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 23rem);
  align-items: stretch;
  overflow: hidden;
}

.profile-hero-copy {
  display: grid;
  align-content: center;
  gap: 1rem;
}

.profile-identity {
  display: inline-grid;
  gap: 0.18rem;
  width: fit-content;
  border: 1px solid rgba(201, 149, 47, 0.24);
  border-radius: calc(var(--radius) + 10px);
  padding: 0.78rem 0.95rem;
  background: rgba(255, 255, 255, 0.56);
}

html[data-theme="dark"] .profile-identity {
  background: rgba(255, 255, 255, 0.045);
}

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

html[data-theme="dark"] .profile-identity span {
  color: var(--gold-2);
}

.profile-identity strong {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  line-height: 1.1;
}

.profile-avatar-card {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  justify-items: stretch;
  border: 1px solid rgba(201, 149, 47, 0.24);
  border-radius: calc(var(--radius) + 14px);
  padding: 1rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(201, 149, 47, 0.2), transparent 8rem),
    rgba(255, 255, 255, 0.58);
}

html[data-theme="dark"] .profile-avatar-card {
  background:
    radial-gradient(circle at 50% 0%, rgba(242, 210, 125, 0.16), transparent 8rem),
    rgba(255, 255, 255, 0.045);
}

.profile-avatar-frame {
  position: relative;
  width: min(12rem, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  justify-self: center;
  overflow: hidden;
  border: 1px solid rgba(201, 149, 47, 0.34);
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(163, 19, 24, 0.1), rgba(201, 149, 47, 0.18));
}

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

.profile-avatar-img.is-hidden,
.profile-avatar-placeholder.is-hidden {
  display: none;
}

.profile-avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 0;
  font-size: clamp(3.3rem, 9vw, 5rem);
  box-shadow: none;
}

.avatar-upload-form {
  display: grid;
  gap: 0.65rem;
}

.avatar-drop {
  position: relative;
  display: grid;
  gap: 0.22rem;
  min-height: 0;
  border: 1px dashed rgba(163, 19, 24, 0.26);
  border-radius: var(--radius);
  padding: 0.8rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

html[data-theme="dark"] .avatar-drop {
  border-color: rgba(242, 210, 125, 0.25);
  background: rgba(255, 255, 255, 0.04);
}

.avatar-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.avatar-drop span {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.42rem 0.72rem;
  color: #fff;
  background: linear-gradient(135deg, var(--red-2), var(--red-dark));
  font-weight: 900;
}

html[data-theme="dark"] .avatar-drop span {
  color: #0b0905;
  background: linear-gradient(135deg, var(--gold-2), var(--gold), var(--gold-dark));
}

.avatar-drop em {
  color: var(--text);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar-drop small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.danger-soft {
  width: 100%;
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.22);
  background: rgba(220, 38, 38, 0.07);
}

html[data-theme="dark"] .danger-soft {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.24);
  background: rgba(248, 113, 113, 0.1);
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(19rem, 0.9fr);
  gap: 1rem;
}

.panel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-title-row h2 {
  margin-bottom: 0.2rem;
}

.panel-title-row p {
  margin: 0;
}

.profile-info-list {
  display: grid;
  gap: 0.65rem;
}

.profile-info-row {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 0.78rem 0.85rem;
  background: rgba(255, 255, 255, 0.48);
}

html[data-theme="dark"] .profile-info-row {
  background: rgba(255, 255, 255, 0.035);
}

.profile-info-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.profile-info-row strong {
  min-width: 0;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.profile-bank-panel {
  margin-top: 1rem;
}

.profile-bank-table {
  margin-top: 1rem;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.login-shell {
  width: min(64rem, 100%);
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  overflow: hidden;
}

.login-story {
  padding: 3rem;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(201, 149, 47, 0.24), transparent 44%),
    linear-gradient(180deg, #a31318, #5f0b10);
}

html[data-theme="dark"] .login-story {
  background:
    linear-gradient(135deg, rgba(215, 170, 62, 0.18), transparent 42%),
    linear-gradient(180deg, #0a0907, #17120a);
}

.login-story h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 0.95;
}

.login-story p {
  color: rgba(255, 255, 255, 0.82);
}

.login-panel {
  padding: 3rem 2.2rem;
  background: rgba(255, 255, 255, 0.68);
}

html[data-theme="dark"] .login-panel {
  background: rgba(8, 8, 8, 0.5);
}

.login-panel h2 {
  margin: 0 0 0.45rem;
}

.theme-floating {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 5;
}

.mini-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 2rem;
}

.mini-kpis div {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  padding: 0.85rem;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.08);
}

.mini-kpis strong {
  display: block;
  color: var(--gold-2);
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.checkbox-label input {
  width: auto;
  min-height: auto;
}

.bottom-nav {
  display: none;
}

@media (max-width: 980px) {
  body {
    padding-bottom: calc(6.65rem + env(safe-area-inset-bottom, 0px));
  }

  .app-shell {
    display: block;
    min-height: 100vh;
  }

  .mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
  }

  .mobile-topbar > .brand {
    min-width: 0;
    flex: 1 1 auto;
  }

  .mobile-topbar .brand-copy {
    min-width: 0;
  }

  .mobile-topbar .brand-copy strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-toolbar-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.18rem;
  }

  .mobile-language-button,
  .mobile-status-icon,
  .mobile-toolbar-actions .icon-button {
    min-width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 0.75rem;
    color: var(--text);
    background: transparent;
    cursor: pointer;
  }

  .mobile-language-button {
    display: inline-flex;
    min-width: 3.4rem;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    padding: 0 0.35rem;
    font: 800 0.72rem/1 var(--font-ui);
  }

  .mobile-language-button:hover,
  .mobile-language-button[aria-expanded="true"],
  .mobile-status-icon:hover,
  .mobile-status-icon[aria-expanded="true"],
  .mobile-toolbar-actions .icon-button:hover {
    background: rgba(163, 19, 24, 0.07);
  }

  .mobile-status-icon .ui-icon,
  .mobile-toolbar-actions .icon-button .ui-icon {
    width: 1.2rem;
    height: 1.2rem;
  }

  .mobile-status-popover {
    position: fixed;
    z-index: 140;
    top: 4.65rem;
    right: 0.75rem;
    width: min(23rem, calc(100vw - 1.5rem));
    max-height: calc(100dvh - 6rem);
  }

  .mobile-status-popover.language-popover {
    width: min(18rem, calc(100vw - 1.5rem));
  }

  html[data-theme="dark"] .mobile-topbar {
    background: rgba(8, 8, 8, 0.86);
  }

  html[data-theme="dark"] .mobile-language-button:hover,
  html[data-theme="dark"] .mobile-language-button[aria-expanded="true"],
  html[data-theme="dark"] .mobile-status-icon:hover,
  html[data-theme="dark"] .mobile-status-icon[aria-expanded="true"],
  html[data-theme="dark"] .mobile-toolbar-actions .icon-button:hover {
    background: rgba(242, 210, 125, 0.1);
  }

  .mobile-topbar .brand {
    padding: 0;
  }

  .mobile-topbar .brand-copy span {
    display: none;
  }

  .side-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: min(19rem, calc(100vw - 3.5rem));
    height: 100vh;
    min-height: 0;
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    border-right: 1px solid var(--line);
  }

  body.nav-open .side-nav {
    transform: translateX(0);
  }

  body.nav-open .nav-backdrop {
    display: block;
  }

  .page {
    padding: 1rem 0.85rem;
  }

  .hero,
  .topbar {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .metrics,
  .panel-grid,
  .login-shell {
    grid-template-columns: 1fr;
  }

  .bottom-nav {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: max(0.7rem, env(safe-area-inset-bottom, 0px));
    z-index: 18;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    gap: 0.12rem;
    width: min(calc(100vw - 1.2rem), 29rem);
    min-height: 4.55rem;
    padding: 0.45rem 0.42rem;
    border: 1px solid rgba(126, 20, 25, 0.12);
    border-radius: 1.45rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 0.8rem 2.2rem rgba(67, 23, 25, 0.15);
    backdrop-filter: blur(22px) saturate(145%);
    transform: translateX(-50%);
    isolation: isolate;
  }

  html[data-theme="dark"] .bottom-nav {
    border-color: rgba(231, 190, 83, 0.2);
    background: rgba(18, 16, 12, 0.96);
    box-shadow: 0 0.9rem 2.4rem rgba(0, 0, 0, 0.42);
  }

  .bottom-nav a,
  .bottom-menu-button {
    position: relative;
    min-width: 0;
    min-height: 3.55rem;
    padding: 0.3rem 0.15rem;
    flex-direction: column;
    gap: 0.16rem;
    border-radius: 1rem;
    color: var(--muted);
    background: transparent;
    border: 0;
    font-size: 0.66rem;
    font-weight: 750;
    letter-spacing: -0.01em;
    line-height: 1;
    transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
  }

  .bottom-nav a:active,
  .bottom-menu-button:active {
    transform: scale(0.95);
  }

  .bottom-nav-icon {
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border-radius: 0.72rem;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
  }

  .bottom-nav .ui-icon {
    width: 1.22rem;
    height: 1.22rem;
    stroke-width: 1.9;
  }

  .bottom-nav a.active {
    color: var(--red-dark);
    background: linear-gradient(180deg, rgba(196, 27, 35, 0.09), rgba(196, 27, 35, 0.025));
  }

  .bottom-nav a.active .bottom-nav-icon {
    color: #fff;
    background: linear-gradient(145deg, var(--red-2), var(--red-dark));
    box-shadow: 0 0.35rem 0.85rem rgba(163, 19, 24, 0.22);
    transform: translateY(-0.08rem);
  }

  html[data-theme="dark"] .bottom-nav a.active {
    color: var(--gold-2);
  }

  html[data-theme="dark"] .bottom-nav a.active .bottom-nav-icon {
    color: #171006;
    background: linear-gradient(145deg, var(--gold-2), var(--gold-dark));
    box-shadow: 0 0.35rem 0.9rem rgba(212, 164, 54, 0.24);
  }

  .bottom-menu-button {
    align-self: end;
    min-height: 4.45rem;
    margin: -1.15rem 0 -0.05rem;
    color: var(--red-dark);
    overflow: visible;
  }

  .bottom-menu-icon {
    display: grid;
    width: 3.45rem;
    height: 3.45rem;
    place-items: center;
    border: 0.28rem solid rgba(255, 255, 255, 0.98);
    border-radius: 1.18rem;
    color: #fff;
    background: linear-gradient(145deg, #e12832 0%, var(--red) 48%, #8f0d14 100%);
    box-shadow: 0 0.65rem 1.35rem rgba(154, 16, 23, 0.32);
    transform: rotate(-2deg);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .bottom-menu-button .ui-icon {
    width: 1.45rem;
    height: 1.45rem;
    stroke-width: 2;
  }

  .bottom-menu-button.active {
    color: var(--red-dark);
  }

  .bottom-menu-button.active .bottom-menu-icon {
    box-shadow: 0 0 0 0.2rem rgba(224, 176, 61, 0.28), 0 0.7rem 1.45rem rgba(154, 16, 23, 0.36);
    transform: translateY(-0.08rem) rotate(0);
  }

  html[data-theme="dark"] .bottom-menu-button {
    color: var(--gold-2);
  }

  html[data-theme="dark"] .bottom-menu-icon {
    border-color: rgba(18, 16, 12, 0.98);
    color: #171006;
    background: linear-gradient(145deg, #f7dc8b 0%, var(--gold) 52%, #9d6c16 100%);
    box-shadow: 0 0.65rem 1.35rem rgba(0, 0, 0, 0.42);
  }

  html[data-theme="dark"] .bottom-menu-button.active .bottom-menu-icon {
    box-shadow: 0 0 0 0.2rem rgba(175, 25, 31, 0.25), 0 0.7rem 1.45rem rgba(0, 0, 0, 0.46);
  }

  .bottom-nav a:focus-visible,
  .bottom-menu-button:focus-visible {
    outline: 0.16rem solid rgba(201, 149, 47, 0.65);
    outline-offset: 0.1rem;
  }

}

.member-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.68rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 24px rgba(89, 18, 18, 0.055);
}

html[data-theme="dark"] .member-pagination {
  border-color: rgba(242, 210, 125, 0.22);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: none;
}

.pagination-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
}

.pagination-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  border: 1px solid rgba(163, 19, 24, 0.1);
  border-radius: 999px;
  padding: 0 0.6rem;
  color: var(--red);
  background: rgba(163, 19, 24, 0.06);
  font-variant-numeric: tabular-nums;
}

html[data-theme="dark"] .pagination-meta span {
  color: var(--gold-2);
  border-color: rgba(242, 210, 125, 0.18);
  background: rgba(242, 210, 125, 0.08);
}

.pagination-meta strong {
  color: var(--text);
  font-weight: 800;
}

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  min-width: 0;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
}

.pagination-step,
.pagination-pages a,
.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.18rem;
  min-width: 2.18rem;
  border: 1px solid var(--line);
  border-radius: 0.78rem;
  padding: 0 0.62rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  background: rgba(255, 255, 255, 0.64);
  font-variant-numeric: tabular-nums;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

html[data-theme="dark"] .pagination-step,
html[data-theme="dark"] .pagination-pages a,
html[data-theme="dark"] .pagination-ellipsis {
  background: rgba(255, 255, 255, 0.055);
}

.pagination-step:hover,
.pagination-step:focus-visible,
.pagination-pages a:hover,
.pagination-pages a:focus-visible {
  border-color: rgba(201, 149, 47, 0.54);
  background: rgba(255, 255, 255, 0.95);
  color: var(--red);
  outline: none;
}

html[data-theme="dark"] .pagination-step:hover,
html[data-theme="dark"] .pagination-step:focus-visible,
html[data-theme="dark"] .pagination-pages a:hover,
html[data-theme="dark"] .pagination-pages a:focus-visible {
  background: rgba(255, 255, 255, 0.095);
  color: var(--gold-2);
}

.pagination-pages a.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--red-2), var(--red), var(--red-dark));
}

html[data-theme="dark"] .pagination-pages a.active {
  color: #0b0905;
  background: linear-gradient(135deg, var(--gold-2), var(--gold), var(--gold-dark));
}

.pagination-step.disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.45;
}

.pagination-ellipsis {
  min-width: 1.4rem;
  border-color: transparent;
  color: var(--muted);
  background: transparent;
  padding: 0 0.15rem;
}

@media (max-width: 680px) {
  .page {
    padding: 0.85rem;
  }

  .nav-links,
  .form-grid,
  .mini-kpis {
    grid-template-columns: 1fr;
  }

  .hero,
  .profile-hero,
  .panel,
  .metric,
  .login-story,
  .login-panel {
    padding: 1rem;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn,
  .hero-actions .btn-muted,
  .hero-actions input {
    flex: 1 1 100%;
  }

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

  .profile-avatar-card {
    justify-items: center;
  }

  .profile-avatar-frame {
    width: min(9.5rem, 70vw);
  }

  .panel-title-row {
    display: grid;
  }

  .panel-title-row .btn-muted {
    width: 100%;
  }

  .profile-info-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .unilevel-orbit {
    width: 8rem;
    height: 8rem;
    justify-self: center;
  }

  .unilevel-orbit strong {
    width: 4.9rem;
    height: 4.9rem;
    font-size: 1.35rem;
  }

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

  .mobile-card-table table,
  .mobile-card-table thead,
  .mobile-card-table tbody,
  .mobile-card-table tr,
  .mobile-card-table th,
  .mobile-card-table td {
    display: block;
  }

  .mobile-card-table thead {
    display: none;
  }

  .mobile-card-table tr {
    border: 1px solid var(--line-soft);
    border-radius: calc(var(--radius) + 6px);
    margin-bottom: 0.7rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.48);
  }

  html[data-theme="dark"] .mobile-card-table tr {
    background: rgba(255, 255, 255, 0.035);
  }

  .mobile-card-table td {
    display: grid;
    grid-template-columns: 6.7rem minmax(0, 1fr);
    gap: 0.55rem;
    border-bottom: 0;
    padding: 0.35rem 0;
  }

  .mobile-card-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .member-pagination {
    flex-direction: column;
    align-items: stretch;
    padding: 0.62rem;
  }

  .pagination-meta {
    justify-content: center;
    text-align: center;
  }

  .pagination-controls {
    justify-content: space-between;
    gap: 0.28rem;
  }

  .pagination-pages {
    flex: 1 1 auto;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 0.1rem 0.05rem;
    scrollbar-width: thin;
  }

  .pagination-step,
  .pagination-pages a,
  .pagination-ellipsis {
    height: 2rem;
    min-width: 2rem;
    border-radius: 0.68rem;
    padding: 0 0.52rem;
    font-size: 0.78rem;
  }
}

/* Readability pass: keep premium tone without oversized serif headings or hard-to-scan numbers. */
.metric .value,
.summary-card strong,
.pin-values strong,
.reward-amount,
.node-volume,
.pagination-meta,
.admin-mono,
table td,
table th,
input,
select,
textarea {
  font-family: var(--font-number) !important;
  font-variant-numeric: tabular-nums lining-nums !important;
}

table td,
table th {
  font-family: var(--font-ui);
}

.hero h1,
.topbar h1,
.portal-hero .hero-copy h1 {
  font-family: var(--font-display) !important;
  font-size: clamp(1.85rem, 4.2vw, 3.35rem) !important;
  line-height: 1.05 !important;
  letter-spacing: -0.035em !important;
}

.panel h2,
.panel h3,
.portal-card h2,
.reward-tier h2,
.pin-region h2 {
  font-family: var(--font-display) !important;
  letter-spacing: -0.018em !important;
}

@media (max-width: 680px) {
  .value {
    font-size: 1.18rem;
  }

  .hero h1,
  .topbar h1,
  .portal-hero .hero-copy h1 {
    font-size: clamp(1.75rem, 9vw, 2.45rem) !important;
  }
}

/* Final responsive pass for the refreshed member portal UI. */
@media (max-width: 680px) {
  .page {
    padding: 0.85rem 0.85rem 6.4rem;
  }

  .page-inner {
    gap: 0.9rem;
  }

  .hero.unilevel-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 1.15rem;
  }

  .unilevel-hero .eyebrow {
    font-size: 0.66rem;
  }

  .unilevel-orbit {
    width: min(8.8rem, 58vw);
    height: min(8.8rem, 58vw);
    margin: 0.35rem auto 0;
  }

  .unilevel-orbit strong {
    width: 5.35rem;
    height: 5.35rem;
    font-size: 1.35rem;
  }

  .unilevel-metrics .metric {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: auto;
    padding: 0.9rem;
  }

  .metric-orb {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.9rem;
  }

  .unilevel-levels {
    padding: 1rem;
  }

  .unilevel-level-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
    gap: 0.58rem;
  }

  .unilevel-level-card {
    min-height: 6rem;
    min-width: 0;
    padding: 0.8rem;
  }

  .unilevel-table-head {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
  }

  .unilevel-table-tools {
    justify-content: stretch;
  }

  .unilevel-search {
    min-width: 0;
    width: 100%;
  }

  .unilevel-table-tools .btn-muted {
    width: 100%;
  }

  .unilevel-table-panel .table-wrap {
    padding: 0 1rem;
  }

  .unilevel-table-panel .member-pagination {
    margin: 0 1rem 1rem;
  }
}

/* Reference-template pass: clean white fintech member portal with Utophia red/gold accents. */
body {
  background:
    radial-gradient(circle at 82% 6%, rgba(201, 149, 47, 0.08), transparent 18rem),
    linear-gradient(180deg, #ffffff 0%, #fbfbfa 100%);
}

.app-shell {
  display: grid;
  grid-template-columns: 17.6rem minmax(0, 1fr);
  grid-template-rows: 4.35rem minmax(0, 1fr);
  min-height: 100vh;
  background: #fff;
}

.side-nav {
  position: sticky;
  top: 0;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  min-height: 100vh;
  border-right: 1px solid #e8e8e8;
  padding: 2rem 1.45rem 1.5rem;
  background: linear-gradient(180deg, #fff 0%, #fdfdfc 100%);
  box-shadow: none;
}

.brand {
  gap: 0.85rem;
}

.side-nav > .brand {
  margin-bottom: 1.1rem;
}

.brand-logo {
  width: 4.15rem;
  height: 4.15rem;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
  box-shadow: none;
}

.brand-copy strong {
  color: #d50f1f;
  font-size: 1.35rem;
  font-weight: 950;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.brand-copy span {
  margin-top: 0.05rem;
  color: #c9952f;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.nav-links {
  gap: 0.35rem;
}

.nav-links a {
  min-height: 3.05rem;
  border-radius: 0.95rem;
  padding: 0 0.9rem;
  color: #4d515d;
  background: transparent;
  font-size: 0.93rem;
  font-weight: 720;
}

.nav-links a .ui-icon {
  width: 1.28rem;
  height: 1.28rem;
  color: #333846;
  stroke-width: 1.8;
}

.nav-links a.active,
.nav-links a:hover {
  color: #fff;
  background:
    radial-gradient(circle at 86% 94%, rgba(242, 210, 125, 0.55), transparent 3.8rem),
    linear-gradient(135deg, #b90817 0%, #e20d24 100%);
  box-shadow: 0 1.15rem 2.2rem rgba(196, 13, 30, 0.2);
}

.nav-links a.active .ui-icon,
.nav-links a:hover .ui-icon {
  color: #fff;
}

.nav-tools {
  margin-top: auto;
  gap: 0.8rem;
}

.nav-tools .theme-toggle,
.nav-tools .nav-logout {
  display: none;
}

.sidebar-promo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.35rem;
  gap: 0.7rem;
  align-items: center;
  border: 1px solid #ececec;
  border-radius: 1.05rem;
  padding: 0.9rem;
  color: #111827;
  text-decoration: none;
  background:
    radial-gradient(circle at 88% 62%, rgba(201, 149, 47, 0.18), transparent 4.5rem),
    linear-gradient(135deg, #fff 0%, #fffaf0 100%);
  box-shadow: 0 1rem 2.4rem rgba(17, 24, 39, 0.055);
}

.sidebar-promo strong,
.sidebar-promo small,
.sidebar-promo em {
  display: block;
}

.sidebar-promo strong {
  font-size: 0.88rem;
  font-weight: 900;
}

.sidebar-promo small {
  margin-top: 0.18rem;
  color: #676b76;
  font-size: 0.72rem;
  font-weight: 650;
}

.sidebar-promo em {
  margin-top: 1rem;
  color: #d2091d;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 900;
}

.promo-goldbar {
  width: 2.35rem;
  height: 4.5rem;
  justify-self: end;
  border-radius: 0.52rem;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.52), transparent 38%),
    linear-gradient(155deg, #f6d879, #c9952f 48%, #8b5c12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34), 0 0.8rem 1.6rem rgba(128, 83, 19, 0.2);
  transform: rotate(8deg);
}

.sidebar-account {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.78rem;
  align-items: center;
  border: 1px solid #e9e9e9;
  border-radius: 1.05rem;
  padding: 0.9rem;
  background: #fff;
  box-shadow: 0 1rem 2.4rem rgba(17, 24, 39, 0.055);
}

.sidebar-avatar {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #c41120;
  background: #fee2e2;
  font-weight: 900;
}

.sidebar-account strong,
.sidebar-account small {
  display: block;
}

.sidebar-account strong {
  overflow: hidden;
  color: #111827;
  font-size: 0.86rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-account small {
  margin-top: 0.12rem;
  color: #6b7280;
  font-size: 0.78rem;
}

.sidebar-account .ui-icon {
  width: 1rem;
  color: #111827;
  transform: rotate(90deg);
}

.desktop-statusbar {
  position: relative;
  z-index: 80;
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  border-bottom: 1px solid #ededed;
  padding: 0 2.35rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  isolation: isolate;
  overflow: visible;
}

.statusbar-actions,
.statusbar-logout {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.status-menu {
  position: relative;
  display: flex;
  align-items: center;
}

.language-pill,
.status-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #111827;
  background: transparent;
  font: 800 0.9rem/1 var(--font-ui);
  cursor: pointer;
}

.language-pill {
  gap: 0.42rem;
  min-height: 2.2rem;
  border-radius: 999px;
  padding: 0 0.65rem;
}

.status-chevron {
  display: inline-block;
  transition: transform 180ms ease;
}

[aria-expanded="true"] .status-chevron {
  transform: rotate(180deg);
}

.status-icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
}

.status-icon:hover,
.language-pill:hover {
  background: #f6f7f8;
}

.notification-dot {
  position: absolute;
  top: 0.1rem;
  right: 0.16rem;
  min-width: 1rem;
  height: 1rem;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: #d8091d;
  font-size: 0.62rem;
  font-weight: 900;
}

.notification-dot[hidden],
.status-popover[hidden] {
  display: none;
}

.status-popover {
  position: absolute;
  z-index: 120;
  top: calc(100% + 0.85rem);
  right: 0;
  overflow: hidden;
  width: min(23rem, calc(100vw - 2rem));
  border: 1px solid #e8e8e8;
  border-radius: 1rem;
  color: #171717;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1.25rem 3rem rgba(25, 17, 10, 0.15);
  backdrop-filter: blur(18px);
  animation: status-popover-in 160ms ease-out both;
}

@keyframes status-popover-in {
  from { opacity: 0; transform: translateY(-0.35rem) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.language-popover {
  width: 16.5rem;
  padding: 0.6rem;
}

.status-popover-label {
  display: block;
  padding: 0.35rem 0.55rem 0.55rem;
  color: #7b7b7b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.language-option {
  display: grid;
  grid-template-columns: 1.5rem 1fr 1rem;
  gap: 0.65rem;
  align-items: center;
  width: 100%;
  border: 0;
  border-radius: 0.75rem;
  padding: 0.7rem;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.language-option:hover,
.language-option.is-selected {
  background: #fff3f3;
}

.language-option strong,
.language-option small {
  display: block;
}

.language-option strong {
  font-size: 0.84rem;
}

.language-option small {
  margin-top: 0.18rem;
  color: #787878;
  font-size: 0.72rem;
}

.language-check {
  color: #c90c20;
  font-weight: 900;
  opacity: 0;
}

.language-option.is-selected .language-check {
  opacity: 1;
}

.notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #ededed;
  padding: 0.95rem 1rem;
}

.notification-header span,
.notification-header strong,
.notification-header small {
  display: block;
}

.notification-header strong {
  font-size: 0.95rem;
}

.notification-header small {
  margin-top: 0.16rem;
  color: #777;
  font-size: 0.72rem;
}

.notification-header a {
  flex: 0 0 auto;
  color: #c90c20;
  font-size: 0.74rem;
  font-weight: 850;
  text-decoration: none;
}

.notification-list {
  max-height: min(25rem, 65vh);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.notification-item {
  display: grid;
  grid-template-columns: 0.55rem 1fr;
  gap: 0.75rem;
  border-bottom: 1px solid #f0f0f0;
  padding: 0.9rem 1rem;
  color: inherit;
  text-decoration: none;
  transition: background 150ms ease, transform 150ms ease;
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-item:hover {
  background: #fff8f8;
  transform: translateX(-0.12rem);
}

.notification-marker {
  width: 0.45rem;
  height: 0.45rem;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #d50c22, #eab84d);
  box-shadow: 0 0 0 0.25rem rgba(213, 12, 34, 0.08);
}

.notification-item strong,
.notification-item small,
.notification-item em {
  display: block;
}

.notification-item strong {
  font-size: 0.84rem;
  line-height: 1.35;
}

.notification-item small {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 0.2rem;
  color: #707070;
  font-size: 0.75rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.notification-item em {
  margin-top: 0.38rem;
  color: #c90c20;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 850;
}

.notification-state {
  padding: 1.35rem 1rem;
  color: #777;
  font-size: 0.8rem;
  text-align: center;
}

.page {
  grid-column: 2;
  grid-row: 2;
  padding: 0;
  background: #fff;
}

.page-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 2.35rem 2.35rem;
}

.hero,
.panel,
.metric,
.topbar {
  border-color: #e9e9e9;
  border-radius: 1.05rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1.2rem 3.4rem rgba(17, 24, 39, 0.055);
}

.unilevel-hero {
  min-height: 12.4rem;
  align-items: start;
  border: 0;
  border-radius: 0;
  margin: 0 -2.35rem 0;
  padding: 4.05rem 3.2rem 5.7rem;
  background:
    radial-gradient(circle at 77% 48%, rgba(201, 149, 47, 0.17), transparent 7.5rem),
    radial-gradient(circle at 87% 34%, rgba(205, 18, 33, 0.08), transparent 8.5rem),
    repeating-linear-gradient(151deg, transparent 0 0.7rem, rgba(201, 149, 47, 0.08) 0.74rem 0.78rem),
    linear-gradient(105deg, #fff 0%, #fbf7f1 100%);
  box-shadow: none;
}

.unilevel-hero::before {
  inset: 0;
  opacity: 1;
  background:
    radial-gradient(circle at 74% 48%, transparent 0 5.8rem, rgba(201, 149, 47, 0.18) 5.9rem 6rem, transparent 6.1rem),
    radial-gradient(circle at 74% 48%, rgba(255, 255, 255, 0.7), transparent 8rem),
    linear-gradient(100deg, transparent 0 50%, rgba(255, 255, 255, 0.54) 51% 100%);
}

.unilevel-hero::after {
  right: 9%;
  bottom: -4.8rem;
  width: 14rem;
  height: 14rem;
  border: 1px solid rgba(201, 149, 47, 0.2);
  background:
    radial-gradient(circle at 36% 42%, #b80c1b 0 0.38rem, transparent 0.42rem),
    radial-gradient(circle at 70% 28%, #c9952f 0 0.28rem, transparent 0.32rem),
    radial-gradient(circle at 58% 72%, #d50f1f 0 0.34rem, transparent 0.38rem),
    repeating-linear-gradient(28deg, transparent 0 0.85rem, rgba(201, 149, 47, 0.17) 0.88rem 0.9rem),
    radial-gradient(circle, rgba(255, 255, 255, 0.88), rgba(255, 245, 233, 0.7) 62%, transparent 63%);
  opacity: 0.95;
}

.unilevel-hero h1 {
  color: #141820;
  font-size: clamp(2rem, 3vw, 2.6rem) !important;
  letter-spacing: -0.045em !important;
}

.unilevel-hero p {
  margin-top: 0.55rem;
  color: #636775;
  font-size: 0.98rem;
}

.unilevel-orbit {
  display: none;
}

.unilevel-metrics {
  position: relative;
  z-index: 2;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: -4.1rem;
}

.unilevel-metrics .metric {
  min-height: 7.7rem;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.05rem;
  align-items: center;
  border: 1px solid #ededed;
  border-radius: 1rem;
  padding: 1.15rem;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1.15rem 2.8rem rgba(17, 24, 39, 0.07);
}

.metric-orb {
  width: 3.9rem;
  height: 3.9rem;
  border-radius: 50%;
  color: #b10d1a;
  background: linear-gradient(135deg, #ffe2e4, #fff2f3);
}

.metric-orb.gold {
  color: #c08a21;
  background: linear-gradient(135deg, #fff0c7, #fff8e7);
}

.metric-orb svg {
  width: 1.55rem;
  height: 1.55rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.metric .label {
  color: #656977;
  font-size: 0.86rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.metric .value {
  margin-top: 0.35rem;
  color: #111827;
  font-size: 1.55rem;
  font-weight: 930;
}

.metric p {
  color: #676b76;
  font-size: 0.78rem;
}

.unilevel-metrics .metric:last-child .value {
  color: #d2091d;
}

.unilevel-levels {
  margin-top: 1.85rem;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.unilevel-levels .panel-title-row {
  display: none;
}

.unilevel-level-grid {
  gap: 0.7rem;
  padding: 0.1rem 0 0.55rem;
}

.unilevel-level-card {
  flex: 1 0 6.1rem;
  min-width: 5.75rem;
  min-height: 6.25rem;
  place-items: center;
  align-content: center;
  gap: 0.35rem;
  border: 1px solid #ececec;
  border-radius: 0.9rem;
  padding: 0.85rem 0.65rem;
  color: #111827;
  text-align: center;
  background: #fff;
  box-shadow: 0 1rem 2.6rem rgba(17, 24, 39, 0.055);
}

.unilevel-level-card span {
  font-size: 0.9rem;
  font-weight: 880;
  letter-spacing: -0.01em;
  text-transform: none;
}

.unilevel-level-card strong {
  font-size: 0.86rem;
  font-weight: 760;
}

.unilevel-level-card small {
  color: #686d78;
  font-size: 0.76rem;
  font-weight: 650;
}

.unilevel-level-card.active {
  color: #fff;
  background:
    radial-gradient(circle at 85% 100%, rgba(242, 210, 125, 0.8), transparent 3.9rem),
    linear-gradient(135deg, #b90817, #e20d24);
  box-shadow: 0 1.15rem 2.6rem rgba(196, 13, 30, 0.22);
}

.unilevel-level-card.active small {
  color: rgba(255, 255, 255, 0.86);
}

.unilevel-table-panel {
  margin-top: 1.05rem;
  border: 1px solid #e6e7eb;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1.15rem 3rem rgba(17, 24, 39, 0.06);
}

.unilevel-table-head {
  grid-template-columns: minmax(0, 1fr) auto;
  border-bottom: 1px solid #eceef2;
  padding: 1.18rem 1.55rem;
}

.unilevel-table-head h2 {
  color: #111827;
  font-size: 1.45rem;
  letter-spacing: -0.035em;
}

.unilevel-table-head h2 span {
  color: #d2091d;
  background: #ffe8e9;
  font-size: 0.78rem;
}

.unilevel-table-head p {
  display: none;
}

.unilevel-table-tools {
  flex-wrap: nowrap;
}

.unilevel-search {
  min-width: 18.5rem;
  min-height: 2.85rem;
  border-color: #e3e5ea;
  border-radius: 0.72rem;
  padding: 0 0.75rem;
  background: #fff;
}

.unilevel-search input {
  color: #111827;
  font-size: 0.88rem;
}

.unilevel-filter-button {
  min-height: 2.85rem;
  border-radius: 0.72rem;
  padding: 0 0.85rem;
  gap: 0.45rem;
}

.unilevel-table-panel .table-wrap {
  padding: 0;
}

.unilevel-table-panel table {
  width: 100%;
  border-collapse: collapse;
}

.unilevel-table-panel th,
.unilevel-table-panel td {
  border-bottom: 1px solid #eceef2;
  padding: 1.02rem 1.55rem;
}

.unilevel-table-panel th {
  color: #4f5665;
  background: #fbfbfc;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
}

.unilevel-table-panel td {
  color: #1f2937;
  font-size: 0.88rem;
}

.unilevel-table-panel tbody tr:hover {
  background: #fff9f4;
}

.status-pill {
  border: 0;
  border-radius: 999px;
  padding: 0.38rem 0.72rem;
  font-size: 0.78rem;
  font-weight: 780;
}

.status-pill.ok {
  color: #159229;
  background: #def7df;
}

.status-pill.warn {
  color: #f05a1a;
  background: #fff0e7;
}

.status-pill.gold {
  color: #855a13;
  background: #fff2cf;
}

.unilevel-table-panel .member-pagination {
  margin: 0;
  border: 0;
  border-radius: 0 0 1rem 1rem;
  padding: 1rem 1.55rem;
  background: #fff;
}

.pagination-step,
.pagination-pages a,
.pagination-ellipsis {
  border-color: #eef0f3;
  border-radius: 0.72rem;
  color: #111827;
  background: #fff;
}

.pagination-pages a.active {
  background:
    radial-gradient(circle at 88% 100%, rgba(242, 210, 125, 0.68), transparent 2.4rem),
    linear-gradient(135deg, #b90817, #df0e23);
  box-shadow: 0 0.8rem 1.6rem rgba(196, 13, 30, 0.18);
}

html[data-theme="dark"] body {
  background: linear-gradient(180deg, #070707, #101010);
}

html[data-theme="dark"] .app-shell {
  background: #080807;
}

html[data-theme="dark"] .side-nav,
html[data-theme="dark"] .desktop-statusbar,
html[data-theme="dark"] .page {
  border-color: rgba(242, 210, 125, 0.15);
  background: #080807;
}

html[data-theme="dark"] .brand-copy strong,
html[data-theme="dark"] .nav-links a,
html[data-theme="dark"] .language-pill,
html[data-theme="dark"] .status-icon {
  color: #fff8e8;
}

html[data-theme="dark"] .status-popover {
  border-color: rgba(242, 210, 125, 0.18);
  color: #fff8e8;
  background: rgba(18, 15, 10, 0.98);
  box-shadow: 0 1.25rem 3rem rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .notification-header,
html[data-theme="dark"] .notification-item {
  border-color: rgba(242, 210, 125, 0.12);
}

html[data-theme="dark"] .language-option:hover,
html[data-theme="dark"] .language-option.is-selected,
html[data-theme="dark"] .notification-item:hover {
  background: rgba(242, 210, 125, 0.08);
}

html[data-theme="dark"] .language-option small,
html[data-theme="dark"] .notification-header small,
html[data-theme="dark"] .notification-item small,
html[data-theme="dark"] .notification-state,
html[data-theme="dark"] .status-popover-label {
  color: #bdb6a8;
}

html[data-theme="dark"] .sidebar-promo,
html[data-theme="dark"] .sidebar-account,
html[data-theme="dark"] .hero,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .metric {
  border-color: rgba(242, 210, 125, 0.16);
  background: linear-gradient(145deg, rgba(24, 20, 14, 0.95), rgba(10, 9, 7, 0.95));
  box-shadow: 0 1.2rem 3.4rem rgba(0, 0, 0, 0.26);
}

html[data-theme="dark"] .unilevel-hero {
  background:
    radial-gradient(circle at 77% 48%, rgba(242, 210, 125, 0.16), transparent 7.5rem),
    repeating-linear-gradient(151deg, transparent 0 0.7rem, rgba(242, 210, 125, 0.07) 0.74rem 0.78rem),
    linear-gradient(105deg, #14110c 0%, #080807 100%);
}

html[data-theme="dark"] .unilevel-hero h1,
html[data-theme="dark"] .metric .value,
html[data-theme="dark"] .unilevel-table-head h2,
html[data-theme="dark"] .unilevel-table-panel td {
  color: #fff8e8;
}

html[data-theme="dark"] .unilevel-table-panel,
html[data-theme="dark"] .unilevel-table-panel .member-pagination,
html[data-theme="dark"] .unilevel-search,
html[data-theme="dark"] .unilevel-table-panel th {
  border-color: rgba(242, 210, 125, 0.13);
  background: rgba(14, 12, 9, 0.96);
}

/* Keep desktop navigation anchored while allowing long menus to scroll. */
@media (min-width: 981px) {
  .side-nav {
    position: fixed;
    inset: 0 auto 0 0;
    width: 17.6rem;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(163, 19, 24, 0.38) transparent;
  }

  .side-nav > * {
    flex-shrink: 0;
  }

  .side-nav::-webkit-scrollbar {
    width: 0.45rem;
  }

  .side-nav::-webkit-scrollbar-track {
    background: transparent;
  }

  .side-nav::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(163, 19, 24, 0.32);
  }

  .side-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(163, 19, 24, 0.52);
  }

  html[data-theme="dark"] .side-nav {
    scrollbar-color: rgba(242, 210, 125, 0.42) transparent;
  }

  html[data-theme="dark"] .side-nav::-webkit-scrollbar-thumb {
    background: rgba(242, 210, 125, 0.34);
  }

  html[data-theme="dark"] .side-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(242, 210, 125, 0.56);
  }
}

@media (max-width: 980px) {
  .app-shell {
    display: block;
    background: #fff;
  }

  .desktop-statusbar,
  .sidebar-promo,
  .sidebar-account {
    display: none;
  }

  .side-nav {
    position: fixed;
  }

  .brand-logo {
    width: 3.25rem;
    height: 3.25rem;
  }

  .page-inner {
    padding: 0 1rem 6.5rem;
  }

  .unilevel-hero {
    margin: 0 -1rem;
    padding: 5.25rem 1.15rem 4.8rem;
  }

  .unilevel-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: -3.4rem;
  }

  .unilevel-level-card {
    flex: 0 0 6.4rem;
  }

  .unilevel-table-head {
    grid-template-columns: 1fr;
  }

  .unilevel-table-tools {
    width: 100%;
  }

  .unilevel-search {
    flex: 1 1 auto;
    min-width: 0;
  }
}

@media (max-width: 680px) {
  .unilevel-metrics {
    grid-template-columns: 1fr;
  }

  .unilevel-metrics .metric {
    min-height: auto;
  }

  .unilevel-level-grid {
    display: flex;
    overflow-x: auto;
  }

  .unilevel-table-tools {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .unilevel-filter-button span {
    display: none;
  }

  .unilevel-table-panel th,
  .unilevel-table-panel td {
    padding: 0.52rem 0;
  }
}

@media (max-width: 430px) {
  .mobile-topbar {
    gap: 0.35rem;
    padding-inline: 0.65rem;
  }

  .mobile-topbar .brand-copy {
    display: none;
  }

  .mobile-topbar .brand-logo {
    width: 2.55rem;
    height: 2.55rem;
  }

  .mobile-toolbar-actions {
    gap: 0.05rem;
  }
}
