:root {
  color-scheme: dark;
  --bg: #0d0e1b; /* Mascot Navy Backdrop */
  --surface: rgba(26, 28, 59, 0.55); /* Glassmorphic Navy surface */
  --surface-2: rgba(36, 39, 84, 0.8);
  --surface-3: rgba(54, 58, 122, 0.9);
  --text: #f3f4f6;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  
  --primary-hsl: 235, 100%, 75%; /* Mascot Periwinkle HSL */
  --primary: hsl(var(--primary-hsl));
  --primary-hover: hsl(235, 100%, 68%);
  --primary-glow: hsla(var(--primary-hsl), 0.16);
  
  --accent-hsl: 45, 100%, 55%; /* Mascot Shiny Gold Accent */
  --accent: hsl(var(--accent-hsl));
  --accent-glow: hsla(var(--accent-hsl), 0.15);
  
  --line: rgba(255, 255, 255, 0.05);
  --line-strong: rgba(255, 255, 255, 0.1);
  --green: #10b981;
  --green-strong: #059669;
  --amber: #f59e0b;
  --coral: #f43f5e;
  --cyan: #06b6d4;
  --ink: #020408;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  --shadow-inset: inset 0 1px 1px rgba(255, 255, 255, 0.05);
  --radius: 8px;
  --radius-sm: 8px;
  --font-body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family: var(--font-body);
  letter-spacing: 0;
  background-color: var(--bg);
  position: relative;
}

body::before {
  content: none;
}

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

button {
  border: 0;
  background: transparent;
  outline: none;
}

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

/* Premium Sidebar (Glassmorphism) */
.sidebar {
  position: sticky;
  top: 0;
  max-width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  padding: 32px 24px;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--line);
  z-index: 10;
}

.brand {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 4px 4px 16px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  box-shadow: 0 4px 20px var(--primary-glow);
  font-weight: 900;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-logo {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px var(--primary-glow);
}

.brand strong {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0;
}

.brand span,
.sidebar-status span {
  color: var(--muted);
  font-size: 12px;
}

.brand strong,
.brand span,
.sidebar-status strong,
.sidebar-status span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-list {
  display: grid;
  align-content: start;
  gap: 6px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Nav Buttons with Subtle micro-animations */
.nav-button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 8px 14px;
  color: var(--soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  transition: background-color var(--fast), border-color var(--fast), color var(--fast), transform var(--fast);
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.02);
  transform: translateX(4px);
}

.nav-button.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow: var(--shadow-inset), 0 4px 12px rgba(0, 0, 0, 0.15);
  font-weight: 600;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 11px;
  transition: background-color var(--fast), border-color var(--fast), color var(--fast), box-shadow var(--fast);
}

.nav-button:hover .nav-icon {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
}

.nav-button.active .nav-icon {
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.nav-count {
  min-width: 24px;
  padding: 2px 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 99px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
}

.nav-button.active .nav-count {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.25);
  color: #fff;
}

.sidebar-status {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-inset);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
  position: relative;
}

.status-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: pulse 2s infinite;
}

.status-dot.online {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.status-dot.error {
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.15);
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Main Area Layout */
.main {
  min-width: 0;
  max-width: 100vw;
  padding: 40px clamp(24px, 5vw, 64px) 64px;
}

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

.eyebrow {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

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

h1 {
  font-family: var(--font-display);
  margin-bottom: 0;
  font-size: 42px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0;
  color: #fff;
  background: linear-gradient(135deg, #fff 30%, var(--soft) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-family: var(--font-display);
  margin-bottom: 18px;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0;
}

h3 {
  font-family: var(--font-display);
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0;
}

.top-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.session-chip {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 46px;
  max-width: 240px;
  padding: 6px 12px 6px 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-inset);
}

.session-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--cyan) 100%);
  font-weight: 900;
  font-family: var(--font-display);
}

.session-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.session-copy strong,
.session-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-copy strong {
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.session-copy span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.select-wrap {
  display: grid;
  gap: 6px;
  min-width: 240px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

/* Styled Inputs, Select and Textarea */
select,
input,
textarea {
  width: 100%;
  min-width: 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  outline: none;
  font-size: 14px;
  box-shadow: var(--shadow-inset);
  transition: background-color var(--fast), border-color var(--fast), box-shadow var(--fast);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  padding-right: 40px !important;
}

select,
input {
  height: 46px;
  padding: 0 16px;
}

textarea {
  min-height: 110px;
  resize: vertical;
  padding: 14px 16px;
}

select:focus,
input:focus,
textarea:focus {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--primary);
  box-shadow: var(--shadow-inset), 0 0 0 4px var(--primary-glow);
}

/* Premium Buttons */
.ghost-button,
.primary-button,
.danger-button,
.tiny-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background-color var(--fast), border-color var(--fast), color var(--fast), box-shadow var(--fast), transform var(--fast);
  white-space: nowrap;
  box-shadow: var(--shadow-inset);
  text-decoration: none;
}

.ghost-button:disabled,
.primary-button:disabled,
.danger-button:disabled,
.tiny-button:disabled,
.icon-button:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line-strong);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 18px var(--primary-glow), var(--shadow-inset);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.3), var(--shadow-inset);
  filter: brightness(1.05);
}

.danger-button {
  color: #fff;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.9) 0%, rgba(225, 29, 72, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.2);
}

.danger-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.35);
  filter: brightness(1.05);
}

.tiny-button {
  min-height: 34px;
  padding: 0 14px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
}

.tiny-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.icon-button {
  width: 46px;
  padding: 0;
  color: var(--soft);
  background: transparent;
  border: 1px solid var(--line);
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-1px);
}

/* Beautiful Helper Notifications */
.notice {
  margin-bottom: 28px;
  padding: 16px 20px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: rgba(16, 185, 129, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
  animation: fadeIn 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.notice.error {
  border-color: rgba(244, 63, 94, 0.2);
  border-left-color: var(--coral);
  background: rgba(244, 63, 94, 0.04);
}

.notice[hidden] {
  display: none !important;
}

/* Core Dashboard Grid and Panel Styles */
.view {
  display: grid;
  gap: 24px;
  contain: layout style;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}

.panel {
  min-width: 0;
  max-width: 100%;
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--shadow-inset);
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: 280px;
  transition: border-color var(--fast), box-shadow var(--fast), transform var(--fast);
}

.panel:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow), var(--shadow-inset), 0 0 16px rgba(99, 102, 241, 0.08);
}

.pad,
.panel.pad {
  padding: 28px;
}

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

/* Custom metrics cards */
.metric {
  display: grid;
  gap: 12px;
  min-height: 132px;
  align-content: space-between;
  position: relative;
  overflow: hidden;
}

.metric::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
}

.metric.green::after { background: var(--green); }
.metric.amber::after { background: var(--amber); }
.metric.coral::after { background: var(--coral); }
.metric.cyan::after { background: var(--cyan); }

.metric-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.metric-value {
  font-family: var(--font-display);
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 34px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0;
}

.metric-foot {
  color: var(--muted);
  font-size: 12px;
}

/* Home Welcome Hero Banner */
.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
  gap: 32px;
  align-items: center;
  padding: 36px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(6, 182, 212, 0.03) 100%), var(--surface);
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.hero-panel:hover {
  border-color: rgba(99, 102, 241, 0.25);
}

.hero-copy {
  display: grid;
  align-content: center;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
}

.hero-copy h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: 0;
  color: #fff;
}

.hero-copy p {
  max-width: 60ch;
  min-width: 0;
  color: var(--soft);
  font-size: 14.5px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.preview-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.preview-strip img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform var(--fast), border-color var(--fast);
}

.preview-strip img:hover {
  transform: scale(1.04);
  border-color: rgba(255, 255, 255, 0.15);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.01);
}

.panel-header h2 {
  margin: 0;
}

.panel-header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

/* Beautiful Interactive Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  background: rgba(0, 0, 0, 0.15);
}

td {
  color: var(--soft);
  font-size: 14px;
}

tbody tr {
  transition: background var(--fast);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.015);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: var(--primary);
  background: rgba(99, 102, 241, 0.06);
  padding: 3px 7px;
  border-radius: 4px;
  border: 1px solid rgba(99, 102, 241, 0.12);
}

.positive { color: var(--accent); font-weight: 600; }
.negative { color: var(--coral); font-weight: 600; }
.muted { color: var(--muted); }

/* Leaderboard custom gold/silver/bronze badges */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.rank-badge.gold {
  background: linear-gradient(135deg, #fcd34d 0%, #d97706 100%);
  color: #1e1b4b;
  font-weight: 900;
}
.rank-badge.silver {
  background: linear-gradient(135deg, #f3f4f6 0%, #9ca3af 100%);
  color: #111827;
  font-weight: 900;
}
.rank-badge.bronze {
  background: linear-gradient(135deg, #fdba74 0%, #c2410c 100%);
  color: #fff;
}
.rank-badge.other {
  background: rgba(255, 255, 255, 0.05);
  color: var(--soft);
  border-color: var(--line);
}

/* Aesthetic Tags / Chips */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  max-width: 100%;
  padding: 3px 12px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.chip.green {
  color: var(--accent);
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.12);
}

.chip.amber {
  color: var(--amber);
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.12);
}

.chip.coral {
  color: var(--coral);
  background: rgba(244, 63, 94, 0.06);
  border-color: rgba(244, 63, 94, 0.12);
}

/* Organized Category Form Grid Layout */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid.single {
  grid-template-columns: 1fr;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field label,
.toggle label {
  color: var(--soft);
  font-size: 13px;
  font-weight: 600;
}

.field-help {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 4px;
}

.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* Beautiful Custom Slide Switches */
.switch {
  position: relative;
  width: 48px;
  height: 26px;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
  z-index: 2;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  transition: background-color var(--fast), border-color var(--fast);
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--muted);
  transition: background-color var(--fast), transform var(--fast);
}

.switch input:checked + span {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
}

.switch input:checked + span::after {
  transform: translateX(22px);
  background: var(--primary);
}

.stack {
  display: grid;
  gap: 18px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.section-list {
  display: grid;
  gap: 14px;
}

/* Form Section list elements */
.row-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: background var(--fast), border-color var(--fast);
}

.row-item:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.1);
}

.row-item strong,
.row-item span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.row-item strong {
  color: #fff;
  font-size: 14.5px;
}

.row-item span {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
  margin-top: 3px;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* Custom premium accordion container */
.details-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.01);
  overflow: hidden;
  transition: border-color var(--fast), background var(--fast);
}

.details-row:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
}

.details-row summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  padding: 18px 24px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 15px;
}

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

.details-row summary::after {
  content: "";
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  transition: transform var(--fast);
  margin-left: 8px;
}

.details-row[open] summary::after {
  transform: rotate(180deg);
}

.details-row summary strong {
  color: #fff;
}

.details-row summary > span > span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 400;
}

.details-row[open] summary {
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}

.details-body {
  padding: 24px;
  background: rgba(0, 0, 0, 0.1);
}

/* Beautiful Interactive Custom Range Sliders */
input[type="range"] {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  border: none;
  outline: none;
  cursor: pointer;
  appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px var(--primary-glow);
  transition: transform var(--fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

/* Beautiful Interactive Chart Visualization */
.chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(36px, 1fr));
  align-items: end;
  gap: 14px;
  min-height: 200px;
  padding: 24px 12px 4px;
}

.bar {
  display: grid;
  align-items: end;
  gap: 8px;
  min-width: 0;
  height: 100%;
  cursor: pointer;
}

.bar-fill {
  min-height: 8px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #34d399 0%, var(--green) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: filter var(--fast), transform var(--fast);
}

.bar-fill.negative {
  background: linear-gradient(180deg, #f87171 0%, var(--coral) 100%);
}

.bar:hover .bar-fill {
  transform: scaleY(1.03);
  filter: brightness(1.1);
}

.bar-label {
  min-height: 34px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

/* Clean Responsive Grid for Command Toggles */
.command-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.command-tile {
  display: grid;
  gap: 12px;
  min-height: 142px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.015);
  box-shadow: var(--shadow-inset);
  transition: border-color var(--fast), background var(--fast), transform var(--fast);
}

.command-tile:hover {
  border-color: rgba(99, 102, 241, 0.25);
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-2px);
}

.command-tile header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.command-tile header strong {
  font-family: var(--font-display);
  color: #fff;
  font-size: 16.5px;
  letter-spacing: 0;
}

.command-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

/* Category Filter pill tabs */
.pill-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.pill-tab {
  min-height: 38px;
  padding: 0 18px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-inset);
  transition: background-color var(--fast), border-color var(--fast), color var(--fast), box-shadow var(--fast), transform var(--fast);
}

.pill-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.pill-tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px var(--primary-glow), var(--shadow-inset);
}

.progress {
  height: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 99px;
  margin-top: 10px;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: inherit;
  transition: width 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 170px;
  padding: 32px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.005);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.empty-state strong {
  color: #fff;
  font-size: 15px;
}

.loading {
  display: grid;
  place-items: center;
  min-height: 380px;
  color: var(--soft);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
}

/* General Fade-In Keyframe Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* High-Performance Responsive Adaptations */
@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  /* The sidebar transforms into a floating glass topbar on mobile */
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: rgba(11, 15, 25, 0.9);
    border-right: none;
    border-bottom: 1px solid var(--line);
    gap: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  }

  .brand {
    padding: 0;
    border-bottom: none;
    grid-template-columns: auto;
    gap: 0;
  }
  
  .brand div {
    display: none !important;
  }

  .sidebar-status {
    display: none !important;
  }

  /* Premium Swipable scrolltrack for tabs on Mobile */
  .nav-list {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding: 4px 2px;
    margin: 0;
    width: 100%;
    max-width: 100%;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .nav-list::-webkit-scrollbar {
    display: none;
  }

  .nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    min-height: 40px;
    flex: 0 0 auto;
    white-space: nowrap;
    gap: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line);
    border-radius: 99px;
  }
  
  .nav-button:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.05);
  }

  .nav-button.active {
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
  }
  
  .nav-button.active .nav-icon {
    background: #fff;
    color: var(--bg);
    box-shadow: none;
    border-color: #fff;
  }

  .hero-panel {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .span-3,
  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8 {
    grid-column: span 6;
  }
}

@media (max-width: 768px) {
  .main {
    padding: 24px 20px 48px;
  }

  .topbar {
    display: grid;
    align-items: stretch;
    gap: 16px;
  }

  h1 {
    font-size: 32px;
  }

  .metric-value {
    font-size: 30px;
  }

  .hero-copy h2 {
    font-size: 26px;
  }

  .top-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .select-wrap {
    width: 100%;
    min-width: 0;
  }

  .session-chip {
    width: 100%;
    max-width: none;
  }

  .ghost-button {
    width: 100%;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .span-3,
  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8,
  .span-12 {
    grid-column: span 1;
  }

  .form-grid,
  .form-grid.three,
  .split {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .preview-strip {
    grid-template-columns: 1fr;
  }

  .nav-list {
    max-width: 100%;
  }

  .panel {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  }

  th,
  td {
    padding: 14px 18px;
  }

  .row-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

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

@media (hover: none) {
  .nav-button:hover,
  .ghost-button:hover,
  .primary-button:hover,
  .danger-button:hover,
  .tiny-button:hover,
  .icon-button:hover,
  .preview-strip img:hover,
  .bar:hover .bar-fill,
  input[type="range"]::-webkit-slider-thumb:hover {
    transform: none;
  }

  .panel:hover,
  .row-item:hover,
  .details-row:hover,
  .command-tile:hover {
    border-color: var(--line);
    box-shadow: var(--shadow);
  }

  tbody tr:hover {
    background: transparent;
  }
}

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

/* Security Lock Screen styling */
.lock-screen {
  max-width: 480px;
  margin: 60px auto;
  padding: 44px;
  background: var(--surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--shadow-inset);
  text-align: center;
  animation: lockFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes lockFadeIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lock-header {
  margin-bottom: 32px;
}

.lock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  font-size: 30px;
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary);
  border-radius: 50%;
  margin-bottom: 24px;
  border: 1.5px solid rgba(99, 102, 241, 0.2);
}

.lock-logo {
  display: inline-block;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 24px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 24px var(--primary-glow);
}

.lock-header h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 10px;
  color: #fff;
  letter-spacing: 0;
}

.lock-header p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  line-height: 1.6;
}

.lock-form {
  display: grid;
  gap: 24px;
  text-align: left;
}

.lock-actions {
  display: grid;
  gap: 20px;
}

.lock-action {
  width: 100%;
  min-height: 50px;
}

.lock-muted {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.lock-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--soft);
  margin-bottom: 8px;
}

.lock-form input {
  width: 100%;
  padding: 13px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: #fff;
  font-size: 15px;
  transition: background-color var(--fast), border-color var(--fast), box-shadow var(--fast);
}

.lock-form input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.03);
  box-shadow: var(--shadow-inset), 0 0 0 4px var(--primary-glow);
}

.lock-form .help-text {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.lock-form .help-text code {
  font-family: monospace;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--soft);
}

.lock-form button {
  width: 100%;
  padding: 14px;
  font-weight: 700;
  font-size: 15px;
}

/* ==========================================
   Discord Member Profile & Identicon Styling
   ========================================== */
.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  min-width: 0;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  display: inline-block;
  vertical-align: middle;
}

.user-profile-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-pseudonym {
  font-weight: 700;
  color: #fff;
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-admin-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.1;
  margin-top: 1px;
}

/* ==========================================
   3D Leaderboard Podium Layout
   ========================================== */
.podium-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: end;
  max-width: 680px;
  margin: 0 auto 36px;
  padding: 24px 20px 8px;
  min-height: 280px;
  text-align: center;
}

.podium-pedestal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  transition: transform var(--fast);
}

.podium-pedestal:hover {
  transform: translateY(-4px);
}

.podium-block {
  width: 100%;
  border-radius: var(--radius) var(--radius) 6px 6px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 10px;
  position: relative;
}

.podium-gold .podium-block {
  height: 130px;
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.2) 0%, rgba(217, 119, 6, 0.05) 100%);
  border-color: rgba(252, 211, 77, 0.25);
  box-shadow: var(--shadow), 0 0 20px rgba(252, 211, 77, 0.08);
}

.podium-silver .podium-block {
  height: 95px;
  background: linear-gradient(180deg, rgba(156, 163, 175, 0.15) 0%, rgba(156, 163, 175, 0.03) 100%);
  border-color: rgba(229, 231, 235, 0.2);
}

.podium-bronze .podium-block {
  height: 75px;
  background: linear-gradient(180deg, rgba(194, 65, 12, 0.15) 0%, rgba(194, 65, 12, 0.03) 100%);
  border-color: rgba(253, 186, 116, 0.2);
}

.podium-avatar-wrap {
  position: absolute;
  top: -46px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.podium-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.podium-gold .podium-avatar {
  width: 68px;
  height: 68px;
  border-color: #fcd34d;
  box-shadow: 0 4px 20px rgba(252, 211, 77, 0.25);
}

.podium-silver .podium-avatar {
  border-color: #e5e7eb;
}

.podium-bronze .podium-avatar {
  border-color: #fdba74;
}

.podium-rank-medal {
  position: absolute;
  bottom: -10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 900;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.podium-gold .podium-rank-medal {
  background: linear-gradient(135deg, #fcd34d 0%, #d97706 100%);
  color: #1e1b4b;
}

.podium-silver .podium-rank-medal {
  background: linear-gradient(135deg, #f3f4f6 0%, #9ca3af 100%);
  color: #111827;
}

.podium-bronze .podium-rank-medal {
  background: linear-gradient(135deg, #fdba74 0%, #c2410c 100%);
  color: #fff;
}

.podium-name {
  font-weight: 800;
  color: #fff;
  font-size: 14px;
  margin-top: 14px;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-gold .podium-name {
  font-size: 15.5px;
}

.podium-val {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--soft);
  margin-top: 2px;
}

.podium-gold .podium-val {
  color: #fcd34d;
}

.podium-pct {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0;
}

/* ==========================================
   AAA Premium Store Grid & Visual Cards
   ========================================== */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
  margin-top: 8px;
}

.store-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--shadow-inset);
  overflow: hidden;
  transition: border-color var(--fast), box-shadow var(--fast), transform var(--fast);
}

.store-card:hover {
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: var(--shadow), var(--shadow-inset), 0 0 20px rgba(99, 102, 241, 0.1);
  transform: translateY(-4px);
}

.card-image-header {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.4) 0%, rgba(17, 24, 39, 0.8) 100%);
  border-bottom: 1px solid var(--line);
}

.card-image-bg {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  filter: blur(8px);
  background-size: cover;
  background-position: center;
  transition: opacity var(--fast);
}

.store-card:hover .card-image-bg {
  opacity: 0.08;
}

.card-image-icon {
  font-size: 52px;
  z-index: 2;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  transition: transform var(--fast);
}

.store-card:hover .card-image-icon {
  transform: scale(1.15) rotate(4deg);
}

.card-payout-tier {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0;
  margin: 0;
}

.card-price {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.card-desc {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 38px;
}

.card-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.card-stock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.card-stock-label {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stock-progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 20px;
}

.stock-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  transition: width var(--fast);
}

.stock-progress-fill.warning {
  background: linear-gradient(90deg, var(--amber) 0%, var(--coral) 100%);
}

.stock-progress-fill.infinite {
  background: linear-gradient(90deg, var(--primary) 0%, var(--cyan) 100%);
  width: 100% !important;
  animation: shine 4s infinite linear;
}

@keyframes shine {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: auto;
}

/* Professional custom builder workspace */
.custom-studio .panel {
  content-visibility: visible;
  contain-intrinsic-size: auto;
}

.builder-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.85fr);
  gap: 28px;
  align-items: center;
  padding: 32px;
  background:
    linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(16, 185, 129, 0.05)),
    var(--surface);
}

.builder-hero h2 {
  margin-bottom: 10px;
  font-size: 30px;
  line-height: 1.15;
}

.builder-hero p,
.builder-section-title p,
.guide-banner p {
  margin: 0;
  color: var(--soft);
  line-height: 1.6;
}

.builder-hero-steps,
.guide-list {
  display: grid;
  gap: 12px;
}

.guide-step,
.guide-pill {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
}

.guide-step {
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
}

.guide-step span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  color: #061019;
  background: var(--accent);
  font-weight: 900;
}

.guide-step strong,
.guide-step small {
  grid-column: 2;
}

.guide-step small,
.guide-pill span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.guide-pill code,
.template-preview code {
  overflow-wrap: anywhere;
  color: var(--accent);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: 6px;
  padding: 4px 7px;
}

.guide-banner {
  border-color: rgba(16, 185, 129, 0.18);
}

.builder-section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.builder-section-title h2 {
  margin-bottom: 6px;
}

.builder-form {
  display: grid;
  gap: 18px;
}

.builder-cluster {
  display: grid;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.builder-cluster:first-child {
  padding-top: 0;
  border-top: 0;
}

.builder-cluster-title {
  display: grid;
  gap: 4px;
}

.builder-cluster-title strong,
.template-meta strong {
  color: var(--text);
}

.builder-cluster-title span,
.template-meta span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.builder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.builder-grid.small {
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
}

.builder-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 22px;
  align-items: start;
}

.template-preview {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.18);
}

.template-preview span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.preview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-chips b {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.03);
  font-size: 11px;
}

.template-meta {
  display: grid;
  min-height: 74px;
  align-content: center;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
}

.discord-preview {
  display: grid;
  gap: 14px;
  min-height: 220px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(2, 6, 23, 0.55);
}

.discord-embed {
  position: relative;
  display: grid;
  gap: 9px;
  padding: 16px 18px;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  background: rgba(17, 24, 39, 0.95);
  box-shadow: var(--shadow-inset);
}

.discord-embed strong {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #fff;
  overflow-wrap: anywhere;
}

.discord-embed p {
  margin: 0;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.discord-author,
.discord-embed footer {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}

.discord-link {
  padding: 2px 6px;
  border: 1px solid rgba(88, 101, 242, 0.32);
  border-radius: 999px;
  color: #a5b4fc;
  font-size: 10px;
  text-transform: uppercase;
}

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

.discord-field {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
}

.discord-field:not(.inline) {
  grid-column: 1 / -1;
}

.discord-field strong {
  display: block;
  color: #f8fafc;
  font-size: 12px;
}

.discord-field span {
  color: var(--soft);
  font-size: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.discord-media,
.discord-thumb {
  display: grid;
  place-items: center;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(245, 158, 11, 0.06));
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.discord-thumb {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 84px;
  min-height: 56px;
}

.advanced-json {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.01);
}

.advanced-json summary {
  padding: 12px 14px;
  color: var(--soft);
  cursor: pointer;
  font-weight: 700;
}

.advanced-json .field {
  padding: 0 14px 14px;
}

.advanced-json .toggle {
  margin: 0 14px 14px;
}

.builder-card .details-body {
  padding: 22px;
}

.embed-fields-grid {
  display: grid;
  gap: 14px;
}

.embed-field-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.75fr) minmax(0, 1fr) 86px;
  gap: 12px;
  align-items: end;
}

.embed-field-row textarea {
  min-height: 72px;
}

.mini-check {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--soft);
  background: rgba(255, 255, 255, 0.02);
  font-size: 12px;
  font-weight: 700;
}

.mini-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.compact-list {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Premium Mascot-Themed Glassmorphic Card Rarity Glows */
.store-card {
  position: relative;
  transition: transform var(--fast), box-shadow var(--fast), border-color var(--fast);
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}
.store-card:hover {
  transform: translateY(-5px) scale(1.01) !important;
}

.tier-legendary {
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.08) 0%, rgba(255, 184, 0, 0.02) 100%) !important;
  border-color: rgba(255, 184, 0, 0.35) !important;
}
.store-card.tier-legendary:hover {
  box-shadow: 0 12px 30px rgba(255, 184, 0, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 184, 0, 0.6) !important;
}

.tier-epic {
  background: linear-gradient(135deg, rgba(163, 53, 238, 0.08) 0%, rgba(163, 53, 238, 0.02) 100%) !important;
  border-color: rgba(163, 53, 238, 0.35) !important;
}
.store-card.tier-epic:hover {
  box-shadow: 0 12px 30px rgba(163, 53, 238, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(163, 53, 238, 0.6) !important;
}

.tier-rare {
  background: linear-gradient(135deg, rgba(0, 192, 255, 0.08) 0%, rgba(0, 192, 255, 0.02) 100%) !important;
  border-color: rgba(0, 192, 255, 0.35) !important;
}
.store-card.tier-rare:hover {
  box-shadow: 0 12px 30px rgba(0, 192, 255, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(0, 192, 255, 0.6) !important;
}

.tier-uncommon {
  background: linear-gradient(135deg, rgba(30, 255, 0, 0.06) 0%, rgba(30, 255, 0, 0.01) 100%) !important;
  border-color: rgba(30, 255, 0, 0.3) !important;
}
.store-card.tier-uncommon:hover {
  box-shadow: 0 12px 30px rgba(30, 255, 0, 0.1), inset 0 1px 1px rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(30, 255, 0, 0.5) !important;
}

.tier-common {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%) !important;
  border-color: var(--line) !important;
}
.store-card.tier-common:hover {
  box-shadow: 0 12px 30px rgba(255, 255, 255, 0.05), inset 0 1px 1px rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}

/* Responsive adjustments for 3D Podium */
@media (max-width: 600px) {
  .builder-hero,
  .builder-grid,
  .builder-grid.small,
  .builder-two-column,
  .embed-field-row,
  .discord-fields {
    grid-template-columns: 1fr;
  }

  .builder-section-title {
    display: grid;
  }

  .podium-container {
    gap: 12px;
    padding: 16px 8px 4px;
    min-height: 240px;
    margin-bottom: 24px;
  }
  
  .podium-gold .podium-avatar {
    width: 58px;
    height: 58px;
  }
  
  .podium-avatar {
    width: 48px;
    height: 48px;
  }
  
  .podium-avatar-wrap {
    top: -36px;
  }
  
  .podium-gold .podium-block {
    height: 110px;
  }
  
  .podium-silver .podium-block {
    height: 80px;
  }
  
  .podium-bronze .podium-block {
    height: 65px;
  }
  
  .podium-name {
    font-size: 12px;
    max-width: 100px;
  }
  
  .podium-gold .podium-name {
    font-size: 13px;
  }
}
