:root {
  --ink: #071019;
  --panel: #0d1622;
  --surface-0: #09111a;
  --surface-1: #0d1723;
  --surface-2: #122030;
  --surface-3: #17283b;
  --line: rgba(123, 167, 214, 0.16);
  --edge: rgba(144, 192, 246, 0.3);
  --text: #edf5ff;
  --headline: #f7fbff;
  --sub: #9db0c8;
  --sub-strong: #bfd2ea;
  --accent: #61d6a8;
  --accent-2: #67b8ff;
  --danger: #ff7288;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --appbar: rgba(7, 16, 25, 0.84);
  --button-start: #17283a;
  --button-end: #102030;
  --button-text: #eaf4ff;
  --button-ghost: rgba(255, 255, 255, 0.02);
  --button-ghost-text: #c6d6ea;
  --button-ghost-border: rgba(123, 167, 214, 0.25);
  --thumb-bg: linear-gradient(180deg, #0c1320, #09111a);
  --font-ui: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

:root[data-theme="light"] {
  --ink: #eff5fb;
  --panel: rgba(255, 255, 255, 0.9);
  --surface-0: #ffffff;
  --surface-1: #fbfdff;
  --surface-2: #f2f7fd;
  --surface-3: #ebf2fb;
  --line: rgba(45, 79, 124, 0.12);
  --edge: rgba(53, 95, 148, 0.22);
  --text: #18304b;
  --headline: #0d223c;
  --sub: #56708f;
  --sub-strong: #2f4c6f;
  --accent: #2ba773;
  --accent-2: #2475c4;
  --danger: #c33c57;
  --shadow: 0 20px 40px rgba(29, 57, 90, 0.08);
  --appbar: rgba(239, 245, 251, 0.86);
  --button-start: #2c79b8;
  --button-end: #1d6299;
  --button-text: #f7fbff;
  --button-ghost: rgba(17, 45, 79, 0.02);
  --button-ghost-text: #244564;
  --button-ghost-border: rgba(53, 95, 148, 0.18);
  --thumb-bg: linear-gradient(180deg, #f6faff, #edf4fd);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  background: var(--ink);
  color: var(--text);
  font: 15px/1.55 var(--font-ui);
}

:root[data-theme="light"] body {
  background: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.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;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--appbar);
  backdrop-filter: blur(14px);
}

.logo {
  font-weight: 800;
  color: var(--headline);
  letter-spacing: -0.03em;
}

.logo .accent {
  color: var(--accent-2);
}

.btn {
  appearance: none;
  border: 1px solid var(--edge);
  border-radius: 0.8rem;
  background: linear-gradient(180deg, var(--button-start), var(--button-end));
  color: var(--button-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 42px;
  padding: 0.7rem 0.95rem;
  font-weight: 600;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.btn[disabled] {
  cursor: default;
  opacity: 0.58;
  transform: none;
  box-shadow: none;
}

.btn.ghost {
  background: var(--button-ghost);
  color: var(--button-ghost-text);
  border-color: var(--button-ghost-border);
}

.btn.danger {
  background: linear-gradient(180deg, #63182a, #42111d);
  color: #ffe6ea;
  border-color: rgba(255, 114, 136, 0.36);
}

.btn.ghost.danger {
  background: rgba(255, 114, 136, 0.06);
  color: #ffb9c4;
}

.btn.sm {
  min-height: 36px;
  padding: 0.55rem 0.8rem;
  border-radius: 0.72rem;
  font-size: 13px;
}

.btn--theme-icon {
  margin-left: auto;
  width: 40px;
  min-width: 40px;
  padding: 0;
}

.hamburger {
  appearance: none;
  border: 1px solid var(--edge);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.02);
  color: var(--button-text);
  width: 40px;
  height: 40px;
  cursor: pointer;
}

:root[data-theme="light"] .hamburger {
  background: var(--surface-0);
  color: var(--headline);
  border-color: var(--edge);
}

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - 62px);
}

.side {
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(9, 17, 26, 0.92), rgba(8, 15, 23, 0.82));
  padding: 1rem 0.95rem;
}

:root[data-theme="light"] .side {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(244, 249, 255, 0.8));
}

.side-head {
  padding: 0.5rem 0.5rem 1rem;
}

.side-kicker,
.section-kicker,
.eyebrow {
  color: var(--sub);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.side-title {
  margin-top: 0.3rem;
  color: var(--headline);
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.snav {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.snav a {
  position: relative;
  padding: 0.85rem 0.95rem;
  border-radius: 0.95rem;
  border: 1px solid transparent;
  color: var(--sub);
  font-weight: 600;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.snav a:hover,
.snav a:focus-visible {
  color: var(--headline);
  border-color: var(--edge);
  background: linear-gradient(180deg, rgba(103, 184, 255, 0.08), rgba(20, 34, 51, 0.42));
  transform: translateX(2px);
}

.snav a.active {
  color: var(--headline);
  border-color: rgba(103, 184, 255, 0.26);
  background:
    linear-gradient(180deg, rgba(103, 184, 255, 0.16), rgba(12, 22, 34, 0.68)),
    linear-gradient(90deg, rgba(97, 214, 168, 0.16), transparent 55%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

:root[data-theme="light"] .snav a.active {
  background:
    linear-gradient(180deg, rgba(36, 117, 196, 0.12), rgba(255, 255, 255, 0.74)),
    linear-gradient(90deg, rgba(43, 167, 115, 0.1), transparent 55%);
}

.main {
  min-width: 0;
  padding: 1rem;
}

.page-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.page-copy h1,
.section-head h2 {
  margin: 0.28rem 0 0;
  color: var(--headline);
  font-size: clamp(1.75rem, 2.6vw, 2.35rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.section-head h2 {
  font-size: 1.45rem;
}

.page-intro {
  margin: 0.6rem 0 0;
  max-width: 60ch;
  color: var(--sub);
}

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

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

.settings-summary {
  grid-template-columns: minmax(0, 1fr);
}

.module-card,
.profile-card,
.metric-card,
.card2,
.activity-card,
.order-card {
  background: linear-gradient(180deg, rgba(16, 28, 42, 0.92), rgba(8, 15, 24, 0.9));
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  box-shadow: var(--shadow);
}

:root[data-theme="light"] .module-card,
:root[data-theme="light"] .profile-card,
:root[data-theme="light"] .metric-card,
:root[data-theme="light"] .card2,
:root[data-theme="light"] .activity-card,
:root[data-theme="light"] .order-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 255, 0.94));
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0.95rem;
}

.profile-avatar {
  width: 58px;
  height: 58px;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(103, 184, 255, 0.32), rgba(97, 214, 168, 0.2));
  color: var(--headline);
  font-size: 22px;
  font-weight: 800;
}

.profile-label,
.metric-label,
.toolbar-summary,
.referral-field span,
.search-field span,
.select-field span {
  color: var(--sub);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.profile-email {
  color: var(--headline);
  font-size: 1.15rem;
  font-weight: 700;
  word-break: break-word;
}

.profile-sub {
  color: var(--sub);
  margin-top: 0.18rem;
}

.metric-card {
  padding: 0.85rem 0.9rem;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-value {
  color: var(--headline);
  font-size: clamp(1.8rem, 2.5vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.06em;
}

.metric-meta {
  color: var(--sub);
  font-size: 13px;
}

.module-card {
  padding: 0.9rem;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.text-link {
  color: var(--accent-2);
  font-weight: 700;
}

.help {
  margin: 0 0 0.8rem;
  color: var(--sub);
}

.newsletter-section {
  margin-bottom: 0.85rem;
}

.newsletter-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(10, 19, 29, 0.62);
  padding: 0.85rem;
}

:root[data-theme="light"] .newsletter-card {
  background: rgba(247, 250, 255, 0.88);
}

.newsletter-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  margin: 0;
  cursor: pointer;
}

.newsletter-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.newsletter-toggle__track {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(88, 112, 145, 0.3);
  position: relative;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.newsletter-toggle__track::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 2px;
  left: 2px;
  border-radius: 999px;
  background: #9bb0ca;
  transition: transform 0.18s ease, background 0.18s ease;
}

.newsletter-toggle input:checked + .newsletter-toggle__track {
  border-color: rgba(80, 227, 164, 0.8);
  background: linear-gradient(180deg, #50e3a4, #32b883);
  box-shadow: 0 10px 24px rgba(50, 184, 131, 0.2);
}

.newsletter-toggle input:checked + .newsletter-toggle__track::after {
  transform: translateX(18px);
  background: #07110d;
}

.newsletter-toggle input:focus-visible + .newsletter-toggle__track {
  outline: 2px solid var(--accent2);
  outline-offset: 3px;
}

.newsletter-toggle__copy {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
  color: var(--text);
}

.newsletter-toggle__copy strong {
  color: var(--headline);
}

.newsletter-toggle__copy span {
  color: var(--sub);
  font-size: 13px;
}

.newsletter-toggle--signin {
  margin-top: 0.85rem;
  padding: 0.72rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(10, 19, 29, 0.52);
}

:root[data-theme="light"] .newsletter-toggle--signin {
  background: rgba(247, 250, 255, 0.9);
}

.newsletter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.newsletter-message {
  color: var(--sub);
  font-size: 13px;
}

.newsletter-message.is-error {
  color: #ffb9c4;
}

.newsletter-message.is-success {
  color: #8af0c5;
}

.referral-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.referral-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.referral-link-row {
  display: flex;
  gap: 0.65rem;
}

.referral-link-row input,
.search-field input,
.select-field select,
.share-panel-input,
.signin-input {
  width: 100%;
  min-height: 44px;
  border-radius: 0.9rem;
  border: 1px solid var(--edge);
  background: var(--surface-2);
  color: var(--text);
  padding: 0.75rem 0.9rem;
}

.search-field input::placeholder {
  color: var(--sub);
}

.referral-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.referral-stat {
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: rgba(18, 32, 48, 0.54);
  padding: 0.85rem 0.95rem;
}

:root[data-theme="light"] .referral-stat {
  background: var(--surface-0);
  border-color: var(--line);
}

.referral-stat .label {
  display: block;
  color: var(--sub);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.referral-stat .value {
  display: block;
  margin-top: 0.28rem;
  color: var(--headline);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.referral-tablewrap,
.table-shell {
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(10, 19, 29, 0.72);
}

:root[data-theme="light"] .referral-tablewrap,
:root[data-theme="light"] .table-shell {
  background: rgba(247, 250, 255, 0.95);
}

.referral-table,
.account-table {
  width: 100%;
  border-collapse: collapse;
}

.referral-table th,
.account-table th {
  background: linear-gradient(90deg, rgba(19, 33, 50, 0.96), rgba(13, 24, 38, 0.95));
  color: var(--sub-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: left;
  padding: 0.9rem 1rem;
}

:root[data-theme="light"] .referral-table th,
:root[data-theme="light"] .account-table th {
  background: linear-gradient(90deg, #f2f7fd, #eef4fc);
}

.referral-table td,
.account-table td {
  padding: 1rem;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

.referral-table td.numeric {
  text-align: right;
}

.referral-table .sub {
  color: var(--sub);
  font-size: 12px;
  margin-top: 0.2rem;
}

.referral-table tr.empty td {
  text-align: center;
  color: var(--sub);
}

.referral-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.referral-status.earned {
  color: #8af0c5;
  border: 1px solid rgba(97, 214, 168, 0.25);
  background: rgba(97, 214, 168, 0.11);
}

.referral-status.pending {
  color: #abd3ff;
  border: 1px solid rgba(103, 184, 255, 0.24);
  background: rgba(103, 184, 255, 0.1);
}

.recent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.activity-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.activity-card {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 0.85rem;
  padding: 0.8rem;
}

.activity-card--link {
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.activity-card--link:hover,
.activity-card--link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(103, 184, 255, 0.28);
}

.activity-card--empty {
  display: block;
}

.activity-thumb,
.thumb {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--thumb-bg);
  color: var(--sub);
}

.activity-thumb {
  aspect-ratio: 4 / 3;
  border-radius: 0.95rem;
  border: 1px solid var(--line);
}

.thumb {
  aspect-ratio: 4 / 3;
  border-radius: 1rem 1rem 0 0;
  border-bottom: 1px solid var(--line);
  font-size: 28px;
  font-weight: 800;
}

.activity-thumb img,
.thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.activity-copy {
  min-width: 0;
}

.activity-eyebrow {
  color: var(--sub);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.activity-title,
.asset-title,
.order-title {
  margin-top: 0.3rem;
  color: var(--headline);
  font-weight: 700;
  word-break: break-word;
}

.activity-meta,
.asset-meta,
.order-meta,
.muted {
  color: var(--sub);
  font-size: 13px;
}

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

.toolbar--stack {
  flex-direction: column;
  align-items: stretch;
}

.toolbar-row {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  justify-content: space-between;
}

.toolbar-row--meta {
  align-items: center;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toolbar-group--pills,
.toolbar-group--views {
  padding: 0.35rem;
  border-radius: 0.95rem;
  border: 1px solid var(--line);
  background: rgba(16, 28, 42, 0.58);
}

:root[data-theme="light"] .toolbar-group--pills,
:root[data-theme="light"] .toolbar-group--views {
  background: var(--surface-0);
  border-color: var(--line);
}

.segmented-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 0.8rem;
  background: transparent;
  color: var(--sub);
  min-height: 40px;
  padding: 0.6rem 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

:root[data-theme="light"] .segmented-btn {
  color: var(--sub-strong);
}

.segmented-btn.is-active {
  color: var(--headline);
  border-color: var(--edge);
  background: linear-gradient(180deg, rgba(103, 184, 255, 0.12), rgba(16, 28, 42, 0.78));
}

:root[data-theme="light"] .segmented-btn.is-active {
  background: linear-gradient(180deg, rgba(36, 117, 196, 0.12), rgba(236, 244, 253, 0.96));
}

.search-field,
.select-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.search-field {
  flex: 1 1 320px;
}

.select-field {
  width: min(220px, 100%);
}

.empty-state {
  padding: 2rem 1rem;
  text-align: center;
}

.empty-title {
  color: var(--headline);
  font-size: 1.05rem;
  font-weight: 700;
}

.empty-copy {
  margin-top: 0.35rem;
  color: var(--sub);
}

.pager {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.account-table .table-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.table-thumb {
  width: 68px;
  aspect-ratio: 4 / 3;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--thumb-bg);
  flex: 0 0 auto;
  position: relative;
}

.table-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.table-title {
  color: var(--headline);
  font-weight: 700;
}

.table-sub {
  margin-top: 0.25rem;
  color: var(--sub);
  font-size: 13px;
}

.status-chip,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(103, 184, 255, 0.08);
  color: var(--sub-strong);
  font-size: 12px;
  font-weight: 700;
}

.status-chip.is-paid,
.status-chip.is-completed {
  color: #8af0c5;
  background: rgba(97, 214, 168, 0.1);
  border-color: rgba(97, 214, 168, 0.22);
}

.status-chip.is-processing,
.status-chip.is-pending {
  color: #abd3ff;
}

.status-chip.is-shipped {
  color: #ffe0a5;
  background: rgba(255, 183, 77, 0.1);
  border-color: rgba(255, 183, 77, 0.22);
}

.table-actions,
.asset-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mobile-stack {
  display: none;
}

.order-card {
  display: none;
  padding: 0.95rem;
}

.order-card-head,
.order-card-foot,
.order-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: flex-start;
}

.order-card-meta {
  margin: 0.9rem 0;
}

.order-card-amount {
  color: var(--headline);
  font-size: 1.05rem;
  font-weight: 800;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.9rem;
}

.asset-grid[data-view="list"] {
  grid-template-columns: 1fr;
}

.card2 {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card2 .thumb.has-thumb {
  color: transparent;
}

.card2-body {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 0.9rem;
}

.asset-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.asset-meta {
  margin-top: 0.3rem;
}

.asset-grid[data-view="list"] .card2 {
  flex-direction: row;
  min-height: 164px;
}

.asset-grid[data-view="list"] .thumb {
  width: 240px;
  min-width: 240px;
  height: 100%;
  border-right: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 1rem 0 0 1rem;
}

.asset-grid[data-view="list"] .card2-body {
  flex: 1 1 auto;
  justify-content: space-between;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.delete-pill {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 34px;
  height: 34px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: rgba(8, 16, 25, 0.84);
  color: var(--headline);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.delete-pill:hover,
.delete-pill:focus-visible {
  border-color: rgba(255, 114, 136, 0.48);
  background: rgba(99, 24, 42, 0.92);
  transform: translateY(-1px);
}

.dialog-overlay,
.signin-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(4, 10, 16, 0.7);
  backdrop-filter: blur(10px);
  z-index: 60;
}

.dialog-panel,
.signin-panel {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: linear-gradient(180deg, var(--surface-1), var(--surface-0));
  box-shadow: var(--shadow);
  padding: 1.1rem;
}

.dialog-title,
.signin-title {
  margin: 0;
  color: var(--headline);
  font-size: 1.1rem;
  font-weight: 750;
}

.dialog-message,
.signin-help {
  margin: 0.45rem 0 0;
  color: var(--sub);
}

.signin-input {
  margin-top: 0.85rem;
}

.signin-input--otp {
  letter-spacing: 0.28em;
  text-align: center;
}

.dialog-actions,
.signin-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1rem;
}

.share-popover {
  position: fixed;
  z-index: 55;
  width: min(340px, calc(100vw - 24px));
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: linear-gradient(180deg, var(--surface-1), var(--surface-0));
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.share-panel-msg {
  margin: 0;
  color: var(--sub);
  font-size: 13px;
}

.share-panel-url {
  display: flex;
  gap: 0.5rem;
}

.share-panel-input {
  min-width: 0;
}

.share-panel-error {
  color: #ffb7c3;
  font-size: 12px;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(4px);
  display: none;
  z-index: 15;
}

.sheet-backdrop.show {
  display: block;
}

@media (max-width: 1220px) {
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-card {
    grid-column: 1 / -1;
  }

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

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

  .side {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(84vw, 320px);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 18;
  }

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

  .main {
    padding: 0.9rem;
  }

  .page-hero,
  .toolbar-row {
    flex-direction: column;
    align-items: stretch;
  }

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

  .referral-link-row,
  .referral-stats,
  .newsletter-card {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .newsletter-actions {
    justify-content: flex-start;
  }

  .toolbar-group--views,
  .toolbar-group--pills {
    width: 100%;
    justify-content: stretch;
  }

  .segmented-btn {
    flex: 1 1 0;
  }

  .account-table {
    display: none;
  }

  .mobile-stack {
    display: grid;
    gap: 0.75rem;
    padding: 0.8rem;
  }

  .order-card {
    display: block;
  }

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

  .asset-grid[data-view="list"] .card2,
  .asset-grid[data-view="grid"] .card2 {
    flex-direction: column;
  }

  .asset-grid[data-view="list"] .thumb,
  .asset-grid[data-view="grid"] .thumb {
    width: 100%;
    min-width: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 1rem 1rem 0 0;
  }
}

@media (max-width: 640px) {
  .appbar {
    padding: 0.8rem 0.85rem;
  }

  .main {
    padding: 0.8rem;
  }

  .module-card,
  .profile-card,
  .metric-card {
    padding: 0.8rem;
  }

  .activity-card {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .activity-thumb {
    border-radius: 0.8rem;
  }
}
