
:root {
  --bg: #0b0f16;
  --bg-2: #111722;
  --surface: #151b26;
  --surface-2: #1a2230;
  --surface-3: #202938;
  --text: #f4f1ea;
  --muted: #99a3b6;
  --muted-2: #727d91;
  --border: rgba(255,255,255,.09);
  --border-strong: rgba(255,255,255,.14);
  --gold: #e6bd69;
  --gold-2: #f2cf82;
  --success: #55d99a;
  --success-bg: rgba(47, 177, 118, .16);
  --warning: #f0bc67;
  --warning-bg: rgba(200, 138, 47, .16);
  --idea: #c79cff;
  --idea-bg: rgba(142, 91, 211, .18);
  --danger: #ff8f89;
  --danger-bg: rgba(193, 69, 62, .18);
  --radius: 22px;
  --shadow: 0 18px 48px rgba(0,0,0,.32);
}


html[data-theme="light"] {
  --bg: #f4eee4;
  --bg-2: #ece3d6;
  --surface: #fffdfa;
  --surface-2: #faf3e8;
  --surface-3: #eadfcd;
  --text: #182030;
  --muted: #556075;
  --muted-2: #6d7788;
  --border: rgba(24,32,48,.14);
  --border-strong: rgba(24,32,48,.22);
  --shadow: 0 16px 34px rgba(76, 56, 30, .12);
}

html[data-theme="light"] {
  background:
    radial-gradient(circle at 85% 5%, rgba(201, 172, 126, .16), transparent 28rem),
    radial-gradient(circle at 12% 88%, rgba(110, 125, 162, .10), transparent 32rem),
    var(--bg);
}

html[data-theme="light"] body {
  color: var(--text);
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 85% 5%, rgba(74, 84, 118, .16), transparent 28rem),
    radial-gradient(circle at 12% 88%, rgba(126, 87, 54, .09), transparent 32rem),
    var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: transparent;
  color: var(--text);
  letter-spacing: -.01em;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell {
  display: grid;
  grid-template-columns: 255px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 17px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(25,31,43,.97), rgba(11,15,22,.98));
  border-right: 0;
  box-shadow: inset -1px 0 0 var(--border);
}

.brand {
  display: flex;
  align-items: center;
  padding: 8px 10px 26px;
}

.brand-logo-wrap {
  justify-content: flex-start;
}

.brand-logo {
  display: block;
  width: 158px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.brand-logo-light { display: none; }
html[data-theme="light"] .brand-logo-dark { display: none; }
html[data-theme="light"] .brand-logo-light { display: block; }

.mobile-brand {
  display: none;
}


.user-chip span {
  color: var(--muted);
  font-size: 12px;
  display: block;
  margin-top: 4px;
}

.nav { display: grid; gap: 7px; }

.nav-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 13px 14px;
  border-radius: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  transition: .18s ease;
}

.nav-glyph {
  width: 16px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  line-height: 1;
}

.nav-icon {
  width: 23px;
  height: 23px;
  display: inline-block;
  background-color: currentColor;
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
  flex: 0 0 23px;
}

.icon-home { mask-image: url("../Icons/home.png"); -webkit-mask-image: url("../Icons/home.png"); }
.icon-categories { mask-image: url("../Icons/categories.png"); -webkit-mask-image: url("../Icons/categories.png"); }
.icon-gifts { mask-image: url("../Icons/gifts.png"); -webkit-mask-image: url("../Icons/gifts.png"); }
.icon-ideas { mask-image: url("../Icons/ideas.png"); -webkit-mask-image: url("../Icons/ideas.png"); }
.icon-people { mask-image: url("../Icons/people.png"); -webkit-mask-image: url("../Icons/people.png"); }
.icon-balances { mask-image: url("../Icons/balances.png"); -webkit-mask-image: url("../Icons/balances.png"); }
.icon-settings { mask-image: url("../Icons/settings.png"); -webkit-mask-image: url("../Icons/settings.png"); }

.nav-btn:hover {
  background: rgba(255,255,255,.035);
  color: var(--text);
}

.nav-btn.active {
  background: linear-gradient(135deg, rgba(230,189,105,.14), rgba(255,255,255,.035));
  color: var(--gold-2);
  border-color: rgba(230,189,105,.16);
}

.sidebar-footer { margin-top: auto; padding-top: 20px; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: rgba(255,255,255,.035);
  border: 1px solid var(--border);
  border-radius: 17px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #8c5bd3, #bd8ef1);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(111, 71, 166, .28);
}

.main {
  padding: 31px 36px 84px;
  min-width: 0;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  background-color: var(--bg);
  background-image: url("../Images/Background/BG-Dark.jpg");
  background-size: cover;
  background-position: left top;
  background-repeat: no-repeat;
}

html[data-theme="light"] .main {
  background-image: url("../Images/Background/BG-Clar.jpg");
}

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

.topbar-copy {
  padding-top: 8px;
}

.topbar h1 {
  margin: 12px 0 0;
  font-family: inherit;
  font-size: 24px;
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -.03em;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 10px;
  color: var(--muted-2);
  margin: 0;
  font-weight: 800;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

select, input, textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #111722;
  color: var(--text);
  padding: 12px 13px;
  border-radius: 13px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

select {
  color-scheme: dark;
}

input::placeholder, textarea::placeholder {
  color: #697488;
}

select:focus, input:focus, textarea:focus {
  border-color: rgba(230,189,105,.5);
  box-shadow: 0 0 0 3px rgba(230,189,105,.08);
}

.primary-btn, .secondary-btn, .danger-btn, .text-btn, .icon-btn {
  border: 0;
  border-radius: 13px;
  padding: 12px 16px;
  font-weight: 750;
  transition: .18s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--gold-2), #c89548);
  color: #1a1510;
  box-shadow: 0 8px 20px rgba(194, 145, 69, .16);
}

.primary-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }

.secondary-btn {
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--border);
}

.danger-btn {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(255,143,137,.12);
}

.text-btn, .icon-btn {
  background: transparent;
  color: var(--muted);
  padding: 8px 10px;
}

.text-btn:hover, .icon-btn:hover { color: var(--text); }

.view { display: none; }
.view.active { display: block; }

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

.event-card {
  position: relative;
  overflow: hidden;
  min-height: 164px;
  background:
    radial-gradient(circle at 90% 10%, rgba(230,189,105,.14), transparent 24%),
    linear-gradient(145deg, rgba(34,41,55,.96), rgba(18,23,33,.97));
  border: 1px solid var(--border-strong);
  border-radius: 25px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.event-card::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  right: -80px;
  top: -85px;
  background: rgba(255,255,255,.022);
  border: 1px solid rgba(255,255,255,.025);
}


.event-card h3 {
  margin: 0 0 7px;
  font-size: 25px;
  font-family: inherit;
  font-weight: 700;
}

.event-card .meta { color: var(--muted); font-size: 13px; }

.event-card .amount {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 10px;
}

.event-card .amount strong {
  font-size: 23px;
  color: var(--gold-2);
}

.event-manager-card {
  min-height: 198px;
}

.progress {
  height: 7px;
  background: rgba(255,255,255,.08);
  border-radius: 99px;
  margin-top: 12px;
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #d99a4a, #f4d986);
  border-radius: inherit;
  box-shadow: 0 0 14px rgba(240,196,111,.2);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 34px 0 15px;
  gap: 16px;
}

.section-header h2 {
  margin: 4px 0 0;
  font-family: inherit;
  font-size: 28px;
  font-weight: 500;
}

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

.gift-card {
  background:
    linear-gradient(145deg, rgba(29,36,49,.97), rgba(20,25,35,.97));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  position: relative;
  min-height: 182px;
  box-shadow: 0 10px 30px rgba(0,0,0,.16);
  transition: .18s ease;
}

.gift-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.15);
  box-shadow: 0 18px 38px rgba(0,0,0,.25);
}

.gift-card .topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.gift-card h3 {
  margin: 16px 0 5px;
  font-size: 19px;
  line-height: 1.25;
  font-family: inherit;
  font-weight: 700;
}

.gift-card .recipient {
  color: var(--muted);
  font-size: 13px;
}

.gift-card .foot {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 10px;
  margin-top: 25px;
}

.gift-card .price {
  font-size: 21px;
  font-weight: 820;
  color: #f8f5ef;
}

.gift-card small {
  color: var(--muted-2) !important;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(255,255,255,.06);
  color: #cfd5df;
  border: 1px solid rgba(255,255,255,.04);
}

.badge.bought, .badge.delivered {
  background: var(--success-bg);
  color: var(--success);
}

.badge.pending, .badge.reserved {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge.idea {
  background: var(--idea-bg);
  color: var(--idea);
}

.secret {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 29px;
  height: 29px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: #cbd1dd;
  opacity: .85;
  background: rgba(0,0,0,.18);
  border: 1px solid var(--border);
}

.toolbar {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

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

.person-card {
  background: linear-gradient(145deg, rgba(29,36,49,.97), rgba(20,25,35,.97));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 19px;
  box-shadow: 0 10px 30px rgba(0,0,0,.14);
}

.person-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(145deg, #6f4eaa, #ab79e1);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 20px;
  color: white;
  box-shadow: 0 10px 24px rgba(102,65,157,.2);
}

.person-card h3 {
  margin: 15px 0 4px;
  font-family: inherit;
  font-weight: 700;
}

.person-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.balance-layout {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 16px;
}

.panel {
  background: linear-gradient(145deg, rgba(29,36,49,.97), rgba(20,25,35,.97));
  border: 1px solid var(--border);
  border-radius: 21px;
  padding: 21px;
  box-shadow: 0 10px 30px rgba(0,0,0,.14);
}

.panel h3 {
  margin-top: 0;
  font-family: inherit;
  font-weight: 700;
  font-size: 21px;
}

.balance-big {
  font-size: 36px;
  font-weight: 900;
  margin: 7px 0;
  color: var(--gold-2);
}

.payment-row {
  display: flex;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.payment-row:last-child { border-bottom: 0; }

.mobile-nav { display: none; }

dialog {
  width: min(720px,calc(100% - 24px));
  border: 1px solid var(--border-strong);
  border-radius: 25px;
  padding: 0;
  color: var(--text);
  background: linear-gradient(160deg, #171e2a, #0f141d);
  box-shadow: 0 28px 90px rgba(0,0,0,.58);
}

dialog::backdrop {
  background: rgba(4,7,12,.72);
  backdrop-filter: blur(8px);
}

#giftForm { padding: 23px; }

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 19px;
}

.dialog-head h2 {
  margin: 3px 0 0;
  font-family: inherit;
  font-weight: 700;
  font-size: 27px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-grid label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  color: #cbd2de;
  font-weight: 750;
}

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

fieldset {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}

legend {
  padding: 0 7px;
  font-weight: 800;
  font-size: 12px;
  color: #cbd2de;
}

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

.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border-radius: 10px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.04);
}

.check-item input {
  width: auto;
  accent-color: var(--gold);
}

.dialog-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 19px;
}

.spacer { flex: 1; }
.hidden { display: none !important; }

.empty {
  grid-column: 1/-1;
  padding: 36px;
  text-align: center;
  border: 1px dashed rgba(255,255,255,.12);
  border-radius: 19px;
  color: var(--muted);
  background: rgba(255,255,255,.025);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%,20px);
  background: #f3ead7;
  color: #17130d;
  padding: 11px 16px;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
  z-index: 99;
  box-shadow: 0 14px 36px rgba(0,0,0,.3);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%,0);
}


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

.settings-panel {
  padding: 24px;
}

.settings-panel h3 {
  margin: 10px 0 8px;
  font-size: 24px;
  font-weight: 600;
}

.settings-copy {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.theme-options {
  display: grid;
  gap: 12px;
}

.theme-option {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.035);
  color: var(--text);
  border-radius: 18px;
  padding: 16px 18px;
  display: grid;
  gap: 4px;
  text-align: left;
}

.theme-option:hover {
  border-color: rgba(230,189,105,.28);
}

.theme-option.active {
  border-color: rgba(230,189,105,.32);
  background: linear-gradient(135deg, rgba(230,189,105,.16), rgba(255,255,255,.04));
  box-shadow: inset 0 0 0 1px rgba(230,189,105,.08);
}

.theme-option-title {
  font-weight: 800;
}

.theme-option-meta {
  color: var(--muted);
  font-size: 13px;
}

.settings-user-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.035);
  border-radius: 18px;
  margin-bottom: 18px;
}

.settings-user-card strong {
  display: block;
  margin-bottom: 4px;
}

.settings-user-card span {
  color: var(--muted);
  font-size: 13px;
}

.settings-switch-btn {
  width: 100%;
}

html[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, rgba(255,250,243,.98), rgba(242,233,220,.98));
}


html[data-theme="light"] select,
html[data-theme="light"] input,
html[data-theme="light"] textarea {
  background: #fffaf3;
  color: var(--text);
}

html[data-theme="light"] select {
  color-scheme: light;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
  color: #8b90a0;
}

html[data-theme="light"] .event-card,
html[data-theme="light"] .gift-card,
html[data-theme="light"] .panel,
html[data-theme="light"] dialog,
html[data-theme="light"] .auth-card,
html[data-theme="light"] .person-card,
html[data-theme="light"] .user-chip,
html[data-theme="light"] .event-list-panel,
html[data-theme="light"] .mobile-nav,
html[data-theme="light"] .theme-option,
html[data-theme="light"] .settings-user-card,
html[data-theme="light"] .summary-stat {
  background: linear-gradient(145deg, rgba(255,253,250,.99), rgba(245,237,225,.99));
  border-color: rgba(24,32,48,.13);
  box-shadow: 0 10px 24px rgba(76, 56, 30, .07);
}

html[data-theme="light"] .event-card::after {
  background: rgba(74, 63, 47, .04);
  border-color: rgba(74, 63, 47, .05);
}

html[data-theme="light"] .mobile-nav {
  background: rgba(248,242,233,.96);
}

html[data-theme="light"] .nav-btn:hover,
html[data-theme="light"] .user-chip-button:hover,
html[data-theme="light"] .theme-option:hover {
  background: rgba(31,36,48,.04);
}

html[data-theme="light"] .nav-btn.active,
html[data-theme="light"] .theme-option.active {
  background: linear-gradient(135deg, rgba(230,189,105,.22), rgba(31,36,48,.04));
}

html[data-theme="light"] .event-card .meta,
html[data-theme="light"] .gift-card .recipient,
html[data-theme="light"] .gift-card small,
html[data-theme="light"] .event-gift-name small,
html[data-theme="light"] .settings-copy,
html[data-theme="light"] .settings-user-card span {
  color: var(--muted);
}

html[data-theme="light"] .gift-card .price,
html[data-theme="light"] .event-price,
html[data-theme="light"] .summary-stat strong,
html[data-theme="light"] .event-list-row,
html[data-theme="light"] .event-gift-name strong {
  color: var(--text);
}

html[data-theme="light"] .progress {
  background: rgba(24,32,48,.11);
}

html[data-theme="light"] .event-card,
html[data-theme="light"] .gift-card {
  box-shadow: 0 14px 28px rgba(76, 56, 30, .08);
}

html[data-theme="light"] .gift-card:hover,
html[data-theme="light"] .event-card:hover,
html[data-theme="light"] .person-card:hover {
  border-color: rgba(24,32,48,.18);
  box-shadow: 0 18px 34px rgba(76, 56, 30, .10);
}

html[data-theme="light"] .event-list-header {
  background: rgba(24,32,48,.055);
  color: #616a7b;
}

html[data-theme="light"] .event-list-row {
  border-top-color: rgba(24,32,48,.10);
}

html[data-theme="light"] .summary-stat {
  background: linear-gradient(145deg, #f9f1e2, #f4e7d3);
}

html[data-theme="light"] .sidebar-footer .user-chip,
html[data-theme="light"] .settings-user-card,
html[data-theme="light"] .theme-option,
html[data-theme="light"] .event-list-panel,
html[data-theme="light"] .panel {
  border-color: rgba(24,32,48,.14);
}

html[data-theme="light"] .nav-btn {
  color: #546075;
}

html[data-theme="light"] .nav-btn.active,
html[data-theme="light"] .theme-option.active {
  color: #d09d3c;
  border-color: rgba(208,157,60,.22);
  background: linear-gradient(135deg, rgba(230,189,105,.26), rgba(24,32,48,.05));
}

html[data-theme="light"] .eyebrow {
  color: #6d7687;
}

html[data-theme="light"] .section-header .text-btn,
html[data-theme="light"] .event-detail-head .secondary-btn {
  color: #445166;
}

.mobile-top-user,
.mobile-top-settings {
  display: none;
}

@media (max-width: 1100px) {
  .hero-grid, .cards-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .people-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 820px) {
  html {
    background:
      radial-gradient(circle at 75% 0%, rgba(77, 85, 117, .2), transparent 28rem),
      #090d14;
  }

  .app-shell { display: block; }
  .sidebar { display: none; }

  .main {
    padding: 12px 24px 108px;
  }

  .topbar {
    align-items: stretch;
    justify-content: flex-start;
    margin-bottom: 18px;
    gap: 12px;
  }

  .topbar-copy {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 0;
  }

  .mobile-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 58px;
    padding: 2px 46px 6px;
    position: relative;
  }

  .mobile-brand .brand-logo {
    width: 150px;
  }

  .mobile-top-user,
  .mobile-top-settings {
    display: grid;
    place-items: center;
    position: absolute;
    top: 8px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 50%;
    z-index: 2;
  }

  .mobile-top-user {
    left: 0;
    background: transparent;
    color: var(--gold-2);
    box-shadow: none;
    border-radius: 0;
  }

  .mobile-top-settings {
    right: 0;
    color: #f6f5f2;
  }

  .mobile-top-user .nav-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .mobile-top-settings .nav-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  html[data-theme="light"] .mobile-top-user {
    color: #d09d3c;
  }

  html[data-theme="light"] .mobile-top-settings {
    color: #202737;
  }

  .eyebrow {
    width: 100%;
    text-align: center;
    letter-spacing: .16em;
    font-size: 11px;
    margin: 0;
  }

  .topbar h1 {
    display: none;
  }

  .topbar-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    flex-shrink: 0;
  }

  .mobile-user-summary {
    display: inline-flex;
  }

  .primary-btn {
    white-space: nowrap;
    min-width: 0;
    width: 100%;
    justify-content: center;
  }

  #dashboardView .hero-grid {
    gap: 16px;
  }

  .mobile-nav {
    position: fixed;
    display: grid;
    grid-template-columns: repeat(5,1fr);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    padding: 10px 22px 6px;
    background: rgba(10,15,24,.98);
    border-top: 1px solid var(--border-strong);
    box-shadow: 0 -10px 30px rgba(0,0,0,.32);
    backdrop-filter: blur(18px);
  }

  .mobile-nav-btn {
    border: 0;
    background: transparent;
    display: grid;
    gap: 5px;
    place-items: center;
    color: #8d97ab;
    padding: 5px 1px 3px;
  }

  .mobile-nav-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .mobile-nav-btn span {
    font-size: 12.5px;
    line-height: 1.05;
    font-weight: 650;
  }

  .mobile-nav-btn.active {
    color: var(--gold-2);
    font-weight: 800;
  }

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

@media (max-width: 600px) {
  .topbar { flex-direction: column; }

  .topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .mobile-user-summary {
    justify-self: center;
  }

  #addGiftBtn {
    width: 100%;
    min-width: 0;
  }

  .hero-grid, .cards-grid, .people-grid, .settings-grid { grid-template-columns: 1fr; }

  .event-card {
    min-height: 158px;
    padding: 19px;
  }

  .event-manager-card {
    min-height: 190px;
  }

  .toolbar { grid-template-columns: 1fr; }

  .section-header { align-items: center; }

  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }

  .check-grid { grid-template-columns: 1fr; }

  dialog {
    max-height: 92vh;
    overflow: auto;
  }
}


.person-card {
  position: relative;
}

.person-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.person-edit-btn {
  padding: 8px 10px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.035);
  color: var(--muted);
  font-weight: 700;
}

.person-edit-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.toggle-line {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px !important;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.025);
}

.toggle-line input {
  width: auto;
  accent-color: var(--gold);
}


.event-manager-card { position: relative; }

.event-manager-card .event-edit-btn {
  margin-top: 16px;
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.035);
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
}
.event-manager-card .event-edit-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}
@media (max-width: 480px) {
  .mobile-nav { padding-left: 14px; padding-right: 14px; }
  .mobile-nav-btn { padding: 5px 0 3px; gap: 4px; }
  .mobile-nav-btn span { font-size: 11px; }
  .mobile-nav-icon { width: 29px; height: 29px; flex-basis: 29px; }
}


.dashboard-event-card { cursor: pointer; }
.dashboard-event-card:hover {
  transform: translateY(-2px);
  border-color: rgba(230,189,105,.25);
}
.dashboard-event-card:focus {
  outline: 2px solid rgba(230,189,105,.45);
  outline-offset: 3px;
}

.event-detail-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}
.event-detail-title {
  min-width: 0;
}
.event-detail-edit-btn {
  margin-left: auto;
  white-space: nowrap;
}
.event-detail-head h2 {
  margin: 4px 0 0;
  font-family: inherit;
  font-size: 32px;
  font-weight: 500;
}
.event-summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.summary-stat {
  background: linear-gradient(145deg, rgba(29,36,49,.97), rgba(20,25,35,.97));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
}
.summary-stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 7px;
}
.summary-stat strong {
  font-size: 22px;
  color: var(--text);
}
.event-list-panel {
  background: linear-gradient(145deg, rgba(29,36,49,.97), rgba(20,25,35,.97));
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}
.event-list-header,
.event-list-row {
  display: grid;
  grid-template-columns: minmax(230px, 2fr) minmax(120px,.8fr) minmax(100px,.6fr) minmax(120px,.8fr) minmax(120px,.8fr);
  gap: 14px;
  align-items: center;
}
.event-list-header {
  padding: 13px 18px;
  background: rgba(255,255,255,.035);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
}
.event-list-row {
  padding: 16px 18px;
  border-top: 1px solid var(--border);
}
.event-gift-name {
  display: grid;
  gap: 4px;
}
.event-gift-name strong {
  font-family: inherit;
  font-size: 17px;
  font-weight: 500;
}
.event-gift-name small { color: var(--muted-2); }
.event-price { font-weight: 800; }

.event-delete-reassign {
  padding: 13px;
  border: 1px solid rgba(240,188,103,.18);
  background: rgba(200,138,47,.08);
  border-radius: 14px;
}
.warning-note {
  color: var(--warning);
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 10px;
}

@media (max-width: 900px) {
  .event-summary-strip { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .event-list-header { display: none; }
  .event-list-row { grid-template-columns: 1fr 1fr; gap: 10px 14px; }
  .event-gift-name { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .event-detail-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .event-detail-title {
    flex: 1 1 160px;
  }
  .event-detail-edit-btn {
    width: 100%;
    margin-left: 0;
  }
  .event-summary-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .event-list-row { grid-template-columns: 1fr; }
  .event-gift-name { grid-column: auto; }
}


.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 10%, rgba(106,77,145,.18), transparent 26rem),
    radial-gradient(circle at 10% 90%, rgba(201,151,76,.10), transparent 30rem),
    #090d14;
}

.auth-card {
  width: min(430px, 100%);
  background: linear-gradient(155deg, rgba(29,36,49,.98), rgba(15,20,29,.99));
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  padding: 30px;
  box-shadow: 0 30px 90px rgba(0,0,0,.52);
}

.auth-brand {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  font-size: 28px;
  background: rgba(255,255,255,.055);
  border: 1px solid var(--border);
  margin-bottom: 18px;
}

.auth-card h1 {
  margin: 4px 0 8px;
  font-family: inherit;
  font-size: 38px;
  font-weight: 500;
}

.auth-subtitle {
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 22px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  border: 1px solid var(--border);
  margin-bottom: 18px;
}

.auth-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px;
  border-radius: 10px;
  font-weight: 800;
}

.auth-tab.active {
  background: rgba(230,189,105,.12);
  color: var(--gold-2);
}

.auth-form {
  display: grid;
  gap: 13px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 750;
  color: #cbd2de;
}

.auth-submit {
  margin-top: 5px;
  width: 100%;
}

.auth-error {
  margin-top: 14px;
  border: 1px solid rgba(255,143,137,.16);
  background: rgba(193,69,62,.10);
  color: var(--danger);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 12px;
  line-height: 1.45;
}

.logged-user-pill {
  min-width: 86px;
  padding: 11px 14px;
  border-radius: 13px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  color: var(--gold-2);
  font-weight: 800;
  text-align: center;
}


.user-chip-button {
  width: 100%;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  appearance: none;
  border: 1px solid var(--border);
  font: inherit;
}

.user-chip-button:hover {
  background: rgba(255,255,255,.065);
  border-color: rgba(230,189,105,.22);
  transform: translateY(-1px);
}

.switch-user-arrow {
  margin-left: auto;
  color: var(--gold-2);
  font-size: 17px !important;
  opacity: .85;
}

.user-chip-button:focus-visible {
  outline: 2px solid rgba(230,189,105,.45);
  outline-offset: 2px;
}


.auth-demo-box {
  margin-top: 16px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255,255,255,.035);
}

.auth-demo-title {
  margin: 0 0 8px;
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth-demo-row, .auth-demo-note {
  margin: 4px 0;
  color: #d8deea;
  font-size: 14px;
}

.auth-demo-note {
  color: var(--muted);
  font-size: 12px;
}

.mobile-nav-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* Mobile category detail: compact, clean header and summary */
@media (max-width: 520px) {
  body.event-detail-active .topbar {
    margin-bottom: 4px;
  }

  body.event-detail-active .topbar-actions {
    margin-bottom: 0;
  }

  #eventDetailView {
    padding-top: 0;
  }

  #eventDetailView .event-detail-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin: 12px 0 12px;
  }

  #eventDetailView #backToDashboardBtn,
  #eventDetailView .event-detail-title .eyebrow {
    display: none;
  }

  #eventDetailView .event-detail-title {
    flex: none;
    width: 100%;
    text-align: center;
  }

  #eventDetailView .event-detail-head h2 {
    margin: 0;
    font-size: 27px;
    line-height: 1.05;
    font-weight: 500;
    letter-spacing: -.025em;
  }

  #eventDetailView .event-detail-edit-btn {
    width: auto;
    min-width: 168px;
    margin: 0;
    padding: 9px 18px;
    border-radius: 11px;
    font-size: 14px;
    line-height: 1;
  }

  #eventDetailView .event-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 12px;
  }

  #eventDetailView .summary-stat {
    min-height: 68px;
    padding: 10px 12px;
    border-radius: 15px;
    box-shadow: none;
  }

  #eventDetailView .summary-stat span {
    font-size: 10.5px;
    line-height: 1.1;
    margin-bottom: 4px;
  }

  #eventDetailView .summary-stat strong {
    font-size: 21px;
    line-height: 1.05;
  }

  #eventDetailView .event-list-panel {
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  #eventDetailView .event-list-row {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 14px 16px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: linear-gradient(145deg, rgba(29,36,49,.97), rgba(20,25,35,.97));
    box-shadow: 0 8px 22px rgba(0,0,0,.12);
  }

  html[data-theme="light"] #eventDetailView .event-list-row {
    background: linear-gradient(145deg, rgba(255,253,250,.99), rgba(245,237,225,.99));
    border-color: rgba(24,32,48,.13);
    box-shadow: 0 8px 18px rgba(76,56,30,.06);
  }

  #eventDetailView .event-gift-name {
    gap: 2px;
  }

  #eventDetailView .event-gift-name strong {
    font-size: 16px;
  }

  #eventDetailView .event-gift-name small,
  #eventDetailView .event-list-row {
    font-size: 12px;
  }

  #eventDetailView .event-price {
    font-size: 18px;
  }
}



/* Mobile category detail v27: narrower summary + compact gift cards */
@media (max-width: 520px) {
  #eventDetailView .event-summary-strip {
    width: min(100%, 226px);
    margin: 0 auto 12px;
    gap: 6px;
  }

  #eventDetailView .summary-stat {
    min-height: 49px;
    padding: 7px 10px 8px;
    border-radius: 11px;
  }

  #eventDetailView .summary-stat span {
    font-size: 9px;
    margin-bottom: 2px;
  }

  #eventDetailView .summary-stat strong {
    font-size: 17px;
  }

  #eventDetailView .event-list-row {
    display: block;
    padding: 12px 15px 13px;
    margin-bottom: 11px;
    border-radius: 16px;
  }

  #eventDetailView .event-gift-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
  }

  #eventDetailView .event-gift-name {
    display: block;
    min-width: 0;
  }

  #eventDetailView .event-gift-name strong {
    display: block;
    font-size: 15px;
    line-height: 1.2;
    margin: 0 0 5px;
  }

  #eventDetailView .event-price {
    font-size: 16px;
    line-height: 1.1;
    font-weight: 800;
  }

  #eventDetailView .event-gift-name small {
    display: block;
    margin-top: 5px;
    font-size: 10px;
  }

  #eventDetailView .event-gift-status {
    justify-self: end;
  }

  #eventDetailView .event-gift-status .badge {
    white-space: nowrap;
    font-size: 10px;
    padding: 6px 9px;
  }

  #eventDetailView .event-gift-route {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 14px;
    padding-top: 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.15;
  }

  #eventDetailView .event-route-arrow {
    color: var(--gold-2);
    font-size: 24px;
    line-height: .7;
    font-weight: 800;
    transform: translateY(-1px);
  }
}



/* Desktop category detail alignment */
@media (min-width: 901px) {
  body.event-detail-active .topbar h1 {
    visibility: hidden;
  }

  #eventDetailView .event-detail-head {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    margin: 2px 0 20px;
  }

  #eventDetailView #backToDashboardBtn {
    justify-self: start;
  }

  #eventDetailView .event-detail-title {
    justify-self: center;
    text-align: center;
  }

  #eventDetailView .event-detail-title .eyebrow {
    display: none;
  }

  #eventDetailView .event-detail-head h2 {
    margin: 0;
    font-size: 31px;
    line-height: 1.08;
  }

  #eventDetailView .event-detail-edit-btn {
    justify-self: end;
    margin-left: 0;
  }

  #eventDetailView .event-summary-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(100%, 1160px);
    margin: 0 auto 18px;
  }

  #eventDetailView .event-list-row {
    grid-template-columns: minmax(280px, 2fr) minmax(130px, .8fr) minmax(110px, .65fr) minmax(130px, .8fr) minmax(150px, .9fr);
  }

  #eventDetailView .event-desktop-cell {
    min-width: 0;
  }

  #eventDetailView .event-desktop-name {
    display: grid;
    gap: 4px;
  }

  #eventDetailView .event-desktop-name strong {
    font-size: 17px;
    font-weight: 500;
  }

  #eventDetailView .event-desktop-name small {
    color: var(--muted-2);
  }

  #eventDetailView .event-desktop-price {
    font-weight: 800;
  }

  #eventDetailView .event-gift-mobile {
    display: none;
  }
}

@media (max-width: 900px) {
  #eventDetailView .event-desktop-cell {
    display: none;
  }

  #eventDetailView .event-gift-mobile {
    display: block;
    width: 100%;
  }
}



/* Mobile People screen */
@media (max-width: 520px) {
  body.people-view-active .topbar-actions {
    display: none;
  }

  #peopleView {
    padding-top: 0;
  }

  #peopleView .section-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin: 0 0 22px;
    text-align: center;
  }

  #peopleView .section-header > div {
    width: 100%;
  }

  #peopleView .section-header .eyebrow {
    display: none;
  }

  #peopleView .section-header h2 {
    margin: 0;
    font-size: 29px;
    line-height: 1.05;
    font-weight: 500;
    letter-spacing: -.025em;
  }

  #peopleView #addPersonBtn {
    width: auto;
    min-width: 196px;
    margin: 0;
    padding: 11px 20px;
    border-radius: 13px;
    font-size: 15px;
    line-height: 1;
  }

  #peopleView .people-grid {
    width: min(330px, calc(100% - 28px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  #peopleView .person-card {
    min-height: 0;
    display: grid;
    grid-template-columns: 58px 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 14px;
    row-gap: 3px;
    align-items: center;
    padding: 16px 15px;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
  }

  #peopleView .person-avatar {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 54px;
    height: 54px;
    font-size: 19px;
  }

  #peopleView .person-card h3 {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    margin: 0;
    font-size: 18px;
    line-height: 1.05;
  }

  #peopleView .person-card p {
    grid-column: 2 / 4;
    grid-row: 2;
    align-self: start;
    margin: 0;
    font-size: 12px;
    line-height: 1.3;
  }

  #peopleView .person-actions {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    margin: 0;
  }

  #peopleView .person-edit-btn {
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 13px;
  }
}



/* Mobile balances / economy screen */
.mobile-balance-events {
  display: none;
}

@media (max-width: 520px) {
  body.balances-view-active .topbar-actions {
    display: none;
  }

  #balancesView {
    padding-top: 0;
  }

  #balancesView .section-header {
    width: 100%;
    margin: 0 0 20px;
    display: flex;
    justify-content: center;
    text-align: center;
  }

  #balancesView .section-header > div {
    width: 100%;
  }

  #balancesView .section-header .eyebrow {
    display: none;
  }

  #balancesView .section-header h2 {
    margin: 0;
    font-size: 29px;
    line-height: 1.05;
    font-weight: 500;
    letter-spacing: -.025em;
  }

  #balancesView .balance-layout {
    display: block;
    width: 100%;
  }

  #balancesView #balanceSummary,
  #balancesView .balance-layout > .panel:nth-child(2) > h3,
  #balancesView .desktop-payment-list {
    display: none;
  }

  #balancesView .balance-layout > .panel:nth-child(2) {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
  }

  #balancesView .mobile-balance-events {
    display: grid;
    width: min(330px, calc(100% - 28px));
    margin: 0 auto;
    gap: 14px;
  }

  #balancesView .mobile-balance-event-card {
    background: linear-gradient(145deg, rgba(29,36,49,.97), rgba(20,25,35,.97));
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 15px 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
  }

  html[data-theme="light"] #balancesView .mobile-balance-event-card {
    background: linear-gradient(145deg, rgba(255,253,250,.99), rgba(245,237,225,.99));
    border-color: rgba(24,32,48,.13);
    box-shadow: 0 8px 18px rgba(76,56,30,.06);
  }

  #balancesView .mobile-balance-event-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
  }

  #balancesView .mobile-balance-event-head h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.15;
    font-weight: 700;
  }

  #balancesView .mobile-balance-event-head strong {
    flex: 0 0 auto;
    font-size: 18px;
    color: var(--gold-2);
  }

  #balancesView .mobile-balance-event-meta {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
  }

  #balancesView .mobile-balance-people {
    margin-top: 11px;
    padding-top: 9px;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 7px;
  }

  #balancesView .mobile-balance-person {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
  }

  #balancesView .mobile-balance-person strong {
    color: var(--text);
  }

  #balancesView .mobile-balance-empty {
    color: var(--muted-2);
    font-size: 12px;
  }
}



/* Desktop balances / economy: grouped by event, same philosophy as mobile */
@media (min-width: 821px) {
  body.balances-view-active .topbar-copy,
  body.balances-view-active .topbar-actions {
    display: none;
  }

  body.balances-view-active .topbar {
    min-height: 0;
    margin-bottom: 10px;
  }

  #balancesView .section-header {
    width: 100%;
    display: flex;
    justify-content: center;
    text-align: center;
    margin: 0 0 24px;
  }

  #balancesView .section-header .eyebrow {
    display: none;
  }

  #balancesView .section-header h2 {
    margin: 0;
    font-size: 30px;
    line-height: 1.05;
    font-weight: 500;
  }

  #balancesView .balance-layout {
    display: block;
    width: 100%;
  }

  #balancesView #balanceSummary,
  #balancesView .balance-layout > .panel:nth-child(2) > h3,
  #balancesView .desktop-payment-list {
    display: none;
  }

  #balancesView .balance-layout > .panel:nth-child(2) {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  #balancesView .mobile-balance-events {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    width: min(1180px, 100%);
    margin: 0 auto;
  }

  #balancesView .mobile-balance-event-card {
    min-width: 0;
    background: linear-gradient(145deg, rgba(29,36,49,.97), rgba(20,25,35,.97));
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 10px 24px rgba(0,0,0,.14);
  }

  html[data-theme="light"] #balancesView .mobile-balance-event-card {
    background: linear-gradient(145deg, rgba(255,253,250,.99), rgba(245,237,225,.99));
    border-color: rgba(24,32,48,.13);
    box-shadow: 0 10px 22px rgba(76,56,30,.07);
  }

  #balancesView .mobile-balance-event-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
  }

  #balancesView .mobile-balance-event-head h3 {
    margin: 0;
    min-width: 0;
    font-size: 19px;
    line-height: 1.15;
  }

  #balancesView .mobile-balance-event-head strong {
    flex: 0 0 auto;
    color: var(--gold-2);
    font-size: 19px;
  }

  #balancesView .mobile-balance-event-meta {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
  }

  #balancesView .mobile-balance-people {
    margin-top: 13px;
    padding-top: 11px;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 8px;
  }

  #balancesView .mobile-balance-person {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    font-size: 13px;
  }

  #balancesView .mobile-balance-empty {
    color: var(--muted-2);
    font-size: 12px;
  }
}

@media (min-width: 821px) and (max-width: 1180px) {
  #balancesView .mobile-balance-events {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
