/* ── Tokens (shadcn-style HSL triplets) ─────────────────────────────────── */
:root {
  --background:   240 6% 8%;
  --foreground:    0 0% 96%;

  --card:          240 6% 10%;
  --card-foreground: 0 0% 96%;

  --popover:       240 6% 11%;
  --popover-foreground: 0 0% 96%;

  --primary:       38 92% 50%;
  --primary-foreground: 20 14% 4%;

  --secondary:     240 5% 15%;
  --secondary-foreground: 0 0% 92%;

  --muted:         240 5% 15%;
  --muted-foreground: 240 5% 64%;

  --accent:        240 5% 17%;
  --accent-foreground: 0 0% 96%;

  --destructive:   0 72% 51%;
  --destructive-foreground: 0 0% 98%;

  --success:       160 84% 39%;
  --success-foreground: 0 0% 98%;

  --warning:       38 92% 50%;

  --border:        240 5% 19%;
  --input:         240 5% 19%;
  --ring:          38 92% 50%;

  --chart-1: 38 92% 50%;
  --chart-2: 217 91% 60%;
  --chart-3: 330 81% 60%;
  --chart-4: 25 95% 53%;
  --chart-5: 160 84% 39%;

  --sidebar:            240 6% 6.5%;
  --sidebar-foreground: 0 0% 88%;
  --sidebar-border:     240 5% 15%;
  --sidebar-accent:     240 5% 14%;
  --sidebar-accent-foreground: 0 0% 96%;

  --radius: 0.625rem;
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 16px -4px rgb(0 0 0 / 0.45);
  --shadow-lg: 0 16px 48px -12px rgb(0 0 0 / 0.55);
}

:root[data-theme="light"] {
  --background:   0 0% 98%;
  --foreground:   240 10% 10%;

  --card:          0 0% 100%;
  --card-foreground: 240 10% 10%;

  --popover:       0 0% 100%;
  --popover-foreground: 240 10% 10%;

  --primary:       32 95% 44%;
  --primary-foreground: 0 0% 100%;

  --secondary:     240 5% 94%;
  --secondary-foreground: 240 10% 12%;

  --muted:         240 5% 94%;
  --muted-foreground: 240 4% 42%;

  --accent:        240 5% 91%;
  --accent-foreground: 240 10% 10%;

  --destructive:   0 72% 45%;
  --destructive-foreground: 0 0% 100%;

  --success:       160 70% 32%;
  --success-foreground: 0 0% 100%;

  --warning:       32 95% 44%;

  --border:        240 6% 88%;
  --input:         240 6% 85%;
  --ring:          32 95% 44%;

  --chart-1: 32 95% 44%;
  --chart-2: 217 80% 48%;
  --chart-3: 330 70% 48%;
  --chart-4: 25 85% 45%;
  --chart-5: 160 70% 32%;

  --sidebar:            0 0% 100%;
  --sidebar-foreground: 240 10% 15%;
  --sidebar-border:     240 6% 90%;
  --sidebar-accent:     240 5% 93%;
  --sidebar-accent-foreground: 240 10% 10%;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.06);
  --shadow-md: 0 4px 16px -4px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 16px 48px -12px rgb(0 0 0 / 0.16);
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.006em;
}

button, input, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; }

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

::selection { background: hsl(var(--primary) / 0.3); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: hsl(var(--border)); border-radius: 5px; border: 2px solid hsl(var(--background)); }
::-webkit-scrollbar-thumb:hover { background: hsl(var(--muted-foreground) / 0.4); }

:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; border-radius: 4px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
}
.btn:hover { background: hsl(var(--accent)); }
.btn:active { transform: translateY(0.5px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn svg { flex-shrink: 0; }

.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 600;
}
.btn-primary:hover { background: hsl(var(--primary) / 0.88); }

.btn-outline {
  background: transparent;
  border-color: hsl(var(--border));
  color: hsl(var(--foreground));
}
.btn-outline:hover { background: hsl(var(--accent)); }

.btn-ghost { background: transparent; color: hsl(var(--muted-foreground)); }
.btn-ghost:hover { background: hsl(var(--accent)); color: hsl(var(--foreground)); }

.btn-destructive-ghost { background: transparent; color: hsl(var(--muted-foreground)); }
.btn-destructive-ghost:hover { background: hsl(var(--destructive) / 0.12); color: hsl(var(--destructive)); }

.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: var(--radius-sm); }
.btn-icon { width: 36px; padding: 0; }
.btn-icon.btn-sm { width: 30px; }

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.6;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-outline { background: transparent; border-color: hsl(var(--border)); color: hsl(var(--muted-foreground)); }
.badge-secondary { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); }
.badge-amber { background: hsl(var(--primary) / 0.12); color: hsl(var(--primary)); border-color: hsl(var(--primary) / 0.25); }
.badge-success { background: hsl(var(--success) / 0.14); color: hsl(var(--success)); border-color: hsl(var(--success) / 0.25); }
.badge-destructive { background: hsl(var(--destructive) / 0.12); color: hsl(var(--destructive)); border-color: hsl(var(--destructive) / 0.25); }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.label { font-size: 12.5px; font-weight: 500; color: hsl(var(--foreground)); }
.label .hint { color: hsl(var(--muted-foreground)); font-weight: 400; }
.info-icon { color: hsl(var(--muted-foreground)); font-weight: 400; cursor: help; margin-left: 2px; }

.input, textarea.input {
  width: 100%;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius-md);
  color: hsl(var(--foreground));
  padding: 9px 12px;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  resize: vertical;
}
.input::placeholder { color: hsl(var(--muted-foreground)); }
.input:focus { border-color: hsl(var(--ring)); box-shadow: 0 0 0 3px hsl(var(--ring) / 0.18); }
textarea.input { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: 11.5px; line-height: 1.6; }

.help-text { color: hsl(var(--muted-foreground)); font-size: 11.5px; line-height: 1.5; margin-top: 6px; }
.help-text code { background: hsl(var(--muted)); padding: 2px 6px; border-radius: 4px; font-family: ui-monospace, monospace; color: hsl(var(--primary)); font-size: 11px; }

.alert {
  background: hsl(var(--destructive) / 0.1);
  border: 1px solid hsl(var(--destructive) / 0.3);
  color: hsl(var(--destructive));
  border-radius: var(--radius-md);
  padding: 9px 12px;
  font-size: 12.5px;
  line-height: 1.5;
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
}
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid hsl(var(--border));
}
.card-title { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }
.card-description { font-size: 12.5px; color: hsl(var(--muted-foreground)); margin-top: 2px; }
.card-content { padding: 20px; }
.card-content-flush { padding: 0; }

/* ── App shell ───────────────────────────────────────────────────────────── */
.shell { display: flex; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  width: 248px;
  flex-shrink: 0;
  background: hsl(var(--sidebar));
  border-right: 1px solid hsl(var(--sidebar-border));
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 40;
  transition: transform 0.22s ease;
}
.sidebar-header { padding: 18px 18px 14px; }
.brand { display: flex; align-items: center; gap: 9px; }
.brand-icon {
  width: 30px; height: 30px;
  border-radius: var(--radius-md);
  background: hsl(var(--primary) / 0.14);
  color: hsl(var(--primary));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-name { font-size: 14.5px; font-weight: 700; letter-spacing: -0.02em; color: hsl(var(--sidebar-foreground)); }
.brand-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: hsl(var(--muted-foreground));
  border: 1px solid hsl(var(--sidebar-border));
  border-radius: 5px;
  padding: 2px 6px;
}

.sidebar-nav { padding: 6px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-group-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: hsl(var(--muted-foreground));
  padding: 14px 10px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  color: hsl(var(--sidebar-foreground) / 0.75);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.14s, color 0.14s;
}
.nav-item svg { flex-shrink: 0; opacity: 0.85; }
.nav-item:hover { background: hsl(var(--sidebar-accent)); color: hsl(var(--sidebar-accent-foreground)); }
.nav-item.active { background: hsl(var(--sidebar-accent)); color: hsl(var(--sidebar-accent-foreground)); }
.nav-item.active svg { color: hsl(var(--primary)); opacity: 1; }

.sidebar-footer { padding: 10px; border-top: 1px solid hsl(var(--sidebar-border)); position: relative; }
.user-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: hsl(var(--sidebar-foreground));
  cursor: pointer;
  transition: background 0.14s;
}
.user-trigger:hover { background: hsl(var(--sidebar-accent)); }
.avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: hsl(var(--primary) / 0.16);
  color: hsl(var(--primary));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}
.user-meta { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; flex: 1; }
.user-name { font-size: 12.5px; font-weight: 600; }
.user-sub { font-size: 11px; color: hsl(var(--muted-foreground)); }
.user-trigger .chev { color: hsl(var(--muted-foreground)); flex-shrink: 0; transition: transform 0.15s; }
.user-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }

.user-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 10px;
  right: 10px;
  background: hsl(var(--popover));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 4px;
  animation: popIn 0.12s ease;
}
.user-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  color: hsl(var(--destructive));
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}
.user-menu-item:hover { background: hsl(var(--destructive) / 0.1); }
@keyframes popIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 0.5);
  z-index: 35;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.sidebar-toggle { display: none; }

@media (max-width: 1023px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .shell.sidebar-open .sidebar { transform: translateX(0); }
  .shell.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .sidebar-toggle { display: inline-flex; }
  .content { margin-left: 0 !important; }
}

/* ── Content / Topbar ───────────────────────────────────────────────────── */
.content { flex: 1; margin-left: 248px; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  background: hsl(var(--background) / 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid hsl(var(--border));
  position: sticky;
  top: 0;
  z-index: 20;
}
.icon-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}
.icon-btn:hover { background: hsl(var(--accent)); color: hsl(var(--foreground)); }

.breadcrumb { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.topbar-updated {
  font-size: 11.5px;
  color: hsl(var(--muted-foreground));
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.topbar-updated::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: hsl(var(--success));
  box-shadow: 0 0 6px hsl(var(--success) / 0.6);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.search-field {
  flex: 1;
  max-width: 320px;
  margin-left: auto;
  position: relative;
  display: flex;
  align-items: center;
}
.search-field svg { position: absolute; left: 10px; color: hsl(var(--muted-foreground)); pointer-events: none; }
.search-field input {
  width: 100%;
  height: 34px;
  padding-left: 32px;
  background: hsl(var(--secondary) / 0.6);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-md);
  color: hsl(var(--foreground));
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.search-field input::placeholder { color: hsl(var(--muted-foreground)); }
.search-field input:focus { border-color: hsl(var(--ring)); background: hsl(var(--background)); }
@media (max-width: 720px) { .search-field { display: none; } }

.topbar-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* ── Main ────────────────────────────────────────────────────────────────── */
.main {
  flex: 1;
  padding: 24px 28px 48px;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  background-image: radial-gradient(circle at 1px 1px, hsl(var(--border) / 0.5) 1px, transparent 0);
  background-size: 28px 28px;
  background-position: -6px -6px;
}
@media (max-width: 640px) { .main { padding: 18px 16px 40px; } }

.page-head { margin-bottom: 20px; }
.page-head h1 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.page-head p { font-size: 13px; color: hsl(var(--muted-foreground)); margin-top: 3px; }

/* ── Overview extras (attention / pot lists) ────────────────────────────── */
.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
@media (max-width: 860px) { .overview-grid { grid-template-columns: 1fr; } }

.ov-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-bottom: 1px solid hsl(var(--border));
  transition: background 0.12s;
}
.ov-row:last-child { border-bottom: none; }
.ov-row.clickable:hover { background: hsl(var(--accent) / 0.5); }
.ov-row .acct-avatar { width: 30px; height: 30px; font-size: 12px; }
.ov-row-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ov-row-label { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-row-sub { font-size: 11px; color: hsl(var(--muted-foreground)); }
.ov-empty { padding: 30px 18px; text-align: center; color: hsl(var(--muted-foreground)); font-size: 12.5px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ov-empty svg { color: hsl(var(--success)); }

/* ── Stat grid ───────────────────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .stat-grid { grid-template-columns: 1fr; } }

.stat-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  transition: border-color 0.2s, transform 0.2s;
  animation: cardIn 0.4s cubic-bezier(0.16,1,0.3,1) backwards;
}
.stat-grid .stat-card:nth-child(1) { animation-delay: 0.02s; }
.stat-grid .stat-card:nth-child(2) { animation-delay: 0.06s; }
.stat-grid .stat-card:nth-child(3) { animation-delay: 0.1s; }
.stat-grid .stat-card:nth-child(4) { animation-delay: 0.14s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.stat-card:hover { border-color: hsl(var(--muted-foreground) / 0.3); }

.stat-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.stat-label { font-size: 12.5px; color: hsl(var(--muted-foreground)); font-weight: 500; }
.stat-icon {
  width: 30px; height: 30px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.icon-amber  { background: hsl(var(--chart-1) / 0.14); color: hsl(var(--chart-1)); }
.icon-blue   { background: hsl(var(--chart-2) / 0.14); color: hsl(var(--chart-2)); }
.icon-pink   { background: hsl(var(--chart-3) / 0.14); color: hsl(var(--chart-3)); }
.icon-green  { background: hsl(var(--chart-5) / 0.14); color: hsl(var(--chart-5)); }

.stat-value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat-sub { font-size: 11.5px; color: hsl(var(--muted-foreground)); margin-top: 3px; }

/* ── Accounts card grid ──────────────────────────────────────────────────── */
.page-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

.accounts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 1100px) { .accounts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px)  { .accounts-grid { grid-template-columns: 1fr; } }
.clickable { cursor: pointer; }

.acct-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.14s, transform 0.14s;
}
.acct-card:hover { border-color: hsl(var(--muted-foreground) / 0.35); transform: translateY(-2px); }

.acct-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; }
.acct-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.acct-avatar {
  width: 34px; height: 34px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13.5px;
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.14);
  flex-shrink: 0;
  text-transform: uppercase;
}
.acct-info { display: flex; flex-direction: column; min-width: 0; }
.acct-label { font-weight: 600; color: hsl(var(--foreground)); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-email { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; color: hsl(var(--muted-foreground)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }

.acct-card-body { padding: 4px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.acct-card-error {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px;
  color: hsl(var(--muted-foreground));
  line-height: 1.4;
}

.credits-main { font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 700; font-size: 26px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: hsl(var(--foreground)); line-height: 1.15; }
.credits-main.dim { color: hsl(var(--muted-foreground)); font-size: 14px; font-weight: 500; }
.acct-card-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: hsl(var(--muted-foreground)); }
.acct-card-row b { color: hsl(var(--foreground)); font-weight: 600; font-variant-numeric: tabular-nums; }
.breakdown { display: flex; gap: 9px; margin-top: 3px; flex-wrap: wrap; }
.bd-item { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: hsl(var(--muted-foreground)); font-variant-numeric: tabular-nums; }
.bd-dot { width: 6px; height: 6px; border-radius: 50%; }
.bd-g { background: hsl(var(--chart-2)); }
.bd-w { background: hsl(var(--chart-3)); }
.bd-l { background: hsl(var(--chart-4)); }
.muted { color: hsl(var(--muted-foreground)); }

.pot-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
  border: 1px solid hsl(var(--primary) / 0.28);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}
.pot-btn:hover { background: hsl(var(--primary) / 0.22); }
.pot-btn:active { transform: translateY(0.5px); }

.dev-cell { display: flex; align-items: center; gap: 9px; }
.dev-bar { flex: 1; height: 6px; border-radius: 3px; background: hsl(var(--muted)); overflow: hidden; }
.dev-bar-fill { height: 100%; border-radius: 3px; background: hsl(var(--chart-5)); transition: width 0.3s; }
.dev-bar-fill.zero { background: hsl(var(--muted-foreground) / 0.4); }
.dev-count { font-size: 12px; font-variant-numeric: tabular-nums; color: hsl(var(--muted-foreground)); white-space: nowrap; }
.dev-count b { color: hsl(var(--foreground)); font-weight: 600; }

.poll-ok, .poll-fail, .poll-never { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.poll-ok { color: hsl(var(--muted-foreground)); }
.poll-fail { color: hsl(var(--destructive)); }
.poll-never { color: hsl(var(--muted-foreground) / 0.7); }
.poll-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.poll-dot.ok { background: hsl(var(--success)); box-shadow: 0 0 6px hsl(var(--success) / 0.6); }
.poll-dot.stale { background: hsl(var(--warning)); }
.poll-dot.fail { background: hsl(var(--destructive)); }

.acct-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-top: 1px solid hsl(var(--border));
}
.row-actions { display: flex; gap: 2px; }
.act-btn {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-size: 10.5px;
  font-weight: 600;
}
.act-btn:hover { background: hsl(var(--accent)); color: hsl(var(--foreground)); }
.act-btn.danger:hover { background: hsl(var(--destructive) / 0.12); color: hsl(var(--destructive)); }

/* Skeleton */
.skeleton {
  display: inline-block;
  border-radius: 5px;
  background: linear-gradient(100deg, hsl(var(--muted)) 30%, hsl(var(--accent)) 50%, hsl(var(--muted)) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  color: transparent !important;
}
@keyframes shimmer { 0% { background-position: 150% 0; } 100% { background-position: -150% 0; } }
.skel-text { height: 1em; width: 60px; }
.skel-avatar { width: 34px; height: 34px; border-radius: var(--radius-md); flex-shrink: 0; }
.skel-line { height: 12px; border-radius: 5px; }

/* Empty state */
.accounts-grid .empty-state { grid-column: 1 / -1; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 56px 20px; }
.empty-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.empty-title { font-size: 14.5px; font-weight: 600; }
.empty-sub { font-size: 12.5px; color: hsl(var(--muted-foreground)); }

/* ── Dialog ──────────────────────────────────────────────────────────────── */
.dialog { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.dialog-overlay { position: absolute; inset: 0; background: rgb(0 0 0 / 0.6); backdrop-filter: blur(3px); animation: fadeIn 0.15s ease; }
.dialog-content {
  position: relative;
  background: hsl(var(--popover));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: dialogIn 0.18s cubic-bezier(0.16,1,0.3,1);
}
.dialog-content-lg { max-width: 740px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes dialogIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }

.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid hsl(var(--border)); flex-shrink: 0; }
.dialog-title { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.dialog-description { font-size: 12px; color: hsl(var(--muted-foreground)); margin-top: 3px; }
.dialog-close { background: none; border: none; color: hsl(var(--muted-foreground)); cursor: pointer; padding: 5px; border-radius: var(--radius-sm); display: flex; transition: color 0.15s, background 0.15s; }
.dialog-close:hover { color: hsl(var(--foreground)); background: hsl(var(--accent)); }

.dialog-body { padding: 20px; flex: 1; }
.dialog-footer { padding: 14px 20px; border-top: 1px solid hsl(var(--border)); display: flex; justify-content: flex-end; gap: 8px; flex-shrink: 0; }

/* ── Detail page ─────────────────────────────────────────────────────────── */
.detail-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: hsl(var(--muted-foreground));
  font-size: 13px;
  font-weight: 500;
  padding: 6px 2px;
  margin-bottom: 16px;
  transition: color 0.15s;
  font-family: inherit;
}
.detail-back-btn:hover { color: hsl(var(--foreground)); }

.detail-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.detail-page-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.detail-avatar { width: 48px; height: 48px; font-size: 18px; }
.detail-page-label { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; display: block; }
.detail-page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

#view-detail .detail-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.detail-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid hsl(var(--border));
  margin-bottom: 18px;
}
.detail-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: hsl(var(--muted-foreground));
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  padding: 9px 4px;
  margin-right: 18px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.detail-tab:hover { color: hsl(var(--foreground)); }
.detail-tab.active { color: hsl(var(--primary)); border-bottom-color: hsl(var(--primary)); font-weight: 600; }
.tab-dot { width: 6px; height: 6px; border-radius: 50%; background: hsl(var(--primary)); box-shadow: 0 0 6px hsl(var(--primary) / 0.6); }
.tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px;
  background: hsl(var(--primary) / 0.16);
  color: hsl(var(--primary));
  font-size: 10.5px;
  font-weight: 700;
}
.detail-tab-panel { animation: fadeIn 0.15s ease; }

/* ── Detail view ─────────────────────────────────────────────────────────── */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
@media (max-width: 560px) { .detail-grid { grid-template-columns: 1fr; } }

.detail-card { background: hsl(var(--secondary) / 0.5); border: 1px solid hsl(var(--border)); border-radius: var(--radius-md); padding: 14px 16px; }
.detail-card-title { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: hsl(var(--muted-foreground)); margin-bottom: 10px; }

.balance-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.balance-row.total { font-weight: 700; font-size: 17px; margin-bottom: 4px; }
.balance-row.total .val { color: hsl(var(--primary)); }
.balance-row .lbl { display: flex; align-items: center; gap: 7px; color: hsl(var(--muted-foreground)); font-weight: 500; }
.balance-dot { width: 7px; height: 7px; border-radius: 50%; }
.dot-blue { background: hsl(var(--chart-2)); }
.dot-pink { background: hsl(var(--chart-3)); }
.dot-orange { background: hsl(var(--chart-4)); }

.detail-section-title { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: hsl(var(--muted-foreground)); margin: 20px 0 10px; }

.ip-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background: hsl(var(--secondary) / 0.5);
  margin-bottom: 10px;
  font-size: 12.5px;
  color: hsl(var(--foreground));
}

.switch {
  position: relative;
  width: 38px; height: 22px;
  border-radius: 999px;
  border: none;
  background: hsl(var(--muted));
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.18s;
  padding: 0;
}
.switch.on { background: hsl(var(--primary)); }
.switch-knob {
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: hsl(var(--background));
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.3);
  transition: transform 0.18s;
}
.switch.on .switch-knob { transform: translateX(16px); }

.device-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--radius-md); background: hsl(var(--secondary) / 0.5); margin-bottom: 6px; font-size: 12px; }
.device-row .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.dot-green { background: hsl(var(--success)); box-shadow: 0 0 6px hsl(var(--success) / 0.5); }
.dot-gray { background: hsl(var(--muted-foreground) / 0.5); }
.device-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.device-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.device-name { color: hsl(var(--foreground)); font-weight: 500; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.device-ip-line {
  display: flex;
  align-items: center;
  gap: 6px;
  color: hsl(var(--muted-foreground));
  font-size: 11px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.device-credits { color: hsl(var(--primary)); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.no-devices { color: hsl(var(--muted-foreground)); font-size: 12px; padding: 14px; text-align: center; background: hsl(var(--secondary) / 0.5); border-radius: var(--radius-md); }

.detail-loading { color: hsl(var(--muted-foreground)); text-align: center; padding: 36px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; }

/* Floating "+amount" pop shown on pot/achievement claims */
.pot-pop {
  position: fixed;
  transform: translate(-50%, 6px) scale(0.9);
  font-weight: 700;
  font-size: 13px;
  color: hsl(var(--success));
  pointer-events: none;
  z-index: 300;
  animation: potPopFloat 1.1s ease forwards;
  text-shadow: 0 1px 8px hsl(var(--background));
}
@keyframes potPopFloat {
  0%   { opacity: 0; transform: translate(-50%, 6px) scale(0.9); }
  15%  { opacity: 1; transform: translate(-50%, 0) scale(1); }
  75%  { opacity: 1; transform: translate(-50%, -24px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -36px) scale(0.95); }
}

/* Achievements */
.ach-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: hsl(var(--secondary) / 0.5);
  margin-bottom: 8px;
  transition: background 0.5s ease;
}
.ach-card.ach-locked { opacity: 0.55; }
.ach-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
}
.ach-icon.ach-icon-claimed { background: hsl(var(--success) / 0.14); color: hsl(var(--success)); }
.ach-icon.ach-icon-locked { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }
.ach-body { flex: 1; min-width: 0; }
.ach-title { font-size: 12.5px; font-weight: 600; color: hsl(var(--foreground)); display: flex; align-items: center; gap: 7px; }
.ach-reward { font-size: 11px; color: hsl(var(--primary)); font-weight: 600; }
.ach-progress-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.ach-progress-bar { flex: 1; height: 5px; border-radius: 3px; background: hsl(var(--muted)); overflow: hidden; }
.ach-progress-fill { height: 100%; border-radius: 3px; background: hsl(var(--chart-2)); transition: width 0.3s; }
.ach-progress-fill.complete { background: hsl(var(--success)); }
.ach-progress-text { font-size: 10.5px; color: hsl(var(--muted-foreground)); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ach-card.ach-claimed-flash { background: hsl(var(--success) / 0.14); }

/* History chart */
.chart-card { background: hsl(var(--secondary) / 0.5); border: 1px solid hsl(var(--border)); border-radius: var(--radius-md); padding: 14px 16px 8px; margin-top: 12px; }
.chart-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.chart-head .lbl { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: hsl(var(--muted-foreground)); }
.chart-head .range { font-size: 10.5px; color: hsl(var(--muted-foreground)); }
.chart-empty { color: hsl(var(--muted-foreground)); font-size: 12px; text-align: center; padding: 26px 0; }

.earn-total { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; margin-bottom: 10px; }
.earn-bars { display: flex; align-items: flex-end; height: 140px; gap: 3px; }
.earn-bar-col { flex: 1; display: flex; align-items: flex-end; height: 100%; min-width: 0; cursor: pointer; }
.earn-bar-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 2px 2px 0 0;
  min-height: 1px;
  transition: opacity 0.15s;
}
.earn-bar-col:hover .earn-bar-stack { opacity: 0.8; }
.earn-seg { width: 100%; flex-shrink: 0; }
.earn-seg-gathering { background: hsl(var(--chart-2)); }
.earn-seg-winnings  { background: hsl(var(--chart-3)); }
.earn-seg-loyalty   { background: hsl(var(--chart-4)); }
.earn-axis { display: flex; gap: 3px; margin-top: 6px; }
.earn-axis-label {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 9.5px;
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
  overflow: hidden;
}

.earn-tooltip {
  position: fixed;
  z-index: 300;
  background: hsl(var(--popover));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-md);
  padding: 11px 15px;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  transform: translate(-50%, -100%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease;
  white-space: nowrap;
}
.earn-tooltip.show { opacity: 1; visibility: visible; }
.earn-tooltip-date { font-size: 11px; color: hsl(var(--muted-foreground)); margin-bottom: 4px; }
.earn-tooltip-value { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.earn-tooltip-breakdown { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: hsl(var(--muted-foreground)); }
.earn-tooltip-arrow {
  position: absolute;
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%) rotate(45deg);
  width: 9px; height: 9px;
  background: hsl(var(--popover));
  border-right: 1px solid hsl(var(--border));
  border-bottom: 1px solid hsl(var(--border));
}

/* ── Login ───────────────────────────────────────────────────────────────── */
.login-screen { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-box { position: relative; background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: var(--radius-lg); padding: 32px 30px; width: 100%; max-width: 380px; box-shadow: var(--shadow-md); display: flex; flex-direction: column; gap: 6px; }

.login-logo { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; color: hsl(var(--foreground)); margin-bottom: 4px; }
.login-logo .logo-mark {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  background: hsl(var(--primary) / 0.14);
  color: hsl(var(--primary));
  display: flex; align-items: center; justify-content: center;
}
.login-sub { text-align: center; color: hsl(var(--muted-foreground)); font-size: 12.5px; margin-bottom: 18px; }

.login-box form { display: flex; flex-direction: column; gap: 12px; }
.login-box button[type=submit] {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border: none;
  border-radius: var(--radius-md);
  height: 38px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.login-box button[type=submit]:hover { background: hsl(var(--primary) / 0.88); }
.login-box button[type=submit]:active { transform: translateY(1px); }
.login-box .arrow { transition: transform 0.15s; }
.login-box button[type=submit]:hover .arrow { transform: translateX(3px); }
.login-error { color: hsl(var(--destructive)); font-size: 12.5px; text-align: center; margin-top: 10px; }

/* ── Toast ───────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 22px; left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: hsl(var(--popover));
  border: 1px solid hsl(var(--border));
  border-left: 3px solid hsl(var(--muted-foreground));
  color: hsl(var(--foreground));
  padding: 11px 18px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { border-left-color: hsl(var(--success)); }
.toast.err { border-left-color: hsl(var(--destructive)); }

/* ── Spinner ─────────────────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { display: inline-block; animation: spin 0.8s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ── Login screen ──────────────────────────────────────────────────────── */
.login-screen {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: hsl(var(--background));
  overflow: hidden;
}

.login-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.055) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, black 20%, transparent 75%);
}

.login-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.32;
  will-change: transform;
}

.blob-amber {
  width: 560px; height: 560px;
  top: -120px; left: -140px;
  background: radial-gradient(circle, hsl(38 92% 55%) 0%, transparent 70%);
  animation: blobDriftA 11s ease-in-out infinite alternate;
}

.blob-blue {
  width: 620px; height: 620px;
  bottom: -180px; right: -160px;
  background: radial-gradient(circle, hsl(217 91% 60%) 0%, transparent 70%);
  animation: blobDriftB 14s ease-in-out infinite alternate;
}

.blob-pink {
  width: 380px; height: 380px;
  top: 40%; left: 55%;
  background: radial-gradient(circle, hsl(330 81% 60%) 0%, transparent 70%);
  opacity: 0.18;
  animation: blobDriftC 9s ease-in-out infinite alternate;
}

.login-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 55% at 50% 45%, transparent 0%, hsl(var(--background)) 78%);
}

.login-embers {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

@keyframes blobDriftA {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.12); }
}
@keyframes blobDriftB {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-50px, -60px) scale(1.08); }
}
@keyframes blobDriftC {
  0%   { transform: translate(-30px, 20px) scale(0.9); }
  100% { transform: translate(30px, -20px) scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  .login-blob, .ember { animation: none; }
}

/* ── Payout history ─────────────────────────────────────────────────────── */
.payout-history { display: flex; flex-direction: column; }

.ph-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 2px;
  border-bottom: 1px solid hsl(var(--border));
  transition: background 0.12s;
}
.ph-row:last-child { border-bottom: none; }
.ph-row:hover { background: hsl(var(--accent) / 0.4); border-radius: var(--radius-sm); }

.ph-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
}
.ph-icon-success { background: hsl(var(--success) / 0.14); color: hsl(var(--success)); }
.ph-icon-pending { background: hsl(var(--warning) / 0.14); color: hsl(var(--warning)); }
.ph-icon-failed  { background: hsl(var(--destructive) / 0.14); color: hsl(var(--destructive)); }
.ph-icon-unknown { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }

.ph-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.ph-amount { font-size: 14.5px; font-weight: 700; color: hsl(var(--foreground)); letter-spacing: -0.01em; }
.ph-method { font-size: 11.5px; color: hsl(var(--muted-foreground)); }

.ph-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.ph-date { font-size: 11px; color: hsl(var(--muted-foreground)); white-space: nowrap; }
.ph-status { font-size: 11px; font-weight: 600; text-transform: capitalize; }
.ph-status-success { color: hsl(var(--success)); }
.ph-status-pending { color: hsl(var(--warning)); }
.ph-status-failed  { color: hsl(var(--destructive)); }
.ph-status-unknown { color: hsl(var(--muted-foreground)); }

/* Floating embers — purely autonomous CSS drift, no cursor interaction */
.ember {
  position: absolute;
  bottom: -10px;
  width: var(--size, 4px);
  height: var(--size, 4px);
  border-radius: 50%;
  background: var(--ember-color, hsl(38 92% 65%));
  box-shadow: 0 0 8px 1px var(--ember-color, hsl(38 92% 65%));
  opacity: 0;
  animation: emberFloat var(--dur, 10s) linear infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes emberFloat {
  0%   { transform: translate(0, 0); opacity: 0; }
  8%   { opacity: var(--peak, 0.8); }
  85%  { opacity: var(--peak, 0.8); }
  100% { transform: translate(var(--drift, 20px), -110vh); opacity: 0; }
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  margin: 0 16px;
  padding: 40px 32px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg, 14px);
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.5);
  text-align: center;
}

.login-icon {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 14px;
}

.login-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  color: hsl(var(--foreground));
}

.login-sub {
  font-size: 13px;
  color: hsl(var(--muted-foreground));
  margin: 0 0 28px;
}

.discord-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: #5865F2;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: filter 0.15s, transform 0.1s;
}

.discord-btn:hover { filter: brightness(1.08); }
.discord-btn:active { transform: scale(0.98); }

.login-note {
  margin: 20px 0 0;
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
}
