/* Shared by the Premium panel, authentication, and embedded receipts. */
:root, .dark, .light {
  --background: light-dark(#f3f7fc, #05080f);
  --foreground: light-dark(#102338, #f8fafc);
  --card: light-dark(#ffffff, #0d1522);
  --card-foreground: var(--foreground);
  --popover: var(--card);
  --popover-foreground: var(--foreground);
  --secondary: light-dark(#e6effb, #101b2b);
  --secondary-foreground: var(--foreground);
  --muted: var(--secondary);
  --muted-foreground: light-dark(#4a6078, #94a3b8);
  --accent: light-dark(#deebfb, #122940);
  --accent-foreground: var(--foreground);
  --primary: light-dark(#075ab1, #62b7ff);
  --primary-foreground: #f8fafc;
  --border: light-dark(#cedbea, #1c3450);
  --input: light-dark(#b4c8dd, #2a4564);
  --hairline: var(--border);
  --ring: light-dark(#005fbf, #00b4ff);
  --sidebar: light-dark(#edf3fa, #080e18);
  --sidebar-foreground: var(--foreground);
  --sidebar-primary: light-dark(#0060c4, #0067d4);
  --sidebar-primary-foreground: #fff;
  --sidebar-accent: var(--secondary);
  --sidebar-accent-foreground: var(--foreground);
  --sidebar-border: var(--border);
  --sidebar-ring: var(--ring);
  --ink: var(--sidebar-primary);
  --ink-soft: light-dark(#004792, #0055b3);
  --mint: light-dark(#cae7ff, #003b80);
  --pearl: var(--secondary);
  --destructive: light-dark(#aa2436, #ff8891);
  --chart-1: #007bff;
  --chart-2: #00b4ff;
  --chart-3: #0065c2;
  --chart-4: light-dark(#137342, #62d99a);
  --chart-5: light-dark(#815300, #f2c46a);
  --shadow-soft: 0 3px 16px light-dark(#1023380b, #00000030);
  --shadow-lift: 0 12px 38px light-dark(#10233818, #00000040);
  --nav-bg: var(--sidebar);
  --nav-active: var(--sidebar-primary);
  --nav-text: var(--foreground);
  --nav-heading: var(--primary);
  --nav-hover: var(--secondary);
  --nav-line: var(--border);
}
:root { color-scheme: light dark; }
:root.dark { color-scheme: dark; }
:root.light { color-scheme: light; }

.nexget-logo {
  object-fit: contain;
  object-position: center;
  border-radius: .35rem;
  background: light-dark(#0d1522, transparent);
}
[data-nexget-receipt] .brand img.nexget-receipt-logo {
  width: 176px;
  height: auto;
  max-width: 100%;
  padding: 0;
  background: transparent;
}
.nexget-balance {
  background: radial-gradient(ellipse at 92% 55%, light-dark(#d9ecff, #09284f), var(--card) 68%);
}
.space-art, .dark .space-art {
  filter: grayscale(1) sepia(.75) hue-rotate(160deg) saturate(1.8);
  mix-blend-mode: multiply;
}
@media(prefers-color-scheme: dark) {
  :root:not(.light) .space-art { content: url("/images/nexget-astronaut-dark.png"); mix-blend-mode: screen; filter: none; }
}
:root.dark .space-art { content: url("/images/nexget-astronaut-dark.png"); mix-blend-mode: screen; filter: none; }

.side-nav { --nav-bg: var(--sidebar); --nav-active: var(--sidebar-primary); --nav-text: var(--foreground); --nav-heading: var(--primary); --nav-hover: var(--secondary); --nav-line: var(--border); }
.side-nav .account-card { background: var(--card); }
.side-nav .account-card:hover { border-color: var(--ring); }
.nav-item:focus-visible, .account-card:focus-visible, .tab-item:focus-visible { box-shadow: 0 0 0 2px var(--ring); }
.nav-item svg { color: var(--primary); }
.nav-item-active svg, .tab-item-active svg { color: #fff; }
.nav-item-active, .nav-item-active:hover, .tab-item-active, .tab-item-active:active { background: var(--sidebar-primary); box-shadow: none; }
.topbar { background: var(--sidebar); }
.tabbar { background: var(--sidebar); border-color: var(--border); box-shadow: var(--shadow-soft); }
.tab-item:not(.tab-item-active) { color: var(--muted-foreground); }
.tab-item:not(.tab-item-active):active { background: var(--secondary); }
.nexget-chart-bar { background: linear-gradient(to bottom, #007bff, light-dark(#a8d2ff,#003b80)); }

[data-nexget-receipt] body { background: var(--background); color: var(--foreground); }
[data-nexget-receipt] .sheet, [data-nexget-receipt] article { background: var(--card); color: var(--foreground); border-color: var(--border); }
[data-nexget-receipt] .head, [data-nexget-receipt] .kp-pix-receipt header { background: linear-gradient(135deg,#092345,#003b80); color: #fff; }
[data-nexget-receipt] .section, [data-nexget-receipt] .kp-pix-receipt .footer { border-color: var(--border); }
[data-nexget-receipt] .kp-pix-receipt .card { background: var(--secondary); border-color: var(--border); }
[data-nexget-receipt] .item small, [data-nexget-receipt] .kp-pix-receipt dt, [data-nexget-receipt] .hint, [data-nexget-receipt] .footer { color: var(--muted-foreground); }
[data-nexget-receipt] button { background: var(--card); color: var(--foreground); border-color: var(--input); }
[data-nexget-receipt] .primary, [data-nexget-receipt] .actions #print-receipt { background: var(--ink); color: #fff; }
@media print {
  :root[data-nexget-receipt] { color-scheme: light; }
}

:root, .dark, .light {
  --status-approved: light-dark(#166534, #86e6ae);
  --status-approved-bg: light-dark(#e0f4e7, #103223);
  --status-pending: light-dark(#815300, #f2c46a);
  --status-pending-bg: light-dark(#fff3d6, #362915);
  --status-denied: light-dark(#aa2436, #ff9ba6);
  --status-denied-bg: light-dark(#fce8eb, #431e2a);
}
.nexget-approved { color: var(--status-approved); }
.nexget-status-approved { color: var(--status-approved); background: var(--status-approved-bg); }
.nexget-status-pending { color: var(--status-pending); background: var(--status-pending-bg); }
.nexget-status-denied { color: var(--status-denied); background: var(--status-denied-bg); }
.nexget-status-approved > span, .nexget-status-pending > span, .nexget-status-denied > span { background: currentColor; }
