:root {
  color-scheme: dark;
  --bg: #05070d;
  --bg-glow: rgba(122, 92, 255, 0.14);
  --surface: rgba(20, 22, 34, 0.92);
  --surface-strong: rgba(26, 29, 45, 0.96);
  --surface-soft: rgba(31, 35, 55, 0.9);
  --border: rgba(118, 131, 165, 0.16);
  --border-strong: rgba(139, 121, 255, 0.32);
  --text: #f4f5ff;
  --text-muted: #aab0d6;
  --text-soft: #c5c9eb;
  --accent: #7c5cff;
  --accent-strong: #9a7bff;
  --accent-ink: #f7f4ff;
  --danger: #ff6b86;
  --warning: #f4c36c;
  --shadow: 0 24px 60px rgba(5, 7, 13, 0.65);
  --shadow-soft: 0 12px 32px rgba(7, 10, 20, 0.55);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-fast: 140ms;
  --dur-med: 200ms;
  --dur-slow: 320ms;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: var(--accent-strong);
}

a:hover {
  color: var(--accent);
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: var(--space-7) var(--space-5) 72px;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

#dashboard-root {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding: var(--space-5) 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

.brand {
  font-weight: 700;
  letter-spacing: 0.3px;
  font-size: 22px;
}

.gradient-text {
  display: inline;
  color: inherit;
  text-shadow: none;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.key-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(28, 31, 46, 0.85);
  color: var(--text-soft);
  font-size: 13px;
  letter-spacing: 0.2px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 32px);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-med) var(--ease-out), border-color var(--dur-med) ease, box-shadow var(--dur-med) ease;
}

.panel::after {
  content: "";
  position: absolute;
  inset: -40% auto auto -30%;
  width: 280px;
  height: 280px;
  background: none;
  opacity: 0.55;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
}

.panel:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.login-panel {
  padding: clamp(28px, 4vw, 40px);
  display: grid;
  gap: var(--space-4);
}

.login-panel .form {
  display: grid;
  gap: var(--space-3);
}

.login-panel .form-field {
  display: grid;
  gap: var(--space-2);
}

.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 107, 134, 0.6);
  background: rgba(255, 107, 134, 0.12);
  color: #ffd6de;
  box-shadow: var(--shadow-soft);
}

.login-panel .footer-note {
  margin: 0;
  color: var(--text-muted);
}

.hero {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.hero-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-5);
}

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--space-2);
  letter-spacing: 0.2px;
}

h1 {
  font-size: clamp(30px, 4.5vw, 38px);
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 18px;
}

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

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-5);
}

.summary-card {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid rgba(128, 114, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.summary-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

.summary-value {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  margin: var(--space-1) 0;
}

.summary-meta {
  font-size: 13px;
  color: var(--text-soft);
}

.summary-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.panel-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 980px) {
  .panel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.currency-filter {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  color: var(--text-soft);
}

.currency-filter span {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-size: 11px;
}

.currency-select {
  min-width: 130px;
}

.dashboard-select {
  appearance: none;
  background: var(--surface-strong);
  border: 1px solid rgba(122, 106, 206, 0.5);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 10px 36px 10px 14px;
  font: inherit;
  position: relative;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease, transform var(--dur-fast) ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23c9cff5' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
}

.dashboard-select:focus-visible {
  outline: none;
  border-color: rgba(144, 123, 255, 0.9);
  box-shadow:
    0 0 0 3px rgba(124, 92, 255, 0.3),
    0 12px 22px rgba(88, 64, 214, 0.2);
  transform: translateY(-1px);
}

.dashboard-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.currency-select:focus-visible {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.25);
}

.currency-panel {
  display: grid;
  gap: var(--space-4);
}

.currency-panel--gold {
  --currency-line-color: rgba(245, 196, 90, 0.95);
  --currency-fill-strong: rgba(245, 196, 90, 0.5);
  --currency-fill-soft: rgba(245, 196, 90, 0.08);
  --currency-border-color: rgba(245, 196, 90, 0.45);
  --currency-marker-color: rgba(245, 196, 90, 0.6);
}

.currency-panel--gems {
  --currency-line-color: rgba(77, 163, 255, 0.95);
  --currency-fill-strong: rgba(77, 163, 255, 0.45);
  --currency-fill-soft: rgba(77, 163, 255, 0.08);
  --currency-border-color: rgba(77, 163, 255, 0.4);
  --currency-marker-color: rgba(77, 163, 255, 0.6);
}

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

.currency-summary {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.currency-value {
  font-size: clamp(34px, 5vw, 46px);
  font-weight: 700;
}

.currency-meta {
  color: var(--text-soft);
  font-size: 14px;
}

.currency-chart {
  position: relative;
  height: 220px;
  border-radius: var(--radius-md);
  border: 1px solid var(--currency-border-color, rgba(140, 123, 255, 0.2));
  background: var(--surface-strong);
  overflow: hidden;
}

.currency-chart-wrapper {
  position: relative;
}

.currency-chart svg {
  width: 100%;
  height: 100%;
  display: block;
}

.currency-chart.is-empty {
  opacity: 0.72;
}

.currency-guide {
  stroke: rgba(162, 168, 210, 0.12);
  stroke-width: 1;
}

.currency-line {
  stroke: var(--currency-line-color, rgba(148, 128, 255, 0.95));
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 10px 18px rgba(124, 92, 255, 0.28));
}

.currency-baseline {
  stroke: rgba(162, 168, 210, 0.18);
  stroke-width: 1.2;
}

.currency-tooltip {
  position: absolute;
  transform: translate(-50%, -120%);
  padding: 10px 12px;
  background: rgba(9, 11, 20, 0.92);
  border: 1px solid var(--currency-border-color, rgba(140, 123, 255, 0.4));
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text);
  box-shadow: var(--shadow-soft);
  pointer-events: none;
  display: grid;
  gap: 4px;
  white-space: nowrap;
}

.currency-tooltip-time {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-size: 10px;
}

.currency-tooltip-value {
  font-weight: 600;
}

.currency-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--currency-marker-color, rgba(124, 92, 255, 0.5));
  pointer-events: none;
}

.currency-empty {
  margin-top: calc(var(--space-2) * -1);
}

.currency-breakdown {
  display: grid;
  gap: var(--space-3);
}

.currency-breakdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.currency-breakdown-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.currency-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-soft);
}

.currency-control span {
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-size: 10px;
  color: var(--text-muted);
}

.currency-control.checkbox span {
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  color: var(--text-soft);
}

.currency-input {
  background: rgba(18, 21, 36, 0.92);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  width: 72px;
}

.currency-select.small {
  min-width: 140px;
  padding: 6px 32px 6px 12px;
}

.currency-legend {
  display: grid;
  gap: var(--space-2);
}

.currency-legend-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: rgba(18, 21, 36, 0.75);
  border: 1px solid rgba(140, 123, 255, 0.15);
}

.currency-panel .currency-stop-strong {
  stop-color: var(--currency-fill-strong, rgba(124, 92, 255, 0.45));
}

.currency-panel .currency-stop-soft {
  stop-color: var(--currency-fill-soft, rgba(124, 92, 255, 0.04));
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--swatch-color, var(--accent));
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.15);
}

.legend-name {
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-value {
  font-weight: 600;
  color: var(--text-soft);
  font-size: 13px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-3);
}

.field {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  display: grid;
  gap: var(--space-1);
}

.field-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--text-muted);
}

.field-value {
  font-size: 17px;
  font-weight: 600;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.section-header p {
  margin: 0;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.account-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-3);
}

.filters {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: min(280px, 100%);
}

@media (min-width: 860px) {
  .account-controls {
    flex-direction: row;
    align-items: center;
  }

  .filters {
    flex-direction: row;
    align-items: center;
    min-width: unset;
  }
}

.search-field {
  position: relative;
}

input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(17, 19, 33, 0.92);
  color: var(--text);
  font-size: 15px;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease, transform var(--dur-fast) ease;
}

input[type="text"]:focus-visible {
  outline: none;
  border-color: rgba(144, 123, 255, 0.9);
  box-shadow:
    0 0 0 3px rgba(124, 92, 255, 0.3),
    0 12px 26px rgba(88, 64, 214, 0.22);
  transform: translateY(-1px);
}

.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-soft);
  font-size: 14px;
}

.account-quick-stats {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(122, 106, 206, 0.35);
  background: rgba(14, 16, 28, 0.8);
}

.account-quick-stat {
  display: grid;
  gap: 2px;
  min-width: 70px;
  text-align: center;
}

.account-quick-stat span {
  color: var(--text-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.account-quick-stat strong {
  font-size: 14px;
  font-weight: 700;
}

.styled-checkbox {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(122, 106, 206, 0.6);
  background: rgba(16, 19, 32, 0.95);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease, transform var(--dur-fast) ease, background var(--dur-fast) ease;
}

.styled-checkbox::before {
  content: '';
  width: 8px;
  height: 4px;
  border-left: 2px solid var(--accent-ink);
  border-bottom: 2px solid var(--accent-ink);
  transform: scale(0) rotate(-45deg);
  transition: transform var(--dur-fast) ease;
}

.styled-checkbox:checked {
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(124, 92, 255, 0.35);
}

.styled-checkbox:checked::before {
  transform: scale(1) rotate(-45deg);
}

.styled-checkbox:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(124, 92, 255, 0.3),
    0 8px 16px rgba(88, 64, 214, 0.2);
}

.styled-checkbox:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: 11px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  cursor: pointer;
  transition:
    transform var(--dur-fast) var(--ease-soft),
    box-shadow var(--dur-med) var(--ease-soft),
    filter var(--dur-fast) ease,
    border-color var(--dur-fast) ease;
  text-decoration: none;
  position: relative;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 12px 24px rgba(124, 92, 255, 0.35);
  filter: brightness(1.04);
}

.button:active:not(:disabled) {
  transform: translateY(0) scale(0.995);
}

.button.secondary,
.button.subtle {
  background: rgba(24, 27, 43, 0.86);
  border-color: var(--border);
  color: var(--text);
  box-shadow: none;
}

.button.secondary:hover:not(:disabled),
.button.subtle:hover:not(:disabled) {
  border-color: var(--border-strong);
  box-shadow: 0 12px 20px rgba(88, 64, 214, 0.2);
}

.button.small {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.button.warning {
  background: var(--warning);
  color: #211503;
}

.button.danger {
  background: var(--danger);
  color: #2a040f;
}

.button.is-loading {
  cursor: progress;
  position: relative;
}

.button.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: var(--radius-pill);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: rgba(255, 255, 255, 0.9);
  position: absolute;
  right: 10px;
  animation: spin 0.7s linear infinite;
}

.button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.button:focus-visible,
.modal-close:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(124, 92, 255, 0.32),
    0 0 0 6px rgba(124, 92, 255, 0.18);
}

.list-state {
  border-radius: var(--radius-md);
  border: 1px dashed rgba(152, 142, 255, 0.4);
  padding: var(--space-4);
  text-align: center;
  color: var(--text-soft);
  margin-bottom: var(--space-4);
  background: rgba(21, 24, 40, 0.75);
}

.account-list {
  display: grid;
  gap: var(--space-5);
}

.account-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  position: relative;
  transition: transform var(--dur-med) var(--ease-out), border-color var(--dur-med) ease, box-shadow var(--dur-med) ease;
}

.account-card-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.account-card-summary::-webkit-details-marker {
  display: none;
}

.account-card-summary::marker {
  content: "";
}

.account-card-summary::after {
  content: "+";
  font-size: 18px;
  color: var(--text-muted);
  margin-left: auto;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(26, 29, 46, 0.8);
}

.account-card[open] > .account-card-summary::after {
  content: "–";
}

.account-card-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.account-card:hover {
  transform: translateY(-3px);
  border-color: rgba(146, 126, 255, 0.45);
  box-shadow: var(--shadow);
}

.account-card.is-hidden {
  display: none;
}

.account-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.account-title-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.account-subtitle {
  color: var(--text-muted);
  font-size: 13px;
}

.account-updated {
  color: var(--text-soft);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(26, 29, 46, 0.8);
  white-space: nowrap;
}

.account-body {
  display: grid;
  gap: var(--space-4);
}

.account-section {
  display: grid;
  gap: var(--space-3);
}

.section-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-3);
}

.stat-chip {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid rgba(133, 122, 255, 0.18);
  background: var(--surface-soft);
  display: grid;
  gap: 2px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

.stat-value {
  font-weight: 700;
  font-size: 20px;
}

.stat-meta {
  font-size: 12px;
  color: var(--text-soft);
}

.stat-total {
  font-size: 12px;
  color: var(--text-soft);
}

.slot-grid {
  display: grid;
  gap: var(--space-3);
}

.slot-card {
  border-radius: var(--radius-md);
  border: 1px solid rgba(140, 128, 255, 0.2);
  padding: var(--space-4);
  background: rgba(24, 27, 45, 0.88);
  display: grid;
  gap: var(--space-3);
}

.slot-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.slot-header h4 {
  margin: 0;
}

.slot-meta {
  font-size: 12px;
  color: var(--text-soft);
}

.slot-currency {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.currency-pill {
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(146, 129, 255, 0.34);
  background: rgba(44, 40, 82, 0.55);
  font-size: 13px;
}

.slot-upgrades {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-3);
}

.slot-entitlement-list {
  display: grid;
  gap: var(--space-3);
}

.slot-entitlement-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: rgba(18, 21, 36, 0.9);
  border: 1px solid rgba(124, 109, 255, 0.18);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
}

.slot-entitlement-slots {
  font-weight: 600;
}

.slot-entitlement-expiry {
  text-align: right;
}

.slot-entitlement-time {
  font-weight: 600;
}

.slot-entitlement-meta {
  font-size: 12px;
  color: var(--text-soft);
}

.upgrade-group {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: rgba(18, 21, 36, 0.9);
  border: 1px solid rgba(124, 109, 255, 0.18);
  display: grid;
  gap: var(--space-2);
}

.upgrade-title {
  font-weight: 600;
  font-size: 14px;
}

.upgrade-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
  display: grid;
  gap: 4px;
}

.upgrade-list li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
}

.upgrade-name {
  flex: 1;
}

.upgrade-values {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  justify-content: flex-end;
}

.upgrade-raw {
  color: var(--text);
}

.rank-pill {
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--rank-color, #ff6b6b);
  color: var(--rank-color, #ff6b6b);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: rgba(0, 0, 0, 0.2);
}

.upgrade-average {
  padding-top: 6px;
  margin-top: 6px;
  border-top: 1px solid rgba(140, 128, 255, 0.2);
  font-weight: 600;
}


.raw-json {
  border-radius: var(--radius-md);
  border: 1px solid rgba(136, 118, 255, 0.24);
  background: rgba(12, 14, 24, 0.92);
  padding: var(--space-3);
}

pre {
  margin: 0;
  max-height: 320px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.45;
  color: #e4e7ff;
}

.account-reason {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 126, 150, 0.36);
  background: rgba(255, 96, 134, 0.12);
  color: #ffdbe4;
  font-size: 14px;
}

.account-footer {
  border-top: 1px solid rgba(140, 128, 255, 0.16);
  padding-top: var(--space-4);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.badge-blacklisted {
  background: rgba(255, 96, 134, 0.16);
  color: #ffd9e3;
  border-color: rgba(255, 120, 150, 0.46);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.status-pill--warning {
  background: rgba(255, 180, 76, 0.18);
  color: #ffd39b;
  border-color: rgba(255, 180, 76, 0.5);
}

.status-pill--success {
  background: rgba(88, 214, 138, 0.16);
  color: #b2f2c7;
  border-color: rgba(88, 214, 138, 0.45);
}

.status-pill--online {
  background: rgba(88, 214, 138, 0.16);
  color: #b2f2c7;
  border-color: rgba(88, 214, 138, 0.45);
}

.status-pill--offline {
  background: rgba(255, 96, 134, 0.16);
  color: #ffd9e3;
  border-color: rgba(255, 120, 150, 0.46);
}

.status-pill--neutral {
  background: rgba(137, 120, 255, 0.16);
  color: #d3c9ff;
  border-color: rgba(137, 120, 255, 0.45);
}

.blacklisted-list {
  display: grid;
  gap: var(--space-3);
}

.blacklisted-card {
  border-radius: var(--radius-md);
  border: 1px solid rgba(144, 129, 255, 0.24);
  background: rgba(20, 23, 39, 0.9);
  padding: var(--space-4);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  transition: border-color var(--dur-fast) ease, transform var(--dur-fast) var(--ease-soft);
}

.blacklisted-card:hover {
  border-color: rgba(165, 150, 255, 0.48);
  transform: translateY(-2px);
}

.blacklisted-title {
  font-weight: 600;
  font-size: 16px;
}

.blacklisted-meta {
  color: var(--text-soft);
  font-size: 13px;
  margin-top: var(--space-1);
}

.blacklisted-actions {
  display: grid;
  gap: var(--space-2);
  justify-items: end;
}

.blacklisted-date {
  font-size: 12px;
  color: var(--text-muted);
}

.toast-region {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  display: grid;
  gap: var(--space-2);
  z-index: 80;
  max-width: min(360px, calc(100vw - 32px));
}

.toast-region--left {
  left: var(--space-5);
  right: auto;
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: rgba(23, 26, 43, 0.96);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  animation: toast-in var(--dur-med) var(--ease-out);
}

.toast-success {
  border-color: rgba(132, 114, 255, 0.46);
}

.toast-error {
  border-color: rgba(255, 116, 150, 0.5);
}

.toast-exit {
  animation: toast-out var(--dur-fast) ease forwards;
}

.modal-root[hidden] {
  display: none;
}

.modal-root {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 13, 0.72);
  backdrop-filter: blur(4px);
  animation: fade-backdrop var(--dur-med) ease;
}

.modal {
  position: relative;
  width: min(460px, calc(100vw - 28px));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(141, 124, 255, 0.42);
  background: var(--surface-strong);
  padding: var(--space-5);
  box-shadow: var(--shadow);
  display: grid;
  gap: var(--space-3);
  animation: modal-in var(--dur-med) var(--ease-out);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.modal-description {
  margin: 0;
  color: var(--text-soft);
}

.modal-body {
  display: grid;
  gap: var(--space-2);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.modal-close {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(26, 29, 45, 0.88);
  color: var(--text);
  border-radius: var(--radius-sm);
  width: 34px;
  height: 34px;
  font-size: 18px;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-soft), border-color var(--dur-fast) ease;
}

.modal-close:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.modal-field {
  display: grid;
  gap: var(--space-1);
}

.modal-label {
  font-size: 13px;
  color: var(--text-soft);
}

.modal-help {
  font-size: 12px;
  color: var(--text-muted);
}

.modal-field input[type="text"] {
  background: rgba(14, 17, 30, 0.94);
}

.modal-settings {
  display: grid;
  gap: var(--space-2);
}

.settings-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(19, 22, 36, 0.8);
  color: var(--text);
}

.modal-option-list {
  display: grid;
  gap: var(--space-2);
}

.modal-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(19, 22, 36, 0.86);
  color: var(--text);
  text-decoration: none;
  transition: border-color var(--dur-fast) ease, transform var(--dur-fast) var(--ease-soft);
}

.modal-option:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.modal-option-title {
  font-weight: 600;
}

.modal-option-subtext {
  font-size: 12px;
  color: var(--text-muted);
}

.modal-option-arrow {
  font-size: 14px;
  color: var(--text-muted);
}

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

.is-hidden {
  display: none !important;
}

.fade-in {
  animation: fade-in-up var(--dur-slow) var(--ease-out) both;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes fade-backdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }

  .panel:hover,
  .account-card:hover,
  .blacklisted-card:hover,
  .button:hover:not(:disabled) {
    transform: none;
    box-shadow: var(--shadow-soft);
  }
}

@media (max-width: 820px) {
  .container {
    padding: var(--space-6) var(--space-4) 64px;
  }

  .hero-content,
  .section-header,
  .account-card-header,
  .blacklisted-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-meta {
    width: 100%;
    justify-content: space-between;
  }

  .filters {
    width: 100%;
  }

  .toast-region {
    right: var(--space-4);
    left: var(--space-4);
    bottom: var(--space-4);
  }

  .modal-actions {
    justify-content: stretch;
  }

  .modal-actions .button {
    flex: 1;
  }
}
