/* ==========================================================================
   CID Portal Design System & Stylesheet
   Modern, Ultra-Premium Glassmorphism Aesthetics
   ========================================================================== */

/* Design Tokens & CSS Variables */

/* ==========================================================================
   Core SPA View Layout
   ========================================================================== */
.page-view {
  display: none !important;
  width: 100%;
}
.page-view.active {
  display: block !important;
}
#pageActivation {
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}
:root {
  /* Dark Theme (DKEY Restrained Dark Navy) */
  --bg-primary: #0d1527;
  --bg-secondary: #0a0f1d;
  --bg-card: #152238;
  --bg-card-hover: #192842;
  --border-color: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(59, 130, 246, 0.18);
  
  --text-main: #f8fafc;
  --text-muted: #8a99ad;
  --text-subtle: #64748b;
  
  --accent-primary: #2563eb;
  --accent-primary-hover: #1d4ed8;
  --accent-secondary: #3b82f6;
  --accent-cyan: #60a5fa;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --input-bg: #101a2c;
  --input-border: #1c2b45;
  --input-focus-border: #3b82f6;
  --input-focus-glow: rgba(59, 130, 246, 0.2);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.38);
  --glow-btn: 0 2px 10px rgba(37, 99, 235, 0.35);

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables (Calm, Premium & Balanced) */
html.light {
  --bg-primary: #f3f6fb;
  --bg-secondary: #e9eff8;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --border-color: #e5edf7;
  --border-glow: rgba(37, 99, 235, 0.08);

  --text-main: #0f172a;
  --text-muted: #5b6b82;
  --text-subtle: #8a99ad;

  --accent-primary: #2563eb;
  --accent-primary-hover: #1d4ed8;
  --accent-secondary: #3b82f6;
  --accent-cyan: #0284c7;
  --accent-emerald: #16a34a;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;

  --input-bg: #ffffff;
  --input-border: #dbe4f0;
  --input-focus-border: #2563eb;
  --input-focus-glow: rgba(37, 99, 235, 0.12);

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.06);
  --glow-btn: 0 2px 8px rgba(37, 99, 235, 0.2);
}

/* Base Resets */
html {
  scroll-behavior: smooth;
}

#activationSection,
.hero-section,
.hero-heading {
  scroll-margin-top: 98px;
}

#storeSection,
.store-section,
.store-heading {
  scroll-margin-top: 98px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

.code-font {
  font-family: var(--font-mono) !important;
}

/* Ambient Background Glows */
.ambient-glow {
  display: none !important;
}

.ambient-glow-1 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
  top: -150px;
  left: 15%;
}

.ambient-glow-2 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
  bottom: 10%;
  right: 10%;
}

.ambient-glow-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
  top: 40%;
  left: -100px;
}

html.light .ambient-glow {
  display: none !important;
}

/* Layout Container */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Site Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(13, 21, 39, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 10px 0;
  transition: all var(--transition-fast);
}

html.light .site-header {
  background: rgba(255, 255, 255, 0.92) !important;
  border-bottom: 1px solid #e5edf7 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.02) !important;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 34px;
  height: 34px;
  background: #1d2d4c;
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
  font-size: 1.05rem;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.brand-logo i {
  color: #60a5fa !important;
}

html.light .brand-logo {
  background: #e3ebfd !important;
  border: 1px solid rgba(37, 99, 235, 0.18) !important;
  box-shadow: none !important;
}

html.light .brand-logo i {
  color: #2563eb !important;
}

.brand-title {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
  color: #f8fafc;
}

html.light .brand-title {
  color: #0f172a !important;
}

.gradient-text {
  color: #60a5fa !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: initial !important;
}

html.light .gradient-text {
  color: #2563eb !important;
}

/* Header Navigation Links */
.header-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  background: #111a2d;
  padding: 3px 4px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

html.light .header-nav {
  background: #e9eff8 !important;
  border: 1px solid #dce5f2 !important;
}

.header-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: #8a99ad;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.header-nav-link:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
}

.header-nav-link.active {
  color: #93c5fd !important;
  background: #1d2d4c !important;
  border: 1px solid rgba(96, 165, 250, 0.25) !important;
  box-shadow: none !important;
}

html.light .header-nav-link {
  color: #5b6b82 !important;
}

html.light .header-nav-link:hover {
  background: rgba(255, 255, 255, 0.6) !important;
  color: #0f172a !important;
}

html.light .header-nav-link.active {
  background: #ffffff !important;
  color: #2563eb !important;
  border: 1px solid #dce5f2 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
}

.user-pill-topline {
  display: flex;
  align-items: center;
  gap: 5px;
}

.badge-role-admin {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(0, 120, 212, 0.2);
  color: var(--accent-primary);
  border: 1px solid rgba(0, 120, 212, 0.4);
  padding: 1px 5px;
  border-radius: var(--radius-full);
}

.header-badges {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-emerald);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulseAnimation 2s infinite;
}

@keyframes pulseAnimation {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.stat-pill strong {
  color: var(--accent-cyan);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
  padding: 6px 0 0;
  max-width: 820px;
  margin: 0 auto 24px;
}

.text-center {
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 12px;
}

.hero-heading {
  font-size: 2.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 10px;
  white-space: nowrap;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Glass Card Component */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  pointer-events: none;
}

.card {
  margin-bottom: 20px;
}

.card-header {
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  gap: 16px;
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(0, 120, 212, 0.12);
  border: 1px solid rgba(0, 120, 212, 0.2);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.card-icon.success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.25);
  color: var(--accent-emerald);
}

.card-icon.code {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.25);
  color: var(--accent-cyan);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card-body {
  padding: 28px;
}

/* IID Counter Badge */
.iid-counter-badge {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.iid-counter-badge.valid {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: var(--accent-emerald);
}

/* Input Form Controls */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--text-subtle);
  font-size: 1.05rem;
  pointer-events: none;
  z-index: 2;
  transition: color var(--transition-fast);
}

.input-wrapper:focus-within .input-icon {
  color: var(--accent-primary);
}

.main-input {
  width: 100%;
  padding: 16px 140px 16px 52px;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 1.05rem;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.04em;
  outline: none;
  transition: all var(--transition-fast);
}

#iidInput,
#productKeyInput {
  padding-left: 18px;
}

/* Auth & Search Inputs with Left Icon */
.input-wrapper .input-icon ~ .main-input,
#loginEmailInput,
#loginPasswordInput,
#regEmailInput,
#regPasswordInput,
#regPasswordRepeatInput,
#checkoutBuyerEmail,
#historySearch {
  padding-left: 48px !important;
  padding-right: 16px !important;
  font-family: var(--font-sans) !important;
  letter-spacing: normal !important;
}

.input-wrapper .input-icon ~ .main-input::placeholder,
#loginEmailInput::placeholder,
#loginPasswordInput::placeholder,
#regEmailInput::placeholder,
#regPasswordInput::placeholder,
#regPasswordRepeatInput::placeholder,
#checkoutBuyerEmail::placeholder,
#historySearch::placeholder {
  font-family: var(--font-sans) !important;
  letter-spacing: normal !important;
}

select.main-input {
  padding: 12px 16px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
}

select.main-input option {
  background-color: #0f172a;
  color: #f8fafc;
  padding: 8px;
}

.main-input:focus {
  border-color: var(--input-focus-border);
  box-shadow: 0 0 0 4px var(--input-focus-glow);
}

.input-tools {
  position: absolute;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tool-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tool-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

/* Format Feedback */
.format-feedback {
  margin-top: 10px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-subtle);
  transition: color var(--transition-fast);
}

.format-feedback.valid {
  color: var(--text-subtle);
}

.format-feedback.error {
  color: var(--accent-rose);
}

/* Dynamic Format Numbers 54 / 63 */
.format-num {
  display: inline-block;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  padding: 0 2px;
  margin: 0 1px;
  border-radius: 0;
  background: transparent !important;
  color: var(--text-subtle, #94a3b8);
  border: none !important;
  box-shadow: none !important;
  transition: color 0.2s ease, text-shadow 0.2s ease;
  letter-spacing: 0.02em;
}

.format-num.active-format {
  color: #10b981 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.7);
  font-weight: 800;
  transform: none;
}

/* Dropzone Area */
.dropzone-area {
  margin-top: 20px;
  border: 2px dashed rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  transition: all var(--transition-normal);
  position: relative;
}

.dropzone-area:hover, .dropzone-area.dragover {
  border-color: var(--accent-primary);
  background: rgba(0, 120, 212, 0.06);
}

.file-input-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
}

.dropzone-icon {
  font-size: 1.8rem;
  color: var(--accent-primary);
  margin-bottom: 8px;
}

.dropzone-main {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.dropzone-main strong {
  color: var(--accent-primary);
}

.dropzone-sub {
  font-size: 0.82rem;
  color: var(--text-subtle);
}

.dropzone-progress {
  position: relative;
  background: rgba(0, 0, 0, 0.2);
  height: 28px;
  border-radius: var(--radius-full);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-primary));
  transition: width 0.3s ease;
}

.progress-label {
  position: relative;
  z-index: 2;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Action Row */
.action-row {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.controls-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.controls-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Toggle Switches */
.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.toggle-switch input {
  display: none;
}

.toggle-slider {
  width: 38px;
  height: 22px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  position: relative;
  transition: background-color var(--transition-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--accent-primary);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(16px);
}

.toggle-text i {
  color: var(--accent-primary);
  margin-right: 2px;
}

/* Timer Pill */
.timer-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.timer-pill strong {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--accent-cyan);
}

.timer-pill.running {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  text-decoration: none;
  outline: none;
}

.btn-primary {
  background: #2563eb !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25) !important;
  transition: all var(--transition-fast) !important;
}

.btn-primary:hover {
  background: #1d4ed8 !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35) !important;
  transform: translateY(-1px) !important;
}

html.light .btn-primary {
  background: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2) !important;
}

html.light .btn-primary:hover {
  background: #1d4ed8 !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-danger-soft {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: var(--accent-rose);
}

.btn-danger-soft:hover {
  background: rgba(244, 63, 94, 0.2);
}

/* Progress Status Card */
.progress-card {
  animation: fadeIn 0.3s ease;
}

.steps-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 600px;
  margin: 0 auto 18px;
  position: relative;
}

.step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
}

.step-bubble {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-subtle);
  transition: all var(--transition-normal);
}

.step-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.step-node.active .step-bubble {
  border-color: var(--accent-primary);
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 0 20px rgba(0, 120, 212, 0.6);
  animation: stepPulse 1.5s infinite;
}

.step-node.completed .step-bubble {
  border-color: var(--accent-emerald);
  background: var(--accent-emerald);
  color: #fff;
}

.step-line {
  flex: 1;
  height: 3px;
  background: var(--border-color);
  margin: 0 10px -20px;
  position: relative;
  z-index: 1;
  transition: background var(--transition-normal);
}

.step-line.completed {
  background: var(--accent-emerald);
}

@keyframes stepPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.progress-status-msg {
  text-align: center;
  font-size: 0.95rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Results Section */
.results-section {
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cid-display-group {
  margin-bottom: 22px;
}

.field-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.copy-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.copy-input-box input {
  width: 100%;
  padding: 14px 50px 14px 18px;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 1rem;
  letter-spacing: 0.05em;
  outline: none;
}

.btn-copy-inline {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.btn-copy-inline:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-cyan);
}

/* Interactive 8 Blocks (A - H) */
.blocks-container {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.blocks-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.block-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 6px;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: all var(--transition-fast);
  overflow: hidden;
}

.block-card:hover {
  border-color: var(--accent-primary);
  background: rgba(0, 120, 212, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 120, 212, 0.2);
}

.block-card.copied {
  border-color: var(--accent-emerald) !important;
  background: rgba(16, 185, 129, 0.15) !important;
}

.block-letter {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-primary);
  margin-bottom: 4px;
}

.block-value {
  width: 100%;
  background: transparent;
  border: none;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
}

.block-hover-action {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 0.75rem;
  color: var(--accent-primary);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.block-card:hover .block-hover-action {
  opacity: 1;
}

/* Result Actions Bar */
.result-actions-bar {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

/* Script Tabs & Code Editor Box */
.script-card {
  margin-top: 24px;
}

.script-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.script-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.tab-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 120, 212, 0.3);
}

.code-editor-box {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #060911;
}

.code-editor-header {
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.editor-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.editor-filename {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-subtle);
}

#scriptTextarea {
  width: 100%;
  padding: 16px;
  background: transparent;
  border: none;
  color: #38bdf8;
  font-size: 0.88rem;
  line-height: 1.6;
  outline: none;
  resize: vertical;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
  margin-bottom: 20px;
}

.feature-card {
  padding: 20px;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(37, 99, 235, 0.12);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 16px;
}

.feature-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Modal Overlay & Windows */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.open,
.modal-overlay.active {
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
}

.modal-window {
  width: 100%;
  max-width: 580px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform var(--transition-normal);
}

.modal-overlay.open .modal-window,
.modal-overlay.active .modal-window {
  transform: scale(1) !important;
}

.modal-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent-primary);
  font-size: 1.1rem;
}

.modal-title-group h3 {
  color: var(--text-main);
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border-color);
  gap: 12px;
}

/* History List Component */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-subtle);
}

.empty-state i {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

#historyModal .modal-window {
  max-width: 920px;
  width: 95vw;
}

/* Cabinet History Link Banner */
.cabinet-history-link-box {
  background: linear-gradient(135deg, rgba(0, 120, 212, 0.08) 0%, rgba(0, 164, 239, 0.04) 100%);
  border: 1px solid rgba(0, 120, 212, 0.25);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  transition: all var(--transition-fast);
}

.cabinet-history-link-box:hover {
  border-color: rgba(0, 120, 212, 0.45);
  background: linear-gradient(135deg, rgba(0, 120, 212, 0.12) 0%, rgba(0, 164, 239, 0.08) 100%);
  box-shadow: 0 4px 16px rgba(0, 120, 212, 0.15);
}

.cabinet-history-link-content {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 300px;
}

.cabinet-history-link-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(0, 120, 212, 0.2);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.cabinet-history-link-text h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 3px;
}

.cabinet-history-link-text p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

/* History 3 Graph Analytics Grid */
.history-analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

@media (max-width: 768px) {
  .history-analytics-grid {
    grid-template-columns: 1fr;
  }
}

.history-graph-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.history-graph-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 120, 212, 0.4);
  transform: translateY(-2px);
}

.history-graph-card.active {
  background: rgba(0, 120, 212, 0.09);
  border-color: var(--accent-primary);
  box-shadow: 0 0 16px rgba(0, 120, 212, 0.25);
}

.history-graph-card.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-emerald));
}

.hgc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.hgc-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.hgc-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-subtle);
}

.hgc-stats {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 10px;
}

.hgc-stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.77rem;
}

.hgc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
  flex-shrink: 0;
}

.hgc-dot.dot-activations {
  background: var(--accent-primary);
  box-shadow: 0 0 6px rgba(0, 120, 212, 0.7);
}

.hgc-dot.dot-purchases {
  background: var(--accent-emerald);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
}

.hgc-label {
  color: var(--text-muted);
  flex: 1;
}

.hgc-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-main);
}

/* Mini Visual Bars inside Graph Card */
.hgc-chart {
  margin-top: auto;
}

.hgc-bars-container {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 44px;
  padding: 4px 10px 2px;
  background: rgba(0, 0, 0, 0.28);
  border-radius: var(--radius-sm);
}

.hgc-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  position: relative;
}

.hgc-bar-fill {
  width: 100%;
  min-height: 4px;
  border-radius: 3px 3px 0 0;
  transition: height 0.4s ease;
}

.hgc-bar-fill.bar-act {
  background: linear-gradient(180deg, #38bdf8 0%, #0078d4 100%);
}

.hgc-bar-fill.bar-pur {
  background: linear-gradient(180deg, #6ee7b7 0%, #10b981 100%);
}

.hgc-bar-lbl {
  font-size: 0.66rem;
  font-weight: 700;
  font-family: var(--font-mono);
  margin-top: 2px;
  color: var(--text-subtle);
}

.modal-month-picker {
  max-width: 330px !important;
  width: 90vw !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
}

html.light .modal-month-picker {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15) !important;
}

html.light .modal-month-picker .modal-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.hist-year-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 12px;
}

html.light .hist-year-selector {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.1);
}

.hist-year-selector strong {
  font-size: 1.05rem;
  color: var(--text-main);
  font-weight: 700;
}

.hist-months-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.hist-month-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast, 0.2s);
}

.hist-month-btn:hover {
  background: rgba(0, 120, 212, 0.12);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.hist-month-btn.active {
  background: var(--accent-primary) !important;
  border-color: var(--accent-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(0, 120, 212, 0.35) !important;
}

.hist-month-btn.is-current {
  border-color: rgba(0, 120, 212, 0.4);
}

html.light .hist-month-btn {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  color: #0f172a;
}

html.light .hist-month-btn:hover {
  background: #eef2ff;
  border-color: var(--accent-primary);
}

html.light .hist-month-btn.active {
  background: var(--accent-primary) !important;
  color: #ffffff !important;
}

/* History Filters Bar */
.history-filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.history-tabs-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.hist-filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.79rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.hist-filter-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.hist-filter-tab.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 120, 212, 0.35);
}

.tab-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.hist-filter-tab.active .tab-count-badge {
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.hist-price-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 1px 7px;
  border-radius: var(--radius-sm);
  margin-left: 6px;
  white-space: nowrap;
}

.hist-act-type-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: var(--radius-sm);
  margin-left: 6px;
  white-space: nowrap;
}

.hist-act-type-tag.phone {
  background: rgba(0, 120, 212, 0.12);
  border: 1px solid rgba(0, 120, 212, 0.25);
  color: #38bdf8;
}

.hist-act-type-tag.online {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  color: #67e8f9;
}

.history-period-indicator {
  font-size: 0.77rem;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  gap: 6px;
}

.history-period-indicator strong {
  color: var(--text-main);
}

.btn-reset-period {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.72rem;
  padding: 2px 7px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-reset-period:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: var(--accent-rose);
}

/* Badges for Item Types */
.badge-hist-type {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.badge-hist-type.badge-act {
  background: rgba(0, 120, 212, 0.15);
  border: 1px solid rgba(0, 120, 212, 0.3);
  color: #38bdf8;
}

.badge-hist-type.badge-key {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.badge-hist-type.badge-pkg {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #67e8f9;
}

.history-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 12px;
  transition: all var(--transition-fast);
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 120, 212, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.hist-card-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
}

@media (max-width: 768px) {
  .hist-card-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
}

.hist-main-info {
  flex: 1 1 auto;
  min-width: 0;
}

.hist-top-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.hist-date {
  font-size: 0.78rem;
  color: var(--text-subtle, #94a3b8);
}

.hist-user-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hist-user-email-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #f59e0b;
  padding: 2px 10px;
  border-radius: var(--radius-full, 20px);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast, 0.15s ease);
  text-decoration: none;
  line-height: 1.3;
}

.hist-user-email-btn:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
  color: #fbbf24;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.hist-user-email-btn.is-admin {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #ef4444;
}

.hist-user-email-btn.is-admin:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #f87171;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.hist-user-guest-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: var(--text-muted, #94a3b8);
  padding: 2px 8px;
  border-radius: var(--radius-full, 20px);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.3;
}

html.light .hist-user-email-btn {
  background: rgba(217, 119, 6, 0.12);
  border-color: rgba(217, 119, 6, 0.35);
  color: #b45309;
}

html.light .hist-user-email-btn:hover {
  background: rgba(217, 119, 6, 0.22);
  color: #92400e;
}

html.light .hist-user-email-btn.is-admin {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.35);
  color: #b91c1c;
}

.hist-product-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main, #ffffff);
  margin-top: 4px;
  margin-bottom: 6px;
}

.hist-price {
  color: var(--accent-emerald, #10b981);
  font-weight: 700;
  margin-left: 6px;
}

.hist-code-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.hist-code-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.hist-code-tag {
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--text-subtle, #94a3b8);
  min-width: 44px;
  width: auto;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.hist-code-text {
  font-family: var(--font-mono, monospace);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  word-break: break-all;
}

.hist-code-text.text-cyan {
  color: #38bdf8;
}

.hist-code-text.text-slate {
  color: #cbd5e1;
}

html.light .hist-code-text.text-slate {
  color: #334155;
}

.hist-code-text.text-emerald {
  color: #10b981;
}

.hist-code-text.text-accent {
  color: #2563eb;
}

.hist-actions-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  justify-content: center;
  flex-shrink: 0;
  min-width: 170px;
}

@media (max-width: 768px) {
  .hist-actions-column {
    align-items: stretch;
    width: 100%;
  }
}

.hist-actions-column .btn {
  width: 100%;
  justify-content: center;
  font-size: 0.8rem;
  padding: 7px 12px;
  white-space: nowrap;
}

html.light .history-item {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

html.light .history-item:hover {
  background: #f8fafc;
  border-color: rgba(0, 120, 212, 0.3);
}

html.light .hist-product-title {
  color: #0f172a;
}

/* Specialized CID Token Purchase History Card */
.history-item.hist-token-item {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.45) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-left: 4px solid var(--accent-primary, #2563eb);
  padding: 18px 20px;
  border-radius: var(--radius-lg, 16px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), 0 0 15px rgba(37, 99, 235, 0.06);
  transition: all var(--transition-fast, 0.15s ease);
}

.history-item.hist-token-item:hover {
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25), 0 0 20px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

html.light .history-item.hist-token-item {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-left: 4px solid #2563eb;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.06);
}

html.light .history-item.hist-token-item:hover {
  border-color: #2563eb;
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.12);
}

.hist-token-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.hist-token-badges-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-tokens-gradient {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(29, 78, 216, 0.35));
  border: 1px solid rgba(59, 130, 246, 0.45);
  color: #93c5fd;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: var(--radius-full, 20px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.2);
}

html.light .badge-tokens-gradient {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.25);
  color: #2563eb;
}

.badge-success-subtle {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 3px 9px;
  border-radius: var(--radius-full, 20px);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

html.light .badge-success-subtle {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.hist-token-meta-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.hist-order-id-chip {
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-subtle, #94a3b8);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

html.light .hist-order-id-chip {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
  color: #64748b;
}

.hist-token-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}

@media (max-width: 900px) {
  .hist-token-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.hist-token-stat-pill {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md, 12px);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all var(--transition-fast, 0.15s ease);
}

.hist-token-stat-pill:hover {
  background: rgba(15, 23, 42, 0.75);
  border-color: rgba(255, 255, 255, 0.14);
}

html.light .hist-token-stat-pill {
  background: rgba(241, 245, 249, 0.7);
  border-color: rgba(0, 0, 0, 0.06);
}

html.light .hist-token-stat-pill:hover {
  background: rgba(241, 245, 249, 0.95);
  border-color: rgba(0, 0, 0, 0.1);
}

.stat-pill-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.hist-token-stat-pill.main-pack .stat-pill-icon {
  background: linear-gradient(135deg, rgba(0, 120, 212, 0.2), rgba(0, 164, 239, 0.3));
  color: #38bdf8;
  border: 1px solid rgba(0, 164, 239, 0.35);
}

.hist-token-stat-pill.balance-pill .stat-pill-icon {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(0, 120, 212, 0.25));
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.hist-token-stat-pill.info-pill .stat-pill-icon {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.25));
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.stat-pill-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.stat-pill-label {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-subtle, #94a3b8);
}

.stat-pill-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main, #ffffff);
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

html.light .stat-pill-value {
  color: #0f172a;
}

.stat-pill-price {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-emerald, #10b981);
}

.stat-pill-sub {
  font-size: 0.74rem;
  color: var(--text-subtle, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hist-token-bottom-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}

html.light .hist-token-bottom-actions {
  border-top-color: rgba(0, 0, 0, 0.06);
}

.hist-token-note {
  font-size: 0.76rem;
  color: var(--text-subtle, #94a3b8);
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 240px;
}

.hist-token-note i {
  color: var(--accent-emerald, #10b981);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.hist-token-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .hist-token-bottom-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .hist-token-btns {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .hist-token-btns .repeat-purchase-tokens-btn {
    grid-column: 1 / -1;
  }
}

/* Settings Controls */
.settings-group {
  margin-bottom: 22px;
}

.settings-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-main);
}

.radio-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.radio-card:hover {
  background: rgba(255, 255, 255, 0.06);
}

.radio-card input {
  margin-top: 4px;
  accent-color: var(--accent-primary);
}

.radio-card input:checked ~ .radio-card-body .radio-title {
  color: var(--accent-primary);
}

.radio-title {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.radio-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.settings-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-top: 6px;
}

.slider {
  width: 100%;
  accent-color: var(--accent-primary);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  animation: toastIn 0.3s ease forwards;
  min-width: 260px;
  max-width: 480px;
  transition: opacity 0.25s ease, transform 0.25s ease, filter 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.toast:hover {
  filter: brightness(1.15);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.toast:active {
  transform: scale(0.98);
}

.toast-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.toast.success,
.toast.toast-success {
  border-left: 4px solid var(--accent-emerald);
}
.toast.success .toast-icon,
.toast.toast-success .toast-icon {
  color: var(--accent-emerald);
}

.toast.info,
.toast.toast-info {
  border-left: 4px solid var(--accent-cyan);
}
.toast.info .toast-icon,
.toast.toast-info .toast-icon {
  color: var(--accent-cyan);
}

.toast.error,
.toast.toast-error {
  border-left: 4px solid var(--accent-rose);
}
.toast.error .toast-icon,
.toast.toast-error .toast-icon {
  color: var(--accent-rose);
}

.toast.warning,
.toast.toast-warning {
  border-left: 4px solid var(--accent-amber);
}
.toast.warning .toast-icon,
.toast.toast-warning .toast-icon {
  color: var(--accent-amber);
}

.toast-message {
  flex: 1;
  line-height: 1.4;
  word-break: break-word;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 20px 0;
  margin-top: 20px;
  background: rgba(8, 12, 22, 0.5);
  font-size: 0.85rem;
  color: var(--text-subtle);
}

html.light .site-footer {
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
  color: #64748b !important;
}

html.light .site-footer a {
  color: #475569 !important;
}

html.light .site-footer a:hover {
  color: #1e293b !important;
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .blocks-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-heading {
    font-size: 1.85rem;
  }
  .header-badges {
    display: none;
  }
  .card-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .action-row {
    flex-direction: column;
    align-items: stretch;
  }
  .controls-right {
    flex-direction: column;
    width: 100%;
  }
  .timer-pill {
    justify-content: center;
    width: 100%;
  }
  .btn-primary {
    width: 100%;
  }
  .blocks-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .script-tabs {
    flex-wrap: wrap;
  }
  .stepper-container {
    flex-direction: column;
    gap: 12px;
    border-radius: var(--radius-lg);
    align-items: flex-start;
    padding: 18px 20px;
  }
  .stepper-divider {
    display: none;
  }
  .verified-banner-content {
    flex-direction: column;
    align-items: flex-start;
  }
  .verified-key-code {
    font-size: 1.05rem;
  }
}

/* ==========================================================================
   Product Key Verification & Stepper Components
   ========================================================================== */

/* Stepper Indicator */
.stepper-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 780px;
  margin: 0 auto 24px;
  position: relative;
  background: var(--bg-card);
  padding: 14px 28px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}

.stepper-step {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0.45;
  transition: all var(--transition-normal);
}

.stepper-step.active {
  opacity: 1;
}

.stepper-step.completed {
  opacity: 0.9;
}

.stepper-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 700;
  transition: all var(--transition-normal);
}

.stepper-step.active .stepper-circle {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  box-shadow: 0 0 16px rgba(0, 120, 212, 0.6);
}

.stepper-step.completed .stepper-circle {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
  color: #fff;
}

.stepper-info {
  display: flex;
  flex-direction: column;
}

.stepper-num {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stepper-text {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

.stepper-divider {
  flex: 1;
  height: 2px;
  background: var(--border-color);
  margin: 0 18px;
  transition: background var(--transition-normal);
}

.stepper-divider.completed {
  background: var(--accent-emerald);
}

/* Product Key Badge & Card */
.badge-product-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #f59e0b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.card-icon.product-key {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.key-counter-badge {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.key-counter-badge.valid {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: var(--accent-emerald);
}

.product-key-input {
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.key-action-row {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}

.key-help-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: block;
  line-height: 1.45;
  margin-top: 10px;
}

.key-help-hint i {
  display: inline;
  margin-right: 5px;
  vertical-align: -1px;
}

.key-help-link {
  display: inline;
  color: var(--accent-primary, #2563eb);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition-fast, 0.2s ease);
}

.key-help-link:hover {
  color: #38bdf8;
}

/* Verified Key Banner */
.verified-key-banner {
  border-color: rgba(16, 185, 129, 0.3);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(18, 26, 47, 0.65) 100%);
  border-radius: var(--radius-md, 14px);
  animation: slideUp 0.3s ease;
  margin-bottom: 20px;
}

.verified-banner-content {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.verified-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.verified-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.verified-tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 20px;
  padding: 3px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: none;
}

.verified-tag i {
  font-size: 0.82rem;
}

.verified-user-email {
  color: var(--text-main);
  font-weight: 600;
}

.verified-key-code {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 2px 0;
  letter-spacing: normal;
  font-family: inherit;
}

.verified-tokens-num {
  color: #10b981;
  font-weight: 700;
}

.verified-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.verified-actions-col {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.verified-actions-col .btn {
  justify-content: center;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* Locked State Notice */
.locked-card {
  text-align: center;
  border-style: dashed;
  opacity: 0.75;
}

.locked-body {
  padding: 44px 24px;
  max-width: 540px;
  margin: 0 auto;
}

.locked-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 16px;
  border: 1px solid var(--border-color);
}

.locked-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.locked-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Seller Modal & Table */
.modal-lg {
  max-width: 1140px;
  width: 96vw;
}

.modal-xl {
  max-width: 1200px;
  width: 96vw;
}

.modal-subtitle {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* Admin Panel Top CID Statistics Grid */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.admin-stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.admin-stat-card:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 120, 212, 0.4);
}

.admin-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
}

.admin-stat-card.total::before {
  background: linear-gradient(90deg, #3b82f6, #0078d4);
}

.admin-stat-card.month::before {
  background: linear-gradient(90deg, #00a4ef, #ec4899);
}

.admin-stat-card.today::before {
  background: linear-gradient(90deg, #10b981, #06b6d4);
}

.admin-stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.admin-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-stat-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
}

.admin-stat-card.total .admin-stat-icon {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.admin-stat-card.month .admin-stat-icon {
  background: rgba(0, 164, 239, 0.15);
  color: #38bdf8;
}

.admin-stat-card.today .admin-stat-icon {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.admin-stat-value {
  font-size: 1.55rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 4px;
}

.admin-stat-sub {
  font-size: 0.72rem;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Admin Tabs Navigation */
.admin-tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
  padding-bottom: 4px;
}

.admin-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.admin-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.admin-tab-btn.active {
  color: var(--accent-primary);
  background: rgba(0, 120, 212, 0.1);
  border-color: rgba(0, 120, 212, 0.3);
  border-bottom-color: transparent;
}

.admin-tab-badge {
  font-size: 0.74rem;
  font-family: var(--font-mono);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-subtle);
}

.admin-tab-btn.active .admin-tab-badge {
  background: var(--accent-primary);
  color: #fff;
}

.seller-desc-box {
  background: rgba(0, 120, 212, 0.08);
  border: 1px solid rgba(0, 120, 212, 0.25);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 22px;
  line-height: 1.5;
}

.seller-desc-box i {
  color: var(--accent-primary);
  font-size: 1.1rem;
  margin-top: 2px;
}

.seller-desc-box strong {
  color: #f59e0b;
}

.add-keys-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.add-keys-hint {
  font-size: 0.82rem;
  color: var(--text-subtle);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.keys-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.keys-list-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.keys-total-copies-badge {
  font-size: 0.8rem;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.btn-link-danger {
  background: none;
  border: none;
  color: var(--accent-rose);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
}

.btn-link-danger:hover {
  text-decoration: underline;
}

.seller-keys-table-wrap {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  max-height: 320px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.2);
}

.seller-keys-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.seller-keys-table th {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  color: var(--text-subtle);
  position: static;
  white-space: nowrap;
}

.seller-keys-table th,
.seller-keys-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
  vertical-align: middle;
}

/* Compact Dashed Code Display for IID & CID in Modals & History */
.code-dashed-block {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.79rem;
  line-height: 1.42;
  letter-spacing: 0.02em;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  word-break: break-all;
  overflow-wrap: anywhere;
  user-select: all;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.code-dashed-block.iid-dashed-code {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.code-dashed-block.iid-dashed-code:hover {
  background: rgba(0, 120, 212, 0.14);
  border-color: rgba(0, 120, 212, 0.4);
  color: #ffffff;
  transform: translateY(-1px);
}

.code-dashed-block.cid-dashed-code {
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.07);
  border: 1px solid rgba(16, 185, 129, 0.22);
  font-weight: 600;
}

.code-dashed-block.cid-dashed-code:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.22);
  transform: translateY(-1px);
}

/* Fallback 3-Column Code Grids */
.code-grid-3cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 6px;
}

.code-grid-3cols .code-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 5px;
  border-radius: var(--radius-sm);
  text-align: center;
  letter-spacing: 0.02em;
  white-space: nowrap;
  user-select: all;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.code-grid-3cols.iid-grid .code-badge {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.code-grid-3cols.iid-grid .code-badge:hover {
  background: rgba(0, 120, 212, 0.18);
  border-color: rgba(0, 120, 212, 0.45);
  color: #ffffff;
  transform: translateY(-1px);
}

.code-grid-3cols.cid-grid .code-badge {
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.22);
}

.code-grid-3cols.cid-grid .code-badge:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.28);
  transform: translateY(-1px);
}

/* History Actions Group (IID and CID Copy buttons) */
.table-actions-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
  justify-content: center;
  width: 68px;
  min-width: unset;
}

.btn-table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 6px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-table-action:hover {
  background: rgba(0, 120, 212, 0.16);
  border-color: rgba(0, 120, 212, 0.4);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-table-action.copy-user-cid-btn {
  border-color: rgba(16, 185, 129, 0.28);
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.08);
}

.btn-table-action.copy-user-cid-btn:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.55);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge.available {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.status-badge.used {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-rose);
}

/* Duplicates Controls in Keys Table */
.copies-control-box {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.copies-count-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-main);
  min-width: 22px;
  text-align: center;
}

.btn-copy-step {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.72rem;
  transition: all var(--transition-fast);
}

.btn-copy-step:hover {
  background: var(--accent-primary);
  color: #fff;
}

.btn-quick-duplicate {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 120, 212, 0.14);
  border: 1px solid rgba(0, 120, 212, 0.35);
  color: var(--accent-primary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-quick-duplicate:hover {
  background: var(--accent-primary);
  color: #fff;
}

.btn-del-key {
  background: transparent;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 6px;
  font-size: 0.85rem;
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.btn-del-key:hover {
  color: var(--accent-rose);
  background: rgba(239, 68, 68, 0.12);
}

/* Admin Users Management Tab Toolbar & Table */
.admin-users-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.admin-users-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.user-filter-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-filter-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.user-filter-chip.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

.admin-users-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 250px;
}

.admin-users-search i {
  position: absolute;
  left: 12px;
  color: var(--text-subtle);
  font-size: 0.85rem;
  pointer-events: none;
}

.admin-users-search input {
  width: 100%;
  padding: 8px 14px 8px 34px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.admin-users-search input:focus {
  border-color: var(--accent-primary);
}

.user-id-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-id-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.user-id-icon.guest {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
}

.user-id-title {
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.88rem;
}

.user-id-sub {
  font-size: 0.75rem;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}

.user-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.user-role-badge.reg {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.user-role-badge.guest {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.user-role-badge.admin {
  background: rgba(0, 120, 212, 0.18);
  color: #38bdf8;
}

.badge-cid-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}

/* Admin Users Table & Compact Layout */
.admin-users-table-wrap {
  overflow-x: hidden;
  width: 100%;
}

.admin-users-table {
  width: 100%;
  table-layout: auto;
}

.admin-users-table th,
.admin-users-table td {
  padding: 10px 12px;
}

.user-cell-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.user-badge-under {
  display: flex;
  align-items: center;
}

.user-badge-under .user-role-badge {
  padding: 2px 8px;
  font-size: 0.72rem;
  letter-spacing: -0.01em;
}

.credits-avail-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Framed Count Box (No 'акт.', No inline '+5') */
.credits-count-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 28px;
  padding: 0 10px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.credits-count-frame .credits-avail-badge {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--accent-cyan);
  line-height: 1;
}

.credits-avail-badge {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--accent-cyan);
}

/* Guest One-Time Key Badge in Table */
.credits-one-time-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-subtle);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.credits-zero-badge {
  color: var(--text-subtle);
  font-size: 0.8rem;
}

.btn-credit-quick {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--accent-cyan);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-credit-quick:hover {
  background: var(--accent-cyan);
  color: #000;
}

/* User Profile Modal Quick Add Activations (+1, +5, +10) */
.audm-quick-add-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.audm-quick-add-btn {
  background: rgba(6, 182, 212, 0.14);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: var(--accent-cyan);
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.audm-quick-add-btn:hover {
  background: var(--accent-cyan);
  color: #031320;
}

.audm-footer-actions-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.audm-footer-label {
  font-size: 0.82rem;
  color: var(--text-subtle);
  font-weight: 600;
  margin-right: 2px;
}

.audm-footer-add-btn {
  font-weight: 700;
  font-size: 0.82rem;
  padding: 6px 12px;
}

.user-id-icon-lg {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 120, 212, 0.15);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.user-id-icon-lg.guest {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.clickable-user-row {
  cursor: pointer;
  transition: background var(--transition-fast);
}

.clickable-user-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.clickable-user-name {
  cursor: pointer;
  color: var(--text-main);
  transition: color var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.clickable-user-name:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

.open-user-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-tag-mini {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
  margin-left: 6px;
  vertical-align: middle;
}

/* ==========================================================================
   User Account, Cabinet & Credits System Styles
   ========================================================================== */

/* Header Auth & User Pill */
.auth-header-wrapper {
  display: flex;
  align-items: center;
}

.header-auth-btn {
  gap: 8px;
  padding: 8px 14px;
}

.user-profile-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 120, 212, 0.08);
  border: 1px solid rgba(0, 120, 212, 0.25);
  padding: 3px 10px 3px 5px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  cursor: pointer;
  user-select: none;
}

.user-profile-pill:hover {
  border-color: var(--accent-primary);
  background: rgba(0, 120, 212, 0.18);
  box-shadow: 0 0 10px rgba(0, 120, 212, 0.25);
  transform: translateY(-1px);
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
}

.user-pill-info {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.user-pill-email {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-main);
  max-width: 135px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-pill-balance {
  font-size: 0.68rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.icon-btn-ghost {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 0.82rem;
  transition: color var(--transition-fast);
}

.icon-btn-ghost:hover {
  color: var(--text-main);
}

/* User Balance Banner */
.user-balance-banner {
  border-color: rgba(6, 182, 212, 0.35);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(18, 26, 47, 0.85) 100%);
  animation: slideUp 0.3s ease;
  margin-bottom: 24px;
}

.balance-banner-content {
  padding: 20px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.balance-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.3);
}

.balance-info-col {
  flex: 1;
}

.balance-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.balance-user-badge {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.balance-status-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  gap: 5px;
}

.balance-amount-row {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.balance-number {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--accent-cyan);
  margin: 0 4px;
}

.balance-hint {
  font-size: 0.82rem;
  color: var(--text-subtle);
  margin-left: 6px;
}

.balance-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Auth Modal Tabs & Form */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 22px;
}

.auth-tab-btn {
  flex: 1;
  padding: 12px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.auth-tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0 14px;
  color: var(--text-subtle);
  font-size: 0.8rem;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.auth-divider span {
  padding: 0 12px;
}

/* Cabinet Modal Components */
.cabinet-profile-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 22px;
}

.cabinet-avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  box-shadow: 0 0 20px rgba(0, 120, 212, 0.4);
}

.cabinet-user-info {
  flex: 1;
}

.cabinet-email {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.cabinet-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.badge-status-active {
  color: var(--accent-emerald);
  font-weight: 700;
}

.cabinet-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-box.primary {
  background: rgba(0, 120, 212, 0.08);
  border-color: rgba(0, 120, 212, 0.3);
}

.stat-box-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.stat-box.primary .stat-box-icon {
  background: var(--accent-primary);
  color: #fff;
}

.stat-box-content {
  flex: 1;
}

.stat-box-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-bottom: 2px;
}

.stat-box-val {
  font-size: 1.35rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-main);
}

/* Pricing Grid & Packages */
.packages-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.package-card {
  position: relative;
  border: 1.5px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.package-card:hover {
  border-color: var(--accent-primary);
  background: rgba(0, 120, 212, 0.06);
  transform: translateY(-2px);
}

.package-card input {
  display: none;
}

.package-card:has(input:checked),
.package-card.selected {
  border-color: var(--accent-primary);
  background: rgba(0, 120, 212, 0.14);
  box-shadow: 0 0 20px rgba(0, 120, 212, 0.3);
}

.package-card.popular {
  border-color: rgba(245, 158, 11, 0.4);
}

.package-card.popular:has(input:checked),
.package-card.popular.selected {
  border-color: #f59e0b;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.35);
}

.package-badge-popular {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.package-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-subtle);
  display: block;
  margin-bottom: 6px;
}

.package-tag.pro {
  color: var(--accent-cyan);
}

.package-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.package-price {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-main);
  margin-bottom: 4px;
}

.package-unit {
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.payment-methods-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.pay-method-card {
  flex: 1;
  min-width: 160px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.pay-method-card input {
  display: none;
}

.pay-method-card:has(input:checked) {
  border-color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
}

.promo-input-group {
  display: flex;
  gap: 10px;
}

.promo-input-group input {
  flex: 1;
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cabinet-stats-grid {
    grid-template-columns: 1fr;
  }
  .balance-banner-content {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   Light Mode Theme Polish & Visual Enhancements
   ========================================================================== */

/* Modal Overlays & Windows */
html.light .modal-overlay {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

html.light .modal-window {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

html.light .modal-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

html.light .modal-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* User Balance Banner in Light Mode */
html.light .user-balance-banner {
  border-color: rgba(6, 182, 212, 0.35);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, #ffffff 100%) !important;
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}

html.light .balance-user-badge {
  color: #0f172a;
}

html.light .balance-amount-row {
  color: #475569;
}

html.light .balance-number {
  color: #0891b2;
  font-weight: 800;
}

html.light .balance-hint {
  color: #64748b;
}

/* Cabinet Modal Profile Card & Stats */
html.light .cabinet-profile-card {
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

html.light .cabinet-email {
  color: #0f172a;
}

html.light .cabinet-meta {
  color: #64748b;
}

html.light .stat-box {
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

html.light .stat-box.primary {
  background: rgba(0, 120, 212, 0.07);
  border-color: rgba(0, 120, 212, 0.28);
}

html.light .stat-box-icon {
  background: #ffffff;
  color: var(--accent-primary);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

html.light .stat-box.primary .stat-box-icon {
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
}

html.light .stat-box-label {
  color: #64748b;
}

html.light .stat-box-val {
  color: #0f172a;
}

/* Cabinet & Seller Tables in Light Mode */
html.light .seller-keys-table-wrap {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
}

html.light .seller-keys-table th {
  background: #f1f5f9 !important;
  color: #334155 !important;
  font-weight: 700;
  border-bottom: 1px solid rgba(0, 0, 0, 0.09) !important;
}

html.light .seller-keys-table td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  color: #1e293b;
}

html.light .seller-keys-table tr:hover td {
  background: #f8fafc;
}

html.light .status-badge.available {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

html.light .status-badge.used {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

html.light .btn-del-key {
  color: #64748b;
}

html.light .btn-del-key:hover {
  color: var(--accent-rose);
}

html.light .code-grid-3cols.iid-grid .code-badge {
  color: #0f172a;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
}

html.light .code-grid-3cols.iid-grid .code-badge:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

html.light .code-grid-3cols.cid-grid .code-badge {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

html.light .code-grid-3cols.cid-grid .code-badge:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.45);
}

html.light .btn-table-action {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

html.light .btn-table-action:hover {
  background: #e2e8f0;
  color: #0f172a;
}

html.light .btn-table-action.copy-user-cid-btn {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #047857;
}

html.light .btn-table-action.copy-user-cid-btn:hover {
  background: rgba(16, 185, 129, 0.22);
  color: #065f46;
}

/* Primary, Secondary & Soft Buttons in Light Mode */
html.light .btn-primary {
  background: #2563eb !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25) !important;
  transition: all var(--transition-fast) !important;
}

html.light .btn-primary:hover {
  background: #1d4ed8 !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
  transform: translateY(-1px) !important;
}

html.light .btn-secondary {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

html.light .btn-secondary:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

html.light .glass-card {
  background: #ffffff !important;
  border: 1px solid #e5edf7 !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03) !important;
}

html.light .btn-danger-soft {
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.22);
  color: #e11d48;
}

html.light .btn-danger-soft:hover {
  background: rgba(244, 63, 94, 0.15);
  color: #be123c;
}

/* Pricing Packages & Payment Methods in Light Mode */
html.light .package-card {
  background: #ffffff;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

html.light .package-card:hover {
  background: rgba(0, 120, 212, 0.04);
  border-color: var(--accent-primary);
}

html.light .package-card:has(input:checked),
html.light .package-card.selected {
  background: rgba(0, 120, 212, 0.08);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 1px var(--accent-primary), 0 8px 20px rgba(0, 120, 212, 0.12);
}

html.light .package-card.popular {
  border-color: rgba(245, 158, 11, 0.45);
}

html.light .package-card.popular:has(input:checked),
html.light .package-card.popular.selected {
  border-color: #f59e0b;
  box-shadow: 0 0 0 1px #f59e0b, 0 8px 24px rgba(245, 158, 11, 0.18);
}

html.light .package-name,
html.light .package-price {
  color: #0f172a;
}

html.light .pay-method-card {
  background: #ffffff;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  color: #334155;
}

html.light .pay-method-card:has(input:checked) {
  background: rgba(16, 185, 129, 0.08);
  border-color: var(--accent-emerald);
  color: #059669;
}

/* Form Inputs & Radio Cards in Light Mode */
html.light .main-input,
html.light .copy-input-box input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
  color: #0f172a;
}

html.light .main-input:focus,
html.light .copy-input-box input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.15);
}

html.light .btn-copy-inline {
  color: #64748b;
}

html.light .btn-copy-inline:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--accent-primary);
}

html.light .radio-card {
  background: #ffffff;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
}

html.light .radio-card:hover {
  border-color: var(--accent-primary);
}

html.light .iid-gen-btn {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
}

html.light .iid-gen-btn:hover {
  background: #f8fafc;
  border-color: rgba(0, 120, 212, 0.4);
}

html.light .iid-gen-btn.active {
  background: rgba(0, 120, 212, 0.08);
  border-color: var(--accent-primary);
  box-shadow: 0 0 14px rgba(0, 120, 212, 0.15);
}

html.light .iid-gen-title {
  color: #0f172a;
}

html.light .iid-gen-meta {
  color: #0284c7;
}

html.light .iid-blocks-container {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
}

html.light .iid-block-input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
  color: #0f172a;
}

html.light .iid-block-input:focus {
  border-color: var(--accent-primary);
}

html.light .iid-block-label {
  color: #0284c7;
}

html.light .radio-card:has(input:checked) {
  background: rgba(0, 120, 212, 0.06);
  border-color: var(--accent-primary);
}

html.light .radio-title {
  color: #0f172a;
}

html.light .radio-desc {
  color: #64748b;
}

html.light .seller-desc-box {
  background: rgba(0, 120, 212, 0.06);
  border-color: rgba(0, 120, 212, 0.2);
  color: #334155;
}

html.light .cabinet-history-link-box {
  background: #ffffff;
  border: 1px solid rgba(0, 120, 212, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

html.light .cabinet-history-link-box:hover {
  background: #f8fafc;
  border-color: var(--accent-primary);
}

html.light .cabinet-history-link-text h4 {
  color: #0f172a;
}

html.light .cabinet-history-link-text p {
  color: #64748b;
}

html.light .history-graph-card {
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.09);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

html.light .history-graph-card:hover {
  background: #ffffff;
  border-color: var(--accent-primary);
}

html.light .history-graph-card.active {
  background: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 14px rgba(0, 120, 212, 0.15);
}

html.light .hgc-title {
  color: #0f172a;
}

html.light .hgc-badge {
  background: #e2e8f0;
  color: #475569;
}

html.light .hgc-val {
  color: #0f172a;
}

html.light .hgc-bars-container {
  background: #e2e8f0;
}

html.light .hgc-bar-lbl {
  color: #475569;
}

html.light .hist-filter-tab {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

html.light .hist-filter-tab:hover {
  background: #e2e8f0;
  color: #0f172a;
}

html.light .hist-filter-tab.active {
  background: var(--accent-primary);
  color: #ffffff;
}

html.light .history-period-indicator strong {
  color: #0f172a;
}

html.light .badge-hist-type.badge-act {
  background: rgba(0, 120, 212, 0.12);
  border-color: rgba(0, 120, 212, 0.25);
  color: #0062a3;
}

html.light .badge-hist-type.badge-key {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.25);
  color: #065f46;
}

html.light .badge-hist-type.badge-pkg {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.25);
  color: #0e7490;
}

html.light .history-item {
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

html.light .history-date {
  color: #64748b;
}

html.light .history-iid {
  color: #334155;
}

html.light .history-top-row .history-key-pill {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #b45309;
}

html.light .history-code-val {
  color: #334155;
}

html.light .history-code-val.cid-val {
  color: #047857;
}

html.light .btn-hist-action {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}

html.light .btn-hist-action:hover {
  background: #f1f5f9;
  color: #0f172a;
}

html.light .btn-hist-action.copy-hist-btn {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #047857;
}

html.light .btn-hist-action.copy-hist-btn:hover {
  background: rgba(16, 185, 129, 0.2);
  color: #065f46;
}

html.light .empty-state {
  color: #64748b;
}

/* Glass Card border highlight in Light Mode */
html.light .glass-card::before {
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.05), transparent);
}

/* Verified Key Banner in Light Mode */
html.light .verified-key-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, #ffffff 100%);
  border-color: rgba(16, 185, 129, 0.25);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.05);
}

html.light .verified-tag {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
  color: #047857;
}

html.light .verified-user-email {
  color: #0f172a;
}

html.light .verified-key-title {
  color: #065f46;
}

html.light .verified-key-code {
  color: #0f172a;
}

html.light .verified-tokens-num {
  color: #059669;
}

/* Locked Card in Light Mode */
html.light .locked-state-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

html.light .locked-icon {
  background: #f1f5f9;
  color: #64748b;
}

html.light .locked-title {
  color: #0f172a;
}

html.light .locked-desc {
  color: #64748b;
}

/* Result Block Cards in Light Mode */
html.light .block-card {
  background: #ffffff;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

html.light .block-card:hover {
  background: rgba(0, 120, 212, 0.06);
  border-color: var(--accent-primary);
}

html.light .block-card.copied {
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: var(--accent-emerald) !important;
}

html.light .block-value {
  color: #0f172a;
}

html.light .format-num {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #64748b;
}

html.light .format-num.active-format {
  color: #059669 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  text-shadow: 0 0 8px rgba(5, 150, 105, 0.4);
}

html.light .key-help-link {
  color: #2563eb;
}

html.light .key-help-link:hover {
  color: #1d4ed8;
}

/* Action Controls in Light Mode */
html.light .timer-pill {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
}

html.light .timer-pill strong {
  color: #2563eb;
}

html.light .dropzone-area {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
}

html.light .dropzone-main {
  color: #1e293b;
}

html.light .dropzone-sub {
  color: #64748b;
}

html.light .stat-pill {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #475569;
}

html.light .stat-pill strong {
  color: #0891b2;
}

html.light .icon-btn {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  color: #475569;
}

html.light .icon-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

html.light .user-profile-pill {
  background: rgba(0, 120, 212, 0.08);
  border-color: rgba(0, 120, 212, 0.25);
}

html.light .user-pill-email {
  color: #0f172a;
}

html.light .user-pill-balance {
  color: #0891b2;
}

html.light .site-header {
  background: rgba(255, 255, 255, 0.85);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

html.light .stepper-container {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

html.light .stepper-circle {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.12);
  color: #64748b;
}

html.light .stepper-step.active .stepper-circle {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

html.light .stepper-step.completed .stepper-circle {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
  color: #ffffff;
}

html.light .stepper-text {
  color: #0f172a;
}

html.light .stepper-divider {
  background: rgba(0, 0, 0, 0.08);
}

html.light .stepper-divider.completed {
  background: var(--accent-emerald);
}

/* ==========================================================================
   Admin Cabinet Box Styles
   ========================================================================== */
.cabinet-admin-box {
  background: rgba(0, 120, 212, 0.08);
  border: 1px solid rgba(0, 120, 212, 0.3);
  border-radius: var(--radius-md);
  padding: 18px 22px;
}

.cabinet-admin-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.cabinet-admin-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(0, 120, 212, 0.18);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.cabinet-admin-details {
  flex: 1;
}

.cabinet-admin-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.cabinet-admin-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Digital Keys Store ("Телефонная активация через CID") Styles
   ========================================================================== */
.store-section {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.store-header {
  max-width: 780px;
  margin: 0 auto 20px;
}

.store-heading {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.store-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Store Category Filters - DKEY Clean Pill Navigation */
.store-filters {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #111a2d;
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.store-filter-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 600;
  color: #8a99ad;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all var(--transition-fast);
}

.store-filter-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
}

.store-filter-btn.active {
  background: #1d2d4c !important;
  color: #93c5fd !important;
  border: 1px solid rgba(96, 165, 250, 0.25) !important;
  box-shadow: none !important;
}

html.light .store-filters {
  background: #e9eff8 !important;
  border: 1px solid #dce5f2 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
}

html.light .store-filter-btn {
  color: #5b6b82 !important;
}

html.light .store-filter-btn:hover {
  background: rgba(255, 255, 255, 0.5) !important;
  color: #0f172a !important;
}

html.light .store-filter-btn.active {
  background: #ffffff !important;
  color: #2563eb !important;
  border: 1px solid #dce5f2 !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06) !important;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

/* Product Card - Clean, Compact & Sleek */
.product-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md, 12px);
  padding: 14px 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.product-card:hover {
  border-color: rgba(0, 120, 212, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.product-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  min-height: 48px;
}

.product-icon-wrap {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  flex-shrink: 0;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-card.windows .product-icon-wrap {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.product-card.office .product-icon-wrap {
  background: rgba(251, 146, 60, 0.12);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.25);
}

.product-title-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

.product-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.product-subtitle {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.2;
  white-space: nowrap;
}

.product-card.office .product-subtitle {
  color: #fb923c;
}

.product-card.windows .product-subtitle {
  color: #38bdf8;
}

html.light .product-card.office .product-subtitle {
  color: #ea580c;
}

html.light .product-card.windows .product-subtitle {
  color: #0284c7;
}

html.light .product-icon-wrap {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.product-specs-compact {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0 0 12px 0;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  list-style: none;
}

html.light .product-specs-compact {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.05);
}

.product-spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.76rem;
  line-height: 1.35;
}

.product-spec-row .spec-k {
  color: var(--text-muted);
  font-size: 0.74rem;
}

.product-spec-row .spec-v {
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.74rem;
  text-align: right;
}

.product-pricing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

.product-curr-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: #38bdf8;
  line-height: 1.1;
  font-family: var(--font-mono);
}

.product-old-price {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-card .btn-buy-product {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Guarantees Bar */
.store-guarantees-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 24px 28px;
  margin-bottom: 30px;
}

.guarantee-col {
  display: flex;
  align-items: center;
  gap: 14px;
}

.guarantee-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.guarantee-text strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.guarantee-text p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Checkout Modal Components */
.checkout-product-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.checkout-product-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.checkout-product-details {
  flex: 1;
}

.checkout-product-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-cyan);
  display: block;
  margin-bottom: 2px;
  white-space: nowrap;
}

.checkout-product-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.checkout-product-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-top: 2px;
}

.checkout-product-price-box {
  text-align: right;
  flex-shrink: 0;
}

.checkout-price-val {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent-emerald);
}

.checkout-price-hint {
  font-size: 0.72rem;
  color: var(--text-subtle);
}

.checkout-success-box {
  padding: 20px 10px;
}

.success-icon-badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  margin: 0 auto 16px;
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.3);
}

.success-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.success-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.issued-key-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 24px;
  text-align: left;
}

.issued-key-input {
  font-size: 1.15rem !important;
  font-weight: 700;
  color: var(--accent-emerald) !important;
  letter-spacing: 0.06em;
}

.success-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   Light Mode Overrides for New Store & Admin Elements
   ========================================================================== */
html.light .header-nav {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.08);
}

html.light .header-nav-link {
  color: #475569;
}

html.light .header-nav-link:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #0f172a;
}

html.light .header-nav-link.active {
  background: var(--accent-primary);
  color: #ffffff;
}

html.light .cabinet-admin-box {
  background: rgba(0, 120, 212, 0.06);
  border-color: rgba(0, 120, 212, 0.25);
}

html.light .cabinet-admin-title {
  color: #0f172a;
}

html.light .cabinet-admin-desc {
  color: #64748b;
}

html.light .store-filters {
  background: rgba(255, 255, 255, 0.65) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(0, 120, 212, 0.14) !important;
  box-shadow: 0 4px 20px rgba(0, 120, 212, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

html.light .store-filter-btn {
  color: #475569;
}

html.light .store-filter-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

html.light .store-heading {
  color: #0f172a;
}

html.light .store-subtitle {
  color: #475569;
}

html.light .product-card {
  background: #ffffff !important;
  border: 1px solid #e5edf7 !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03) !important;
}

html.light .product-card:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

html.light .product-title {
  color: #0f172a;
}

html.light .product-badge-cid {
  background: rgba(2, 132, 199, 0.07);
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.18);
}

html.light .product-specs-list {
  border-bottom-color: rgba(0, 0, 0, 0.07);
}

html.light .product-specs-list li {
  color: #475569;
}

html.light .product-specs-list li i {
  color: #059669;
}

html.light .product-curr-price {
  color: #0f172a;
}

html.light .store-guarantees-bar {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

html.light .guarantee-text strong {
  color: #0f172a;
}

html.light .guarantee-text p {
  color: #64748b;
}

html.light .checkout-product-card {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
}

html.light .checkout-product-name {
  color: #0f172a;
}

html.light .checkout-product-desc {
  color: #64748b;
}

html.light .issued-key-box {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.1);
}

html.light .admin-stat-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

html.light .admin-stat-value {
  color: #0f172a;
}

html.light .admin-stat-label {
  color: #64748b;
}

html.light .admin-tab-btn {
  color: #64748b;
}

html.light .admin-tab-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

html.light .admin-tab-btn.active {
  background: rgba(0, 120, 212, 0.1);
  color: var(--accent-primary);
  border-color: rgba(0, 120, 212, 0.25);
}

html.light .user-filter-chip {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.08);
  color: #475569;
}

html.light .user-filter-chip:hover {
  background: #e2e8f0;
  color: #0f172a;
}

html.light .user-filter-chip.active {
  background: var(--accent-primary);
  color: #ffffff;
}

html.light .admin-users-search input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0f172a;
}

html.light .seller-keys-table-wrap {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

html.light .seller-keys-table th {
  background: #f8fafc;
  border-bottom-color: rgba(0, 0, 0, 0.08);
  color: #475569;
}

html.light .seller-keys-table td {
  border-bottom-color: rgba(0, 0, 0, 0.06);
  color: #334155;
}

html.light .copies-control-box {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.1);
}

html.light .copies-count-num {
  color: #0f172a;
}

html.light .btn-copy-step {
  background: #e2e8f0;
  color: #475569;
}

html.light .btn-copy-step:hover {
  background: var(--accent-primary);
  color: #ffffff;
}

html.light .badge-cid-count {
  background: #f1f5f9;
  color: #0f172a;
}

html.light .user-id-title {
  color: #0f172a;
}

html.light .clickable-user-row:hover {
  background: #f8fafc;
}

html.light .clickable-user-name {
  color: #0f172a;
}

html.light .clickable-user-name:hover {
  color: var(--accent-primary);
}

html.light #adminUserDetailsModal .modal-window {
  background: #ffffff !important;
  color: #0f172a;
}

html.light #adminUserDetailsModal .stat-box {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
}

html.light #adminUserDetailsModal .stat-box.primary {
  background: rgba(0, 120, 212, 0.07);
  border-color: rgba(0, 120, 212, 0.28);
}

html.light #adminUserDetailsModal .stat-box-val {
  color: #0f172a;
}

html.light #adminUserDetailsModal .code-font {
  color: #0f172a;
}

/* Modal Table Fit & Compact Display (Prevents Horizontal Scrollbar) */
#adminUserDetailsModal .modal-window {
  max-width: 980px;
  width: 95vw;
}

#cabinetModal .modal-window {
  max-width: 1140px;
  width: 96vw;
}

/* Compact Checkout Modal (No Scrollbar, Perfectly Fitted Single Window) */
#productCheckoutModal .modal-window,
.modal-checkout-sm {
  max-width: 550px !important;
  width: 94vw !important;
  max-height: 96vh !important;
  overflow: hidden !important;
}

#productCheckoutModal .modal-header {
  padding: 14px 22px !important;
}

#productCheckoutModal .modal-body {
  padding: 14px 22px 18px !important;
  overflow-y: visible !important;
  overflow-x: hidden !important;
}

#productCheckoutModal .checkout-product-card {
  padding: 11px 16px !important;
  gap: 13px !important;
}

#productCheckoutModal .checkout-product-icon {
  width: 44px !important;
  height: 44px !important;
  font-size: 1.35rem !important;
  border-radius: var(--radius-md) !important;
  flex-shrink: 0 !important;
}

#productCheckoutModal .checkout-product-badge {
  font-size: 0.72rem !important;
  margin-bottom: 2px !important;
  white-space: normal !important;
  word-break: break-word !important;
  line-height: 1.2 !important;
}

#productCheckoutModal .checkout-product-name {
  font-size: 1.08rem !important;
  margin-bottom: 2px !important;
  line-height: 1.25 !important;
}

#productCheckoutModal .checkout-product-desc {
  font-size: 0.78rem !important;
  line-height: 1.3 !important;
  margin-top: 1px !important;
}

#productCheckoutModal .checkout-product-price-box {
  text-align: right !important;
  flex-shrink: 0 !important;
}

#productCheckoutModal .checkout-price-val {
  font-size: 1.35rem !important;
  line-height: 1.2 !important;
}

#productCheckoutModal .checkout-price-hint {
  font-size: 0.7rem !important;
}

#productCheckoutModal .settings-group {
  margin-top: 11px !important;
  margin-bottom: 11px !important;
}

#productCheckoutModal .settings-label {
  font-size: 0.82rem !important;
  margin-bottom: 5px !important;
}

#productCheckoutModal .input-wrapper .main-input {
  padding: 8px 12px 8px 38px !important;
  font-size: 0.9rem !important;
}

#productCheckoutModal .settings-hint {
  font-size: 0.71rem !important;
  line-height: 1.3 !important;
  margin-top: 4px !important;
  display: block !important;
}

#productCheckoutModal .payment-methods-row {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
}

#productCheckoutModal .pay-method-card {
  min-width: 0 !important;
  padding: 8px 6px !important;
  justify-content: center !important;
  gap: 6px !important;
  font-size: 0.82rem !important;
  white-space: nowrap !important;
}

#productCheckoutModal .pay-method-card i {
  font-size: 0.95rem !important;
}

#productCheckoutModal #payProductBtn {
  margin-top: 11px !important;
  padding: 10px 18px !important;
  font-size: 0.94rem !important;
}

#adminUserDetailsModal .seller-keys-table-wrap,
#cabinetModal .seller-keys-table-wrap {
  max-height: 350px;
  overflow-y: auto;
  overflow-x: auto;
}

#adminUserDetailsModal .seller-keys-table,
#cabinetModal .seller-keys-table {
  width: 100%;
}

#adminUserDetailsModal .seller-keys-table th,
#adminUserDetailsModal .seller-keys-table td,
#cabinetModal .seller-keys-table th,
#cabinetModal .seller-keys-table td {
  padding: 8px 12px;
}

/* User Profile 2x2 Stats Grid */
#audmStatsGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

#audmStatsGrid .stat-box {
  padding: 10px 14px;
  min-height: 64px;
  border-radius: var(--radius-md);
  gap: 10px;
}

#audmStatsGrid .stat-box-icon {
  width: 36px;
  height: 36px;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

#audmStatsGrid .stat-box-val {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.1;
}

#audmStatsGrid .stat-box-label {
  font-size: 0.74rem;
  margin-bottom: 2px;
}

.audm-quick-add-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.audm-quick-add-btn {
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(0, 120, 212, 0.15);
  border: 1px solid rgba(0, 120, 212, 0.3);
  color: var(--accent-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.audm-quick-add-btn:hover {
  background: var(--accent-primary);
  color: #fff;
  transform: translateY(-1px);
}

/* User Account Blocking Tab & Card */
.audm-block-card {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.22);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.audm-block-card.is-active-card {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.22);
}

.audm-block-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.audm-block-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.audm-block-icon.danger {
  background: rgba(239, 68, 68, 0.16);
  color: var(--accent-rose);
}

.audm-block-icon.success {
  background: rgba(16, 185, 129, 0.16);
  color: var(--accent-emerald);
}

.audm-block-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.audm-block-desc {
  margin: 2px 0 0 0;
  font-size: 0.8rem;
  color: var(--text-subtle);
  line-height: 1.4;
}

.audm-block-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

.user-role-badge.blocked {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-rose);
  border-color: rgba(239, 68, 68, 0.35);
}

/* Clickable Key Code Pill (Purchased Keys Tab) */
.code-copyable-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap !important;
  word-break: keep-all !important;
  flex-shrink: 0;
}

.code-copyable-pill span {
  white-space: nowrap !important;
  word-break: keep-all !important;
  font-family: var(--font-mono);
  font-size: 0.83rem;
  letter-spacing: 0.02em;
}

.code-copyable-pill:hover {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: var(--accent-emerald);
  transform: translateY(-1px);
}

/* Stacked Table Codes (Streamlined without duplicate right buttons) */
.table-history-codes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.table-history-codes .history-code-row {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all var(--transition-fast);
  cursor: pointer;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.table-history-codes .history-code-row:hover {
  background: rgba(0, 120, 212, 0.12);
  border-color: rgba(0, 120, 212, 0.35);
  transform: translateY(-1px);
}

.table-history-codes .history-code-row.cid-code-row {
  background: rgba(16, 185, 129, 0.04);
  border-color: rgba(16, 185, 129, 0.16);
}

.table-history-codes .history-code-row.cid-code-row:hover {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.18);
  transform: translateY(-1px);
}

.table-history-codes .history-code-tag {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-subtle);
  flex-shrink: 0;
  min-width: 32px;
}

.table-history-codes .history-code-tag.cid-tag {
  color: var(--accent-emerald);
}

.table-history-codes .history-code-val {
  font-family: var(--font-mono);
  font-size: 0.81rem;
  letter-spacing: 0.015em;
  user-select: all;
  white-space: nowrap !important;
  flex: 0 0 auto;
  overflow: visible;
}

.table-history-codes .history-code-val.cid-val {
  color: var(--accent-emerald);
  font-weight: 600;
}

/* Date and Time Column (Date on top, Time below) */
.table-datetime-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.25;
}

.table-date-txt {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
}

.table-time-txt {
  font-size: 0.73rem;
  color: var(--text-subtle);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

html.light .table-date-txt {
  color: #0f172a;
}

html.light .table-history-codes .history-code-row {
  background: #f8fafc;
  border-color: #e2e8f0;
}

html.light .table-history-codes .history-code-row:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

html.light .table-history-codes .history-code-row.cid-code-row {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.2);
}

html.light .table-history-codes .history-code-row.cid-code-row:hover {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.35);
}

html.light .code-dashed-block.iid-dashed-code {
  color: #0f172a;
  background: #f1f5f9;
  border-color: #cbd5e1;
}

html.light .code-dashed-block.iid-dashed-code:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

html.light .code-dashed-block.cid-dashed-code {
  color: #047857;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.28);
}

html.light .code-dashed-block.cid-dashed-code:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.45);
}

@media (max-width: 992px) {
  .cabinet-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .store-guarantees-bar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-nav {
    display: none;
  }
  .store-heading {
    font-size: 1.8rem;
  }
  .products-grid {
    grid-template-columns: 1fr;
  }
  .product-card {
    aspect-ratio: auto;
    min-height: auto;
  }
}

/* Purchased Keys in User Cabinet & Admin View */
.cabinet-product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cabinet-product-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  background: rgba(0, 120, 212, 0.12);
  color: var(--accent-primary);
}

.cabinet-product-icon-wrap.windows {
  background: rgba(0, 164, 239, 0.15);
  color: #00a4ef;
}

.cabinet-product-icon-wrap.office {
  background: rgba(216, 59, 1, 0.15);
  color: #ea580c;
}

.cabinet-product-title-group {
  display: flex;
  flex-direction: column;
}

.cabinet-product-name-txt {
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.88rem;
}

.cabinet-product-sub-txt {
  font-size: 0.74rem;
  color: var(--text-subtle);
}

.btn-activate-key-fast {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition-fast);
}

.btn-activate-key-fast:hover {
  background: var(--accent-emerald);
  color: #ffffff;
  border-color: var(--accent-emerald);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

html.light .cabinet-product-name-txt {
  color: #0f172a;
}

html.light .cabinet-product-sub-txt {
  color: #64748b;
}

html.light .btn-activate-key-fast {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.3);
}

html.light .btn-activate-key-fast:hover {
  background: #059669;
  color: #ffffff;
}

html.light .tab-count-badge {
  background: rgba(0, 0, 0, 0.08);
  color: #334155;
}

html.light .hist-filter-tab.active .tab-count-badge {
  background: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

html.light .hist-price-badge {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
  color: #065f46;
}

html.light .hist-act-type-tag.phone {
  background: rgba(0, 120, 212, 0.1);
  border-color: rgba(0, 120, 212, 0.22);
  color: #0062a3;
}

html.light .hist-act-type-tag.online {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.22);
  color: #0e7490;
}

/* Yellow / Amber User Profile Pill matching CID activation (Личный кабинет пользователя) */
.history-user-account-pill {
  font-size: 0.76rem;
  color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.1) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.history-user-account-pill i {
  color: #f59e0b !important;
  font-size: 0.74rem;
}

.history-user-account-pill.admin-clickable-user {
  cursor: pointer;
  user-select: none;
}

.history-user-account-pill.admin-clickable-user:hover {
  background: rgba(245, 158, 11, 0.22) !important;
  border-color: rgba(245, 158, 11, 0.6) !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
  transform: translateY(-1px);
}

/* Clickable product title link to open checkout */
.hist-product-title-link {
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(0, 120, 212, 0.4);
  text-underline-offset: 3px;
  transition: all var(--transition-fast);
}

.hist-product-title-link:hover {
  color: #38bdf8;
  text-decoration-color: #38bdf8;
  text-shadow: 0 0 8px rgba(0, 120, 212, 0.35);
}

html.light .history-user-account-pill {
  color: #b45309 !important;
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
}

html.light .history-user-account-pill i {
  color: #b45309 !important;
}

html.light .history-user-account-pill.admin-clickable-user:hover {
  background: rgba(245, 158, 11, 0.22) !important;
  border-color: rgba(245, 158, 11, 0.65) !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

html.light .hist-product-title-link {
  color: #1e293b;
  text-decoration-color: rgba(37, 99, 235, 0.4);
}

html.light .hist-product-title-link:hover {
  color: #2563eb;
  text-decoration-color: #2563eb;
}






/* ==================================================== */
/* DEDICATED PAGE VIEWS SYSTEM & ADDITIONAL REFINEMENTS */
/* ==================================================== */

.page-view {
  display: none !important;
  animation: fadeInPage 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  width: 100%;
}

.page-view.active {
  display: block !important;
}

@keyframes fadeInPage {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Page Headers */
.page-header-banner {
  margin-bottom: 24px;
}

.page-header-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.page-header-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* 6-Digit Email Verification Code Input Group */
.code-digits-group {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
}

.code-digit-input {
  width: 48px;
  height: 58px;
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  background: rgba(15, 23, 42, 0.75);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  color: #38bdf8;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.code-digit-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.4);
  background: rgba(15, 23, 42, 0.95);
  transform: translateY(-2px);
}

/* Custom Table Styling */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table-custom {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table-custom th {
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.6);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}

.table-custom td {
  padding: 14px 16px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.table-custom tr:last-child td {
  border-bottom: none;
}

.table-custom tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Cabinet Info List */
.cabinet-info-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.cabinet-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 8px;
  font-size: 13px;
}

.cabinet-avatar-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(129, 140, 248, 0.2));
  border: 2px solid #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #38bdf8;
  margin: 0 auto 12px;
}

/* Purchased Keys Grid */
.purchased-keys-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.purchased-key-card {
  padding: 18px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.purchased-key-display {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 10px 12px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: #38bdf8;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Empty State Wrap */
.empty-state-wrap .empty-icon {
  font-size: 48px;
  color: var(--text-muted);
  opacity: 0.5;
  margin-bottom: 14px;
}

.empty-state-wrap .empty-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
}

.empty-state-wrap .empty-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 20px;
}

/* Store Toolbar */
.store-toolbar {
  padding: 12px 18px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.store-categories {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Badges */
.badge-role-admin {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-role-user {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}


/* ==========================================================================
   PORTAL REFINEMENTS, AESTHETICS & DEFENSIVE ALIGNMENTS (v3.0)
   ========================================================================== */

/* Main layout container fixes */
.main-content {
  min-height: calc(100vh - 140px);
  padding: 14px 0 20px;
  width: 100%;
}

.app-container {
  width: 100%;
}

.hero-subheading {
  font-size: 0.98rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Button glow & icon alignments */
.btn-glow {
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.28) !important;
  transition: all var(--transition-fast, 0.2s);
}

.btn-glow:hover {
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.42) !important;
  transform: translateY(-1px);
}

html.light .btn-glow {
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.22) !important;
}

html.light .btn-glow:hover {
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35) !important;
}

.btn-spinner, .btn-icon, .btn-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
  font-weight: 700;
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent-primary, #2563eb);
  cursor: pointer;
  padding: 4px 8px;
  text-decoration: underline;
  font-size: 0.9rem;
}

/* Defensive full-width input guarantees */
.main-input, .product-key-input, .form-control {
  width: 100% !important;
  box-sizing: border-box !important;
}

.input-wrapper, .key-input-wrapper, .input-with-icon {
  position: relative !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
}

/* Guarantee card title and description always stack vertically */
.card-title-group > div {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.card-title {
  margin: 0 !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: var(--text-main) !important;
}

.card-desc {
  margin: 0 !important;
  font-size: 0.9rem !important;
  color: var(--text-muted) !important;
  line-height: 1.4 !important;
}

/* Key action row styling */
.key-action-row, .key-actions-row {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}

/* Card spacing */
.key-card, .input-card, .result-card {
  margin-bottom: 28px;
}

/* History enhancements */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-period-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Dropzone styling */
.dropzone-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dropzone-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Footer layout */
.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}

.footer-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--text-primary);
}

/* Tool button inside input styling */
.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm, 6px);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--transition-fast, 0.2s);
}

.tool-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

/* Product features list in store */
.product-features-list {
  list-style: none;
  padding: 0;
  margin: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-features-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.product-features-list li::before {
  content: '✓';
  color: #10b981;
  font-weight: 800;
}


.add-keys-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.admin-tab-content {
  margin-top: 24px;
}
.brand-info {
  display: flex;
  flex-direction: column;
}
.package-card-body {
  padding: 20px;
}
.step-node.pending {
  opacity: 0.45;
}


.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-md, 8px);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast, 0.2s);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* ==========================================================================
   Admin SMTP Settings Tab (Integrated Full-Width View)
   ========================================================================== */
.smtp-full-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.smtp-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  width: 100%;
}

.smtp-form-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md, 10px);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

html.light .smtp-form-panel {
  background: rgba(0, 0, 0, 0.02);
}

.smtp-panel-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

html.light .smtp-panel-title {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

.smtp-panel-title i {
  color: var(--accent-primary);
}

.settings-group-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.settings-hint {
  font-size: 0.74rem;
  color: var(--text-subtle);
  margin-top: 4px;
  display: block;
}

.smtp-actions-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md, 10px);
  flex-wrap: wrap;
  margin-top: 4px;
}

html.light .smtp-actions-bar {
  background: rgba(0, 0, 0, 0.02);
}

.smtp-status-note {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 768px) {
  .smtp-actions-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .smtp-status-note {
    margin-left: 0;
  }
}

.product-spec-row .spec-v.act-highlight,
.product-spec-row .spec-v.online-act {
  color: #10b981;
  font-weight: 700;
}

/* ==========================================================================
   MOBILE-FIRST ULTRA-RESPONSIVE ADAPTATION (Smartphones & Tablets)
   ========================================================================== */

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
}

.mobile-nav-link.is-hidden,
.mobile-nav-link[style*="display: none"] {
  display: none !important;
}

@media (max-width: 640px) {
  /* Safe spacing for bottom navigation */
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 12px)) !important;
  }

  .site-footer {
    padding-bottom: calc(20px + 64px) !important;
    margin-top: 16px !important;
  }

  .container, .app-container {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  /* Fixed Bottom Nav Bar */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1500 !important;
    background: rgba(10, 15, 29, 0.94) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5) !important;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 8px)) !important;
    justify-content: space-around !important;
    align-items: center !important;
  }

  .mobile-nav-link {
    display: flex;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    color: var(--text-muted) !important;
    text-decoration: none !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    padding: 6px 10px !important;
    border-radius: 12px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    min-width: 58px !important;
    position: relative !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .mobile-nav-link.is-hidden,
  .mobile-nav-link[style*="display: none"] {
    display: none !important;
  }

  .mobile-nav-link i {
    font-size: 1.18rem !important;
    transition: transform 0.2s ease, color 0.2s ease !important;
  }

  .mobile-nav-link:active {
    transform: scale(0.92) !important;
  }

  .mobile-nav-link.active {
    color: #ffffff !important;
    background: rgba(0, 120, 212, 0.16) !important;
    border: 1px solid rgba(0, 120, 212, 0.32) !important;
    box-shadow: 0 0 16px rgba(0, 120, 212, 0.28) !important;
  }

  .mobile-nav-link.active i {
    color: #38bdf8 !important;
    transform: translateY(-1px) !important;
  }

  /* Light Theme Bottom Nav (Calm, Soft, Refined) */
  html.light .mobile-bottom-nav {
    background: rgba(255, 255, 255, 0.94) !important;
    border-top: 1px solid #e2e8f0 !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05) !important;
  }

  html.light .mobile-nav-link {
    color: #64748b !important;
  }

  html.light .mobile-nav-link.active {
    color: #2563eb !important;
    background: rgba(37, 99, 235, 0.08) !important;
    border: 1px solid rgba(37, 99, 235, 0.2) !important;
    box-shadow: none !important;
  }

  html.light .mobile-nav-link.active i {
    color: #2563eb !important;
  }

  /* Header on Mobile */
  .site-header {
    padding: 10px 0 !important;
  }

  .brand-title {
    font-size: 1.25rem !important;
    white-space: nowrap !important;
  }

  .brand-logo {
    width: 34px !important;
    height: 34px !important;
    font-size: 1.05rem !important;
  }

  .user-profile-pill {
    padding: 4px 8px 4px 5px !important;
    gap: 6px !important;
  }

  .user-pill-email {
    display: none !important;
  }

  .header-auth-btn span {
    font-size: 0.82rem !important;
  }

  /* Hero Section */
  .hero-section {
    padding: 10px 0 0 !important;
    margin-bottom: 14px !important;
  }

  .hero-heading {
    font-size: clamp(1.22rem, 5vw, 1.5rem) !important;
    line-height: 1.25 !important;
    margin-bottom: 6px !important;
    white-space: nowrap !important;
  }

  .hero-subheading {
    font-size: clamp(0.72rem, 3.1vw, 0.8rem) !important;
    line-height: 1.45 !important;
    padding: 0 4px !important;
    max-width: 100% !important;
  }

  .hero-subtitle {
    font-size: 0.88rem !important;
    padding: 0 10px !important;
  }

  /* Stepper Bar (Horizontal & Sleek on Mobile) */
  .stepper-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 6px 10px !important;
    margin: 10px auto 14px !important;
    width: 100% !important;
    border-radius: var(--radius-lg, 12px) !important;
    gap: 4px !important;
  }

  .stepper-step {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 5px !important;
    flex: 1 !important;
    justify-content: center !important;
  }

  .stepper-circle {
    width: 25px !important;
    height: 25px !important;
    min-width: 25px !important;
    font-size: 0.75rem !important;
  }

  .stepper-info {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .stepper-num {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
  }

  .stepper-text {
    display: none !important;
  }

  .stepper-divider {
    display: block !important;
    flex: 1 !important;
    height: 2px !important;
    min-width: 6px !important;
    margin: 0 3px !important;
    background: rgba(255, 255, 255, 0.1) !important;
  }

  /* Cards & Inputs on Mobile (Clean, compact, nicely contained) */
  .card, .glass-card {
    border-radius: 14px !important;
    margin-bottom: 12px !important;
  }

  .card-header {
    padding: 10px 14px !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  .card-icon {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    font-size: 0.88rem !important;
    border-radius: 9px !important;
  }

  .card-title {
    font-size: 0.94rem !important;
  }

  .card-desc {
    font-size: 0.76rem !important;
    line-height: 1.3 !important;
  }

  .key-counter-badge {
    font-size: 0.72rem !important;
    padding: 2px 7px !important;
    white-space: nowrap !important;
  }

  .card-body {
    padding: 12px 14px !important;
  }

  .main-input {
    padding: 10px 76px 10px 14px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    letter-spacing: 0.01em !important;
    min-height: 42px !important;
  }

  .main-input::placeholder {
    font-size: 12.2px !important;
  }

  #iidInput.main-input,
  #productKeyInput.main-input {
    padding-left: 14px !important;
    padding-right: 82px !important;
    font-size: 12.2px !important;
    letter-spacing: 0.01em !important;
  }

  #iidInput.main-input::placeholder,
  #productKeyInput.main-input::placeholder {
    font-size: 11.5px !important;
    letter-spacing: normal !important;
  }

  .input-wrapper .input-icon {
    left: 14px !important;
    font-size: 0.98rem !important;
  }

  .input-wrapper .input-icon ~ .main-input,
  #loginEmailInput,
  #loginPasswordInput,
  #regEmailInput,
  #regPasswordInput,
  #regPasswordRepeatInput,
  #checkoutBuyerEmail,
  #historySearch {
    padding-left: 44px !important;
    padding-right: 14px !important;
    font-family: var(--font-sans) !important;
    letter-spacing: normal !important;
  }

  .input-wrapper .input-icon ~ .main-input::placeholder,
  #loginEmailInput::placeholder,
  #loginPasswordInput::placeholder,
  #regEmailInput::placeholder,
  #regPasswordInput::placeholder,
  #regPasswordRepeatInput::placeholder,
  #checkoutBuyerEmail::placeholder,
  #historySearch::placeholder {
    font-family: var(--font-sans) !important;
    letter-spacing: normal !important;
  }

  .input-tools {
    right: 6px !important;
    gap: 4px !important;
  }

  .tool-btn {
    padding: 6px 9px !important;
    border-radius: 7px !important;
    font-size: 0.8rem !important;
  }

  .tool-btn span {
    display: none !important;
  }

  .format-feedback {
    font-size: 0.75rem !important;
    margin-top: 6px !important;
    line-height: 1.3 !important;
  }

  .key-action-row, .action-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    margin-top: 10px !important;
  }

  .key-action-row > div, .action-row > div {
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .key-action-row .btn, .action-row .btn, .main-submit-btn, #payProductBtn, #checkoutBtn {
    min-height: 40px !important;
    height: 40px !important;
    font-size: 0.88rem !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 6px 14px !important;
  }

  .key-help-hint {
    font-size: 0.76rem !important;
    line-height: 1.4 !important;
    margin-top: 8px !important;
    display: block !important;
    text-align: center !important;
    color: var(--text-muted) !important;
  }

  .key-help-hint i {
    display: inline !important;
    margin-right: 4px !important;
    vertical-align: -1px !important;
  }

  .key-help-link {
    display: inline !important;
  }

  /* Step 1 Account Balance Banner on Mobile */
  .verified-key-banner {
    margin-bottom: 12px !important;
    border-radius: 14px !important;
  }

  .verified-banner-content {
    padding: 12px 14px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .verified-details {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
  }

  .verified-title-row {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-bottom: 1px !important;
  }

  .verified-tag {
    font-size: 0.74rem !important;
    padding: 2px 8px !important;
  }

  .verified-user-email {
    font-size: 0.74rem !important;
    font-weight: 600 !important;
  }

  .verified-key-code {
    font-size: 0.96rem !important;
    line-height: 1.25 !important;
    margin: 1px 0 !important;
  }

  .verified-tokens-num {
    font-weight: 700 !important;
  }

  .verified-meta {
    font-size: 0.75rem !important;
    line-height: 1.3 !important;
  }

  .verified-actions-col {
    width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin-top: 4px !important;
  }

  .verified-actions-col .btn {
    width: 100% !important;
    min-height: 38px !important;
    height: 38px !important;
    padding: 6px 8px !important;
    font-size: 0.8rem !important;
    justify-content: center !important;
    white-space: nowrap !important;
  }

  /* Step 3: Confirmation ID Grid */
  /* Step 3: Confirmation ID Grid - 3 in a row! */
  .blocks-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }

  .block-card, .block-box {
    padding: 8px 4px !important;
    border-radius: 10px !important;
  }

  .block-letter {
    font-size: 0.72rem !important;
    width: 20px !important;
    height: 20px !important;
    margin: 0 auto 2px !important;
  }

  .block-value, .block-digits {
    font-size: 0.88rem !important;
    letter-spacing: 0.02em !important;
    font-weight: 700 !important;
    padding: 0 !important;
  }

  /* Toast Notification Placement on Mobile */
  .toast-container {
    position: fixed !important;
    bottom: calc(76px + env(safe-area-inset-bottom, 10px)) !important;
    left: 14px !important;
    right: 14px !important;
    margin: 0 auto !important;
    max-width: 400px !important;
    z-index: 2500 !important;
    align-items: stretch !important;
  }

  .toast {
    min-width: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 16px !important;
    font-size: 0.88rem !important;
    box-sizing: border-box !important;
  }

  /* Modals on Mobile: Perfectly Contained & Responsive (Nothing overflows) */
  .modal-overlay {
    padding: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .modal-window,
  #productCheckoutModal .modal-window,
  #buyModal .modal-window,
  #adminUserDetailsModal .modal-window,
  .modal-checkout-sm,
  .modal-lg {
    width: 95vw !important;
    max-width: 440px !important;
    max-height: 88vh !important;
    margin: auto !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
  }

  .modal-header {
    padding: 14px 16px !important;
    flex-shrink: 0 !important;
  }

  .modal-window .modal-body {
    padding: 14px 16px !important;
    max-height: calc(88vh - 120px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .modal-footer {
    padding: 12px 16px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    gap: 8px !important;
  }

  .modal-footer .btn {
    width: 100% !important;
    min-height: 44px !important;
  }

  /* Checkout Product Modal Specifics */
  #productCheckoutModal .checkout-product-card {
    flex-wrap: wrap !important;
    padding: 12px 14px !important;
    gap: 10px !important;
  }

  #productCheckoutModal .checkout-product-details {
    flex: 1 1 calc(100% - 60px) !important;
    min-width: 0 !important;
  }

  #productCheckoutModal .checkout-product-price-box {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-top: 1px solid var(--border-color) !important;
    padding-top: 8px !important;
    margin-top: 4px !important;
    text-align: left !important;
  }

  /* Buy Tokens Modal Specifics */
  #buyModal .pricing-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  #buyModal .package-card {
    padding: 10px !important;
  }

  #buyModal .package-price {
    font-size: 1.25rem !important;
  }

  #buyModal .package-unit {
    font-size: 0.72rem !important;
  }

  #buyModal .payment-methods-row {
    flex-direction: column !important;
    gap: 8px !important;
  }

  #buyModal .pay-method-card {
    min-width: 0 !important;
    width: 100% !important;
    padding: 10px 14px !important;
    justify-content: flex-start !important;
  }

  .audm-stats-grid, #audmStatsGrid, .admin-user-stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  /* Store Products Grid on Mobile: 2 items per row! */
  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .product-card {
    padding: 10px 8px !important;
    border-radius: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .product-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    margin-bottom: 6px !important;
    min-height: 0 !important;
  }

  .product-icon-wrap {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    border-radius: 7px !important;
    font-size: 0.92rem !important;
  }

  .product-title-group {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .product-title {
    font-size: 0.78rem !important;
    line-height: 1.2 !important;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .product-subtitle {
    font-size: 0.65rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-top: 1px !important;
  }

  .product-specs-compact {
    padding: 4px 6px !important;
    gap: 2px !important;
    margin: 0 0 6px 0 !important;
    border-radius: 6px !important;
  }

  .product-spec-row {
    font-size: 0.68rem !important;
    line-height: 1.25 !important;
    gap: 3px !important;
  }

  .product-spec-row .spec-k {
    font-size: 0.64rem !important;
  }

  .product-spec-row .spec-v {
    font-size: 0.64rem !important;
  }

  .product-pricing-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 5px !important;
    padding-top: 6px !important;
    margin-top: auto !important;
  }

  .product-pricing-row > div {
    display: flex !important;
    align-items: baseline !important;
    justify-content: center !important;
    gap: 5px !important;
  }

  .product-curr-price {
    font-size: 0.98rem !important;
    line-height: 1 !important;
  }

  .product-old-price {
    font-size: 0.65rem !important;
  }

  .product-card .btn-buy-product {
    width: 100% !important;
    padding: 5px 8px !important;
    font-size: 0.76rem !important;
    min-height: 32px !important;
    height: 32px !important;
    border-radius: 7px !important;
    justify-content: center !important;
    gap: 4px !important;
  }

  /* Cabinet Page on Mobile: Flat & Clean (No Window Box, snug cards) */
  #pageCabinet .card.glass-card,
  #pageCabinet .card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 12px !important;
  }

  #pageCabinet .card-header {
    background: transparent !important;
    border-bottom: none !important;
    padding: 2px 0 10px 0 !important;
  }

  #pageCabinet .card-body {
    padding: 0 !important;
    max-height: none !important;
    overflow-y: visible !important;
  }

  #pageCabinet .cabinet-profile-card {
    padding: 12px 14px !important;
    border-radius: 14px !important;
    margin-bottom: 10px !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 8px !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-sm) !important;
  }

  #pageCabinet .cabinet-avatar-lg {
    margin: 0 auto !important;
    width: 48px !important;
    height: 48px !important;
    font-size: 1.25rem !important;
  }

  #pageCabinet .cabinet-user-info {
    width: 100% !important;
  }

  #pageCabinet .cabinet-user-email {
    font-size: 0.95rem !important;
  }

  #pageCabinet .cabinet-meta {
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-top: 4px !important;
  }

  #pageCabinet .cabinet-role-badge {
    font-size: 0.72rem !important;
    padding: 2px 8px !important;
  }

  #pageCabinet #cabinetLogoutBtn {
    width: 100% !important;
    min-height: 38px !important;
    height: 38px !important;
    font-size: 0.82rem !important;
    padding: 6px 12px !important;
    justify-content: center !important;
  }

  #pageCabinet .cabinet-stats-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    margin-bottom: 10px !important;
  }

  #pageCabinet .stat-box {
    padding: 8px 6px !important;
    border-radius: 12px !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 3px !important;
  }

  #pageCabinet .stat-box-icon {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    font-size: 0.8rem !important;
    margin: 0 auto !important;
    border-radius: 7px !important;
  }

  #pageCabinet .stat-box-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
  }

  #pageCabinet .stat-box-label {
    font-size: 0.65rem !important;
    white-space: nowrap !important;
  }

  #pageCabinet .stat-box-val {
    font-size: 1rem !important;
    line-height: 1.1 !important;
  }

  #pageCabinet #cabinetTopupBtn {
    padding: 2px 6px !important;
    font-size: 0.68rem !important;
    min-height: 22px !important;
    height: 22px !important;
    border-radius: 6px !important;
    width: 100% !important;
    justify-content: center !important;
    margin-top: 2px !important;
  }

  /* Cabinet History Box (Tightly hugs text, no giant whitespace) */
  #pageCabinet .cabinet-history-link-box {
    padding: 12px 14px !important;
    border-radius: 14px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    height: auto !important;
    min-height: 0 !important;
    flex: none !important;
    width: 100% !important;
    margin-top: 10px !important;
    box-sizing: border-box !important;
  }

  #pageCabinet .cabinet-history-link-content {
    flex: none !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
  }

  #pageCabinet .cabinet-history-link-icon {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    flex-shrink: 0 !important;
  }

  #pageCabinet .cabinet-history-link-text {
    flex: 1 !important;
    min-width: 0 !important;
  }

  #pageCabinet .cabinet-history-link-text h4 {
    font-size: 0.86rem !important;
    margin-bottom: 2px !important;
    line-height: 1.25 !important;
  }

  #pageCabinet .cabinet-history-link-text p {
    font-size: 0.74rem !important;
    line-height: 1.3 !important;
    color: var(--text-muted) !important;
  }

  #pageCabinet #cabinetOpenHistoryBtn,
  #pageCabinet .cabinet-history-link-box .btn {
    width: 100% !important;
    min-height: 36px !important;
    height: 36px !important;
    padding: 6px 12px !important;
    font-size: 0.82rem !important;
    justify-content: center !important;
    border-radius: 8px !important;
  }

  /* History Page on Mobile: 3 stats blocks in 1 row */
  #pageHistory .card-body {
    padding: 12px 10px !important;
    max-height: none !important;
    overflow-y: visible !important;
  }

  .history-analytics-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    margin-bottom: 12px !important;
  }

  .history-graph-card {
    padding: 8px 6px !important;
    border-radius: 10px !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  .hgc-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
    margin-bottom: 4px !important;
  }

  .hgc-title {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
  }

  .hgc-title i {
    font-size: 0.7rem !important;
  }

  .hgc-badge {
    font-size: 0.58rem !important;
    font-weight: 600 !important;
    padding: 1px 4px !important;
    border-radius: 4px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }

  .hgc-stats {
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;
    margin-bottom: 4px !important;
  }

  .hgc-stat-item {
    font-size: 0.66rem !important;
    gap: 3px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .hgc-dot {
    width: 5px !important;
    height: 5px !important;
  }

  .hgc-label {
    font-size: 0.62rem !important;
  }

  .hgc-val {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
  }

  .hgc-chart {
    height: 4px !important;
    border-radius: 2px !important;
    margin-top: 2px !important;
  }

  .history-search-row {
    flex-direction: column !important;
    gap: 10px !important;
  }

  .history-search-box {
    width: 100% !important;
  }

  .history-actions-group {
    width: 100% !important;
    display: flex !important;
    gap: 8px !important;
  }

  .history-actions-group .btn {
    flex: 1 !important;
    justify-content: center !important;
  }

  .history-filter-chips {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 8px !important;
    padding-bottom: 6px !important;
    scrollbar-width: none !important;
  }

  .history-filter-chips::-webkit-scrollbar {
    display: none !important;
  }

  .hist-card-inner {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .hist-header-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }

  .hist-user-meta {
    margin-left: 0 !important;
  }

  .hist-actions-column {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    align-items: stretch !important;
  }

  .hist-actions-column .btn {
    width: 100% !important;
    flex: none !important;
    min-width: 0 !important;
    min-height: 42px !important;
    padding: 8px 14px !important;
    font-size: 0.85rem !important;
    white-space: nowrap !important;
    justify-content: center !important;
  }

  /* Seller Panel on Mobile */
  .seller-stats-grid, .admin-stats-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .seller-tabs, .admin-tabs {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 8px !important;
    padding-bottom: 6px !important;
    scrollbar-width: none !important;
  }

  .seller-tabs::-webkit-scrollbar, .admin-tabs::-webkit-scrollbar {
    display: none !important;
  }

  .table-wrapper, .admin-table-container, .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 12px !important;
  }
}

/* ==========================================================================
   New Layout Enhancements: Activation, History Date Filter, Tokens Modal
   ========================================================================== */

/* 1. ACTIVATION SECTION */
.activation-action-grid {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 16px;
  align-items: stretch;
  margin-top: 14px;
}

.compact-dropzone {
  margin-top: 0 !important;
  padding: 12px 18px !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 94px;
  border-radius: var(--radius-md);
  border: 1.5px dashed rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.02);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.compact-dropzone:hover {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.06);
}

.compact-dropzone .dropzone-content {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.compact-dropzone .dropzone-icon {
  font-size: 1.6rem !important;
  color: #2563eb;
  margin-bottom: 0 !important;
  flex-shrink: 0;
}

.compact-dropzone .dropzone-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.compact-dropzone .dropzone-main {
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  color: var(--text-main);
  margin-bottom: 0 !important;
  line-height: 1.35;
}

.compact-dropzone .dropzone-sub {
  font-size: 0.74rem !important;
  color: var(--text-subtle);
  margin-bottom: 0 !important;
}

.activation-cta-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.activation-cta-col .timer-pill {
  width: 100%;
  justify-content: center;
  padding: 6px 12px;
  font-size: 0.85rem;
  min-height: 38px;
  height: 38px;
  margin: 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
}

.activation-cta-col .timer-pill strong {
  color: #38bdf8;
  font-family: var(--font-mono);
}

.activation-cta-col #getCidBtn {
  width: 100%;
  min-height: 46px;
  height: 46px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
}

@media (max-width: 768px) {
  .activation-action-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .compact-dropzone {
    padding: 14px 12px !important;
  }
  .compact-dropzone .dropzone-content {
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }
  .activation-cta-col .timer-pill {
    display: none !important; /* User requested removing timer on mobile */
  }
  .activation-cta-col #getCidBtn {
    width: 100% !important;
    min-height: 48px !important;
  }
}

/* 2. HISTORY PAGE ENHANCEMENTS */
#pageHistory {
  max-width: 820px !important;
  margin: 0 auto !important;
  width: 100% !important;
}

.history-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.history-search-wrap {
  flex: 1 1 240px;
  max-width: 100%;
}

.history-filter-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.history-filter-wrap #histDateFilterBtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.history-filter-wrap #histDateFilterBtn.has-filter {
  background: rgba(37, 99, 235, 0.15) !important;
  border-color: #2563eb !important;
  color: #38bdf8 !important;
}

.history-filter-wrap #histResetDateBtn {
  height: 34px;
  padding: 0 10px;
}

/* History Date Picker Modal */
.modal-datepicker {
  max-width: 340px !important;
  width: 92vw !important;
  border-radius: 16px !important;
}

.hist-calendar-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

.hist-days-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-subtle);
  margin-bottom: 6px;
}

.hist-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.hist-day-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
}

.hist-day-cell:hover:not(.disabled) {
  background: rgba(37, 99, 235, 0.16);
  border-color: #2563eb;
  color: #fff;
}

.hist-day-cell.active {
  background: #2563eb !important;
  color: #fff !important;
  font-weight: 700 !important;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.5) !important;
}

.hist-day-cell.is-today {
  border-color: rgba(56, 189, 248, 0.6);
  font-weight: 700;
}

.hist-day-cell.disabled {
  opacity: 0.22;
  cursor: not-allowed;
  pointer-events: none;
}

.hist-day-cell.empty-pad {
  pointer-events: none;
  visibility: hidden;
}

html.light .modal-datepicker {
  background: #ffffff !important;
}

html.light .hist-day-cell {
  color: #0f172a;
}

html.light .hist-day-cell:hover:not(.disabled) {
  background: #eff6ff;
  border-color: #2563eb;
}

/* 3. TOKEN PACKAGES MODAL (2x3 desktop, 3x2 mobile) */
.modal-tokens-compact {
  max-width: 580px !important;
  width: 94vw !important;
  max-height: 95vh !important;
}

#buyModal .modal-tokens-compact .modal-header {
  padding: 14px 20px !important;
}

#buyModal .modal-tokens-compact .modal-body {
  padding: 14px 20px 18px !important;
}

#buyModal .modal-tokens-compact .modal-desc {
  margin-bottom: 12px !important;
  font-size: 0.85rem !important;
}

.tokens-grid-6 {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important; /* 2 rows of 3 on Desktop */
  gap: 10px !important;
  margin-bottom: 14px !important;
}

.tokens-grid-6 .package-card {
  padding: 10px 8px !important;
  text-align: center;
  border-radius: 12px !important;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid var(--border-color);
  min-height: 82px;
}

.tokens-grid-6 .package-card:hover {
  background: rgba(37, 99, 235, 0.06);
  border-color: #2563eb;
}

.tokens-grid-6 .package-card.selected,
.tokens-grid-6 .package-card:has(input:checked) {
  background: rgba(37, 99, 235, 0.12) !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 0 1px #2563eb, 0 6px 18px rgba(37, 99, 235, 0.18) !important;
}

.tokens-grid-6 .package-name {
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  margin-bottom: 4px !important;
  color: var(--text-main);
}

.tokens-grid-6 .package-price {
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  color: #38bdf8 !important;
  margin-bottom: 2px !important;
}

html.light .tokens-grid-6 .package-price {
  color: #2563eb !important;
}

.tokens-grid-6 .package-unit {
  font-size: 0.68rem !important;
  color: var(--text-subtle) !important;
}

@media (max-width: 640px) {
  #buyModal .modal-tokens-compact {
    max-width: 440px !important;
  }
  .tokens-grid-6 {
    grid-template-columns: repeat(2, 1fr) !important; /* 3 rows of 2 on Smartphone */
    gap: 8px !important;
  }
  .tokens-grid-6 .package-card {
    padding: 10px 6px !important;
    min-height: 84px !important;
  }
  .tokens-grid-6 .package-name {
    font-size: 0.82rem !important;
  }
  .tokens-grid-6 .package-price {
    font-size: 1.05rem !important;
  }
  .tokens-grid-6 .package-unit {
    font-size: 0.64rem !important;
  }
}

