:root {
  --bg-panel: rgba(255, 255, 255, 0.94);
  --bg-panel-solid: #ffffff;
  --bg-card: #ffffff;
  --bg-card-subtle: #f8fafc;
  --border-subtle: #e2e8f0;
  --border-glow: rgba(14, 165, 233, 0.45);
  --accent-blue: #0284c7;
  --accent-cyan: #0ea5e9;
  --accent-green: #16a34a;
  --accent-emerald: #10b981;
  --accent-gold: #d97706;
  --accent-purple: #9333ea;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --danger: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-drag: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(14, 165, 233, 0.35) transparent;
}

/* Custom Sleek Wii-Era Glass & Cyan Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 999px;
  margin: 3px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7dd3fc, #0ea5e9);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 1px 4px rgba(14, 165, 233, 0.25);
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #38bdf8, #0284c7);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* Vector UI Icons */
.ui-icon {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.15em;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  transition: transform 0.15s ease, stroke 0.15s ease;
}

.ui-icon-sm {
  width: 0.9em;
  height: 0.9em;
  vertical-align: -0.1em;
}

.ui-icon-lg {
  width: 1.4em;
  height: 1.4em;
  vertical-align: -0.22em;
}

.ui-icon-xl {
  width: 1.8em;
  height: 1.8em;
  vertical-align: -0.25em;
}

.ui-icon-spin {
  animation: ui-icon-spin 2s linear infinite;
}

@keyframes ui-icon-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

html, body {
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  position: fixed !important;
  inset: 0 !important;
  background: radial-gradient(circle at 50% 30%, #1e293b 0%, #0f172a 60%, #050811 100%) fixed !important;
  overflow: hidden !important;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-main);
  font-size: 14.5px;
}

#app-container {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  min-width: 566px;
  min-height: 546px;
  position: relative;
  background: transparent;
  justify-content: flex-start;
}

/* ============================================================
   MAIN VIEWPORT (Clean, Uncluttered 3D Diorama at Top)
   ============================================================ */
#viewport-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 240px;
}

#canvas-container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  cursor: grab;
}

#canvas-container:active {
  cursor: grabbing;
}

/* Floating Camera Reset Button (Wii Pill Style) */
.cam-reset-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
  color: #0f172a;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 800;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  z-index: 25;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cam-reset-btn:hover {
  background: #ffffff;
  color: #0284c7;
  border-color: #38bdf8;
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.25);
}

.cam-reset-btn:active {
  transform: translateY(0) scale(0.98);
}

.cam-reset-btn.hidden {
  display: none !important;
}

/* Pest Warning Banner (Wii Alert Capsule) */
.pest-banner {
  position: absolute;
  top: 62px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid #f87171;
  padding: 10px 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.2);
  z-index: 25;
  animation: bounceIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pest-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pest-icon {
  font-size: 24px;
  animation: wobble 1s infinite alternate;
}

.pest-text {
  display: flex;
  flex-direction: column;
  font-size: 12.5px;
  color: #7f1d1d;
}

.pest-text strong {
  font-size: 13.5px;
  color: #991b1b;
}

/* Harvest Banner (Wii Golden Harvest Capsule) */
.harvest-banner {
  position: absolute;
  top: 62px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid #f59e0b;
  padding: 10px 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.25);
  z-index: 25;
  animation: bounceIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.harvest-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 13.5px;
  color: #78350f;
}

/* Medium Depleted Banner (Soil & Clay Balls) */
.medium-banner {
  position: absolute;
  top: 62px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  background: linear-gradient(135deg, #fefce8, #fef9c3);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid #eab308;
  padding: 10px 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 24px rgba(234, 179, 8, 0.25);
  z-index: 25;
  animation: bounceIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.medium-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.medium-icon {
  font-size: 24px;
}

.medium-text {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: #713f12;
}

.medium-text strong {
  font-size: 13px;
  color: #854d0e;
}

.btn-action {
  background: linear-gradient(180deg, #ffffff, #f1f5f9);
  color: #0f172a;
  border: 1.5px solid #cbd5e1;
  font-weight: 800;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-action:hover {
  transform: scale(1.06);
  border-color: #0ea5e9;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}

/* ============================================================
   UNIFIED BOTTOM CONSOLE & DOCK (Wii Clean Panel Style)
   ============================================================ */
.bottom-console {
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 24px 24px 16px 16px;
  margin: 0 8px 8px 8px;
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
  z-index: 30;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.bottom-console.collapsed {
  border-radius: 18px;
  margin-bottom: 8px;
}

.bottom-console.collapsed .console-body,
.bottom-console.collapsed .console-nav {
  display: none !important;
}

.bottom-console.collapsed .console-header {
  border-bottom: none;
}

/* Row 1: Header & Drag Zone */
.console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0;
  -webkit-app-region: drag;
  cursor: grab;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  -webkit-app-region: drag;
  user-select: none;
}

.leaf-icon {
  font-size: 18px;
  filter: drop-shadow(0 1px 3px rgba(34, 197, 94, 0.4));
  pointer-events: none;
}

.app-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, #0284c7, #16a34a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  pointer-events: none;
}

.level-badge {
  background: linear-gradient(180deg, #34d399, #10b981);
  border: 1px solid #059669;
  color: #ffffff !important;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  text-align: center;
}

.stats-group {
  display: flex;
  align-items: center;
  gap: 8px;
  -webkit-app-region: drag;
  user-select: none;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  background: #ffffff;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13.5px;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  color: #0f172a;
  pointer-events: none;
}

.cash-pill {
  color: #b45309;
}

.currency-symbol {
  color: #d97706;
}

.win-controls {
  display: flex;
  gap: 6px;
  -webkit-app-region: no-drag;
}

.icon-btn {
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  color: #475569;
  cursor: pointer;
  font-size: 12px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  -webkit-app-region: no-drag;
}

.icon-btn:hover {
  background: #0ea5e9;
  color: #ffffff;
  border-color: #0284c7;
  transform: scale(1.08);
}

#btn-close:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #dc2626;
}

/* Row 2: Console Body */
.console-body {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  -webkit-app-region: no-drag;
}

.plant-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.plant-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.plant-strain-name {
  font-weight: 800;
  font-size: 16.5px;
  color: #0f172a;
  letter-spacing: -0.2px;
}

.plant-stage-tag {
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #38bdf8, #0ea5e9);
  color: #ffffff !important;
  border: 1px solid #0284c7;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Pot Selector Horizontal Pills (Full Width, buttons grow) */
.pot-selector {
  display: flex;
  gap: 8px;
  width: 100%;
}

.pot-tab-btn {
  flex: 1 1 0;
  min-width: 0;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  color: #475569;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pot-tab-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: translateY(-1px);
}

.pot-tab-btn.active {
  background: linear-gradient(180deg, #34d399, #10b981) !important;
  border-color: #059669 !important;
  color: #ffffff !important;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.pot-tab-btn.hydro-slot {
  border-color: #bae6fd;
  background: #f0f9ff;
  color: #0284c7;
}

.pot-tab-btn.hydro-slot:hover {
  background: #e0f2fe;
}

.pot-tab-btn.hydro-slot.active {
  background: linear-gradient(180deg, #38bdf8, #0284c7) !important;
  border-color: #0369a1 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.45);
}

.pot-tab-btn.hydro-pending {
  border-color: #38bdf8;
  border-style: dashed;
  background: #f0f9ff;
  color: #0284c7;
}

.pot-tab-btn.hydro-pending:hover {
  background: #e0f2fe;
}

.pot-tab-btn.hydro-pending.active {
  background: linear-gradient(180deg, #38bdf8, #0284c7) !important;
  border-color: #0369a1 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.35);
}

.pot-tab-btn.locked {
  opacity: 0.45;
  filter: grayscale(1);
}

/* Growth Progress Bar */
.growth-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 1px 2px;
}

.growth-icon {
  font-size: 13.5px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.growth-bar {
  flex: 1;
  height: 9px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.growth-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
  transition: width 0.3s ease;
}

.growth-pct {
  font-size: 12px;
  font-weight: 800;
  color: #334155;
  min-width: 40px;
  text-align: right;
}

/* Console Actions Row */
.console-actions-row {
  display: flex;
  gap: 7px;
  align-items: center;
}

.hud-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  border: 1.5px solid #cbd5e1;
  padding: 6px 12px;
  border-radius: 999px;
  color: #0f172a;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 12.5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.hud-btn:hover {
  background: #ffffff;
  border-color: #38bdf8;
  color: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

.hud-btn:active {
  transform: translateY(0);
}

.nute-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  color: #0f172a;
  white-space: nowrap;
}

.nute-btn:hover {
  background: #ffffff;
  border-color: #8b5cf6;
  color: #7c3aed;
  box-shadow: 0 3px 10px rgba(139, 92, 246, 0.2);
  transform: translateY(-1px);
}

.nute-btn:active {
  transform: translateY(0);
}

.nute-btn.active {
  background: linear-gradient(180deg, #ede9fe, #ddd6fe) !important;
  border-color: #c4b5fd !important;
  color: #6d28d9 !important;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
}

/* Water / Moisture Progress Bar (Full Width like Growth Bar) */
.water-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 2px 2px;
  border-radius: 999px;
  transition: all 0.15s ease;
  user-select: none;
}

.water-progress-wrap:hover .water-bar {
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.35);
}

.water-progress-wrap:hover .water-drop-icon {
  transform: scale(1.15);
}

.water-drop-icon {
  font-size: 13.5px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.water-bar {
  flex: 1;
  height: 9px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
}

.water-fill {
  height: 100%;
  background: linear-gradient(90deg, #0ea5e9, #38bdf8);
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
  transition: width 0.3s ease, background 0.3s ease;
}

.water-pct {
  font-size: 12px;
  font-weight: 800;
  color: #0284c7;
  min-width: 40px;
  text-align: right;
  white-space: nowrap;
}

.env-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  cursor: default;
  white-space: nowrap;
  user-select: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.light-status {
  cursor: pointer;
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0284c7;
}

.light-status:hover {
  background: #e0f2fe;
  border-color: #38bdf8;
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 3px 10px rgba(14, 165, 233, 0.2);
}

.light-status.warm-mode {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.pulse-glow {
  animation: pulseGlow 1.2s infinite ease-in-out !important;
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(249, 115, 22, 0.4);
    border-color: #f97316;
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 16px rgba(249, 115, 22, 0.8);
    border-color: #ea580c;
    transform: scale(1.05);
  }
}

/* Row 3: Console Navigation Tabs (Wii Channel Dock) */
.console-nav {
  display: flex;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 7px 10px;
  gap: 6px;
  border-top: 1.5px solid #e2e8f0;
  -webkit-app-region: no-drag;
}

.nav-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  color: #475569;
  padding: 8px 6px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.nav-tab:hover {
  background: #f0f9ff;
  border-color: #7dd3fc;
  color: #0284c7;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(14, 165, 233, 0.18);
}

.nav-tab.active {
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%) !important;
  border-color: #0369a1 !important;
  color: #ffffff !important;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.nav-icon {
  font-size: 16px;
}

.nav-text {
  font-size: 12px;
  font-weight: 700;
}

.nav-badge {
  position: absolute;
  top: -4px;
  right: -2px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
  border: 1.5px solid #ffffff;
}

/* ============================================================
   FLOATING MOVABLE WINDOWS (Orders, Stash, Shop, Breeding, Settings)
   ============================================================ */
.modal-overlay {
  position: absolute;
  width: 480px;
  max-width: calc(100vw - 20px);
  height: 490px;
  max-height: calc(100vh - 205px);
  min-width: 360px;
  min-height: 260px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1.5px solid #cbd5e1;
  border-radius: 18px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18), 0 3px 10px rgba(0, 0, 0, 0.08);
  animation: floatPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-app-region: no-drag;
  color: #0f172a;
  resize: both;
}

@keyframes floatPopIn {
  0% { transform: scale(0.96); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-card {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px 9px 14px;
  margin-bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  border-bottom: 1.5px solid #e2e8f0;
  flex-shrink: 0;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.modal-header.dragging {
  cursor: grabbing !important;
  background: #f8fafc !important;
}

.modal-header h3 {
  font-size: 14.5px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-header h3::before {
  content: '⠿';
  font-size: 13px;
  color: #94a3b8;
  opacity: 0.8;
}

.modal-close {
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  color: #64748b;
  font-size: 12px;
  cursor: pointer;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #dc2626;
  transform: scale(1.08);
}

.modal-sub {
  font-size: 11.5px;
  color: #64748b;
  padding: 8px 14px 4px 14px;
  margin: 0;
  line-height: 1.4;
  flex-shrink: 0;
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  overflow-y: auto;
  padding: 6px 14px 14px 14px;
}

.theme-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px 14px 14px;
}

/* Order Cards (Wii Menu Box Cards) */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}

.order-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.order-card:hover {
  border-color: #7dd3fc;
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.14);
  transform: translateY(-2px);
}

.order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.client-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.client-avatar {
  font-size: 20px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  padding: 4px;
}

.client-avatar-3d {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff, #e2e8f0);
  border: 1.5px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.order-card:hover .client-avatar-3d {
  transform: scale(1.08);
  border-color: #6366f1;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.client-avatar-3d img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  transition: opacity 0.15s ease;
  display: block;
}

.client-avatar-3d canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  border-radius: 50%;
  pointer-events: none;
}

.avatar-emoji-fallback {
  display: none;
}

body.dark-theme .client-avatar-3d {
  background: radial-gradient(circle at 35% 35%, #1e293b, #0f172a);
  border-color: #334155;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.05);
}


.client-name {
  font-weight: 800;
  font-size: 13.5px;
  color: #0f172a;
}

.order-payout {
  font-weight: 800;
  font-size: 14px;
  color: #b45309;
}

.order-quote {
  font-size: 12px;
  font-style: italic;
  color: #64748b;
}

.order-req {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  color: #334155;
}

.btn-fulfill {
  background: linear-gradient(180deg, #34d399, #10b981);
  border: 1px solid #059669;
  color: #ffffff;
  font-weight: 800;
  font-size: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
  transition: all 0.15s ease;
}

.btn-fulfill:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.45);
}

.btn-fulfill:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Stash Grid */
.stash-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.jar-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
  min-width: 0;
}

.jar-card:hover {
  border-color: #38bdf8;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.12);
}

.jar-icon {
  font-size: 26px;
}

.jar-name {
  font-weight: 800;
  font-size: 13.5px;
  color: #0f172a;
}

.jar-grams {
  font-size: 15px;
  font-weight: 800;
  color: #16a34a;
}

.btn-sell-bulk {
  background: linear-gradient(180deg, #fef08a 0%, #facc15 100%) !important;
  border: 1.5px solid #ca8a04 !important;
  color: #0f172a !important;
  font-weight: 800 !important;
}

.btn-sell-bulk span {
  color: #0f172a !important;
}

.btn-sell-bulk .bulk-strike {
  text-decoration: line-through;
  opacity: 0.65;
  color: #475569 !important;
  font-size: 10.5px;
  font-weight: 700;
}

.btn-sell-bulk .bulk-final-price {
  color: #000000 !important;
  font-weight: 900;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.15);
  padding: 1px 7px;
  border-radius: 6px;
}

/* Modal Sticky Headers & Navigation for Stash, Breeding, and Grow Shop */
#modal-shop .modal-card,
#modal-stash .modal-card,
#modal-breeding .modal-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

#modal-shop .modal-header,
#modal-stash .modal-header,
#modal-breeding .modal-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 11px 14px 9px 14px;
  margin-bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  border-bottom: 1.5px solid #e2e8f0;
  flex-shrink: 0;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

#modal-shop .shop-tabs,
.stash-nav-bar,
.breeding-nav-bar {
  position: sticky;
  top: 48px;
  z-index: 29;
  padding: 4px 14px 10px 14px;
  margin-bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1.5px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  flex-shrink: 0;
  display: flex;
  gap: 8px;
}

.stash-scroll-body,
.breeding-scroll-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px 16px 14px;
  scroll-behavior: smooth;
}

/* Shop Subtabs & Cards */
.shop-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.shop-subtab {
  flex: 1;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  color: #475569;
  padding: 7px 5px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  transition: all 0.15s ease;
}

.shop-subtab:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.shop-subtab.active {
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%) !important;
  border-color: #0369a1 !important;
  color: #ffffff !important;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.shop-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px 16px 14px;
  scroll-behavior: smooth;
}

.shop-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.shop-card:hover {
  border-color: #7dd3fc;
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.12);
  transform: translateY(-2px);
}

.shop-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shop-item-icon {
  font-size: 24px;
}

.shop-item-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.shop-item-name {
  font-weight: 800;
  font-size: 13.5px;
  color: #0f172a;
}

.shop-item-desc {
  font-size: 11.5px;
  color: #64748b;
}

.shop-item-price {
  font-weight: 800;
  color: #b45309;
  font-size: 13.5px;
}

.btn-buy {
  background: linear-gradient(180deg, #fef08a 0%, #facc15 100%);
  border: 1.5px solid #ca8a04;
  color: #0f172a !important;
  font-weight: 800;
  font-size: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(202, 138, 4, 0.25);
  transition: all 0.15s ease;
}

.btn-buy:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.45);
}

.btn-buy:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Toast */
.toast {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #34d399, #10b981);
  border: 1.5px solid #059669;
  color: #000000 !important;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35), 0 2px 6px rgba(0, 0, 0, 0.08);
  text-shadow: none;
  z-index: 250;
  animation: slideDownToast 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  max-width: 85%;
  text-align: center;
}

@keyframes slideDownToast {
  0% { transform: translate(-50%, -12px) scale(0.95); opacity: 0; }
  100% { transform: translate(-50%, 0) scale(1); opacity: 1; }
}

.hidden {
  display: none !important;
}

/* Animations */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bounceIn {
  0% { transform: translate(-50%, -8px) scale(0.92); opacity: 0; }
  100% { transform: translate(-50%, 0) scale(1); opacity: 1; }
}

@keyframes wobble {
  0% { transform: rotate(-8deg); }
  100% { transform: rotate(8deg); }
}

/* Weather Badge in HUD */
.weather-badge {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
}
.weather-badge.golden_hour {
  border-color: #fde047 !important;
  background: #fefce8 !important;
  color: #ca8a04 !important;
  box-shadow: 0 2px 8px rgba(234, 179, 8, 0.2);
}
.weather-badge.rain {
  border-color: #bae6fd !important;
  background: #f0f9ff !important;
  color: #0284c7 !important;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.2);
}
.weather-badge.rainbow {
  border-color: #fbcfe8 !important;
  background: linear-gradient(135deg, #fdf2f8, #faf5ff) !important;
  color: #db2777 !important;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.25);
}

/* Radio Button Active Glow */
.radio-btn.active {
  color: #16a34a !important;
  animation: pulseRadio 1.8s infinite alternate ease-in-out;
}
@keyframes pulseRadio {
  0% { transform: scale(1); }
  100% { transform: scale(1.12); filter: drop-shadow(0 0 4px #22c55e); }
}

/* Curing Shelf Section */
.curing-shelf-section {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  margin-top: 10px;
}
.curing-shelf-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}
.jars-shelf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.curing-shelf-section .jar-card {
  align-items: stretch;
  text-align: left;
  min-width: 0;
  box-sizing: border-box;
  padding: 10px 12px;
  gap: 4px;
}

.jar-card.diamond {
  border-color: #facc15;
  background: linear-gradient(180deg, #ffffff, #fefce8);
  box-shadow: 0 4px 14px rgba(234, 179, 8, 0.2);
}

.jar-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 6px;
  min-width: 0;
}

.jar-icon-wrap {
  font-size: 18px;
  flex-shrink: 0;
}

.jar-meta-name {
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}
.jar-cure-bar {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin: 3px 0;
  border: 1px solid #cbd5e1;
}
.jar-cure-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* Breeding Lab & Codex */
.breeding-workbench {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
  color: #0f172a;
}

.workbench-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
}

.workbench-sub {
  font-size: 11.5px;
  color: #475569;
  line-height: 1.45;
}

.workbench-sub strong {
  color: #0f172a;
}

.workbench-fee {
  font-size: 11px;
  color: #15803d;
  font-weight: 800;
  background: #dcfce7;
  border: 1px solid #86efac;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
}

.breeding-crossing-badge {
  background: rgba(168, 85, 247, 0.15);
  color: #7e22ce;
  border: 1px solid rgba(168, 85, 247, 0.35);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.demo-breeding-banner {
  background: rgba(99, 102, 241, 0.08);
  border: 1.5px dashed #818cf8;
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 8px;
  color: #312e81;
  font-size: 11.5px;
  line-height: 1.45;
}

.demo-breeding-banner strong {
  color: #1e1b4b;
}

.demo-locked-badge {
  font-size: 10px;
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
}

.btn-demo-locked-action {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: not-allowed !important;
  background: #e2e8f0 !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #64748b !important;
  box-shadow: none !important;
}

.breeding-selectors {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.breed-cross-symbol {
  font-size: 18px;
  color: #8b5cf6;
  font-weight: 900;
  user-select: none;
}

.breed-select {
  flex: 1;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #0f172a;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  outline: none;
}

.breed-select option {
  background: #ffffff;
  color: #0f172a;
}

.breed-select:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.codex-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.codex-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  color: #0f172a;
}

.codex-card-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
}

.codex-card-desc {
  font-size: 11px;
  color: #475569;
  line-height: 1.35;
  margin: 3px 0;
}

.codex-type-badge {
  font-size: 9.5px;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 800;
}

.codex-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  margin-top: auto;
  padding-top: 5px;
  border-top: 1px solid #f1f5f9;
  color: #334155;
}

.codex-stat-base {
  color: #475569;
}

.codex-stat-base strong {
  color: #0f172a;
}

.codex-stat-price {
  color: #15803d;
  font-weight: 800;
}

.codex-stat-seed {
  color: #7c3aed;
  font-weight: 700;
}

.codex-card.locked {
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  color: #64748b;
}

.codex-card.locked .codex-card-title {
  color: #475569;
}

.codex-card.locked .codex-card-desc {
  color: #64748b;
  font-style: italic;
}

.codex-locked-badge {
  font-size: 9.5px;
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
  border: 1px solid rgba(100, 116, 139, 0.25);
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 800;
}

.codex-locked-status {
  font-size: 10px;
  color: #b45309;
  margin-top: auto;
  font-weight: 700;
  padding-top: 4px;
}

/* Theme & Pet Selectors */
.theme-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 0 14px 0;
}
.theme-pill-btn {
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  color: #475569;
  padding: 8px 6px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.theme-pill-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.theme-pill-btn.active {
  background: linear-gradient(180deg, #34d399, #10b981);
  border-color: #059669;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

/* ============================================================
   MIDNIGHT DARK MODE THEME
   ============================================================ */
body.dark-theme {
  background: radial-gradient(circle at 50% 30%, #162032 0%, #0b1120 60%, #020617 100%) fixed !important;
  --bg-panel: rgba(15, 23, 42, 0.95);
  --bg-panel-solid: #0f172a;
  --bg-card: #1e293b;
  --bg-card-subtle: #0f172a;
  --border-subtle: #334155;
  --border-glow: rgba(56, 189, 248, 0.45);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  color: #f8fafc;
}

body.dark-theme #viewport-wrap,
body.dark-theme #canvas-container,
body.dark-theme #app-container {
  background: transparent !important;
}

body.dark-theme ::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

body.dark-theme ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #0284c7, #0369a1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Dark Mode Bottom Console */
body.dark-theme .bottom-console {
  background: rgba(15, 23, 42, 0.95);
  border-color: #334155;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-theme .console-header {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-bottom: 1px solid #334155;
}

body.dark-theme .app-title {
  background: linear-gradient(135deg, #38bdf8, #4ade80);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.dark-theme .stat-pill {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

body.dark-theme .stat-pill.cash-pill {
  color: #fbbf24;
}

body.dark-theme .currency-symbol {
  color: #f59e0b;
}

body.dark-theme .icon-btn {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

body.dark-theme .icon-btn:hover {
  background: #0ea5e9;
  color: #ffffff;
  border-color: #38bdf8;
}

body.dark-theme .plant-strain-name {
  color: #f8fafc;
}

body.dark-theme .pot-tab-btn {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

body.dark-theme .pot-tab-btn:hover {
  background: #334155;
  color: #ffffff;
}

body.dark-theme .pot-tab-btn.hydro-slot {
  background: rgba(2, 132, 199, 0.18);
  border-color: #0284c7;
  color: #38bdf8;
}

body.dark-theme .pot-tab-btn.hydro-slot:hover {
  background: rgba(2, 132, 199, 0.3);
}

body.dark-theme .pot-tab-btn.hydro-pending {
  border-color: #38bdf8;
  border-style: dashed;
  background: rgba(2, 132, 199, 0.12);
  color: #38bdf8;
}

body.dark-theme .pot-tab-btn.hydro-pending:hover {
  background: rgba(2, 132, 199, 0.24);
}

body.dark-theme .growth-bar,
body.dark-theme .water-bar {
  background: #0b0f19;
  border-color: #334155;
}

body.dark-theme .growth-pct {
  color: #cbd5e1;
}

body.dark-theme .water-pct {
  color: #38bdf8;
}

body.dark-theme .hud-btn {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-color: #334155;
  color: #f8fafc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

body.dark-theme .hud-btn:hover {
  background: #1e293b;
  border-color: #38bdf8;
  color: #38bdf8;
}

body.dark-theme .nute-btn {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-color: #334155;
  color: #f8fafc;
}

body.dark-theme .nute-btn:hover {
  border-color: #a855f7;
  color: #c084fc;
}

body.dark-theme .nute-btn.active {
  background: linear-gradient(180deg, #3b0764, #581c87) !important;
  border-color: #7c3aed !important;
  color: #c084fc !important;
}

body.dark-theme .env-badge {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

body.dark-theme .light-status {
  background: rgba(2, 132, 199, 0.18);
  border-color: #0284c7;
  color: #38bdf8;
}

body.dark-theme .light-status.warm-mode {
  background: rgba(194, 65, 12, 0.22);
  border-color: #ea580c;
  color: #fb923c;
}

body.dark-theme .weather-badge {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

body.dark-theme .console-nav {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-top: 1.5px solid #334155;
}

body.dark-theme .nav-tab {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

body.dark-theme .nav-tab:hover {
  background: #334155;
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Dark Mode Floating Windows */
body.dark-theme .modal-overlay,
body.dark-theme #modal-shop,
body.dark-theme #modal-stash,
body.dark-theme #modal-breeding,
body.dark-theme #modal-clients,
body.dark-theme #modal-theme {
  background: rgba(15, 23, 42, 0.96) !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 3px 10px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .modal-header,
body.dark-theme .modal-overlay .modal-header,
body.dark-theme #modal-shop .modal-header,
body.dark-theme #modal-stash .modal-header,
body.dark-theme #modal-breeding .modal-header,
body.dark-theme #modal-clients .modal-header,
body.dark-theme #modal-theme .modal-header {
  background: rgba(15, 23, 42, 0.98) !important;
  border-bottom-color: #334155 !important;
}

body.dark-theme .modal-header h3,
body.dark-theme .modal-overlay .modal-header h3,
body.dark-theme #modal-shop .modal-header h3,
body.dark-theme #modal-stash .modal-header h3,
body.dark-theme #modal-breeding .modal-header h3,
body.dark-theme #modal-clients .modal-header h3,
body.dark-theme #modal-theme .modal-header h3 {
  color: #f8fafc !important;
}

body.dark-theme .modal-header h3::before {
  color: #64748b !important;
}

body.dark-theme .modal-header.dragging,
body.dark-theme .modal-overlay .modal-header.dragging,
body.dark-theme #modal-shop .modal-header.dragging,
body.dark-theme #modal-stash .modal-header.dragging,
body.dark-theme #modal-breeding .modal-header.dragging,
body.dark-theme #modal-clients .modal-header.dragging,
body.dark-theme #modal-theme .modal-header.dragging {
  background: #1e293b !important;
}

body.dark-theme .modal-close {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

body.dark-theme .modal-close:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
}

body.dark-theme .modal-sub {
  color: #94a3b8 !important;
}

body.dark-theme #section-bulk h4 {
  color: #f8fafc !important;
}

body.dark-theme .settings-audio-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

body.dark-theme .settings-audio-card span {
  color: #f8fafc !important;
}

body.dark-theme .settings-danger-card {
  background: rgba(159, 18, 57, 0.2) !important;
  border-color: rgba(244, 63, 94, 0.35) !important;
}

body.dark-theme #modal-shop .shop-tabs,
body.dark-theme .stash-nav-bar,
body.dark-theme .breeding-nav-bar {
  background: rgba(15, 23, 42, 0.98);
  border-bottom-color: #334155;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-theme .shop-subtab {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

body.dark-theme .shop-subtab:hover {
  background: #334155;
  color: #f8fafc;
}

body.dark-theme .order-card,
body.dark-theme .shop-card,
body.dark-theme .jar-card,
body.dark-theme .codex-card {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark-theme .order-card:hover,
body.dark-theme .shop-card:hover,
body.dark-theme .jar-card:hover {
  border-color: #38bdf8;
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.2);
}

body.dark-theme .client-avatar {
  background: #0f172a;
  border-color: #334155;
}

body.dark-theme .client-name,
body.dark-theme .shop-item-name,
body.dark-theme .jar-name,
body.dark-theme .jar-meta-name {
  color: #f8fafc;
}

body.dark-theme .order-quote,
body.dark-theme .shop-item-desc {
  color: #94a3b8;
}

body.dark-theme .order-payout,
body.dark-theme .shop-item-price {
  color: #fbbf24;
}

body.dark-theme .order-req {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-theme .curing-shelf-section {
  background: #0f172a;
  border-color: #334155;
}

body.dark-theme .curing-shelf-title {
  color: #f8fafc;
}

body.dark-theme .jar-card.diamond {
  border-color: #eab308;
  background: linear-gradient(180deg, #1e293b, #292524);
  box-shadow: 0 4px 14px rgba(234, 179, 8, 0.2);
}

body.dark-theme .jar-cure-bar {
  background: #0b0f19;
  border-color: #334155;
}

body.dark-theme .breeding-workbench {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

body.dark-theme .workbench-title {
  color: #f8fafc;
}

body.dark-theme .workbench-sub {
  color: #94a3b8;
}

body.dark-theme .workbench-sub strong {
  color: #f8fafc;
}

body.dark-theme .workbench-fee {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.35);
}

body.dark-theme .breeding-crossing-badge {
  background: rgba(168, 85, 247, 0.25);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.45);
}

body.dark-theme .demo-breeding-banner {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(129, 140, 248, 0.35);
  color: #c7d2fe;
}

body.dark-theme .demo-breeding-banner strong {
  color: #ffffff;
}

body.dark-theme .demo-locked-badge {
  background: rgba(239, 68, 68, 0.22);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.45);
}

body.dark-theme .btn-demo-locked-action {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}

body.dark-theme .breed-cross-symbol {
  color: #c084fc;
}

body.dark-theme .breed-select,
body.dark-theme select {
  background: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}

body.dark-theme .breed-select option {
  background: #0f172a;
  color: #f8fafc;
}

body.dark-theme .codex-card {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

body.dark-theme .codex-card-title {
  color: #f8fafc;
}

body.dark-theme .codex-card-desc {
  color: #94a3b8;
}

body.dark-theme .codex-type-badge {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.4);
}

body.dark-theme .codex-card-footer {
  border-top-color: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

body.dark-theme .codex-stat-base {
  color: #94a3b8;
}

body.dark-theme .codex-stat-base strong {
  color: #f8fafc;
}

body.dark-theme .codex-stat-price {
  color: #4ade80;
}

body.dark-theme .codex-stat-seed {
  color: #c084fc;
}

body.dark-theme .codex-card.locked {
  background: #0f172a;
  border-color: #334155;
  color: #94a3b8;
}

body.dark-theme .codex-card.locked .codex-card-title {
  color: #cbd5e1;
}

body.dark-theme .codex-card.locked .codex-card-desc {
  color: #94a3b8;
}

body.dark-theme .codex-locked-badge {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.3);
}

body.dark-theme .codex-locked-status {
  color: #fbbf24;
}

body.dark-theme .theme-pill-btn {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

body.dark-theme .theme-pill-btn:hover {
  background: #334155;
  color: #f8fafc;
}

body.dark-theme .cam-reset-btn {
  background: rgba(15, 23, 42, 0.92);
  border-color: #334155;
  color: #f8fafc;
}

body.dark-theme .cam-reset-btn:hover {
  background: #1e293b;
  color: #38bdf8;
  border-color: #0ea5e9;
}

body.dark-theme .settings-demo-import-card {
  background: rgba(99, 102, 241, 0.15) !important;
  border-color: rgba(129, 140, 248, 0.35) !important;
}

body.dark-theme .settings-demo-import-card span {
  color: #c7d2fe !important;
}

body.dark-theme .settings-demo-import-card div {
  color: #a5b4fc !important;
}



/* ============================================================
   PWA EDITION: FULL SCREEN & DYNAMIC BROWSER SCALING
   ============================================================ */
#app-container {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  background: transparent !important;
  box-shadow: none !important;
}

#viewport-wrap {
  flex: 1 1 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 140px !important;
  position: relative !important;
  overflow: hidden !important;
  background: radial-gradient(circle at 50% 40%, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.98) 65%, #050811 100%) !important;
}

#canvas-container {
  width: 100% !important;
  height: 100% !important;
  position: absolute !important;
  inset: 0 !important;
  background: transparent !important;
}

#canvas-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

/* ============================================================
   MOBILE-FIRST PWA: FULL GAME AREA MODAL DRAWERS & ERGONOMICS
   ============================================================ */

/* Modals DO NOT float; they occupy the entire game area / viewport */
.modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: 100% !important;
  max-height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  resize: none !important;
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  z-index: 5000 !important;
  display: flex;
  flex-direction: column !important;
  animation: mobileSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.modal-overlay.hidden,
.hidden {
  display: none !important;
}

@keyframes mobileSlideUp {
  0% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

body:not(.dark-theme) .modal-overlay {
  background: #ffffff !important;
  color: #0f172a !important;
}

body.dark-theme .modal-overlay {
  background: #0f172a !important;
  color: #f8fafc !important;
}

.modal-card {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  border-radius: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.modal-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
  padding: max(12px, env(safe-area-inset-top, 12px)) 16px 12px 16px !important;
  border-radius: 0 !important;
  cursor: default !important;
  -webkit-app-region: no-drag !important;
  touch-action: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: inherit !important;
  border-bottom: 1.5px solid rgba(148, 163, 184, 0.2) !important;
}

.modal-header h3 {
  font-size: 16px !important;
  font-weight: 800 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.modal-close {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  border-radius: 999px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  background: rgba(148, 163, 184, 0.15) !important;
  border: 1px solid rgba(148, 163, 184, 0.3) !important;
  color: inherit !important;
  transition: all 0.15s ease !important;
  touch-action: manipulation !important;
}

.modal-close:active {
  transform: scale(0.92) !important;
  background: rgba(148, 163, 184, 0.3) !important;
}

.modal-sub {
  padding: 8px 16px 4px 16px !important;
  margin: 0 !important;
  font-size: 12.5px !important;
  line-height: 1.4 !important;
  color: #64748b !important;
  flex-shrink: 0 !important;
}

body.dark-theme .modal-sub {
  color: #94a3b8 !important;
}

/* Scrollable bodies taking full available height with safe area bottom padding */
.orders-list,
.stash-scroll-body,
.breeding-scroll-body,
.theme-content,
.shop-items-list {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  padding: 12px 14px !important;
  padding-bottom: calc(36px + env(safe-area-inset-bottom, 0px)) !important;
}

/* Horizontal scrollable subtabs for Shop, Stash, and Breeding */
.shop-tabs,
.stash-nav-bar,
.breeding-nav-bar {
  display: flex !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-x: contain !important;
  gap: 6px !important;
  padding: 8px 14px !important;
  flex-shrink: 0 !important;
  scrollbar-width: none !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15) !important;
}

.shop-tabs::-webkit-scrollbar,
.stash-nav-bar::-webkit-scrollbar,
.breeding-nav-bar::-webkit-scrollbar {
  display: none !important;
}

.shop-subtab {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  min-height: 38px !important;
  padding: 6px 14px !important;
  font-size: 12.5px !important;
  border-radius: 999px !important;
  touch-action: manipulation !important;
}

/* Mobile-first bottom console: firmly rooted at bottom of screen */
.bottom-console {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  border-radius: 20px 20px 0 0 !important;
  padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15) !important;
  z-index: 40 !important;
}

@media (min-width: 820px) {
  .bottom-console {
    width: min(860px, calc(100% - 24px)) !important;
    margin: 0 auto 12px auto !important;
    border-radius: 22px !important;
  }
}

/* Touch-optimized Navigation Tabs */
.console-nav {
  padding: 6px 8px !important;
  padding-bottom: max(6px, env(safe-area-inset-bottom, 6px)) !important;
  gap: 5px !important;
}

.nav-tab {
  min-height: 44px !important;
  border-radius: 12px !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  padding: 6px 4px !important;
}

.nav-tab .nav-icon {
  font-size: 17px !important;
}

.nav-tab .nav-text {
  font-size: 11.5px !important;
}

/* Touch target sizing for buttons & cards */
.hud-btn, .nute-btn, .btn-action, .btn-buy, .btn-fulfill, .icon-btn {
  min-height: 40px !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
}

/* Pot tabs smooth horizontal scroll on narrow mobile */
.pot-selector {
  display: flex !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  gap: 6px !important;
}

.pot-selector::-webkit-scrollbar {
  display: none !important;
}

.pot-tab-btn {
  min-height: 38px !important;
  flex: 1 0 auto !important;
  white-space: nowrap !important;
  touch-action: manipulation !important;
}

/* Mobile viewport bounce & gesture control */
html, body {
  overscroll-behavior-y: none !important;
  touch-action: pan-x pan-y !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

/* Hide Electron desktop-only window management controls in browser PWA */
#btn-topmost,
#btn-min,
#btn-close {
  display: none !important;
}

.console-header {
  cursor: default !important;
  -webkit-app-region: no-drag !important;
}

/* ============================================================
   PWA DEMO & PAYPAL UNLOCK SYSTEM STYLES
   ============================================================ */

/* Badges */
.demo-tag {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff !important;
  font-size: 9.5px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 6px;
  vertical-align: middle;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 3px rgba(217,119,6,0.3);
  margin-left: 5px;
  user-select: none;
}

.pro-tag {
  display: none !important;
}

.btn-unlock-header {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: 1px solid #b45309;
  color: #ffffff !important;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(217,119,6,0.35);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-unlock-header:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 4px 12px rgba(217,119,6,0.45);
}

.btn-unlock-header.unlocked {
  background: linear-gradient(135deg, #059669, #047857);
  border-color: #065f46;
  box-shadow: 0 2px 6px rgba(5,150,105,0.3);
}

/* Floating Bottom-Center Unlock Button (Directly Above HUD) */
.btn-unlock-floating {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 28;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 1.5px solid rgba(254, 243, 199, 0.7);
  color: #ffffff !important;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  padding: 8px 20px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.45), 0 1px 3px rgba(0, 0, 0, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  animation: unlockFloatingPulse 3s infinite ease-in-out;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  user-select: none;
}

.btn-unlock-floating:hover {
  transform: translateX(-50%) translateY(-2px) scale(1.04);
  box-shadow: 0 8px 24px rgba(217, 119, 6, 0.6), 0 0 14px rgba(251, 191, 36, 0.45);
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
}

.btn-unlock-floating:active {
  transform: translateX(-50%) translateY(0) scale(0.97);
}

.btn-unlock-floating.unlocked {
  display: none !important;
}

@keyframes unlockFloatingPulse {
  0%, 100% {
    box-shadow: 0 4px 16px rgba(217, 119, 6, 0.45), 0 0 0 0 rgba(245, 158, 11, 0.45);
  }
  50% {
    box-shadow: 0 6px 22px rgba(217, 119, 6, 0.6), 0 0 0 6px rgba(245, 158, 11, 0);
  }
}

/* Modal Unlock Drawer */
#modal-unlock .modal-card {
  max-width: 520px;
  width: 95%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.unlock-modal-body {
  padding: 14px 16px 20px 16px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.unlock-pitch-banner {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  border: 1.5px solid #6366f1;
  border-radius: 14px;
  padding: 16px;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(99,102,241,0.25);
}

.pitch-badge {
  display: inline-block;
  background: rgba(245,158,11,0.25);
  color: #fde047;
  border: 1px solid rgba(245,158,11,0.5);
  font-size: 9.5px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.unlock-pitch-banner h4 {
  margin: 0 0 4px 0;
  font-size: 15px;
  font-weight: 800;
  color: #e0e7ff;
}

.unlock-pitch-banner p {
  margin: 0;
  font-size: 12px;
  color: #c7d2fe;
  line-height: 1.45;
}

.unlock-perks-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.perk-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

body.dark-theme .perk-card {
  background: #1e293b;
  border-color: #334155;
}

.perk-icon {
  font-size: 22px;
  line-height: 1;
}

.perk-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.perk-text strong {
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
}

body.dark-theme .perk-text strong {
  color: #f8fafc;
}

.perk-text span {
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
}

body.dark-theme .perk-text span {
  color: #94a3b8;
}

/* Checkout Box */
.unlock-checkout-box {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.dark-theme .unlock-checkout-box {
  background: #0f172a;
  border-color: #334155;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.checkout-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

body.dark-theme .checkout-price-row {
  border-bottom-color: #334155;
}

.price-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
}

body.dark-theme .price-title {
  color: #f8fafc;
}

.price-val {
  font-size: 20px;
  font-weight: 900;
  color: #15803d;
}

body.dark-theme .price-val {
  color: #4ade80;
}

.price-type {
  font-size: 11px;
  color: #64748b;
  font-weight: 700;
}

body.dark-theme .price-type {
  color: #94a3b8;
}

.paypal-container {
  min-height: 44px;
  position: relative;
  z-index: 1;
}

.paypal-loading {
  text-align: center;
  font-size: 11.5px;
  color: #64748b;
  padding: 6px 0;
}

body.dark-theme .paypal-loading {
  color: #94a3b8;
}

/* Simulation and Sandbox Buttons */
.sandbox-test-row {
  margin-top: 4px;
  text-align: center;
}

.btn-sandbox-unlock {
  width: 100%;
  background: #f1f5f9;
  border: 1px dashed #94a3b8;
  color: #475569;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-sandbox-unlock:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #64748b;
}

body.dark-theme .btn-sandbox-unlock {
  background: #1e293b;
  border-color: #475569;
  color: #cbd5e1;
}

body.dark-theme .btn-sandbox-unlock:hover {
  background: #334155;
  color: #ffffff;
}

/* Restore section */
.restore-license-section {
  border-top: 1px dashed #cbd5e1;
  padding-top: 10px;
  text-align: center;
}

body.dark-theme .restore-license-section {
  border-top-color: #334155;
}

.btn-toggle-restore {
  background: none;
  border: none;
  color: #6366f1;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
}

body.dark-theme .btn-toggle-restore {
  color: #818cf8;
}

.restore-form {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.restore-desc {
  font-size: 11px;
  color: #64748b;
  margin: 0;
}

body.dark-theme .restore-desc {
  color: #94a3b8;
}

.restore-input {
  width: 100%;
  box-sizing: border-box;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  color: #0f172a;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  outline: none;
}

body.dark-theme .restore-input {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

.btn-submit-restore {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border: 1px solid #4338ca;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-submit-restore:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
}

/* Active License Card */
.unlock-active-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1.5px solid #86efac;
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
  color: #14532d;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

body.dark-theme .unlock-active-card {
  background: linear-gradient(135deg, rgba(20,83,45,0.4) 0%, rgba(6,78,59,0.5) 100%);
  border-color: #059669;
  color: #d1fae5;
}

.unlock-success-icon {
  font-size: 38px;
}

.unlock-active-card h4 {
  font-size: 17px;
  font-weight: 900;
  margin: 0;
  color: #166534;
}

body.dark-theme .unlock-active-card h4 {
  color: #4ade80;
}

.unlock-badge-pill {
  background: #16a34a;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  margin: 4px 0;
}

.unlock-order-id {
  font-size: 11px;
  color: #15803d;
  font-family: monospace;
  margin: 0;
}

body.dark-theme .unlock-order-id {
  color: #86efac;
}

.unlock-active-desc {
  font-size: 11.5px;
  color: #166534;
  line-height: 1.4;
  margin-top: 4px;
}

body.dark-theme .unlock-active-desc {
  color: #a7f3d0;
}

.btn-relock-test {
  margin-top: 12px;
  background: transparent;
  border: 1px dashed #15803d;
  color: #166534;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}

body.dark-theme .btn-relock-test {
  border-color: #4ade80;
  color: #86efac;
}

.btn-relock-test:hover {
  background: rgba(22,101,52,0.1);
}
