:root {
  --bg-gradient: linear-gradient(135deg, #f5effe 0%, #e8ddfb 50%, #f0e6ff 100%);
  --surface-glass: rgba(255, 255, 255, 0.85);
  --surface-dark: #120f24;
  --surface-card: #ffffff;
  --primary-purple: #7c3aed;
  --primary-purple-glow: rgba(124, 58, 237, 0.35);
  --neon-lime: #ccff00;
  --neon-lime-hover: #b8e600;
  --text-dark: #0f0c20;
  --text-muted: #6b6684;
  --border-light: rgba(124, 58, 237, 0.15);
  --border-dark: #2a244d;
  --danger: #ff4b60;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-float: 0 20px 40px -15px rgba(124, 58, 237, 0.18);
  --shadow-neon: 0 6px 20px rgba(204, 255, 0, 0.35);
}

[data-theme="dark"] {
  --bg-gradient: linear-gradient(135deg, #0b0816 0%, #120f24 50%, #1a1533 100%);
  --surface-glass: rgba(18, 15, 36, 0.85);
  --surface-dark: #090714;
  --surface-card: #181430;
  --text-dark: #f5effe;
  --text-muted: #a49ec2;
  --border-light: rgba(139, 92, 246, 0.25);
  --border-dark: #2d2557;
  --shadow-float: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Custom Cyber Arrow Cursor & Particle Trail */
@media (min-width: 993px) {
  body, a, button, input, textarea, select {
    cursor: none !important;
  }

  .custom-arrow-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 26px;
    height: 26px;
    pointer-events: none;
    z-index: 99999;
    transform: translate(0, 0);
    filter: drop-shadow(0 0 6px rgba(204, 255, 0, 0.75)) drop-shadow(0 0 12px rgba(124, 58, 237, 0.5));
    transition: transform 0.15s ease-out;
  }

  .cursor-hover .custom-arrow-cursor {
    transform: scale(1.22) rotate(-6deg);
    filter: drop-shadow(0 0 10px rgba(204, 255, 0, 1)) drop-shadow(0 0 20px rgba(124, 58, 237, 0.8));
  }

  #cursorCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 99997;
  }
}

/* App Layout */
.app-wrapper {
  display: flex;
  max-width: 1480px;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
  gap: 2rem;
  align-items: flex-start;
  flex: 1; /* ดัน Footer ไปอยู่ล่างสุดเสมอ */
}

/* Sidebar Dock */
.side-dock {
  width: 260px;
  flex-shrink: 0;
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: var(--shadow-float);
  position: sticky;
  top: 1.5rem;
  z-index: 50;
}

.dock-header {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.dock-user-status {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dock-nav {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.dock-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  background: rgba(255, 255, 255, 0.08);
}

.dock-link:hover {
  background: var(--primary-purple);
  color: #ffffff;
  transform: translateX(4px);
}

.dock-link.active {
  background: var(--surface-dark);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(18, 15, 36, 0.3);
  border: 1px solid var(--border-light);
}

.dock-link.active .dock-icon-box {
  background: var(--neon-lime);
  color: var(--surface-dark);
}

.dock-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

/* Main Content Panel */
.main-content {
  flex: 1;
  min-width: 0;
}

/* Brand Typography */
.brand-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-text {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  display: flex;
  align-items: baseline;
}

.brand-text .txt-doc {
  color: var(--text-dark);
}

.brand-text .txt-vibe {
  background: linear-gradient(135deg, #8b5cf6 0%, #ccff00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: italic;
  margin-left: 1px;
}

.brand-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-lime);
  margin-left: 2px;
  display: inline-block;
  box-shadow: 0 0 8px var(--neon-lime);
}

/* Top Navbar */
.navbar {
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 0.75rem 1.5rem;
  margin-bottom: 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-float);
  position: relative;
  z-index: 100;
}

.navbar-center-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.nav-search-box {
  display: flex;
  align-items: center;
  background: var(--surface-card);
  border: 1px solid var(--border-light);
  border-radius: 30px;
  padding: 0.5rem 1rem;
  gap: 0.6rem;
  transition: all 0.25s ease;
}

.nav-search-box:focus-within {
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 3px var(--primary-purple-glow);
}

.nav-search-input {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  font-size: 0.9rem !important;
  color: var(--text-dark) !important;
  box-shadow: none !important;
  width: 100%;
}

.nav-search-input:focus {
  outline: none;
}

.nav-shortcut-badge {
  font-size: 0.7rem;
  font-weight: 800;
  background: var(--surface-dark);
  color: var(--neon-lime);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  white-space: nowrap;
}

.navbar-right-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-icon-nav {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-card);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-dark);
  font-size: 1.1rem;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: none;
}

.btn-icon-nav:hover {
  border-color: var(--primary-purple);
  transform: translateY(-2px) scale(1.05);
}

/* Notification Bell Dropdown */
.notification-wrapper {
  position: relative;
  display: inline-block;
}

.bell-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--danger);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--surface-card);
  pointer-events: none;
  animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 75, 96, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(255, 75, 96, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 75, 96, 0); }
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 360px;
  background: var(--surface-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(18, 15, 36, 0.4);
  padding: 1.25rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.96);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.notification-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.notif-header {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-dark);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-mark-read {
  background: transparent;
  border: none;
  color: var(--primary-purple);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-mark-read:hover {
  background: rgba(124, 58, 237, 0.1);
  text-decoration: underline;
}

.notif-list {
  max-height: 300px;
  overflow-y: auto;
  margin-top: 0.5rem;
}

.notif-item {
  display: flex;
  gap: 0.85rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-dark);
  transition: all 0.2s ease;
  background: rgba(124, 58, 237, 0.05);
  margin-bottom: 0.4rem;
  border-left: 3px solid var(--primary-purple);
}

.notif-item.read {
  border-left-color: transparent;
  background: transparent;
  opacity: 0.6;
}

.notif-item:hover {
  background: rgba(124, 58, 237, 0.15);
  transform: translateX(4px);
  opacity: 1;
}

.notif-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-dark);
  color: var(--neon-lime);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

/* Hero Banner */
.hero-banner {
  background: radial-gradient(circle at 85% 20%, rgba(204, 255, 0, 0.2), transparent 45%),
              radial-gradient(circle at 15% 85%, rgba(124, 58, 237, 0.2), transparent 50%),
              var(--surface-glass);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 3.25rem 2.75rem;
  margin-bottom: 2.75rem;
  box-shadow: var(--shadow-float);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 45%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 55%
  );
  transform: rotate(30deg);
  animation: heroLightSweep 10s infinite linear;
  pointer-events: none;
}

@keyframes heroLightSweep {
  0% { transform: translateY(-100%) rotate(30deg); }
  100% { transform: translateY(100%) rotate(30deg); }
}

.hero-flex-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-text-side {
  flex: 1.2;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary-purple);
  margin-bottom: 0.85rem;
  background: rgba(124, 58, 237, 0.12);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
}

.hero-title {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.hero-title .glow-text {
  background: linear-gradient(135deg, var(--primary-purple) 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
}

/* 3D Visual Stage */
.hero-visual-side {
  flex-shrink: 0;
  width: 300px;
  height: 300px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
}

.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.particle-1 {
  width: 8px;
  height: 8px;
  background: var(--neon-lime);
  top: 20%;
  left: 15%;
  box-shadow: 0 0 12px var(--neon-lime);
  animation: particleFloat1 4s ease-in-out infinite alternate;
}

.particle-2 {
  width: 12px;
  height: 12px;
  background: var(--primary-purple);
  bottom: 25%;
  right: 15%;
  box-shadow: 0 0 14px var(--primary-purple);
  animation: particleFloat2 5s ease-in-out infinite alternate;
}

.particle-3 {
  width: 6px;
  height: 6px;
  background: #ffffff;
  top: 70%;
  left: 25%;
  animation: particleFloat1 3.5s ease-in-out infinite alternate;
}

@keyframes particleFloat1 {
  0% { transform: translateY(0) scale(1); opacity: 0.4; }
  100% { transform: translateY(-25px) scale(1.3); opacity: 1; }
}

@keyframes particleFloat2 {
  0% { transform: translateY(0) scale(1.2); opacity: 0.7; }
  100% { transform: translateY(30px) scale(0.8); opacity: 0.3; }
}

.radar-ring-outer {
  position: absolute;
  width: 290px;
  height: 290px;
  border-radius: 50%;
  border: 2px dashed rgba(124, 58, 237, 0.25);
  animation: rotateClockwise 24s linear infinite;
}

.radar-ring-inner {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1.5px solid rgba(204, 255, 0, 0.4);
  border-top-color: transparent;
  border-bottom-color: transparent;
  animation: rotateCounter 14s linear infinite;
}

@keyframes rotateClockwise { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes rotateCounter { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }

.floating-device-stage {
  width: 200px;
  height: 200px;
  position: relative;
  z-index: 5;
  transition: transform 0.15s ease-out;
  transform-style: preserve-3d;
}

.floating-device-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 20px 30px rgba(18, 15, 36, 0.35));
  animation: coreFloat 4.5s ease-in-out infinite alternate;
}

@keyframes coreFloat {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(3deg); }
  100% { transform: translateY(-4px) rotate(-3deg); }
}

.live-signal-badge {
  position: absolute;
  bottom: 5px;
  left: -15px;
  background: var(--surface-dark);
  color: #ffffff;
  padding: 0.5rem 0.9rem;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 10px 20px rgba(18, 15, 36, 0.35);
  border: 1px solid rgba(204, 255, 0, 0.5);
  animation: badgeFloatLeft 4s ease-in-out infinite alternate;
  z-index: 6;
}

.online-users-badge {
  position: absolute;
  top: 5px;
  right: -15px;
  background: var(--surface-card);
  color: var(--text-dark);
  padding: 0.4rem 0.85rem;
  border-radius: 30px;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: var(--shadow-float);
  border: 1px solid var(--border-light);
  animation: badgeFloatRight 4.5s ease-in-out infinite alternate;
  z-index: 6;
}

@keyframes badgeFloatLeft {
  0% { transform: translateY(0) rotate(0); }
  100% { transform: translateY(-10px) rotate(-2deg); }
}

@keyframes badgeFloatRight {
  0% { transform: translateY(0) rotate(0); }
  100% { transform: translateY(10px) rotate(2deg); }
}

.live-dot-pulse {
  width: 8px;
  height: 8px;
  background: var(--neon-lime);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--neon-lime);
}

/* Feature Bento Grid (จัดแถวละ 2 การ์ด + ดีไซน์ Tarot) */
.feature-bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* บังคับ 2 การ์ดต่อ 1 แถว */
  gap: 2rem;
  margin-bottom: 3.5rem;
}

.bento-card {
  background: var(--surface-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.85rem;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 15px 35px -10px rgba(18, 15, 36, 0.5);
}

/* ลายเส้นกรอบซ้อนด้านในแบบขอบไพ่ (Inner Border Frame) */
.bento-card::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  pointer-events: none;
  transition: border-color 0.35s ease;
}

.bento-card:hover {
  transform: translateY(-8px);
  border-color: rgba(204, 255, 0, 0.45);
  box-shadow: 0 20px 45px -10px rgba(124, 58, 237, 0.4);
}

.bento-card:hover::before {
  border-color: rgba(204, 255, 0, 0.3);
}

/* มุมการ์ดไพ่ (Card Corner Rank & Suit) */
.card-corner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--neon-lime);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
}

.card-rank {
  background: rgba(204, 255, 0, 0.12);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--neon-lime);
}

.card-suit {
  color: #a49ec2;
}

.bento-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: all 0.3s ease;
}

.bento-card:hover .bento-icon-wrapper {
  background: var(--neon-lime);
  color: var(--surface-dark);
  transform: scale(1.08) rotate(4deg);
  box-shadow: 0 0 20px rgba(204, 255, 0, 0.4);
}

/* Animations สำหรับ SVG ไอคอนในการ์ด */
.animated-card-svg .svg-rotate {
  transform-origin: center;
  animation: svgSpin 8s linear infinite;
}

.animated-card-svg .svg-pulse {
  transform-origin: center;
  animation: svgPulse 2s ease-in-out infinite alternate;
}

.animated-card-svg .svg-scan-line {
  animation: svgScan 2.5s ease-in-out infinite;
}

.animated-card-svg .svg-line-1,
.animated-card-svg .svg-line-2,
.animated-card-svg .svg-line-3 {
  animation: svgTyping 2s ease-in-out infinite alternate;
}

@keyframes svgSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes svgPulse { from { transform: scale(0.9); opacity: 0.7; } to { transform: scale(1.1); opacity: 1; } }
@keyframes svgScan { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(14px); } }
@keyframes svgTyping { 0% { opacity: 0.4; } 100% { opacity: 1; } }

.bento-card h4 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bento-card:hover h4 {
  color: var(--neon-lime);
}

.bento-card p {
  font-size: 0.92rem;
  color: #a49ec2;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.bento-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  background: rgba(124, 58, 237, 0.3);
  color: #d8b4fe;
  margin-left: auto;
}

.bento-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
}

.footer-label {
  color: #6b6684;
  font-weight: 700;
}

.footer-status {
  color: var(--neon-lime);
  font-weight: 800;
}

/* Cards & Layout */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-float);
}

/* Manual Product Cards */
.manual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

.manual-card {
  background: var(--surface-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.manual-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary-purple);
  box-shadow: 0 25px 45px -10px var(--primary-purple-glow);
}

.manual-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: rgba(124, 58, 237, 0.05);
  transition: transform 0.4s ease;
}

.manual-card:hover .manual-card-img {
  transform: scale(1.03);
}

.manual-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  background: var(--surface-card);
  z-index: 2;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 40px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
}

.btn-lime {
  background: var(--neon-lime);
  color: #0f0c20;
  box-shadow: var(--shadow-neon);
}

.btn-lime:hover {
  background: var(--neon-lime-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(204, 255, 0, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-light);
  color: var(--text-dark);
}

.btn-secondary:hover {
  background: var(--primary-purple);
  color: #ffffff;
  border-color: var(--primary-purple);
}

.btn-danger {
  background: #fff0f2;
  color: var(--danger);
  border: 1px solid #ffd6dc;
}

.btn-danger:hover {
  background: var(--danger);
  color: #ffffff;
}

.btn-sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
}

.btn-full {
  width: 100%;
}

/* ================= SITE FOOTER (ย้ายมาไว้กว้าง 100% นอก App Wrapper) ================= */
.site-footer {
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-light);
  padding: 3.5rem 0 2rem 0;
  width: 100%;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.footer-brand {
  max-width: 320px;
}

.footer-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-links-wrapper {
  display: flex;
  gap: 4rem;
  flex-wrap: wrap;
}

.footer-column h4 {
  font-size: 1.05rem;
  color: var(--text-dark);
  margin-bottom: 1.25rem;
  font-weight: 800;
}

.footer-column a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  transition: color 0.2s ease;
}

.footer-column a:hover {
  color: var(--primary-purple);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(204, 255, 0, 0.1);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  color: var(--neon-lime);
  font-weight: 700;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--neon-lime);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--neon-lime);
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .app-wrapper { flex-direction: column; padding: 0 1rem; gap: 1rem; }
  .side-dock {
    position: fixed;
    bottom: 0; left: 0; right: 0; top: auto;
    width: 100%;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 0.75rem 1rem;
    flex-direction: row;
    justify-content: space-around;
    z-index: 1000;
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.2);
  }
  .dock-header, .dock-user-status { display: none; }
  .dock-nav { flex-direction: row; width: 100%; justify-content: space-around; }
  .dock-link span:not(.dock-icon-box) { display: none; }
  .dock-link { padding: 0.5rem; background: transparent; }
  
  .navbar-center-search { display: none; }
  .hero-banner { padding: 2.25rem 1.5rem; }
  .hero-flex-box { flex-direction: column-reverse; text-align: center; gap: 1.5rem; }
  .hero-text-side { display: flex; flex-direction: column; align-items: center; }
  .hero-title { font-size: 2.2rem; }
  .hero-visual-side { width: 240px; height: 240px; }
  .radar-ring-outer { width: 230px; height: 230px; }
  .radar-ring-inner { width: 180px; height: 180px; }
  .floating-device-stage { width: 150px; height: 150px; }
  .live-signal-badge { left: 0; bottom: 0; font-size: 0.7rem; }
  .online-users-badge { right: 0; top: 0; font-size: 0.7rem; }
  
  /* บนมือถือปรับ Bento Grid กลับเป็นแถวละ 1 ใบ */
  .feature-bento-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  
  .notification-dropdown { width: 300px; right: -50px; }
  
  .footer-top { flex-direction: column; gap: 2rem; align-items: center; text-align: center; }
  .footer-links-wrapper { justify-content: center; }
  .footer-bottom { flex-direction: column; text-align: center; justify-content: center; }
  .site-footer { padding-bottom: 6rem; /* เผื่อพื้นที่ให้ Sidebar Dock ด้านล่างสุด */ }
}