:root {
  --bg: #f6f3ff;
  --surface: #ffffff;
  --surface-2: #fbfaff;
  --text: #111331;
  --muted: #68658a;
  --border: #ded7ff;
  --primary: #5a35ff;
  --primary-2: #7a5dff;
  --green: #0aa653;
  --red: #f1232e;
  --orange: #f08a00;
  --shadow: 0 18px 40px rgba(61, 45, 134, 0.10);
  font-family: Poppins, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f9f7ff 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
}

.brand strong {
  display: block;
  color: var(--primary);
  font-size: 20px;
}

.brand small,
.side-card small,
.panel p,
.transaction small,
.notif-list small {
  color: var(--muted);
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-nav button,
.ghost,
.primary,
.text-button,
.action-card,
.round-action,
.photo,
.icon,
.notif-list button {
  border: 0;
  border-radius: 8px;
}

.side-nav button {
  min-height: 46px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: #474461;
  text-align: left;
  font-weight: 700;
}

.side-nav button.active,
.side-nav button:hover {
  background: #eeeaff;
  color: var(--primary);
}

svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.4;
}

.side-card {
  margin-top: auto;
  padding: 14px;
  border: 1px solid #ccefdc;
  border-radius: 8px;
  background: #f1fff7;
  display: flex;
  gap: 10px;
  align-items: center;
}

.sync-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}

.main {
  height: 100vh;
  overflow: auto;
  padding: 28px 32px 40px;
}

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

.eyebrow {
  margin: 0 0 4px;
  color: var(--primary);
  font-weight: 800;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(30px, 3vw, 44px);
  letter-spacing: 0;
}

h2 {
  margin-bottom: 4px;
  font-size: 20px;
  letter-spacing: 0;
}

.top-actions,
.button-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.ghost,
.primary,
.text-button {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
}

.ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary);
}

.danger-ghost {
  color: var(--red);
  border-color: #ffc4ca;
  background: #fff7f8;
}


.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
}

.text-button {
  background: transparent;
  color: var(--primary);
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.6fr) repeat(3, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.hero-card,
.metric,
.panel,
.action-card,
.account-grid article,
.dashboard-cards article {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.hero-card {
  min-height: 178px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-card p,
.metric p {
  color: var(--muted);
  font-weight: 800;
}

.hero-card strong {
  display: block;
  color: var(--primary);
  font-size: clamp(54px, 6vw, 82px);
  line-height: 0.95;
}

.round-action {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  background: #f0ecff;
  color: var(--primary);
  border: 1px solid var(--border);
}

.round-action svg {
  width: 34px;
  height: 34px;
}

.metric {
  padding: 22px;
  display: grid;
  align-content: center;
  gap: 10px;
  text-align: center;
}

.metric span,
.action-card i {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  margin: 0 auto;
  display: grid;
  place-items: center;
}

.metric strong {
  font-size: 42px;
}

.metric.cash-in span,
.action-card.cash-in i,
.type.in,
.pill.in {
  background: #e9f9f0;
  color: var(--green);
}

.metric.claimed span {
  background: #e9f9f0;
  color: var(--green);
}

.metric.unclaimed span {
  background: #fff3df;
  color: var(--orange);
}

.action-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.action-card {
  min-height: 130px;
  padding: 18px;
  display: grid;
  place-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 900;
}

.action-card.cash-out i,
.type.out,
.pill.out {
  background: #fff0f1;
  color: var(--red);
}

.action-card:not(.cash-in):not(.cash-out) i {
  background: #eeeaff;
  color: var(--primary);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(360px, 0.9fr);
  gap: 18px;
}

.panel {
  padding: 20px;
  margin-bottom: 18px;
}

.panel.wide {
  min-width: 0;
}

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

.panel-head.compact {
  align-items: center;
}

.transaction-list,
.notif-list,
.phone-list {
  display: grid;
}

.transaction {
  display: grid;
  grid-template-columns: 64px 56px minmax(240px, 1fr) minmax(150px, max-content);
  gap: 14px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid #ebe7ff;
}

.type,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 30px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
}

.photo {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: #eeeaff;
}

.transaction strong,
.notif-list strong {
  display: block;
}

.transaction p {
  margin-bottom: 4px;
  font-weight: 800;
}

.transaction small {
  display: inline-block;
  margin-right: 10px;
  white-space: nowrap;
}

.amount {
  text-align: right;
  font-size: 21px;
  font-weight: 900;
}

.amount small {
  display: block;
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.green,
.amount.in {
  color: var(--green);
}

.red,
.amount.out {
  color: var(--red);
}

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

.mini-stats,
.dashboard-cards,
.account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.mini-stats span,
.dashboard-cards article {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}

.mini-stats b,
.dashboard-cards strong {
  display: block;
  color: var(--primary);
  font-size: 30px;
}

.notif-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid #ebe7ff;
}

.notif-list.full {
  margin-top: 6px;
  border-top: 1px solid #ebe7ff;
}

.notif-list button {
  min-height: 38px;
  padding: 0 12px;
  background: var(--primary);
  color: white;
  font-weight: 800;
}

.desktop-mobile-format,
.desktop-notifs-panel {
  width: 100%;
  max-width: none;
  margin: 0;
}

.desktop-mobile-format {
  display: grid;
  gap: 14px;
}

.desktop-mobile-format .gt-card,
.desktop-notifs-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.desktop-mobile-format .gt-card {
  padding: 16px;
}

.gt-card-heading {
  margin: 0 0 12px;
  color: #060719;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 0;
}

.gt-card-heading.center {
  text-align: center;
}

.gt-card-heading.primary {
  color: var(--primary);
}

.gt-segment,
.gt-toggle {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.gt-segment button,
.gt-toggle button {
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: #0d1024;
  font-size: 13px;
  font-weight: 900;
}

.gt-segment button.active,
.gt-toggle button.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.gt-summary-custom-range {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.gt-summary-custom-range input,
.gt-daterange-inputs input {
  min-height: 44px;
  width: 100%;
  border: 1.5px solid var(--primary);
  border-radius: 12px;
  padding: 0 14px;
  background: #fff;
  color: #0d1024;
  font-weight: 700;
}

.gt-summary-custom-range span {
  color: var(--muted);
  font-size: 13px;
}

.gt-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.gt-summary-tile {
  min-height: 84px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  align-content: center;
}

.gt-summary-tile small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.gt-summary-tile strong {
  font-size: 22px;
  line-height: 1;
}

.gt-summary-tile.green {
  background: #edfdf4;
}

.gt-summary-tile.green strong {
  color: var(--green);
}

.gt-summary-tile.red {
  background: #fff1f2;
}

.gt-summary-tile.red strong {
  color: var(--red);
}

.gt-summary-tile.purple {
  background: #f1edff;
}

.gt-summary-tile.purple strong {
  color: var(--primary);
}

.gt-summary-tile.gray {
  background: #f7f7fb;
}

.gt-tile-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.gt-summary-date {
  margin: 12px 0 0;
  text-align: right;
  color: var(--muted);
  font-size: 13px;
}

.gt-history-card {
  margin-top: 0;
}

.gt-daterange-box {
  padding: 12px;
  border: 1.5px solid var(--primary);
  border-radius: 14px;
  background: #fff;
}

.gt-daterange-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.gt-daterange-inputs label {
  display: grid;
  gap: 5px;
}

.gt-daterange-inputs small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.gt-quick-range {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.gt-quick-range button {
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: #0d1024;
  font-size: 13px;
  font-weight: 900;
}

.gt-quick-range button:hover,
.gt-quick-range button:focus-visible {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.gt-search-row {
  margin-top: 12px;
}

.gt-search-row label {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.gt-search-row input {
  width: 100%;
  border: 0;
  outline: 0;
}

.gt-history-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.gt-history-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.gt-button-secondary {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
}

.gt-history-toggle {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.gt-list-panel {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.gt-record {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid #ece8fb;
}

.gt-record:last-child {
  border-bottom: 0;
}

.gt-type-stack {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.gt-type-stack b {
  min-width: 44px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.gt-record.green .gt-type-stack b { background: #e9f9ef; color: var(--green); }
.gt-record.red .gt-type-stack b { background: #fff0f1; color: var(--red); }

.gt-type-stack button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: var(--primary);
  background: #eeeaff;
}

.gt-record b {
  display: block;
  font-size: 15px;
}

.gt-record strong {
  display: block;
  margin-top: 2px;
  color: #0d1024;
  font-size: 13px;
}

.gt-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.gt-record em {
  color: var(--green);
  font-style: normal;
  font-size: 18px;
  font-weight: 900;
  text-align: right;
}

.gt-record.red em {
  color: var(--red);
}

.gt-record em small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.gt-history-table-wrap {
  margin-top: 10px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 10px;
  background: #eefbf3;
  border: 1px solid #bfeacc;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.sync-pill svg {
  width: 17px;
  height: 17px;
}

.desktop-notif-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.desktop-notif-metrics article {
  min-height: 128px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
}

.desktop-notif-metrics article.wide {
  min-height: 86px;
  grid-template-columns: minmax(0, 1fr) auto;
  place-items: stretch;
  align-content: center;
  text-align: left;
}

.desktop-notif-metrics span {
  color: currentColor;
  font-size: 13px;
  font-weight: 900;
}

.desktop-notif-metrics i {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f1edff;
}

.desktop-notif-metrics i svg {
  width: 24px;
  height: 24px;
}

.desktop-notif-metrics strong {
  color: currentColor;
  font-size: 32px;
  line-height: 1;
}

.desktop-notif-metrics .wide strong {
  font-size: 28px;
}

.desktop-notif-metrics .wide i {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
}

.desktop-notif-metrics .blue { color: var(--primary); }
.desktop-notif-metrics .green { color: var(--green); }
.desktop-notif-metrics .orange { color: var(--orange); }
.desktop-notif-metrics .green i { background: #e9f9ef; }
.desktop-notif-metrics .orange i { background: #fff5df; }

.desktop-notif-tools {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 54px;
  gap: 12px;
  margin-bottom: 14px;
}

.desktop-notif-search {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.desktop-notif-search svg {
  color: var(--muted);
  width: 24px;
  height: 24px;
}

.desktop-notif-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
}

.desktop-filter-icon {
  min-height: 52px;
  padding: 0;
}

.desktop-notif-source {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.desktop-notif-source select {
  min-height: 52px;
  width: 100%;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
}

.desktop-upgrade-chip {
  width: 100%;
  min-height: 52px;
  margin-bottom: 16px;
  border: 1px solid #ffd18a;
  border-radius: 12px;
  background: #fff8ea;
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 900;
}

.desktop-notif-subfilters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.desktop-phone-pills {
  display: inline-flex;
  gap: 8px;
}

.desktop-phone-pills button {
  min-height: 30px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.desktop-phone-pills button.active,
.desktop-phone-pills button:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.desktop-notif-period {
  margin: 0;
  color: var(--muted);
}

.desktop-notif-date-filter,
.desktop-notif-status-filter {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 8px;
}

.desktop-notif-status-filter {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
}

.desktop-notif-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.notif-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, auto);
  gap: 18px;
  padding: 16px 18px;
  border: 1.5px solid #e9d5ff;
  border-radius: 14px;
  background: #fff;
}

.notif-card-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.notif-phone-tag {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--primary);
  background: #ede9fe;
  font-size: 12px;
  font-weight: 900;
}

.notif-phone-tag svg {
  width: 14px;
  height: 14px;
}

.notif-card b {
  font-size: 16px;
}

.notif-card small {
  color: var(--muted);
  line-height: 1.4;
}

.notif-card-action {
  display: grid;
  justify-items: end;
  align-content: center;
  gap: 8px;
  text-align: right;
}

.notif-card-action strong {
  color: var(--primary);
  font-size: 22px;
  line-height: 1;
}

.notif-card.unclaimed .notif-card-action strong {
  color: var(--orange);
}

.notif-card.claimed .notif-card-action strong {
  color: var(--green);
}

.notif-card-action em {
  display: inline-flex;
  padding: 5px 12px;
  border-radius: 999px;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.notif-card.unclaimed .notif-card-action em {
  color: var(--orange);
  border: 1px solid #ffdca1;
  background: #fff5df;
}

.notif-card.claimed .notif-card-action em {
  color: var(--green);
  border: 1px solid #c9f0d2;
  background: #e9f9ef;
}

.notif-card-action button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 900;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 260px auto;
  gap: 12px;
  margin-bottom: 12px;
}

.date-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

.date-filter button {
  min-width: 118px;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--primary);
  font-weight: 800;
}

.date-filter button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: transparent;
}

.compact-filter {
  margin-top: -6px;
}

.compact-filter button {
  min-width: 96px;
  min-height: 34px;
  font-size: 12px;
}

.toolbar label,
.toolbar select {
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
}

.toolbar label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
}

.toolbar input {
  width: 100%;
  border: 0;
  outline: 0;
}

.toolbar select {
  padding: 0 12px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

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

th,
td {
  padding: 14px;
  border-bottom: 1px solid #ebe7ff;
  text-align: left;
  white-space: nowrap;
}

th {
  background: #f3f0ff;
  color: var(--primary);
}

.account-grid {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.account-grid article {
  padding: 20px;
}

.account-grid span {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eeeaff;
  color: var(--primary);
  font-weight: 800;
}

.account-grid strong,
.account-grid b {
  display: block;
  margin-top: 10px;
  font-size: 26px;
}

.fee-panel {
  max-width: 860px;
}

.icon {
  width: 40px;
  height: 40px;
  margin-right: 8px;
  color: var(--primary);
  background: #f2eeff;
  border: 1px solid var(--border);
}

.icon.danger {
  color: var(--red);
  background: #fff2f3;
  border-color: #ffd0d4;
}

.referral-hero {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 8px 0 22px;
}

.referral-hero > svg {
  width: 76px;
  height: 76px;
  padding: 18px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.referral-hero strong {
  display: block;
  color: var(--primary);
  font-size: 54px;
  letter-spacing: 0;
}

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

.details div,
.phone-list article {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid #ebe7ff;
}

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

.details dd {
  margin: 0;
  font-weight: 800;
}

.phone-list article {
  display: grid;
  grid-template-columns: 1fr 150px 1fr auto;
  align-items: center;
}

.phone-list b {
  color: var(--green);
}

.connected-badge {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 8px;
  background: #eeeaff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.phone-card-main {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px !important;
  background: #fff;
}

.disconnect-main-phone {
  width: 100%;
  min-height: 42px;
  margin: 10px 0 8px;
  border: 1px solid #ffb8be;
  border-radius: 8px;
  background: #fff7f8;
  color: var(--red);
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.disconnect-copy {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff8e8;
  border: 1px solid #ffd99a;
  color: #7a4a00;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
}

.transaction-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.proof-card {
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  font-weight: 800;
}

.proof-card:hover {
  border-color: var(--primary);
  background: #fbfaff;
}

.proof-card svg {
  width: 46px;
  height: 46px;
  padding: 10px;
  border-radius: 50%;
  color: var(--primary);
  background: #eeeaff;
}

.proof-card small,
.proof-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.desktop-txn-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.desktop-txn-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.desktop-txn-form input,
.desktop-txn-form select,
.camera-select-row select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  background: white;
  color: var(--text);
  outline: 0;
}

.desktop-txn-form input:focus,
.desktop-txn-form select:focus,
.camera-select-row select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(90, 53, 255, 0.12);
}

.submit-wide {
  grid-column: 1 / -1;
  min-height: 48px;
}

.danger-save {
  background: linear-gradient(135deg, var(--red), #ff4e58);
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8f6ff;
}

.mode-switch button {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mode-switch button.active {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.proof-preview-panel {
  align-self: start;
}

.proof-preview {
  min-height: 300px;
  border: 1px dashed #b9abff;
  border-radius: 8px;
  background: #fbfaff;
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
  color: var(--muted);
  overflow: hidden;
}

.proof-preview > svg {
  width: 60px;
  height: 60px;
  color: var(--primary);
}

.proof-preview img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 8px;
}

.camera-dialog {
  width: min(760px, calc(100vw - 32px));
  border: 0;
  border-radius: 12px;
  padding: 0;
  background: transparent;
}

.camera-dialog::backdrop {
  background: rgba(17, 19, 49, 0.55);
}

.camera-box {
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: white;
  box-shadow: var(--shadow);
}

.camera-select-row {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--muted);
  font-weight: 800;
}

#desktopCameraVideo {
  width: 100%;
  max-height: 430px;
  background: #111331;
  border-radius: 8px;
  object-fit: contain;
  margin-bottom: 14px;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .brand span,
  .side-nav button {
    font-size: 0;
  }

  .side-nav button {
    justify-content: center;
  }

  .side-card {
    display: none;
  }

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

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

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

  .main {
    height: auto;
    padding: 18px;
  }

  .topbar,
  .panel-head {
    display: grid;
  }

  .hero-grid,
  .action-row,
  .mini-stats,
  .dashboard-cards,
  .account-grid,
  .toolbar,
  .transaction-form-grid,
  .proof-grid,
  .desktop-txn-form {
    grid-template-columns: 1fr;
  }

  .transaction {
    grid-template-columns: 48px 44px 1fr;
  }

  .transaction .amount {
    grid-column: 3;
    text-align: left;
  }
}

/* ── Fee Records Page ──────────────────────────────────────────── */
.fee-records-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.fee-calendar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 14px;
}

.fee-month-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.fee-month-row strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.fee-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

.fee-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.fee-calendar-grid span {
  position: relative;
  text-align: center;
  font-size: 13px;
  padding: 6px 2px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s;
}

.fee-calendar-grid span:hover {
  background: #ede9fe;
}

.fee-calendar-grid span.today {
  font-weight: 700;
  color: var(--primary);
}

.fee-calendar-grid span.selected {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.fee-calendar-grid span.muted {
  color: var(--border);
  cursor: default;
}

/* Dot indicator for days with records */
.fee-calendar-grid span i {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  margin: 2px auto 0;
}

.fee-calendar-grid span.selected i {
  background: #fff;
}

.fee-day-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.fee-day-detail h3 {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 700;
}

.fee-day-stats {
  display: flex;
  gap: 20px;
}

.fee-day-stats span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fee-day-stats small {
  font-size: 12px;
  color: var(--muted);
}

.fee-day-stats strong {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
}

.section-sub-head {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fee-records-list {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.fee-record-head {
  display: grid;
  grid-template-columns: 1fr 160px 120px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #5b21b6, #7c3aed);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.fee-records-list article {
  display: grid;
  grid-template-columns: 24px 1fr 160px 120px 24px;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.fee-records-list article:last-child {
  border-bottom: none;
}

.fee-records-list article:hover {
  background: #f8f5ff;
}

.fee-records-list article svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.fee-records-list article b {
  font-size: 13px;
  font-weight: 600;
}

.fee-records-list article strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}

.fee-records-list article em {
  font-style: normal;
  font-size: 13px;
  color: var(--muted);
}

.fee-records-list .muted {
  padding: 20px 16px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 900px) {
  .fee-records-layout {
    grid-template-columns: 1fr;
  }
}
