:root {
  --bg: #061021;
  --sidebar: #080f1f;
  --panel: rgba(8, 28, 58, 0.82);
  --panel-2: rgba(4, 18, 39, 0.94);
  --text: #f5f8ff;
  --muted: #9eadc7;
  --line: rgba(69, 132, 210, 0.36);
  --brand: #1d8dff;
  --brand-2: #20d5ff;
  --gold: #f5c23a;
  --gold-2: #b87413;
  --warn: #f6c13a;
  --danger: #ff6848;
  --ok: #35f27b;
  --shadow: 0 18px 52px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 72% 8%, rgba(18, 122, 222, 0.32), transparent 32%),
    radial-gradient(circle at 42% 0%, rgba(245, 194, 58, 0.1), transparent 24%),
    linear-gradient(135deg, #040916 0%, #071a36 55%, #030711 100%);
  color: var(--text);
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.auth-layout {
  grid-template-columns: 1fr;
}

body.auth-layout .sidebar,
body.auth-layout .topbar,
body.auth-layout .page-heading,
body.auth-layout .site-footer {
  display: none;
}

body.auth-layout main {
  min-height: 100vh;
  display: grid;
  align-content: center;
  padding: 32px;
}

body.auth-layout #auth {
  width: min(980px, 100%);
  margin: 0 auto;
}

body.auth-layout #auth .split {
  grid-template-columns: minmax(320px, 560px);
  justify-content: center;
}

.auth-brand {
  display: none;
}

body.auth-layout .auth-brand {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
  margin-bottom: 24px;
}

.auth-brand img {
  width: 168px;
  height: 168px;
  object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.35));
}

.auth-brand strong {
  color: #fff8df;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1;
  text-shadow: 0 2px 0 #b97816, 0 7px 18px rgba(0, 0, 0, 0.45);
  -webkit-text-stroke: 0.55px #d7a83b;
}

.auth-brand span {
  color: #f8fafc;
  font-size: 18px;
  font-weight: 800;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.sidebar {
  min-height: 100vh;
  background: linear-gradient(180deg, #080f1f 0%, #030916 100%);
  color: #eef5ff;
  padding: 18px 18px 16px;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-right: 1px solid rgba(82, 137, 209, 0.28);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
  padding: 8px 2px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-logo {
  width: 170px;
  height: 170px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.34));
}

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

.brand strong {
  color: #fff8df;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1.05;
  text-shadow: 0 2px 0 #b97816, 0 6px 14px rgba(0, 0, 0, 0.45);
  -webkit-text-stroke: 0.45px #d7a83b;
}

.brand em {
  color: #f8fafc;
  display: block;
  font-size: 16px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
  margin-top: 8px;
}

nav {
  display: grid;
  gap: 6px;
}

.nav-item,
.ghost,
.top-actions a,
button {
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.nav-item {
  color: #dce8ff;
  background: transparent;
  text-align: left;
  padding: 12px 13px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-item span {
  width: 20px;
  color: #c7d8f7;
}

.nav-item:hover,
.nav-item.active {
  background: linear-gradient(90deg, rgba(245, 194, 58, 0.28), rgba(245, 194, 58, 0.06));
  border-color: rgba(245, 194, 58, 0.55);
  color: #fff;
  box-shadow: inset -3px 0 0 var(--gold);
}

.rise-card {
  border: 1px solid rgba(245, 194, 58, 0.55);
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(245, 194, 58, 0.26), rgba(7, 17, 34, 0.94) 58%);
  margin-top: auto;
}

.rise-card .crown {
  color: var(--gold);
  font-size: 34px;
  line-height: 1;
}

.rise-card strong {
  color: var(--gold);
  display: block;
  font-size: 20px;
  margin-top: 8px;
}

.rise-card p {
  color: #d8e3f8;
  margin: 8px 0 14px;
}

.mini-nav {
  justify-content: center;
  background: linear-gradient(180deg, #ffd85c, #b97816);
  color: #07111f;
  font-weight: 900;
}

.session {
  display: grid;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.session span {
  color: #b9c3d6;
  font-size: 13px;
}

.ghost {
  color: #dce8ff;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
  text-align: center;
  border-radius: 8px;
  padding: 10px 12px;
}

main {
  min-width: 0;
  padding: 0 28px 28px;
}

.topbar {
  min-height: 74px;
  margin: 0 -28px 24px;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(3, 8, 20, 0.78);
  border-bottom: 1px solid rgba(82, 137, 209, 0.28);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 3;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  border-color: transparent;
  color: #f7fbff;
  font-size: 23px;
}

.search-box {
  width: min(360px, 34vw);
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(3, 27, 56, 0.92);
  border: 1px solid rgba(80, 147, 226, 0.34);
  border-radius: 14px;
  padding: 0 12px;
}

.search-box input {
  border: 0;
  background: transparent;
  color: #eef6ff;
  padding: 0;
}

.search-box span {
  color: #dbe8ff;
  font-size: 22px;
}

.top-spacer {
  flex: 1;
}

.utility-icons {
  display: flex;
  gap: 12px;
}

.member-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.member-chip img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.member-chip strong,
.member-chip span {
  display: block;
}

.member-chip span {
  color: var(--muted);
  font-size: 12px;
}

.page-heading {
  margin: 0 0 18px;
  padding: 22px 24px;
  border: 1px solid rgba(80, 147, 226, 0.28);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(5, 22, 48, 0.94), rgba(8, 44, 88, 0.58)),
    radial-gradient(circle at 92% 12%, rgba(245, 194, 58, 0.14), transparent 24%);
  box-shadow: var(--shadow);
}

.page-heading h1 {
  color: #fff8df;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1.05;
  text-shadow: 0 2px 0 #b97816, 0 5px 12px rgba(0, 0, 0, 0.4);
}

.page-heading p {
  color: #d7e3f8;
  font-size: 16px;
  max-width: 780px;
}

.top-actions {
  display: flex;
  gap: 10px;
}

.top-actions a,
button {
  border: 1px solid rgba(80, 147, 226, 0.42);
  background: rgba(4, 26, 54, 0.82);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 12px;
  white-space: nowrap;
}

button {
  background: linear-gradient(180deg, #1678ff, #0f4fb8);
  color: #fff;
  border-color: rgba(80, 147, 226, 0.65);
  font-weight: 800;
}

button:hover,
.top-actions a:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 17px;
}

p {
  margin: 6px 0 0;
  color: var(--muted);
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 16px;
}

.dashboard-hero {
  min-height: 190px;
  border: 1px solid rgba(62, 130, 216, 0.34);
  border-radius: 10px;
  padding: 36px 32px;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(90deg, rgba(4, 19, 43, 0.96), rgba(8, 51, 103, 0.58)),
    radial-gradient(circle at 78% 46%, rgba(255, 205, 73, 0.34), transparent 11%),
    linear-gradient(135deg, #06152e, #083a78);
}

.dashboard-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 55%, rgba(32, 213, 255, 0.14)),
    repeating-linear-gradient(110deg, transparent 0 36px, rgba(32, 213, 255, 0.08) 37px, transparent 39px);
  opacity: 0.85;
}

.dashboard-hero::after {
  content: "↗";
  position: absolute;
  right: 110px;
  top: 18px;
  color: var(--gold);
  font-size: 150px;
  font-weight: 900;
  text-shadow: 0 0 30px rgba(245, 194, 58, 0.55);
  transform: rotate(-6deg);
}

.dashboard-hero > div {
  position: relative;
  z-index: 1;
}

.dashboard-hero span {
  color: #e6efff;
  font-size: 23px;
}

.dashboard-hero h2 {
  color: var(--gold);
  font-size: clamp(42px, 5vw, 62px);
  line-height: 1;
  margin-top: 6px;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.dashboard-hero p {
  color: #edf5ff;
  font-size: 17px;
  margin-top: 12px;
}

.dashboard-hero p strong {
  color: var(--gold);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 304px;
  gap: 16px;
}

.dashboard-main,
.dashboard-side {
  display: grid;
  gap: 16px;
}

.panel,
.metric {
  background: linear-gradient(180deg, rgba(8, 31, 66, 0.86), rgba(5, 18, 39, 0.9));
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
  min-width: 0;
}

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

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 14px;
}

.metric {
  min-height: 138px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.metric::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  height: 34px;
  background:
    linear-gradient(135deg, transparent 8%, rgba(32, 213, 255, 0.9) 9% 11%, transparent 12% 26%, rgba(32, 213, 255, 0.95) 27% 29%, transparent 30% 44%, rgba(32, 213, 255, 0.95) 45% 47%, transparent 48% 62%, rgba(32, 213, 255, 0.95) 63% 65%, transparent 66%),
    linear-gradient(180deg, rgba(32, 213, 255, 0.16), transparent);
  opacity: 0.8;
}

.metric span {
  display: block;
  color: #dbe7fa;
  font-size: 15px;
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 28px;
}

.metric small {
  display: block;
  margin-top: 14px;
  color: var(--ok);
  font-weight: 800;
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 16px;
  align-items: start;
}

.form {
  display: grid;
  gap: 12px;
}

label {
  color: #c5d4ea;
  font-weight: 800;
  font-size: 13px;
  display: grid;
  gap: 6px;
}

input,
select {
  width: 100%;
  border: 1px solid rgba(80, 147, 226, 0.42);
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--text);
  background: rgba(2, 13, 29, 0.9);
}

input[type="file"] {
  color: #dce8ff;
}

.form.locked {
  border-color: rgba(53, 242, 123, 0.42);
}

input:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(120px, 220px) auto auto;
  gap: 10px;
  margin-top: 12px;
}

.checkbox-list {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(80, 147, 226, 0.32);
  border-radius: 8px;
  background: rgba(2, 13, 29, 0.42);
}

.checkbox-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.checkbox-list input {
  width: auto;
}

.checkbox-list.compact {
  grid-template-columns: repeat(2, minmax(90px, 1fr));
  min-width: 220px;
}

.table-wrap {
  overflow: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 680px;
}

th,
td {
  border-bottom: 1px solid rgba(80, 147, 226, 0.22);
  text-align: left;
  padding: 11px 10px;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: #c4d2e8;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

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

.mini-card,
.details,
.tree-box {
  border: 1px solid rgba(80, 147, 226, 0.3);
  border-radius: 10px;
  padding: 14px;
  background: rgba(4, 19, 42, 0.86);
}

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

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

.detail {
  display: grid;
  gap: 4px;
}

.detail span {
  color: var(--muted);
  font-size: 12px;
}

.detail strong {
  overflow-wrap: anywhere;
}

.payment-panel {
  margin-top: 16px;
}

.payment-summary {
  margin-bottom: 14px;
}

.payment-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.payment-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(80, 147, 226, 0.32);
  border-radius: 8px;
  padding: 10px;
  background: rgba(2, 13, 29, 0.52);
}

.payment-options input {
  width: auto;
}

.qr-box {
  width: 154px;
  height: 154px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  align-items: center;
  justify-items: center;
  border: 10px solid #f8fafc;
  border-radius: 8px;
  background: #061021;
  margin-bottom: 14px;
  position: relative;
}

.qr-box span {
  width: 38px;
  height: 38px;
  border: 8px solid #f8fafc;
}

.qr-box strong {
  position: absolute;
  inset: auto 0 10px;
  text-align: center;
  color: var(--gold);
  font-size: 12px;
}

.tree-box {
  display: grid;
  gap: 18px;
  overflow-x: auto;
}

.binary-visual {
  --tree-zoom: 1;
  min-width: 720px;
  display: flex;
  justify-content: center;
  padding: 18px 8px 8px;
  transform: scale(var(--tree-zoom));
  transform-origin: top center;
  transition: transform 0.16s ease;
}

.tree-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
  min-width: 110px;
}

.tree-person {
  min-width: 112px;
  max-width: 148px;
  min-height: 70px;
  display: grid;
  place-items: center;
  gap: 3px;
  text-align: center;
  border: 1px solid rgba(245, 194, 58, 0.55);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 0%, rgba(245, 194, 58, 0.28), transparent 56%),
    linear-gradient(180deg, rgba(8, 40, 82, 0.98), rgba(3, 13, 29, 0.98));
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  padding: 10px;
  position: relative;
  z-index: 1;
}

.tree-person strong {
  color: #fff8df;
  font-size: 14px;
}

.tree-person span {
  color: #aac0df;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.tree-person small {
  color: #8ea2c3;
  font-size: 9px;
  font-weight: 900;
}

.tree-person.active-member {
  border-color: rgba(53, 242, 123, 0.72);
  background:
    radial-gradient(circle at 50% 0%, rgba(53, 242, 123, 0.24), transparent 56%),
    linear-gradient(180deg, rgba(5, 88, 64, 0.98), rgba(3, 28, 34, 0.98));
}

.tree-person.active-member small {
  color: var(--ok);
}

.tree-branch.empty .tree-person {
  border-color: rgba(80, 147, 226, 0.26);
  color: var(--muted);
  background: rgba(3, 13, 29, 0.68);
}

.tree-person.open-slot {
  cursor: pointer;
  font-weight: 900;
}

.tree-person.open-slot:hover {
  border-color: rgba(245, 194, 58, 0.68);
  color: #fff8df;
  transform: translateY(-2px);
}

.tree-children {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 20px;
  padding-top: 42px;
  position: relative;
}

.tree-children::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 25%;
  right: 25%;
  height: 1px;
  background: rgba(245, 194, 58, 0.62);
}

.tree-children > .tree-branch::before {
  content: "";
  position: absolute;
  top: -22px;
  width: 1px;
  height: 22px;
  background: rgba(245, 194, 58, 0.62);
}

.tree-branch:has(.tree-children) > .tree-person::after {
  content: "";
  position: absolute;
  bottom: -22px;
  left: 50%;
  width: 1px;
  height: 22px;
  background: rgba(245, 194, 58, 0.62);
}

.tree-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
}

.tree-summary div,
.pair-preview {
  border: 1px solid rgba(80, 147, 226, 0.3);
  border-radius: 10px;
  padding: 12px;
  background: rgba(3, 13, 29, 0.9);
}

.tree-summary span,
.pair-preview span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.tree-summary strong,
.pair-preview strong {
  display: block;
  color: #fff;
  margin-top: 4px;
}

.pair-preview strong {
  color: var(--gold);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
  background: rgba(29, 141, 255, 0.18);
  color: #7fceff;
}

.badge.ok {
  background: rgba(53, 242, 123, 0.12);
  color: var(--ok);
}

.badge.warn {
  background: rgba(246, 193, 58, 0.14);
  color: var(--warn);
}

.badge.danger {
  background: rgba(255, 104, 72, 0.14);
  color: var(--danger);
}

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

.row-actions button {
  padding: 6px 9px;
  font-size: 12px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 10px;
}

.steps span {
  border: 1px solid rgba(80, 147, 226, 0.3);
  border-radius: 10px;
  padding: 12px;
  background: rgba(3, 13, 29, 0.72);
  font-weight: 900;
}

.line-chart {
  min-height: 220px;
  display: flex;
  align-items: end;
  gap: 18px;
  padding: 24px 12px 0;
  border-top: 1px solid rgba(80, 147, 226, 0.2);
  background:
    linear-gradient(rgba(80, 147, 226, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 147, 226, 0.12) 1px, transparent 1px);
  background-size: 100% 44px, 64px 100%;
}

.line-chart span {
  flex: 1;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, var(--gold), rgba(245, 194, 58, 0.12));
}

.promo-panel {
  min-height: 138px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  border: 1px solid rgba(80, 147, 226, 0.34);
  border-radius: 10px;
  padding: 20px 28px;
  background:
    linear-gradient(90deg, rgba(7, 29, 62, 0.94), rgba(8, 52, 107, 0.72)),
    radial-gradient(circle at 86% 20%, rgba(245, 194, 58, 0.26), transparent 24%);
}

.promo-panel h2 {
  color: var(--gold);
  font-size: 24px;
}

.trophy {
  font-size: 58px;
  filter: drop-shadow(0 8px 18px rgba(245, 194, 58, 0.28));
}

.quick-panel h2,
.network-summary h2,
.rank-card h2 {
  margin-bottom: 16px;
}

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

.action-grid .nav-item {
  justify-content: center;
  min-height: 78px;
  text-align: center;
  background: linear-gradient(180deg, rgba(25, 105, 220, 0.48), rgba(6, 21, 45, 0.86));
}

.donut {
  width: 150px;
  height: 150px;
  margin: 10px auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  background: conic-gradient(var(--gold) 0 49%, #1d8dff 49% 100%);
  position: relative;
}

.donut::after {
  content: "";
  position: absolute;
  inset: 20px;
  border-radius: inherit;
  background: #071326;
}

.donut strong,
.donut span {
  position: relative;
  z-index: 1;
  display: block;
}

.donut strong {
  font-size: 26px;
}

.donut span {
  color: var(--muted);
  font-size: 12px;
}

.network-summary p {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.network-summary p span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
}

.network-summary p:last-child span {
  background: var(--gold);
}

.rank-card > strong {
  display: block;
  color: #dff7ff;
  margin-bottom: 14px;
}

.progress {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.progress span {
  display: block;
  width: 78%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-2), var(--gold));
}

.alert {
  margin-bottom: 14px;
  border: 1px solid rgba(32, 213, 255, 0.34);
  background: rgba(6, 45, 77, 0.96);
  color: #dff7ff;
  border-radius: 8px;
  padding: 12px 14px;
}

.alert.error {
  border-color: rgba(255, 104, 72, 0.5);
  background: rgba(80, 19, 25, 0.88);
  color: #ffd2cc;
}

.hidden,
.admin-only.hidden {
  display: none !important;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #b8c8e1;
  border-top: 1px solid rgba(80, 147, 226, 0.24);
  margin-top: 22px;
  padding: 22px 2px 0;
}

.site-footer strong {
  color: var(--gold);
}

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

  .dashboard-side {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

  .sidebar {
    min-height: auto;
    position: static;
  }

  .brand-logo {
    width: 130px;
    height: 130px;
  }

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

  main {
    padding: 0 16px 20px;
  }

  .topbar {
    margin: 0 -16px 20px;
    padding: 14px 16px;
    flex-wrap: wrap;
  }

  .search-box {
    width: min(100%, 420px);
  }

  .metrics,
  .split,
  .steps,
  .dashboard-side {
    grid-template-columns: 1fr;
  }

  .dashboard-hero::after {
    right: 18px;
    top: 52px;
    font-size: 90px;
    opacity: 0.42;
  }
}

@media (max-width: 620px) {
  nav {
    grid-template-columns: 1fr;
  }

  .utility-icons,
  .top-actions {
    display: none;
  }

  .member-chip {
    width: 100%;
  }

  .dashboard-hero {
    padding: 26px 20px;
  }

  .dashboard-hero h2 {
    font-size: 38px;
  }

  .promo-panel {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .inline-form,
  .tree-row {
    grid-template-columns: 1fr;
  }
}
