:root {
  /* Sci-Fi Color Palette */
  --bg-color: #000000;
  --bg-panel: rgba(3, 5, 10, 0.8);
  --bg-panel-hover: rgba(8, 12, 20, 0.9);

  --primary-neon: #00f3ff;
  --primary-neon-dim: rgba(0, 243, 255, 0.2);
  --secondary-neon: #b026ff;
  --accent-neon: #ff0055;
  --success-neon: #00ff66;
  --danger-neon: #ff0055;

  --text-main: #e0fbfc;
  --text-muted: #6b859e;

  /* Fonts */
  --font-header: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;

  /* Borders & Effects */
  --glass-border: 1px solid rgba(0, 243, 255, 0.15);
  --glass-blur: blur(12px);
  --glow-shadow: 0 0 10px rgba(0, 243, 255, 0.3), inset 0 0 10px rgba(0, 243, 255, 0.1);

  /* Transitions */
  --trans-fast: 0.2s ease;
  --trans-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  /* Techy background pattern */
  background-image:
    linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
  background-size: 30px 30px;
}

/* Hide UI elements if loaded in an iframe (SPA mode) */
html.in-iframe .sidebar-main,
html.in-iframe .sidebar-sub,
html.in-iframe .topbar,
html.in-iframe .logo-box-floating,
body.in-iframe .sidebar-main,
body.in-iframe .sidebar-sub,
body.in-iframe .topbar,
body.in-iframe .logo-box-floating {
  display: none !important;
}

body.in-iframe .main-content {
  padding-top: 20px !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  padding-bottom: 20px !important;
  height: 100vh !important;
}

body.in-iframe .content-wrapper {
    padding: 0 !important;
}

/* --- Layout --- */
.layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  position: relative;
  overflow: hidden;
}

body.fullscreen-mode .topbar,
body.fullscreen-mode .sidebar-sub,
body.fullscreen-mode .logo-box-floating {
  display: none !important;
}

body.fullscreen-mode .main-body-container {
  height: 100vh;
}

.main-body-container {
  display: flex;
  flex: 1;
  width: 100%;
  overflow: hidden;
}

.logo-box-floating {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 300px;
  height: 60px;
  background: rgba(2, 3, 5, 0.95);
  backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 95% 100%, 0 100%);
  padding: 0 10px;
}

/* --- Main Navigation Menu --- */
.sidebar-main {
  width: 85px;
  height: 100%;
  background: rgba(2, 3, 5, 0.95);
  backdrop-filter: var(--glass-blur);
  border-right: var(--glass-border);
  padding: 20px 0 15px 0; /* Reduced padding since it's now below topbar */
  z-index: 10;
  position: relative;
  box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}



.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-links {
  list-style: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.nav-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 0;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--trans-fast);
  position: relative;
  text-decoration: none;
}

.icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--icon-color);
  transition: var(--trans-smooth);
}

.nav-label {
  font-size: 10px;
  font-family: var(--font-header);
  letter-spacing: 0.5px;
  transition: var(--trans-fast);
}

.nav-item svg {
  transition: var(--trans-smooth);
}

.nav-item:hover {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
  border-left: 3px solid var(--icon-color, var(--primary-neon));
}

.nav-item:hover .icon-box {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.nav-item:hover .nav-label {
  color: #fff;
}

.nav-item:hover svg {
  transform: scale(1.1);
  filter: drop-shadow(0 0 5px var(--primary-neon));
}

.nav-item.active {
  border-left: 3px solid transparent;
}

.nav-item.active .icon-box {
  background: var(--icon-color);
  color: #000;
  box-shadow: 0 0 15px var(--icon-color);
}

.nav-item.active .nav-label {
  color: #fff;
}

.nav-bottom {
  width: 100%;
  list-style: none;
}

/* Tooltip */
.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--primary-neon);
  padding: 5px 10px;
  font-family: var(--font-header);
  font-size: 10px;
  letter-spacing: 1px;
  opacity: 0;
  visibility: hidden;
  transition: var(--trans-fast);
  white-space: nowrap;
  pointer-events: none;
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(15px);
}

/* --- Sub Navigation Menu --- */
.sidebar-sub {
  width: 260px;
  height: 100%;
  background: rgba(4, 6, 12, 0.9);
  backdrop-filter: var(--glass-blur);
  border-right: var(--glass-border);
  padding: 20px; /* Reduced padding since it's now below topbar */
  z-index: 9;
  overflow-y: auto;
}

/* Custom Scrollbar for Sub Menu */
.sidebar-sub::-webkit-scrollbar {
  width: 3px;
}

.sidebar-sub::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

.sidebar-sub::-webkit-scrollbar-thumb {
  background: rgba(255, 75, 114, 0.3);
  border-radius: 10px;
}

.sidebar-sub::-webkit-scrollbar-thumb:hover {
  background: #ff4b72;
}

.sub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sub-header h2 {
  font-family: var(--font-header);
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--text-main);
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success-neon);
  box-shadow: 0 0 8px var(--success-neon);
  animation: blink 2s infinite;
}

/* --- Sub Menu Search --- */
.sub-menu-search {
  margin-bottom: 20px;
  position: relative;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-input-wrapper svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  transition: var(--trans-fast);
}

.sub-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 15px 10px 40px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  transition: var(--trans-fast);
  outline: none;
}

.sub-search-input:focus {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--primary-neon);
  box-shadow: 0 0 10px var(--primary-neon-dim);
}

.sub-search-input:focus + svg {
  color: var(--primary-neon);
  filter: drop-shadow(0 0 5px var(--primary-neon));
}

.sub-search-input::placeholder {
  color: var(--text-muted);
  font-style: italic;
  font-size: 13px;
}

.accordion-container {
  width: 100%;
  margin-bottom: 20px;
}

/* Search Results UI */
.search-results-header {
  font-family: var(--font-header);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin: 15px 0 10px 0;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.result-item {
  margin-bottom: 15px !important;
}

.result-category {
  font-family: var(--font-header);
  font-size: 8px;
  letter-spacing: 1px;
  margin-bottom: 4px;
  opacity: 0.8;
}

.no-results {
  padding: 20px 0;
  text-align: center;
  font-family: var(--font-body);
  color: var(--text-muted);
  font-style: italic;
  font-size: 14px;
}

.accordion-item {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 5px;
  display: none; /* Hidden unless active */
}

.accordion-item.active {
  display: block;
}

.sub-header-style {
  background: transparent;
  padding: 12px 15px;
  border-radius: 6px;
  margin-bottom: 4px;
  transition: var(--trans-fast);
}

.sub-header-style:hover {
  background: rgba(255, 255, 255, 0.05);
}

.sub-header-style.active {
  background-color: #ff4b72;
}

.sub-header-style .header-text {
  font-size: 14px;
  font-weight: 500;
}

.sub-header-style.no-chevron {
  cursor: pointer;
}

.accordion-sub-item.expanded .chevron {
  transform: rotate(90deg); /* Points down or right depending on initial state */
}

.accordion-sub-item .accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.accordion-sub-item.expanded .accordion-content {
  max-height: 1500px;
  transition: max-height 0.5s ease-in;
}

.accordion-header {
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: var(--font-header);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  transition: var(--trans-fast);
  border-radius: 8px;
}

.accordion-header .chevron {
  transition: transform 0.3s ease;
}

.accordion-item.expanded .chevron {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.accordion-item.expanded .accordion-content {
  max-height: 1000px;
  transition: max-height 0.5s ease-in;
}

.sub-links-list {
  list-style: none;
  padding: 10px 0 10px 25px;
  margin-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sub-link-item {
  font-family: var(--font-body);
  font-size: 14px;
  color: #e0e0e0;
  cursor: pointer;
  transition: var(--trans-fast);
  position: relative;
  padding: 0;
}

.sub-link-item a {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
  padding: 0; /* Align perfectly with text-only items */
}

.sub-link-item:hover, .sub-link-item.active {
  color: var(--primary-neon);
  transform: translateX(5px);
}

.sub-link-item.active::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  background: var(--primary-neon);
  border-radius: 50%;
  box-shadow: 0 0 5px var(--primary-neon);
}

.badge-pro {
  font-size: 9px;
  font-weight: 900;
  color: #ff4b72;
  background: rgba(255, 75, 114, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  border: 1px solid rgba(255, 75, 114, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
}

.sub-panel {
  margin-top: auto;
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.overlay-menu-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.overlay-menu-item {
  padding: 12px 15px;
  font-family: var(--font-body);
  font-size: 15px;
  color: #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: var(--trans-fast);
}

.overlay-menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--primary-neon);
  padding-left: 20px;
}

.overlay-menu-item.has-submenu svg {
  opacity: 0.7;
}

.panel-title {
  font-family: var(--font-header);
  font-size: 10px;
  color: var(--accent-neon);
  margin-bottom: 8px;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  margin-bottom: 8px;
}

.progress-bar .fill {
  height: 100%;
  background: var(--accent-neon);
  box-shadow: 0 0 5px var(--accent-neon);
}

.panel-info {
  font-family: var(--font-header);
  font-size: 9px;
  color: var(--text-muted);
}

/* --- Content Wrapper --- */
.content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* --- Top Bar --- */
.topbar {
  height: 80px;
  width: 100%;
  flex-shrink: 0;
  background: rgba(2, 3, 5, 0.95);
  backdrop-filter: var(--glass-blur);
  border-bottom: var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  z-index: 50;
}

.hud-element {
  font-family: var(--font-header);
  font-size: 12px;
  letter-spacing: 2px;
  display: flex;
  gap: 10px;
  background: rgba(0, 243, 255, 0.05);
  padding: 8px 15px;
  border: 1px solid var(--primary-neon-dim);
  clip-path: polygon(0 0, 100% 0, 90% 100%, 0% 100%);
}

.hud-element .label {
  color: var(--text-muted);
}

.hud-element .value {
  color: var(--primary-neon);
}

/* Login / Auth Area */
.auth-module {
  display: flex;
  align-items: center;
  gap: 20px;
}

.auth-greeting {
  font-family: var(--font-header);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.btn-primary {
  background: transparent;
  color: var(--primary-neon);
  border: 1px solid var(--primary-neon);
  padding: 10px 20px;
  font-family: var(--font-header);
  font-size: 12px;
  letter-spacing: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: var(--trans-fast);
  box-shadow: inset 0 0 10px rgba(0, 243, 255, 0.1);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.4), transparent);
  transition: var(--trans-smooth);
}

.btn-primary:hover {
  background: rgba(0, 243, 255, 0.1);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
  text-shadow: 0 0 5px var(--primary-neon);
}

.btn-primary:hover::before {
  left: 100%;
  transition: 0.5s;
}

/* --- Main Content --- */
.main-content {
  flex: 1;
  padding: 100px 40px 40px 40px; /* Top padding to clear the 80px topbar */
  overflow-y: auto;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.glass-card {
  background: var(--bg-panel);
  border: var(--glass-border);
  backdrop-filter: var(--glass-blur);
  position: relative;
  overflow: hidden;
}

/* Tech corners */
.glass-card::before,
.glass-card::after {
  content: '';
  position: absolute;
  width: 15px;
  height: 15px;
  border: 2px solid var(--primary-neon);
  opacity: 0.5;
}

.glass-card::before {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}

.glass-card::after {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
}

.widget-large {
  grid-column: span 2;
  min-height: 400px;
}

.widget-small {
  grid-column: span 1;
  min-height: 185px;
}

.card-header {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(0, 243, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
}

.card-title {
  font-family: var(--font-header);
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--primary-neon);
}

.card-action {
  font-size: 10px;
  background: rgba(255, 0, 85, 0.2);
  color: var(--accent-neon);
  padding: 3px 8px;
  border: 1px solid var(--accent-neon);
  border-radius: 2px;
  animation: blink 1.5s infinite;
}

.card-body {
  padding: 20px;
  height: calc(100% - 51px);
}

.center-content {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Hologram effect */
.hologram-placeholder {
  width: 80%;
  height: 80%;
  border: 1px dashed var(--primary-neon-dim);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--primary-neon-dim);
  font-family: var(--font-header);
  letter-spacing: 3px;
  position: relative;
  overflow: hidden;
  background: repeating-linear-gradient(0deg,
      rgba(0, 243, 255, 0.05),
      rgba(0, 243, 255, 0.05) 1px,
      transparent 1px,
      transparent 4px);
}

.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: rgba(0, 243, 255, 0.5);
  box-shadow: 0 0 10px var(--primary-neon);
  animation: scan 3s linear infinite;
}

.data-list {
  list-style: none;
  font-family: var(--font-header);
  font-size: 12px;
}

.data-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.neon-text.success {
  color: var(--success-neon);
  text-shadow: 0 0 5px var(--success-neon);
}

.neon-text.danger {
  color: var(--danger-neon);
  text-shadow: 0 0 5px var(--danger-neon);
  animation: blink 2s infinite;
}

.terminal-text {
  font-family: 'Courier New', Courier, monospace;
  color: var(--success-neon);
  font-size: 12px;
  line-height: 1.6;
}

.blinking-cursor {
  animation: blink 1s step-end infinite;
}

/* Animations */
@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 5px var(--primary-neon);
  }

  100% {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--primary-neon);
  }
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

@keyframes scan {
  0% {
    top: -10%;
  }

  100% {
    top: 110%;
  }
}
}

/* --- Form Elements --- */
.tech-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.input-group label {
  font-family: var(--font-header);
  font-size: 11px;
  color: var(--primary-neon);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tech-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.tech-input {
  width: 100%;
  background: rgba(0, 243, 255, 0.03);
  border: 1px solid var(--primary-neon-dim);
  padding: 14px 18px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 16px;
  outline: none;
  transition: var(--trans-smooth);
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.tech-input:focus {
  background: rgba(0, 243, 255, 0.08);
  border-color: var(--primary-neon);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.15), inset 0 0 10px rgba(0, 243, 255, 0.05);
}

.tech-input::placeholder {
  color: rgba(224, 251, 252, 0.3);
}

.input-prefix {
  position: absolute;
  left: 15px;
  color: var(--primary-neon-dim);
  font-family: var(--font-header);
  font-weight: 900;
  pointer-events: none;
}

.has-prefix .tech-input {
  padding-left: 35px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 0, 85, 0.1);
  border: 1px solid var(--accent-neon);
  color: var(--accent-neon);
  font-family: var(--font-header);
  font-size: 10px;
  letter-spacing: 1px;
  border-radius: 4px;
  margin-bottom: 15px;
}

.status-badge.connected {
  background: rgba(0, 255, 102, 0.1);
  border-color: var(--success-neon);
  color: var(--success-neon);
}

.connection-card {
  max-width: 600px;
}

.account-preview {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--primary-neon-dim);
  border-radius: 8px;
}

.avatar-mock {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-neon), var(--secondary-neon));
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-header);
  font-size: 24px;
  color: #000;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.account-info h4 {
  font-family: var(--font-header);
  font-size: 16px;
  color: #fff;
  margin-bottom: 4px;
}

.account-info p {
  font-size: 13px;
  color: var(--text-muted);
}

.loader {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Topbar Status --- */
.top-status-container {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-right: 25px;
  padding-right: 25px;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.status-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-header);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-neon);
  box-shadow: 0 0 8px var(--accent-neon);
  transition: var(--trans-smooth);
}

.status-dot.active {
  background: var(--success-neon);
  box-shadow: 0 0 12px var(--success-neon);
  animation: pulse-status 2s infinite;
}

@keyframes pulse-status {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

.status-label {
  color: var(--text-muted);
}

.status-value {
  color: #fff;
  font-weight: 700;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

.status-value.connected {
  color: var(--success-neon);
  text-shadow: 0 0 8px rgba(0, 255, 102, 0.3);
}

/* --- Setup Specific Styles --- */
.setup-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  padding-bottom: 100px;
}

.glass-card[id] {
  scroll-margin-top: 110px; /* Account for 80px topbar + padding */
}

.tech-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-family: var(--font-body);
}

.tech-table th {
  text-align: left;
  padding: 12px;
  background: rgba(0, 243, 255, 0.05);
  color: var(--primary-neon);
  font-family: var(--font-header);
  font-size: 11px;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--primary-neon-dim);
}

.tech-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-size: 14px;
}

.tech-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.tech-checkbox-group {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  margin-top: 10px;
}

.tech-checkbox {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid var(--primary-neon-dim);
  background: rgba(0, 243, 255, 0.03);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  transition: var(--trans-fast);
}

.tech-checkbox:checked {
  background: var(--primary-neon-dim);
  border-color: var(--primary-neon);
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.tech-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--primary-neon);
  font-size: 12px;
  font-weight: bold;
}

.tech-checkbox-label {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-main);
}

.tech-select {
  width: 100%;
  background: rgba(0, 243, 255, 0.03);
  border: 1px solid var(--primary-neon-dim);
  padding: 12px 18px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 16px;
  outline: none;
  border-radius: 4px;
  cursor: pointer;
}

.tech-select option {
  background: #0a0e14;
  color: #fff;
}

.pro-badge {
  color: var(--accent-neon);
  font-family: var(--font-header);
  font-size: 9px;
  font-weight: bold;
  padding: 2px 5px;
  border: 1px solid var(--accent-neon);
  border-radius: 3px;
  margin-left: 5px;
}

.widget-full {
  grid-column: span 2;
}

.widget-half {
  grid-column: span 1;
}

/* --- Modal Styles --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  transition: var(--trans-smooth);
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-container {
  width: 650px;
  max-height: 90vh;
  background: #0a0e14;
  border: var(--glass-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 243, 255, 0.1);
  transform: translateY(30px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.modal-overlay.active .modal-container {
  transform: translateY(0) scale(1);
  box-shadow: 0 0 50px rgba(0, 243, 255, 0.25), 0 0 0 1px rgba(0, 243, 255, 0.2);
}

.modal-header {
  padding: 20px 30px;
  border-bottom: 1px solid rgba(0, 243, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 243, 255, 0.02);
}

.modal-title {
  font-family: var(--font-header);
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--primary-neon);
  text-transform: uppercase;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--trans-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--accent-neon);
  transform: rotate(90deg);
}

.modal-body {
  padding: 30px;
  overflow-y: auto;
}

.modal-footer {
  padding: 20px 30px;
  border-top: 1px solid rgba(0, 243, 255, 0.1);
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  background: rgba(0, 243, 255, 0.02);
}

.customization-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.custom-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.custom-group-full {
  grid-column: span 2;
}

.custom-label {
  font-family: var(--font-header);
  font-size: 11px;
  color: var(--primary-neon);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Custom scrollbar for modal body */
.modal-body::-webkit-scrollbar {
  width: 4px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.01);
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--primary-neon-dim);
  border-radius: 10px;
}

/* --- Gift Gallery --- */
.gift-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px;
  max-height: 800px;
  overflow-y: auto;
  padding: 10px;
}

.gift-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: var(--trans-fast);
  position: relative;
  overflow: hidden;
}

.gift-card:hover {
  background: rgba(0, 243, 255, 0.05);
  border-color: var(--primary-neon);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 243, 255, 0.1);
}

.gift-card img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}

.gift-name {
  font-family: var(--font-header);
  font-size: 11px;
  color: var(--text-main);
  text-align: center;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.gift-id {
  font-size: 10px;
  color: var(--text-muted);
  font-family: 'Courier New', Courier, monospace;
  margin-bottom: 8px;
}

.gift-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  opacity: 0;
  transform: translateY(10px);
  transition: var(--trans-smooth);
}

.gift-card:hover .gift-actions {
  opacity: 1;
  transform: translateY(0);
}

.action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: var(--trans-fast);
}

.action-btn:hover {
  border-color: var(--primary-neon);
  color: var(--primary-neon);
  background: rgba(0, 243, 255, 0.1);
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.action-btn.copy:hover {
  border-color: var(--success-neon);
  color: var(--success-neon);
  background: rgba(0, 255, 102, 0.1);
}

.gift-card .copy-id-btn {
  position: absolute;
  bottom: -40px;
  left: 0;
  width: 100%;
  padding: 10px 0;
  background: var(--primary-neon);
  color: #000;
  border: none;
  font-family: var(--font-header);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--trans-smooth);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.gift-card:hover .copy-id-btn {
  bottom: 0;
}

.search-wrapper {
  position: relative;
  width: 300px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

#gift-search {
  padding-left: 40px;
}

.loading-container {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 0;
  gap: 20px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 243, 255, 0.1);
  border-top-color: var(--primary-neon);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.header-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}

#gift-count {
  font-size: 10px;
  margin-left: 10px;
  letter-spacing: 1px;
}

/* --- Overlay Request Banner --- */
@keyframes borderRainbow {
  0%   { border-color: #00f3ff; box-shadow: 0 0 20px rgba(0,243,255,0.4), inset 0 0 20px rgba(0,243,255,0.05); }
  25%  { border-color: #bc13fe; box-shadow: 0 0 20px rgba(188,19,254,0.4), inset 0 0 20px rgba(188,19,254,0.05); }
  50%  { border-color: #ff4b72; box-shadow: 0 0 20px rgba(255,75,114,0.4), inset 0 0 20px rgba(255,75,114,0.05); }
  75%  { border-color: #00ff66; box-shadow: 0 0 20px rgba(0,255,102,0.4), inset 0 0 20px rgba(0,255,102,0.05); }
  100% { border-color: #00f3ff; box-shadow: 0 0 20px rgba(0,243,255,0.4), inset 0 0 20px rgba(0,243,255,0.05); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes rocketBounce {
  0%, 100% { transform: translateY(0) rotate(-45deg); }
  50%       { transform: translateY(-6px) rotate(-45deg); }
}

.overlay-request-banner {
  grid-column: span 2;
  position: relative;
  border: 2px solid #00f3ff;
  border-radius: 12px;
  padding: 24px 30px;
  background: rgba(0, 243, 255, 0.03);
  animation: borderRainbow 4s linear infinite;
  display: flex;
  align-items: center;
  gap: 25px;
  overflow: hidden;
}

.overlay-request-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(0,243,255,0.05) 0%,
    rgba(188,19,254,0.05) 25%,
    rgba(255,75,114,0.05) 50%,
    rgba(0,255,102,0.05) 75%,
    rgba(0,243,255,0.05) 100%);
  background-size: 400% 400%;
  animation: shimmer 6s ease infinite;
  pointer-events: none;
  border-radius: 10px;
}

.request-banner-icon {
  font-size: 40px;
  line-height: 1;
  flex-shrink: 0;
  animation: rocketBounce 2s ease-in-out infinite;
  display: inline-block;
}

.request-banner-content {
  flex: 1;
}

.request-banner-title {
  font-family: var(--font-header);
  font-size: 16px;
  letter-spacing: 3px;
  color: #fff;
  text-shadow: 0 0 10px rgba(255,255,255,0.4);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.request-banner-title span {
  background: linear-gradient(90deg, #00f3ff, #bc13fe, #ff4b72, #00f3ff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

.request-banner-sub {
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(224,251,252,0.7);
  line-height: 1.5;
}

.request-banner-sub strong {
  color: #00ff66;
  text-shadow: 0 0 5px rgba(0,255,102,0.5);
}

.btn-request {
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(0,243,255,0.15), rgba(188,19,254,0.15));
  border: 1px solid #00f3ff;
  color: #fff;
  padding: 14px 28px;
  font-family: var(--font-header);
  font-size: 12px;
  letter-spacing: 2px;
  cursor: pointer;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  transition: var(--trans-smooth);
  white-space: nowrap;
}

.btn-request::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn-request:hover {
  background: linear-gradient(135deg, rgba(0,243,255,0.3), rgba(188,19,254,0.3));
  box-shadow: 0 0 25px rgba(0,243,255,0.5);
  transform: scale(1.03);
}

.btn-request:hover::before {
  transform: translateX(100%);
}

/* Request Modal */
.request-modal-container {
  width: 600px;
}

.request-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.request-tag {
  background: rgba(0,243,255,0.08);
  border: 1px solid rgba(0,243,255,0.2);
  color: var(--primary-neon);
  padding: 5px 12px;
  border-radius: 20px;
  font-family: var(--font-header);
  font-size: 10px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--trans-fast);
  user-select: none;
}

.request-tag:hover, .request-tag.selected {
  background: rgba(0,243,255,0.2);
  border-color: var(--primary-neon);
  box-shadow: 0 0 10px rgba(0,243,255,0.3);
}

.request-tag.selected {
  color: #000;
  background: var(--primary-neon);
}

.request-textarea {
  width: 100%;
  background: rgba(0, 243, 255, 0.03);
  border: 1px solid var(--primary-neon-dim);
  padding: 14px 18px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: var(--trans-smooth);
  border-radius: 4px;
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.request-textarea:focus {
  background: rgba(0, 243, 255, 0.08);
  border-color: var(--primary-neon);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.15);
}

.request-textarea::placeholder {
  color: rgba(224,251,252,0.3);
}

.request-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(0,255,102,0.1);
  border: 1px solid #00ff66;
  color: #00ff66;
  border-radius: 20px;
  font-family: var(--font-header);
  font-size: 10px;
  letter-spacing: 1px;
  margin-bottom: 15px;
}

.request-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00ff66;
  box-shadow: 0 0 6px #00ff66;
  animation: blink 1.5s infinite;
}
/* --- Points System & User Info Management --- */
#form-userinfo-custom .custom-group small {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    font-family: var(--font-body);
    opacity: 0.7;
}

#btn-reset-all-points {
    transition: all 0.3s ease;
}

#btn-reset-all-points:hover {
    background: var(--danger-neon) !important;
    color: white !important;
    box-shadow: 0 0 15px var(--danger-neon);
}

.points-value {
    color: #ffcc00 !important;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
}
