/* ===== LANDING PAGE SPECIFIC STYLES ===== */
/* CSS Variables are now centralized in system.css */

html {
  scroll-padding-top: 100px;
}

body.landing .container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
  overflow-x: hidden;
}

/* Add top margin only for non-hero sections */
body.landing section:not(.hero) .container {
  margin-top: 0;
}

body.landing section:first-of-type:not(.hero) {
  margin-top: 100px;
}

body.landing footer .container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== NAVIGATION STYLES ===== */
/* All navbar styles are centralized in system.css */
/* All navbar, hamburger, and mobile-menu styles moved to system.css for unified navbar */

.mobile-divider {
  height: 1px;
  background: rgba(168, 197, 218, 0.2);
  margin: 0.5rem 0;
}

/* Mobile User Info Section */
.mobile-user-info {
  background: var(--bg-tertiary);
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 0.5rem;
}

.mobile-user-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.mobile-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(168, 197, 218, 0.3);
  flex-shrink: 0;
}

.mobile-user-details {
  flex: 1;
  min-width: 0;
}

.mobile-user-name {
  font-weight: 700;
  font-size: 1rem;
  color: #e2e8f0;
  margin-bottom: 2px;
}

.mobile-user-email {
  font-size: 0.8125rem;
  color: #64748b;
}

.mobile-balance-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.mobile-balance-item {
  background: rgba(20, 27, 45, 0.6);
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(168, 197, 218, 0.15);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}

.mobile-balance-item:active {
  transform: scale(0.98);
  background: rgba(20, 27, 45, 0.8);
  border-color: rgba(168, 197, 218, 0.25);
}

.mobile-balance-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.mobile-balance-label svg {
  opacity: 0.7;
}

.mobile-balance-value {
  font-size: 1rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 0.25rem;
}

.mobile-balance-locked {
  font-size: 0.6875rem;
  color: #64748b;
}

.mobile-btn {
  position: relative;
  background: rgba(168, 197, 218, 0.15);
  color: #A8C5DA;
  border: 1px solid rgba(168, 197, 218, 0.3);
  padding: 0.875rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  text-align: center;
  width: 100%;
  overflow: hidden;
}

.mobile-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--border-primary);
  opacity: 0;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-btn:hover {
  background: rgba(168, 197, 218, 0.2);
  border-color: rgba(168, 197, 218, 0.5);
  transform: translateY(-1px);
}

.mobile-btn:hover::before {
  opacity: 1;
}

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

.mobile-btn.logout {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.mobile-btn.logout:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 80px 0 60px;
  position: relative;
  text-align: center;
  overflow: hidden;
}

.badge-dot {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 10px;
  height: 10px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  animation: dotBlink 1.5s ease-in-out infinite;
  z-index: 1;
}

.badge-dot::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: rgba(20, 27, 45, 0.95);
  color: #f1f5f9;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(16, 185, 129, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: none !important;
}

.badge-dot::after {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  right: 3px;
  border: 4px solid transparent;
  border-top-color: var(--bg-panel);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  animation: none !important;
}

.badge-dot:hover::before,
.badge-dot:hover::after {
  opacity: 1;
}

@keyframes dotBlink {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.3;
    transform: scale(0.8);
  }
}

.hero h1 {
  font-size: clamp(48px, 8vw, 120px);
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 50%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  line-height: 0.95;
  animation: titleFadeIn 0.8s ease-out;
}

@keyframes titleFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-subtitle {
  font-size: clamp(20px, 3vw, 36px);
  font-weight: 600;
  color: #cbd5e1;
  margin-top: 0;
  letter-spacing: 0.02em;
  animation: titleFadeIn 0.8s ease-out 0.1s backwards;
}

.hero-description {
  font-size: clamp(14px, 1.5vw, 18px);
  color: var(--text-secondary);
  max-width: 650px;
  margin: 20px auto 40px;
  line-height: 1.6;
  animation: titleFadeIn 0.8s ease-out 0.2s backwards;
  padding: 0 1rem;
}

#typingText {
  display: inline-block;
  font-size: inherit;
  font-weight: 500;
  line-height: 1.6;
  transition: opacity 0.3s ease-in-out;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  text-align: center;
  max-width: 100%;
}

#typingText::after {
  content: none !important;
}

.char {
  white-space: pre;
}

.char-new {
  opacity: 1;
}

.char-morphing {
  display: inline-block;
  animation: morphIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: #A8C5DA;
}

.char-old {
  opacity: 0.35;
  color: #64748b;
}

@keyframes morphIn {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.8);
    filter: blur(4px);
  }

  60% {
    transform: translateY(2px) scale(1.05);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: linear-gradient(180deg, #A8C5DA 0%, #A8C5DA 100%);
  margin: 0 1px;
  animation: cursorPulse 1.2s ease-in-out infinite;
  vertical-align: text-bottom;
  box-shadow: 0 0 10px rgba(168, 197, 218, 0.6);
  border-radius: 1px;
}

@keyframes cursorPulse {

  0%,
  100% {
    opacity: 1;
    transform: scaleY(1);
  }

  50% {
    opacity: 0.3;
    transform: scaleY(1.05);
  }
}

.hero-stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto 48px;
  padding: 36px 48px;
  background: var(--bg-card-light);
  border: 1px solid var(--border-primary);
  border-radius: 24px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
  animation: titleFadeIn 0.8s ease-out 0.3s backwards;
}

.stat-item {
  text-align: center;
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 60%;
  background: linear-gradient(180deg, transparent, var(--border-accent), transparent);
}

.stat-value {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
  font-family: var(--font-numeric);
}

.stat-value.pos {
  color: var(--success);
}

.stat-value.neg {
  color: var(--danger);
}

.stat-label {
  font-size: clamp(12px, 1vw, 14px);
  color: var(--market-neutral);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: titleFadeIn 0.8s ease-out 0.4s backwards;
}

/* ===== BUTTONS ===== */
/* Button styles inherited from system.css */
/* Landing page specific button overrides for larger sizing */
.hero-actions .btn-primary,
.hero-actions .btn-secondary {
  padding: 18px 36px;
  font-size: clamp(15px, 1.2vw, 17px);
}

/* ===== SECTIONS ===== */
.sec {
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
  text-align: center;
}

.sub {
  font-size: 1rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 3rem;
}

/* ===== GRID & CARDS ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-secondary);
  border-radius: 16px;
  padding: 28px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transform: translateZ(0) scale(1);
  will-change: transform, box-shadow, border-color;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  right: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(168, 197, 218, 0.1),
      transparent);
  transition: all 0.6s ease;
}

.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(168, 197, 218, 0), rgba(168, 197, 218, 0.4));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover::before {
  left: 100%;
  right: -100%;
}

.card:hover::after {
  opacity: 1;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 197, 218, 0.3);
  box-shadow:
    0 0 0 1px rgba(168, 197, 218, 0.08),
    0 6px 20px -4px rgba(168, 197, 218, 0.15),
    0 12px 32px -8px rgba(0, 0, 0, 0.3);
  background: rgba(20, 27, 45, 0.9);
}

.card:active {
  transform: translateY(-2px);
  transition: all 0.1s ease;
}

.card .meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 12px;
}

.card .cat {
  background: rgba(168, 197, 218, 0.15);
  color: #A8C5DA;
  padding: 4px 12px;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(168, 197, 218, 0.2);
}

.card:hover .cat {
  background: rgba(168, 197, 218, 0.25);
  border-color: rgba(168, 197, 218, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(168, 197, 218, 0.2);
}

.meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.date {
  color: var(--text-muted);
  font-weight: 500;
}

.cat {
  background: rgba(168, 197, 218, 0.2);
  color: #A8C5DA;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  border: 1px solid rgba(168, 197, 218, 0.3);
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
  transition: color 0.3s ease, transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.card:hover h3 {
  color: #A8C5DA;
  transform: translateX(4px);
}

.card p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.9375rem;
  transition: color 0.3s ease;
  position: relative;
  z-index: 1;
}

.card:hover p {
  color: #cbd5e1;
}

/* ===== PORTFOLIO SECTION ===== */
.port-wrap {
  position: relative;
  overflow: visible;
  /* ✅ FIX: Allow tooltips to show outside container */
  margin: 0 -2rem;
  padding: 0 2rem;
  width: 100%;
}

.port-scroll {
  display: flex;
  gap: 20px;
  overflow: visible;
  padding: 20px 0;
  cursor: grab;
  user-select: none;
  width: max-content;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.port-scroll::-webkit-scrollbar {
  display: none;
}

.port-scroll:active {
  cursor: grabbing;
}

.pcard {
  min-width: 320px;
  max-width: 320px;
  background: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-overlay) 100%);
  border: 1px solid rgba(168, 197, 218, 0.15);
  border-radius: 20px;
  padding: 28px 24px;
  flex-shrink: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.pcard::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
      transparent,
      rgba(168, 197, 218, 0.5) 20%,
      rgba(168, 197, 218, 0.5) 50%,
      rgba(168, 197, 218, 0.5) 80%,
      transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.pcard:hover {
  transform: translateY(-6px);
  border-color: rgba(168, 197, 218, 0.3);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(168, 197, 218, 0.1) inset;
  background: linear-gradient(145deg, var(--bg-panel) 0%, var(--bg-panel) 100%);
}

.pcard:hover::before {
  opacity: 1;
}

.plogo {
  width: 64px;
  height: 64px;
  font-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(168, 197, 218, 0.15) 0%, rgba(168, 197, 218, 0.15) 100%);
  border-radius: 16px;
  margin: 0 auto 20px;
  border: 1px solid rgba(168, 197, 218, 0.25);
  transition: all 0.3s ease;
}

.pcard:hover .plogo {
  transform: scale(1.05);
  border-color: rgba(168, 197, 218, 0.4);
  box-shadow: 0 8px 24px rgba(168, 197, 218, 0.2);
}

.pname {
  font-size: 20px;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.palloc {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(168, 197, 218, 0.2) 0%, rgba(168, 197, 218, 0.2) 100%);
  color: #A8C5DA;
  padding: 6px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  border: 1px solid rgba(168, 197, 218, 0.3);
  transition: all 0.3s ease;
}

.pcard:hover .palloc {
  background: linear-gradient(135deg, rgba(168, 197, 218, 0.3) 0%, rgba(168, 197, 218, 0.3) 100%);
  color: #93c5fd;
}

.palloc-bar {
  height: 6px;
  background: var(--bg-card-light);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid rgba(71, 85, 105, 0.2);
}

.palloc-fill {
  height: 100%;
  background: linear-gradient(90deg, #A8C5DA 0%, #A8C5DA 25%, #8BA9BE 75%, #A8C5DA 100%);
  border-radius: 10px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(168, 197, 218, 0.4);
}

.pinfo {
  display: grid;
  gap: 12px;
}

.pinfo-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 14px;
  background: rgba(20, 27, 45, 0.6);
  border-radius: 12px;
  border: 1px solid rgba(71, 85, 105, 0.25);
  transition: all 0.3s ease;
}

.pcard:hover .pinfo-item {
  background: rgba(20, 27, 45, 0.8);
  border-color: rgba(168, 197, 218, 0.2);
}

.plabel {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.pvalue {
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}

.pchange {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  margin: 6px auto 0;
  padding: 6px 12px;
  border-radius: 8px;
  width: fit-content;
  transition: all 0.3s ease;
}

.pchange.pos {
  color: var(--accent-green);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.1) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.pchange.neg {
  color: var(--accent-red);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.1) 100%);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ===== NEW PORTFOLIO CARD DESIGN ===== */
.pcard-new {
  min-width: 380px;
  max-width: 380px;
  background: linear-gradient(145deg, var(--bg-overlay) 0%, var(--bg-panel) 100%);
  border: 1px solid var(--border-primary);
  border-radius: 24px;
  padding: 24px;
  flex-shrink: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: visible;
  /* ✅ FIX: Allow chart tooltip to overflow card */
  clip-path: none;
  /* Ensure no clipping on tooltip */
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pcard-new::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
      transparent,
      rgba(168, 197, 218, 0.5) 30%,
      rgba(168, 197, 218, 0.5) 70%,
      transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.pcard-new:hover {
  transform: translateY(-8px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-primary) inset;
  background: linear-gradient(145deg, var(--bg-modal) 0%, var(--bg-primary) 100%);
}

.pcard-new:hover::before {
  opacity: 1;
}

/* Header with icon and title */
.pcard-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pcard-icon {
  width: 56px;
  height: 56px;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card-light);
  border-radius: 16px;
  border: 1px solid var(--border-secondary);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.pcard-stock-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
}

.pcard-new:hover .pcard-icon {
  transform: scale(1.05);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md);
}

.pcard-header-content {
  flex: 1;
  min-width: 0;
}

.pcard-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
  width: 100%;
}

.pcard-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  line-height: 1.2;
}

.pcard-company-category {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
  line-height: 1;
}

.pcard-company-category.company-tech {
  background: linear-gradient(135deg, rgba(168, 197, 218, 0.15) 0%, rgba(139, 169, 190, 0.15) 100%);
  color: #A8C5DA;
  border-color: rgba(168, 197, 218, 0.3);
}

.pcard-company-category.company-automotive {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.pcard-company-category.company-oilgas {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.15) 0%, rgba(202, 138, 4, 0.15) 100%);
  color: #eab308;
  border-color: rgba(234, 179, 8, 0.3);
}

.pcard-company-category.company-metals {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
}

.pcard-company-category.company-crypto {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
}

.pcard-company-category.company-liquid {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.15) 100%);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.3);
}

.pcard-company-category.company-fixed {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(79, 70, 229, 0.15) 100%);
  color: #6366f1;
  border-color: rgba(99, 102, 241, 0.3);
}

.pcard-company-category.company-diversified {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.15) 0%, rgba(100, 116, 139, 0.15) 100%);
  color: #94a3b8;
  border-color: var(--border-accent);
}

.pcard-ticker {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* Badges */
.pcard-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  margin-bottom: 16px;
}

.pcard-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 6px;
  border: 1px solid;
  letter-spacing: 0.06em;
  line-height: 1;
}

.badge-category.category-crypto {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
}

.badge-category.category-stock {
  background: linear-gradient(135deg, rgba(168, 197, 218, 0.15) 0%, rgba(168, 197, 218, 0.15) 100%);
  color: #A8C5DA;
  border-color: rgba(168, 197, 218, 0.3);
}

.badge-type {
  background: linear-gradient(135deg, var(--border-primary) 0%, rgba(100, 116, 139, 0.12) 100%);
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.25);
}

.badge-risk.risk-low {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

.badge-risk.risk-high {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.badge-risk.risk-medium {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
}

/* Values Section */
.pcard-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.pcard-value-item {
  background: var(--bg-card-light);
  border: 1px solid var(--border-secondary);
  border-radius: 12px;
  padding: 14px 12px;
  transition: all 0.3s ease;
}

.pcard-new:hover .pcard-value-item {
  background: var(--bg-hover);
  border-color: var(--border-accent);
}

.pcard-value-label {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.pcard-value-amount {
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

/* Returns Section */
.pcard-returns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pcard-return-item {
  background: var(--bg-card-light);
  border: 1px solid var(--border-secondary);
  border-radius: 12px;
  padding: 14px 12px;
  transition: all 0.3s ease;
}

.pcard-new:hover .pcard-return-item {
  background: var(--bg-hover);
  border-color: var(--border-accent);
}

.pcard-return-label {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.pcard-return-value {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.pcard-return-value .positive {
  color: var(--success);
}

.pcard-return-value .negative {
  color: var(--danger);
}

.pcard-return-value.positive {
  color: var(--success);
}

.pcard-return-value.negative {
  color: var(--danger);
}

/* Allocation Section */
.pcard-allocation {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pcard-allocation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pcard-allocation-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pcard-allocation-percent {
  font-size: 16px;
  font-weight: 900;
  background: linear-gradient(135deg, #A8C5DA 0%, #8BA9BE 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pcard-allocation-bar {
  height: 8px;
  background: var(--bg-card-light);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-secondary);
}

.pcard-allocation-fill {
  height: 100%;
  background: linear-gradient(90deg, #A8C5DA 0%, #A8C5DA 35%, #8BA9BE 70%, #A8C5DA 100%);
  border-radius: 10px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(168, 197, 218, 0.5);
}

/* Chart Section */
.pcard-chart {
  background: var(--bg-card-light);
  border: 1px solid var(--border-secondary);
  border-radius: 14px;
  padding: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: visible;
  /* Allow tooltip to overflow */
}

.pcard-chart:hover {
  background: var(--bg-hover);
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pcard-new:hover .pcard-chart {
  background: var(--bg-hover);
  border-color: var(--border-accent);
}

.pcard-chart-label {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.pcard-chart-canvas {
  width: 100%;
  height: 80px;
  position: relative;
  overflow: visible;
  /* ✅ FIX: Allow tooltip to show outside canvas */
}

.pcard-chart-canvas canvas {
  max-width: 100% !important;
  max-height: 100% !important;
}

/* Sector Badge Styles */
.badge-sector {
  background: linear-gradient(135deg, rgba(168, 197, 218, 0.15) 0%, rgba(168, 197, 218, 0.15) 100%);
  color: #A8C5DA;
  border-color: rgba(168, 197, 218, 0.3);
}

.badge-sector.sector-crypto {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
}

.badge-sector.sector-us {
  background: linear-gradient(135deg, rgba(168, 197, 218, 0.15) 0%, rgba(139, 169, 190, 0.15) 100%);
  color: #A8C5DA;
  border-color: rgba(168, 197, 218, 0.3);
}

.badge-sector.sector-jkse {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.badge-sector.sector-commodity {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.15) 0%, rgba(202, 138, 4, 0.15) 100%);
  color: #eab308;
  border-color: rgba(234, 179, 8, 0.3);
}

.badge-sector.sector-bond {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

.badge-sector.sector-cash {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.15) 0%, rgba(100, 116, 139, 0.15) 100%);
  color: #94a3b8;
  border-color: var(--border-accent);
}

.badge-risk.risk-none {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.15) 0%, rgba(100, 116, 139, 0.15) 100%);
  color: #94a3b8;
  border-color: var(--border-accent);
}

/* Chart Tooltip */
.pcard-chart-tooltip {
  position: absolute;
  background: linear-gradient(145deg, var(--bg-modal) 0%, var(--bg-modal) 100%);
  border: 1px solid rgba(168, 197, 218, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  pointer-events: none;
  z-index: 9999;
  /* ✅ FIX: Higher z-index to ensure tooltip shows above all elements */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  white-space: nowrap;
  /* Prevent text wrapping */
  font-family: var(--font-numeric);
}

.tooltip-price {
  font-size: 14px;
  font-weight: 800;
  color: #A8C5DA;
  margin-bottom: 4px;
  font-family: var(--font-numeric);
}

.tooltip-date {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

/* Asset Type Badge Styles */
.badge-asset {
  background: linear-gradient(135deg, rgba(168, 197, 218, 0.15) 0%, rgba(168, 197, 218, 0.15) 100%);
  color: #A8C5DA;
  border-color: rgba(168, 197, 218, 0.3);
}

.badge-asset.asset-crypto {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
}

.badge-asset.asset-stock {
  background: linear-gradient(135deg, rgba(168, 197, 218, 0.15) 0%, rgba(168, 197, 218, 0.15) 100%);
  color: #A8C5DA;
  border-color: rgba(168, 197, 218, 0.3);
}

/* New Custom Badge Styles for Database Values */
.badge-asset.asset-growth {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.15) 100%);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.3);
}

.badge-asset.asset-value {
  background: linear-gradient(135deg, rgba(168, 197, 218, 0.15) 0%, rgba(139, 169, 190, 0.15) 100%);
  color: #A8C5DA;
  border-color: rgba(168, 197, 218, 0.3);
}

.badge-asset.asset-dividend {
  background: linear-gradient(135deg, rgba(168, 197, 218, 0.15) 0%, rgba(139, 169, 190, 0.15) 100%);
  color: #A8C5DA;
  border-color: rgba(168, 197, 218, 0.3);
}

.badge-sector.sector-tech {
  background: linear-gradient(135deg, rgba(168, 197, 218, 0.15) 0%, rgba(139, 169, 190, 0.15) 100%);
  color: #A8C5DA;
  border-color: rgba(168, 197, 218, 0.3);
}

.badge-sector.sector-energy {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.15) 0%, rgba(202, 138, 4, 0.15) 100%);
  color: #eab308;
  border-color: rgba(234, 179, 8, 0.3);
}

.badge-sector.sector-finance {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

.badge-sector.sector-other {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.15) 0%, rgba(100, 116, 139, 0.15) 100%);
  color: #94a3b8;
  border-color: var(--border-accent);
}

.badge-asset.asset-commodity {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.15) 0%, rgba(202, 138, 4, 0.15) 100%);
  color: #eab308;
  border-color: rgba(234, 179, 8, 0.3);
}

.badge-asset.asset-bond {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

.badge-asset.asset-cash {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.15) 0%, rgba(100, 116, 139, 0.15) 100%);
  color: #94a3b8;
  border-color: var(--border-accent);
}

/* Footer with last updated */
.pcard-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(71, 85, 105, 0.15);
}

.pcard-last-updated {
  display: flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  padding: 6px 12px;
  background: rgba(71, 85, 105, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(71, 85, 105, 0.12);
  transition: all 0.3s ease;
}

.pcard-last-updated:hover {
  background: rgba(71, 85, 105, 0.12);
  border-color: rgba(71, 85, 105, 0.2);
}


/* ===== RESPONSIVE PORTFOLIO CARDS ===== */

/* Tablet (max 1024px) */
@media (max-width: 1024px) {
  .pcard-new {
    min-width: 340px;
    max-width: 340px;
    padding: 20px;
    gap: 16px;
  }

  .pcard-icon {
    width: 48px;
    height: 48px;
    font-size: 28px;
  }

  .pcard-title {
    font-size: 18px;
  }

  .pcard-ticker {
    font-size: 12px;
  }

  .pcard-badge {
    font-size: 10px;
    padding: 4px 8px;
  }

  .pcard-value-amount,
  .pcard-return-value {
    font-size: 16px;
  }

  .pcard-allocation-percent {
    font-size: 14px;
  }
}

/* Mobile (max 768px) */
@media (max-width: 768px) {
  .pcard-new {
    min-width: 300px;
    max-width: 300px;
    padding: 18px;
    display: flex !important; /* Force display on mobile */
    visibility: visible !important;
    opacity: 1 !important; /* Ensure visibility */
    gap: 14px;
    backdrop-filter: none; /* Remove expensive blur on mobile */
    -webkit-backdrop-filter: none;
  }

  .pcard-header {
    gap: 12px;
  }

  .pcard-icon {
    width: 44px;
    height: 44px;
    font-size: 24px;
  }

  .pcard-title {
    font-size: 16px;
  }

  .pcard-ticker {
    font-size: 11px;
  }

  .pcard-badges {
    gap: 6px;
  }

  .pcard-badge {
    font-size: 9px;
    padding: 4px 7px;
  }

  .pcard-values,
  .pcard-returns {
    gap: 10px;
  }

  .pcard-value-item,
  .pcard-return-item {
    padding: 12px 10px;
  }

  .pcard-value-label,
  .pcard-return-label {
    font-size: 9px;
    margin-bottom: 6px;
  }

  .pcard-value-amount,
  .pcard-return-value {
    font-size: 15px;
  }

  .pcard-allocation-label {
    font-size: 11px;
  }

  .pcard-allocation-percent {
    font-size: 13px;
  }

  .pcard-allocation-bar {
    height: 6px;
  }

  .pcard-chart {
    padding: 14px;
  }

  .pcard-chart-label {
    font-size: 10px;
    margin-bottom: 10px;
  }

  .pcard-chart-canvas {
    height: 70px;
  }

  .pcard-footer {
    gap: 6px;
    padding-top: 6px;
  }

  .pcard-btn {
    padding: 8px;
  }

  .pcard-btn svg {
    width: 14px;
    height: 14px;
  }
}

/* Small Mobile (max 480px) */
@media (max-width: 480px) {

  /* Chart tooltip compact for small screens */
  .chart-tooltip,
  .chart-tooltip * {
    font-size: 9px !important;
    line-height: 1.3 !important;
  }

  .chart-tooltip {
    padding: 6px !important;
    min-width: 120px !important;
    max-width: calc(100vw - 20px) !important;
    border-radius: 6px !important;
  }

  .hero-description {
    font-size: 14px;
    margin: 16px auto 32px;
    padding: 0 1.5rem;
    max-width: 100%;
  }

  #typingText {
    font-size: 14px;
    line-height: 1.8;
    display: block;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
    margin: 0 auto 32px;
  }

  .stat-item:not(:last-child)::after {
    display: none;
  }

  .pcard-new {
    min-width: 280px;
    max-width: 280px;
    padding: 16px;
    gap: 12px;
  }

  .pcard-icon {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .pcard-title {
    font-size: 15px;
  }

  .pcard-ticker {
    font-size: 10px;
  }

  .pcard-badge {
    font-size: 8px;
    padding: 3px 6px;
  }

  .pcard-value-item,
  .pcard-return-item {
    padding: 10px 8px;
  }

  .pcard-value-label,
  .pcard-return-label {
    font-size: 8px;
  }

  .pcard-value-amount,
  .pcard-return-value {
    font-size: 14px;
  }

  .pcard-allocation-label {
    font-size: 10px;
  }

  .pcard-allocation-percent {
    font-size: 12px;
  }

  .pcard-chart {
    padding: 12px;
  }

  .pcard-chart-canvas {
    height: 60px;
  }

  .pcard-btn {
    padding: 7px;
  }

  .pcard-btn svg {
    width: 13px;
    height: 13px;
  }
}

/* Extra Small Mobile (max 360px) */
@media (max-width: 360px) {
  .pcard-new {
    min-width: 260px;
    max-width: 260px;
    padding: 14px;
    gap: 10px;
  }

  .pcard-icon {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .pcard-title {
    font-size: 14px;
  }

  .pcard-value-amount,
  .pcard-return-value {
    font-size: 13px;
  }

  .pcard-chart-canvas {
    height: 50px;
  }
}

.pchange::before {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-style: solid;
}

.pchange.pos::before {
  border-width: 0 4px 6px 4px;
  border-color: transparent transparent var(--accent-green) transparent;
}

.pchange.neg::before {
  border-width: 6px 4px 0 4px;
  border-color: var(--accent-red) transparent transparent transparent;
}

/* ===== STOCK DISPLAY ===== */
.stock-wrap {
  background: var(--bg-secondary);
  border: 1px solid var(--border-secondary);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  margin-bottom: 30px;
  overflow: hidden;
}

/* Seasonal decorations - Subtle & Beautiful */
.stock-wrap::before,
.stock-wrap::after {
  content: '';
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

/* Winter - Subtle frost corners */
.stock-wrap.season-winter::before {
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background:
    radial-gradient(circle at 5% 5%, var(--border-secondary) 0%, transparent 15%),
    radial-gradient(circle at 95% 5%, var(--border-secondary) 0%, transparent 15%),
    radial-gradient(circle at 5% 95%, var(--border-secondary) 0%, transparent 15%),
    radial-gradient(circle at 95% 95%, var(--border-secondary) 0%, transparent 15%);
  border-radius: 24px;
}

.stock-wrap.season-winter .season-particle {
  font-size: 12px;
  animation: snowfall 15s linear infinite;

}

/* Spring - Soft pink glow corners */
.stock-wrap.season-spring::before {
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background:
    radial-gradient(circle at 10% 10%, rgba(168, 197, 218, 0.06) 0%, transparent 20%),
    radial-gradient(circle at 90% 10%, rgba(219, 39, 119, 0.06) 0%, transparent 20%);
  border-radius: 24px;
}

.stock-wrap.season-spring .season-particle {
  font-size: 14px;
  animation: floatGentle 12s ease-in-out infinite;

}

/* Summer - Warm golden accent */
.stock-wrap.season-summer::before {
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.12) 0%, transparent 70%);
  border-radius: 0 24px 0 0;
}

.stock-wrap.season-summer::after {
  bottom: 0;
  left: 0;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle at 20% 80%, rgba(234, 179, 8, 0.1) 0%, transparent 70%);
  border-radius: 0 0 0 24px;
}

/* Fall/Autumn - Warm orange/brown gradient corners */
.stock-wrap.season-fall::before {
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background:
    radial-gradient(circle at 8% 8%, rgba(217, 119, 6, 0.08) 0%, transparent 18%),
    radial-gradient(circle at 92% 92%, rgba(180, 83, 9, 0.08) 0%, transparent 18%);
  border-radius: 24px;
}

.stock-wrap.season-fall .season-particle {
  font-size: 13px;
  animation: leafFallGentle 18s ease-in infinite;

}

/* Gentle snowfall animation */
@keyframes snowfall {
  0% {
    transform: translateY(-20px) translateX(0) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 0.6;
  }

  90% {
    opacity: 0.3;
  }

  100% {
    transform: translateY(500px) translateX(30px) rotate(180deg);
    opacity: 0;
  }
}

/* Gentle floating for spring flowers */
@keyframes floatGentle {

  0%,
  100% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0.5;
  }

  25% {
    transform: translateY(150px) translateX(-15px) rotate(90deg);
    opacity: 0.4;
  }

  50% {
    transform: translateY(300px) translateX(10px) rotate(180deg);
    opacity: 0.3;
  }

  75% {
    transform: translateY(450px) translateX(-10px) rotate(270deg);
    opacity: 0.2;
  }
}

/* Realistic gentle leaf fall */
@keyframes leafFallGentle {
  0% {
    transform: translateY(-20px) translateX(0) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 0.5;
  }

  50% {
    transform: translateY(250px) translateX(-25px) rotate(180deg);
    opacity: 0.4;
  }

  90% {
    opacity: 0.2;
  }

  100% {
    transform: translateY(500px) translateX(-45px) rotate(360deg);
    opacity: 0;
  }
}

.stock-header {
  margin-bottom: 2rem;
}

.stock-ticker {
  font-size: 1.5rem;
  font-weight: 800;
  color: #A8C5DA;
  margin-bottom: 0.5rem;
}

.stock-price {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  font-family: var(--font-numeric);
}

.stock-change {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  font-family: var(--font-numeric);
}

.stock-period {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bg-tertiary);
  border-radius: 16px;
  border: 1px solid var(--border-secondary);
}

.icard {
  text-align: center;
  padding: 0 2rem;
  position: relative;
}

.icard:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 50px;
  background: linear-gradient(180deg, transparent, rgba(168, 197, 218, 0.4), transparent);
}

.ilabel {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.ivalue {
  font-size: 1.5rem;
  font-weight: 800;
}

.chart-box {
  position: relative;
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 20px 15px 20px 10px;
  border: 1px solid var(--border-secondary);
  height: 600px;
  margin-bottom: 30px;
}

#candleChart {
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
}

#candleChart [class*="price-axis"] text {
  pointer-events: none;
}

/* ===== UTILITIES ===== */
.pos {
  color: var(--accent-green);
}

.neg {
  color: var(--accent-red);
}

.loading {
  color: var(--text-secondary);
  text-align: center;
  padding: 2rem;
  font-weight: 500;
}

/* ===== SKELETON LOADERS ===== */
@keyframes skeleton-pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.skeleton-card {
  background: linear-gradient(90deg, var(--bg-card-light) 0%, var(--bg-card) 50%, var(--bg-card-light) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border: 1px solid rgba(168, 197, 218, 0.1);
  border-radius: 16px;
  height: 200px;
  position: relative;
  overflow: hidden;
}

.skeleton-pcard {
  min-width: 320px;
  max-width: 320px;
  height: 380px;
  background: linear-gradient(90deg, var(--bg-card) 0%, var(--bg-overlay) 50%, var(--bg-card) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border: 1px solid rgba(168, 197, 218, 0.15);
  border-radius: 20px;
  flex-shrink: 0;
}

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

  100% {
    background-position: -200% 0;
  }
}

/* ===== NEWS MODAL ===== */
.news-modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.95);
  backdrop-filter: blur(8px);
  z-index: 10000;
  overflow-y: auto;
  padding: 2rem 1rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.news-modal-content {
  max-width: 800px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--bg-panel) 0%, var(--bg-panel) 100%);
  border: 1px solid rgba(168, 197, 218, 0.2);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  position: relative;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.news-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  transform: rotate(90deg);
}

.news-modal-header {
  padding: 2.5rem 2.5rem 2rem 2.5rem;
  border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

.news-modal-category {
  display: inline-block;
  background: linear-gradient(135deg, rgba(168, 197, 218, 0.15) 0%, rgba(139, 169, 190, 0.15) 100%);
  color: #A8C5DA;
  border: 1px solid rgba(168, 197, 218, 0.3);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.news-modal-title {
  font-size: 32px;
  font-weight: 900;
  color: #f8fafc;
  line-height: 1.2;
  margin: 0 0 1.5rem 0;
  letter-spacing: -0.02em;
}

.news-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 14px;
  color: #94a3b8;
}

.news-meta-author,
.news-meta-date,
.news-meta-updated {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.news-meta-author svg,
.news-meta-date svg,
.news-meta-updated svg {
  opacity: 0.7;
}

.news-modal-body {
  padding: 2.5rem;
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.8;
}

.news-modal-body p {
  margin-bottom: 1.5rem;
}

.news-modal-body h3 {
  color: #f8fafc;
  font-size: 22px;
  font-weight: 700;
  margin: 2rem 0 1rem 0;
}

.news-modal-body ul,
.news-modal-body ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.news-modal-body li {
  margin-bottom: 0.5rem;
}

.news-modal-body strong {
  color: #e2e8f0;
  font-weight: 600;
}

.news-modal-body a {
  color: #A8C5DA;
  text-decoration: none;
  border-bottom: 1px solid rgba(168, 197, 218, 0.3);
  transition: all 0.2s ease;
}

.news-modal-body a:hover {
  color: #93c5fd;
  border-bottom-color: #93c5fd;
}

/* Enhanced Markdown content styling for #modalContent */
#modalContent h1,
#modalContent h2 {
  color: #f1f5f9;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

#modalContent h1 {
  font-size: 2rem;
}

#modalContent h2 {
  font-size: 1.5rem;
  border-bottom: 2px solid rgba(168, 197, 218, 0.3);
  padding-bottom: 0.5rem;
}

#modalContent img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1.5rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#modalContent blockquote {
  border-left: 4px solid rgba(168, 197, 218, 0.5);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: #94a3b8;
  font-style: italic;
  background: var(--bg-tertiary);
  padding: 1rem 1rem 1rem 1.5rem;
  border-radius: 0 8px 8px 0;
}

#modalContent code {
  background: rgba(20, 27, 45, 0.8);
  color: #A8C5DA;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: var(--font-numeric);
  font-size: 0.9em;
}

#modalContent pre {
  background: rgba(20, 27, 45, 0.8);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border-titanium);
}

#modalContent pre code {
  background: none;
  padding: 0;
  color: #e2e8f0;
}

#modalContent hr {
  border: none;
  border-top: 1px solid var(--border-accent);
  margin: 2rem 0;
}

#modalContent table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

#modalContent th,
#modalContent td {
  padding: 0.75rem;
  border: 1px solid var(--border-accent);
  text-align: left;
}

#modalContent th {
  background: rgba(168, 197, 218, 0.2);
  font-weight: 600;
  color: #f1f5f9;
}

#modalContent td {
  color: #cbd5e1;
}

/* =========================
   Portfolio Detail Modal Styles
   ========================= */
.portfolio-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10000;
  padding: 2rem;
  overflow-y: auto;
  animation: fadeIn 0.2s ease;
}

.chart-modal-content {
  max-width: 900px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--bg-modal) 0%, var(--bg-modal) 100%);
  border-radius: 20px;
  border: 1px solid var(--border-titanium);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  position: relative;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chart-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.chart-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  transform: rotate(90deg);
}

.chart-modal-header {
  padding: 2rem 2rem 1.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.chart-modal-icon {
  font-size: 2.5rem;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, rgba(168, 197, 218, 0.15) 0%, rgba(139, 169, 190, 0.15) 100%);
  border: 1px solid rgba(168, 197, 218, 0.3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-modal-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0;
  line-height: 1.2;
}

.chart-modal-subtitle {
  font-size: 0.875rem;
  color: #94a3b8;
  margin: 0.25rem 0 0;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chart-modal-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  background: rgba(20, 27, 45, 0.5);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.chart-modal-stat {
  text-align: center;
}

.chart-modal-stat-label {
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.chart-modal-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f1f5f9;
  font-family: var(--font-numeric);
}

.chart-modal-stat-value.positive {
  color: #22c55e;
}

.chart-modal-stat-value.negative {
  color: #ef4444;
}

.chart-modal-body {
  padding: 2rem;
  position: relative;
  min-height: 400px;
}

#portfolioModalChart {
  width: 100%;
  max-width: 100%;
  height: 350px;
  max-height: 40vh;
  position: relative;
  overflow: hidden;
}

#portfolioModalChart canvas {
  max-width: 100% !important;
  max-height: 100% !important;
}

#chartModalCanvas {
  width: 100%;
  max-width: 100%;
  height: 400px;
  display: block;
}

.chart-modal-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(20, 27, 45, 0.8);
  backdrop-filter: blur(4px);
  border-radius: 0 0 20px 20px;
}

.chart-modal-loading .spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(168, 197, 218, 0.2);
  border-top-color: #A8C5DA;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.chart-modal-loading p {
  margin-top: 1rem;
  color: #94a3b8;
  font-size: 0.875rem;
}

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

@media (max-width: 768px) {
  .chart-modal {
    padding: 1rem;
  }

  .chart-modal-content {
    border-radius: 16px;
  }

  .chart-modal-header {
    padding: 1.5rem 1rem 1rem;
  }

  .chart-modal-icon {
    width: 50px;
    height: 50px;
    font-size: 2rem;
  }

  .chart-modal-title {
    font-size: 1.25rem;
  }

  .chart-modal-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }

  .chart-modal-body {
    padding: 1rem;
    min-height: 300px;
    overflow-x: auto;
  }

  #chartModalCanvas {
    height: 300px;
    max-width: 100%;
  }

  .chart-modal-close {
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    font-size: 1.25rem;
  }
}

@media (max-width: 768px) {
  .news-modal {
    padding: 1rem 0.5rem;
  }

  .news-modal-content {
    border-radius: 16px;
  }

  .news-modal-header {
    padding: 2rem 1.5rem 1.5rem 1.5rem;
  }

  .news-modal-title {
    font-size: 24px;
  }

  .news-modal-body {
    padding: 1.5rem;
    font-size: 15px;
  }

  .news-modal-close {
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
  }
}

/* ===== FOOTER ===== */
}

/* Mobile footer fix - SIMPLE AND CONSISTENT */
@media (max-width: 768px) {
  html {
    background: var(--bg-primary);
  }

  body.landing,
  body.dashboard,
  body.assets,
  body.settings,
  body.page,
  body.admin {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    /* Dynamic viewport height for mobile browsers */
  }

  body.landing footer,
  body.dashboard footer,
  body.assets footer,
  body.settings footer,
  body.page footer,
  body.admin footer {
    margin-top: auto;
    margin-bottom: 0;
  }

  /* Chart tooltip responsive for mobile */
  .chart-tooltip,
  .chart-tooltip * {
    font-size: 10px !important;
    line-height: 1.35 !important;
  }

  .chart-tooltip {
    padding: 8px !important;
    min-width: 140px !important;
    max-width: calc(100vw - 24px) !important;
    border-radius: 6px !important;
  }
}

footer .container {
  max-width: 1400px !important;
  margin: 0 auto !important;
  padding: 0 2rem !important;
}

.footer-content {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 2rem !important;
  min-height: 60px !important;
}

.footer-left {
  display: flex !important;
  align-items: center !important;
  gap: 1rem !important;
  flex-wrap: wrap !important;
  flex: 1 !important;
  height: 100% !important;
}

.footer-year {
  color: var(--text-muted) !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}

.footer-link {
  color: var(--text-secondary) !important;
  text-decoration: none !important;
  font-size: 0.8125rem !important;
  transition: color 0.2s !important;
  white-space: nowrap !important;
}

.footer-link:hover {
  color: #cbd5e1 !important;
}

.footer-center {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  flex-shrink: 0 !important;
  height: 100% !important;
}

.footer-legal {
  display: flex !important;
  gap: 0.75rem !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
}

.footer-link-small {
  color: #64748b !important;
  text-decoration: none !important;
  font-size: 0.75rem !important;
  transition: color 0.2s !important;
  white-space: nowrap !important;
}

.footer-link-small:hover {
  color: #cbd5e1 !important;
}

.footer-right {
  display: flex !important;
  gap: 1rem !important;
  align-items: center !important;
  flex-shrink: 0 !important;
  height: 100% !important;
  flex: 1 !important;
  justify-content: flex-end !important;
}

@media (max-width: 1024px) {
  footer .container {
    padding: 0 1.5rem !important;
  }

  .footer-content {
    flex-direction: column !important;
    gap: 2rem !important;
    text-align: center !important;
  }

  .footer-left {
    justify-content: center !important;
    width: 100% !important;
  }

  .footer-center {
    order: -1 !important;
  }

  .footer-right {
    justify-content: center !important;
  }
}

.footer-logo {
  display: inline-block !important;
  text-decoration: none !important;
  transition: opacity 0.2s !important;
}

.footer-logo:hover {
  opacity: 0.8 !important;
}

.footer-logo svg {
  opacity: 0.6;
  transition: opacity 0.3s;
}

.footer-logo:hover svg {
  opacity: 1;
}

.footer-social {
  width: 36px !important;
  height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--text-secondary) !important;
  background: var(--bg-card-light) !important;
  border-radius: 8px !important;
  transition: all 0.2s !important;
  border: 1px solid rgba(168, 197, 218, 0.1) !important;
}

.footer-social:hover {
  color: #cbd5e1 !important;
  background: rgba(168, 197, 218, 0.15) !important;
  border-color: rgba(168, 197, 218, 0.3) !important;
  transform: translateY(-2px) !important;
}

/* ===== LEGACY MODAL - MATCHING DASHBOARD STYLE (renamed to avoid conflict with unified modal) ===== */
.legacy-modal {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, var(--bg-modal), var(--bg-modal));
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.legacy-modal.show {
  display: flex;
  opacity: 1;
}

.modal-box {
  background: linear-gradient(135deg, var(--bg-modal), var(--bg-modal));
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 24px;
  padding: 48px 40px 40px;
  max-width: 480px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6), 0 0 40px rgba(102, 126, 234, 0.15), 0 0 0 1px rgba(102, 126, 234, 0.1) inset;
  position: relative;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-box h3 {
  color: #f8fafc;
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 6px 0;
  letter-spacing: -0.5px;
  text-align: center;
}

.modal-box p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0 0 32px 0;
  font-weight: 400;
  text-align: center;
}

.modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--accent-red) 0%, #dc2626 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  animation: modalIconPulse 0.5s ease;
}

@keyframes modalIconPulse {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===== AUTH MODAL (LOGIN) - Use specific class to avoid conflict ===== */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: linear-gradient(135deg, var(--bg-panel), var(--bg-panel));
  backdrop-filter: blur(16px) saturate(180%);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: linear-gradient(135deg,
      var(--bg-panel) 0%,
      var(--bg-overlay) 50%,
      var(--bg-panel) 100%);
  border: 1px solid rgba(168, 197, 218, 0.2);
  border-radius: 16px;
  padding: 24px 20px 20px;
  width: min(420px, 95%);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(168, 197, 218, 0.1) inset,
    0 0 40px rgba(168, 197, 218, 0.08);
  position: relative;
  animation: slideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);

}

.modal-content-inner {
  width: 100%;
}

.modal-content h2 {
  color: #f8fafc;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -0.3px;
  text-align: center;
  background: linear-gradient(135deg, #A8C5DA 0%, #8BA9BE 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-content>p,
.modal-content p {
  color: #64748b;
  font-size: 12px;
  margin: 0 0 20px;
  font-weight: 400;
  text-align: center;
  line-height: 1.4;
}

.auth-progress {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin-bottom: 24px;
  padding: 0 10px;
  gap: 6px;
}

.progress-step-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  min-width: 60px;
}

.progress-step {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card-light);
  border: 2px solid rgba(168, 197, 218, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #475569;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
  margin-bottom: 6px;
}

.progress-step.active {
  background: linear-gradient(135deg, #A8C5DA, #A8C5DA);
  border-color: #A8C5DA;
  color: #ffffff;
  box-shadow:
    0 0 0 3px rgba(168, 197, 218, 0.15),
    0 4px 12px rgba(168, 197, 218, 0.3);
  transform: scale(1.05);
}

.progress-step.completed {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #10b981;
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15), 0 2px 8px rgba(16, 185, 129, 0.25);
}

.progress-step-label {
  font-size: 9px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.progress-step-wrapper.active .progress-step-label {
  color: #A8C5DA;
}

.progress-step-wrapper.completed .progress-step-label {
  color: #10b981;
}

.progress-line-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  padding-top: 18px;
}

.progress-line {
  width: 100%;
  height: 2px;
  background: var(--bg-card-light);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.progress-line::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #10b981, #059669);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.progress-line.completed::before {
  width: 100%;
}

.progress-line-wrapper[style*="opacity:0"] {
  will-change: opacity, transform;
}

.progress-step-wrapper[style*="opacity:0"] {
  will-change: opacity, transform;
}

.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-group label {
  display: block;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0.85;
}

.form-group input[type="text"],
.form-group input[type="password"] {
  width: 100%;
  padding: 10px 14px;
  background: rgba(20, 27, 45, 0.8);
  border: 1px solid rgba(168, 197, 218, 0.2);
  border-radius: 10px;
  color: #e2e8f0;
  font-size: 14px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) inset;
  font-family: inherit;
}

.form-group input::placeholder {
  color: #475569;
  font-weight: 400;
}

.form-group input:hover {
  border-color: rgba(168, 197, 218, 0.35);
  background: rgba(20, 27, 45, 0.9);
}

.form-group input:focus {
  outline: none;
  border-color: #A8C5DA;
  background: rgba(20, 27, 45, 0.95);
  box-shadow: 0 0 0 3px rgba(168, 197, 218, 0.15), 0 2px 6px rgba(0, 0, 0, 0.15) inset;
}

.error-msg {
  display: none;
  color: #f87171;
  font-size: 12px;
  margin-bottom: 12px;
  font-weight: 500;
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
}

.auth-footer {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
}

.btn-link {
  background: none;
  border: none;
  color: #A8C5DA;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.btn-link:hover {
  color: #93c5fd;
}

.auth-hint {
  color: #64748b;
  font-size: 13px;
}

.verification-animation {
  text-align: center;
  padding: 56px 0 40px;
}

.verification-circle {
  width: 88px;
  height: 88px;
  margin: 0 auto 28px;
  border-radius: 50%;
  background: rgba(168, 197, 218, 0.08);
  border: 3px solid #A8C5DA;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: none;
  box-shadow:
    0 0 0 8px rgba(168, 197, 218, 0.05),
    0 8px 24px rgba(168, 197, 218, 0.15);
}

@keyframes pulseGlow {

  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 0 0 8px rgba(168, 197, 218, 0.05),
      0 8px 24px rgba(168, 197, 218, 0.15);
  }

  50% {
    transform: scale(1.05);
    box-shadow:
      0 0 0 12px rgba(168, 197, 218, 0.08),
      0 12px 32px rgba(168, 197, 218, 0.25);
  }
}

.verification-circle.verified {
  animation: successPop 0.5s ease;
  background: rgba(16, 185, 129, 0.08);
  border-color: #10b981;
  box-shadow:
    0 0 0 8px rgba(16, 185, 129, 0.05),
    0 8px 24px rgba(16, 185, 129, 0.2);
}

@keyframes successPop {
  0% {
    transform: scale(0.9);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

.verification-circle.verified .checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.verification-circle.verified .checkmark-check {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes stroke {
  100% {
    stroke-dashoffset: 0;
  }
}

.checkmark {
  width: 40px;
  height: 40px;
}

.checkmark-circle {
  stroke: #10b981;
  stroke-width: 2;
}

.checkmark-check {
  stroke: #10b981;
  stroke-width: 3;
  stroke-linecap: round;
}

.spinner,
.spinner-small {
  border: 3px solid rgba(168, 197, 218, 0.2);
  border-top-color: #A8C5DA;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner {
  width: 32px;
  height: 32px;
}

.spinner-small {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

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

.verification-text {
  color: #94a3b8;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.2px;
  transition: all 0.3s ease;
  text-align: center;
  margin: 0;
}

.verification-circle.failed {
  animation: shake 0.6s ease;
  background: rgba(239, 68, 68, 0.08);
  border-color: #ef4444;
  box-shadow:
    0 0 0 8px rgba(239, 68, 68, 0.05),
    0 8px 24px rgba(239, 68, 68, 0.2);
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-8px);
  }

  20%,
  40%,
  60%,
  80% {
    transform: translateX(8px);
  }
}

#turnstile-widget {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  min-height: 65px;
  width: 100%;
  opacity: 1;
  visibility: visible;
}

@media (max-width: 600px) {
  .modal-overlay {
    padding: 8px;
  }

  .modal-content {
    padding: 20px 16px 16px;
    width: calc(100% - 16px);
    margin: 0 8px;
    border-radius: 14px;
  }

  .auth-progress {
    padding: 0 6px;
    margin-bottom: 20px;
    gap: 4px;
  }

  .progress-step-wrapper {
    min-width: 55px;
  }

  .progress-step {
    width: 32px;
    height: 32px;
    font-size: 13px;
    margin-bottom: 5px;
  }

  .progress-step-label {
    font-size: 8px;
  }

  .progress-line {
    height: 2px;
  }

  .form-group {
    margin-bottom: 14px;
  }

  .form-group input {
    padding: 9px 12px;
    font-size: 14px;
  }
}

@media (max-width: 420px) {
  .modal-content {
    padding: 18px 14px 14px;
    border-radius: 12px;
  }

  .modal-content h2 {
    font-size: 18px;
    margin-bottom: 3px;
  }

  .modal-content>p,
  .modal-content p {
    font-size: 11px;
    margin-bottom: 14px;
  }

  .auth-progress {
    padding: 0 2px;
    margin-bottom: 18px;
    gap: 3px;
  }

  .progress-step-wrapper {
    min-width: 48px;
  }

  .progress-step {
    width: 36px;
    height: 36px;
    font-size: 13px;
    margin-bottom: 5px;
  }

  .progress-step.active {
    transform: scale(1.05);
  }

  .progress-step-label {
    font-size: 8px;
    letter-spacing: 0.3px;
  }

  .progress-line {
    height: 2px;
  }
}

/* ===== FORM ELEMENTS ===== */
.fg {
  margin-bottom: 20px;
}

.fg label {
  display: block;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  opacity: 0.9;
  text-align: left;
}

.fg input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(20, 27, 45, 0.6);
  border: 1.5px solid var(--border-titanium);
  border-radius: 10px;
  color: #f8fafc;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) inset;
  font-family: inherit;
}

.fg input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.fg input:hover {
  border-color: rgba(148, 163, 184, 0.35);
  background: var(--bg-card);
}

.fg input:focus {
  outline: none;
  border-color: var(--accent-blue);
  background: var(--bg-card);
  box-shadow: 0 0 0 4px rgba(168, 197, 218, 0.1), 0 2px 8px rgba(0, 0, 0, 0.1) inset;
}

.captcha-wrapper {
  margin: 24px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 65px;
}

.fa {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  width: 100%;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  letter-spacing: -0.01em;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--border-primary);
  opacity: 0;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover::before {
  opacity: 1;
}

.btn.bp {
  background: rgba(168, 197, 218, 0.15);
  color: #A8C5DA;
  border: 1px solid rgba(168, 197, 218, 0.3);
}

.btn.bp:hover:not(:disabled) {
  background: rgba(168, 197, 218, 0.2);
  border-color: rgba(168, 197, 218, 0.5);
  transform: translateY(-1px);
}

.btn.bp:active:not(:disabled) {
  transform: translateY(0);
}

.btn.bp:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn.bs {
  background: rgba(20, 27, 45, 0.5);
  color: #cbd5e1;
  border: 1px solid var(--border-primary);
}

.btn.bs:hover:not(:disabled) {
  background: var(--bg-card);
  border-color: rgba(255, 255, 255, 0.2);
}

.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 10px;
  padding: 12px 16px;
  color: #fca5a5;
  font-size: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ===== PAGE LOADER ===== */

/* ===== RESPONSIVE - 4K TO MOBILE ===== */

/* 4K (2560px+) */
@media (min-width: 2560px) {
  body.landing .container {
    max-width: 1440px;
    margin: 100px auto 0 auto;
    padding: 0 3rem;
    width: 100%;
  }

  body.landing footer .container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 3rem;
  }

  .hero {
    padding: 180px 0 120px;
  }

  .hero-stats {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1400px;
    padding: 50px 60px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  }

  .pcard {
    min-width: 380px;
    max-width: 380px;
  }
}

/* Large Desktop (1440px - 2559px) */
@media (min-width: 1440px) and (max-width: 2559px) {
  body.landing .container {
    max-width: 1440px;
    margin: 100px auto 0 auto;
    width: 100%;
  }

  body.landing footer .container {
    max-width: 1440px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  }
}

/* Tablet & Small Desktop (1024px - 1439px) */
@media (max-width: 1439px) {
  body.landing .container {
    max-width: 1440px;
    margin: 100px auto 0 auto;
    padding: 0 1.25rem;
    width: 100%;
  }

  body.landing footer .container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1.25rem;
  }
}

/* Tablet Portrait (768px - 1023px) */
@media (max-width: 1023px) {
  .hero {
    padding: 100px 0 60px;
  }

  .hero-badge {
    font-size: 13px;
    padding: 8px 16px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    padding: 32px 24px;
    gap: 20px;
  }

  .stat-item:not(:last-child)::after {
    display: none;
  }

  .nav-links {
    display: none !important;
  }

  .hamburger {
    display: flex;
  }

  .sec {
    padding: 3.5rem 0;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  /* All navbar styles moved to system.css */

  /* Adjust body container for floating navbar */
  body.landing .container {
    margin-top: 90px;
    /* Space for floating navbar */
    padding: 0 1.25rem;
  }

  body.page .page-content {
    margin-top: 90px;
    /* Space for floating navbar */
    padding: 0 1.25rem 2rem;
  }

  .port-wrap {
    margin: 0 -1rem;
    padding: 0 1rem;
  }

  .pcard {
    min-width: 290px;
    max-width: 290px;
    padding: 24px 20px;
  }

  .plogo {
    width: 56px;
    height: 56px;
    font-size: 32px;
    margin: 0 auto 16px;
  }

  .pname {
    font-size: 18px;
    margin-bottom: 10px;
  }

  #typingText {
    font-size: 14px;
    line-height: 1.6;
  }

  .typing-cursor {
    height: 1em;
    width: 1.5px;
  }

  .palloc {
    font-size: 13px;
    padding: 5px 12px;
    margin-bottom: 14px;
  }

  .palloc-bar {
    margin-bottom: 20px;
  }

  .pinfo-item {
    padding: 14px 12px;
  }

  .pvalue {
    font-size: 20px;
  }

  .pchange {
    font-size: 13px;
    padding: 5px 10px;
  }

  .chart-box {
    height: 500px;
    padding: 50px 10px 5px 8px;
  }

  #candleChart {
    height: 100% !important;
  }
}

/* Mobile Small (767px and below) */
@media (max-width: 767px) {
  body.landing .container {
    max-width: 1440px;
    margin: 100px auto 0 auto;
    padding: 0 1rem;
    width: 100%;
  }

  body.landing footer .container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1rem;
  }

  .hero {
    min-height: 100vh;
    padding: 120px 0 50px;
  }

  .hero-badge {
    margin-bottom: 20px;
    font-size: 12px;
    padding: 8px 14px;
  }

  .hero h1 {
    font-size: 48px;
    margin-bottom: 12px;
    line-height: 1;
  }

  .hero-subtitle {
    font-size: 20px;
  }

  .hero-description {
    font-size: 15px;
    margin: 20px auto 32px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    padding: 24px 20px;
    gap: 16px;
    margin-bottom: 40px;
  }

  .stat-item:not(:last-child) {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-primary);
  }

  .sec {
    padding: 2.5rem 0;
  }

  .title {
    font-size: 1.75rem;
  }

  .sub {
    font-size: 0.875rem;
  }

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

  .stock-wrap {
    padding: 1.5rem 1rem;
  }

  .stock-header {
    text-align: center;
  }

  .stock-ticker {
    font-size: 1.25rem;
  }

  .stock-price {
    font-size: 2.5rem;
  }

  .stock-change {
    font-size: 1.1rem;
  }

  .chart-box {
    padding: 18px 12px 18px 10px;
    height: 450px;
  }

  #candleChart {
    height: 100% !important;
  }

  #candleChart>div:first-child {
    font-size: 40px !important;
  }

  .info-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .icard {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(168, 197, 218, 0.1);
  }

  .icard:last-child {
    border-bottom: none;
  }

  .icard::after {
    display: none;
  }

  .modal-box {
    padding: 32px 24px;
    border-radius: 20px;
  }

  .modal-box h3 {
    font-size: 24px;
  }

  .modal-box p {
    font-size: 14px;
    margin-bottom: 24px;
  }

  .fg input {
    padding: 12px 14px;
    font-size: 16px;
  }

  .btn {
    padding: 14px;
    font-size: 15px;
  }

  .captcha-wrapper {
    overflow: visible;
  }

  #turnstile-widget {
    min-height: 70px;
    overflow: visible;
  }

  .cf-turnstile {
    transform: scale(0.9);
    transform-origin: center center;
  }

  footer {
    padding: 1.5rem 0;
    margin-top: 3rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .footer-left {
    flex-direction: column;
    gap: 1rem;
  }

  .footer-center {
    order: -1;
  }

  .footer-right {
    justify-content: center;
  }
}

/* ============================================
   PAGES STYLING - 1400PX LIKE DASHBOARD
   ============================================ */
body.page .page-content {
  max-width: 1440px;
  margin: 100px auto 0;
  padding: 0 2rem 2rem 2rem;
  width: 100%;
}

body.page footer {
  margin-top: 3rem;
}

body.page footer .container {
  max-width: 1440px;
  padding: 0 2rem;
}

/* 4K and Ultra-wide */
@media (min-width: 2560px) {
  body.page .page-content {
    max-width: 1440px;
    padding: 0 3rem 3rem 3rem;
  }

  body.page footer .container {
    max-width: 1440px;
    padding: 0 3rem;
  }
}

/* Tablet & Desktop (1024px - 1439px) */
@media (max-width: 1439px) {
  body.page .page-content {
    padding: 0 1.5rem 2rem 1.5rem;
  }

  body.page footer .container {
    padding: 0 1.5rem;
  }
}

/* Mobile (max-width: 767px) */
@media (max-width: 767px) {
  body.page .page-content {
    margin: 100px auto 0;
    padding: 0 1rem 1rem 1rem;
  }

  body.page footer .container {
    padding: 0 1rem;
  }
}

/* Mobile Small (max-width: 480px) */
@media (max-width: 480px) {
  body.page .page-content {
    margin: 100px auto 0;
    padding: 0 0.75rem 0.75rem 0.75rem;
  }

  body.page footer .container {
    padding: 0 0.75rem;
  }
}

/* Mobile Extra Small (480px and below) */
@media (max-width: 480px) {
  #typingText {
    font-size: 13px;
    line-height: 1.8;
    display: block;
    padding: 0 0.5rem;
  }

  .pcard {
    min-width: 270px;
    max-width: 270px;
    padding: 22px 18px;
  }

  .plogo {
    width: 52px;
    height: 52px;
    font-size: 30px;
  }

  .pname {
    font-size: 17px;
  }

  .pvalue {
    font-size: 19px;
  }

  .chart-box {
    height: 450px;
    padding: 45px 8px 12px 6px;
  }

  #candleChart {
    height: 100% !important;
  }

  #candleChart>div:first-child {
    font-size: 32px !important;
  }
}

/* Mobile Ultra Small (479px and below) */
@media (max-width: 479px) {
  .hero {
    padding: 100px 0 30px;
  }

  .hero-badge {
    font-size: 11px;
    padding: 6px 12px;
    margin-bottom: 16px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-description {
    font-size: 14px;
    margin: 16px auto 28px;
  }

  .hero-stats {
    padding: 20px 16px;
  }

  /* Candlestick and page loader styles in system.css */
}

/* Ultra Small (360px and below) */
@media (max-width: 360px) {
  .chart-box {
    height: 400px;
    padding: 40px 6px 10px 4px;
  }

  #candleChart {
    height: 100% !important;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .hero-description {
    font-size: 13px;
  }

  .cf-turnstile {
    transform: scale(0.77);
  }

  .modal-box {
    padding: 28px 20px;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ===== PRINT ===== */
@media print {

  .nav,
  .hamburger,
  .mobile-menu,
  .legacy-modal,
  .page-loader {
    display: none !important;
  }

  body::before,
  body::after {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .hero {
    page-break-after: always;
  }
}

/* ========================================
   LOGIN MODAL SMOOTH ANIMATIONS (for /index.php)
   ======================================== */

/* Smooth slide transitions for modal content steps */
.modal-content-inner {
  position: relative;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content-inner.slide-out-left {
  opacity: 0;
  transform: translateX(-30px);
}

.modal-content-inner.slide-out-right {
  opacity: 0;
  transform: translateX(30px);
}

.modal-content-inner.slide-in-left {
  animation: slideInLeftModal 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-content-inner.slide-in-right {
  animation: slideInRightModal 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideInLeftModal {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRightModal {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== OPTIMIZED 2025 ANIMATIONS & UX (ALL PAGES) ===== */
/* Button Interactions - Modern Mobile UX */
button,
.btn,
.btn-primary,
.btn-secondary,
.nav-btn,
.submit-btn-new,
.tab,
.mobile-tab,
.order-type-tab {
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(1);
  will-change: transform;
}

button:hover:not(:disabled),
.btn:hover:not(:disabled),
.btn-primary:hover:not(:disabled),
.btn-secondary:hover:not(:disabled),
.nav-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:active:not(:disabled),
.btn:active:not(:disabled),
.btn-primary:active:not(:disabled),
.btn-secondary:active:not(:disabled),
.nav-btn:active:not(:disabled),
.submit-btn-new:active:not(:disabled),
.tab:active,
.mobile-tab:active,
.order-type-tab:active {
  transform: scale(0.96);
  transition: transform 0.05s cubic-bezier(0.4, 0, 0.6, 1);
}

/* Card Hover - Premium Feel */
.card,
.pcard {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.card:hover,
.pcard:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

/* Input Focus - Smooth Attention */
input:not([type="range"]),
textarea,
select {
  transition: border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus:not([type="range"]),
textarea:focus,
select:focus {
  transform: scale(1.01);
  box-shadow: 0 0 0 3px rgba(168, 197, 218, 0.1);
}

/* Ripple Effect - Material Design */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease-out, height 0.6s ease-out;
  pointer-events: none;
}

.ripple:active::after {
  width: 300px;
  height: 300px;
  transition: width 0.3s ease-out, height 0.3s ease-out;
}

/* Order Cancel Animation */
.order-cancelling {
  animation: orderFadeOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes orderFadeOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(-20px);
  }
}

/* Loading Button State */
.submit-btn-new.submitting,
.btn.loading {
  animation: buttonPulse 1s ease-in-out infinite;
  pointer-events: none;
}

@keyframes buttonPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(0.98);
    opacity: 0.9;
  }
}

/* Slider Interaction */
input[type="range"] {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

input[type="range"]:active {
  transform: scaleY(1.1);
}

/* Tab Active Indicator */
.tab,
.mobile-tab,
.order-type-tab {
  position: relative;
}

.tab::after,
.mobile-tab::after,
.order-type-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #A8C5DA, #8BA9BE);
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab.active::after,
.mobile-tab.active::after,
.order-type-tab.active::after {
  transform: scaleX(1);
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {

  button:active:not(:disabled),
  .btn:active:not(:disabled),
  .tab:active,
  .mobile-tab:active,
  .order-type-tab:active {
    transform: scale(0.94);
    opacity: 0.8;
  }

  .card:active,
  .pcard:active {
    transform: scale(0.98);
  }

  /* Disable hover effects on touch */
  button:hover,
  .btn:hover,
  .card:hover,
  .pcard:hover {
    transform: none;
  }
}

/* Hardware Acceleration */
.panel,
.card,
.pcard,
.nav,
button,
.btn,
.modal-box,
.modal-content,
.tab,
.mobile-tab {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* ===== CHART LEGEND STYLES ===== */
.chart-legend {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--bg-overlay);
  border: 1px solid var(--border-titanium);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 11px;
  z-index: 100;
  display: flex;
  gap: 12px;
  align-items: center;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  flex-wrap: wrap;
  max-width: calc(100% - 20px);
  transition: all 0.3s ease;
}

.chart-legend.minimized {
  padding: 8px;
  gap: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  justify-content: center;
  cursor: pointer;
}

.chart-legend.minimized .legend-toggle,
.chart-legend.minimized .legend-divider {
  display: none !important;
}

.chart-legend.minimized .legend-minimize-btn {
  margin: 0;
}

.legend-toggle {
  font-family: var(--font-primary);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  background: rgba(71, 85, 105, 0.2);
  border: 1px solid var(--border-titanium);
  color: #64748b;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.legend-toggle:hover {
  background: rgba(71, 85, 105, 0.3);
  border-color: var(--border-accent);
}

.legend-toggle:active {
  transform: scale(0.97);
}

.legend-toggle.active {
  background: rgba(168, 197, 218, 0.15);
  border-color: rgba(168, 197, 218, 0.4);
  color: #e2e8f0;
}

.legend-dot {
  display: inline-block;
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: opacity 0.2s ease;
}

.legend-label {
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.legend-divider {
  width: 1px;
  height: 20px;
  background: var(--border-titanium);
  margin: 0 4px;
}

.legend-minimize-btn {
  background: rgba(71, 85, 105, 0.2);
  border: 1px solid var(--border-titanium);
  color: #94a3b8;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  min-width: 28px;
  font-weight: 600;
}

.legend-minimize-btn:hover {
  background: rgba(71, 85, 105, 0.3);
  border-color: var(--border-accent);
  color: #e2e8f0;
}

.legend-minimize-btn:active {
  transform: scale(0.95);
}

/* Responsive: Tablet (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
  .chart-legend {
    top: 8px;
    left: 8px;
    padding: 8px 10px;
    gap: 10px;
    font-size: 10px;
    max-width: calc(100% - 16px);
  }

  .legend-toggle {
    padding: 4px 8px;
    font-size: 9px;
    gap: 5px;
  }

  .legend-dot {
    width: 7px;
    height: 7px;
  }

  .legend-divider {
    height: 18px;
  }

  .legend-minimize-btn {
    padding: 4px 7px;
    min-width: 26px;
    font-size: 11px;
  }
}

/* Responsive: Mobile (max 768px) */
@media (max-width: 768px) {
  .chart-legend {
    top: 6px;
    left: 6px;
    padding: 6px 8px;
    gap: 8px;
    font-size: 9px;
    max-width: calc(100% - 12px);
  }

  .chart-legend.minimized {
    width: 36px;
    height: 36px;
    padding: 6px;
  }

  .legend-toggle {
    padding: 4px 6px;
    font-size: 8px;
    gap: 4px;
  }

  .legend-dot {
    width: 6px;
    height: 6px;
  }

  .legend-label {
    letter-spacing: 0.2px;
  }

  .legend-divider {
    height: 16px;
    margin: 0 2px;
  }

  .legend-minimize-btn {
    padding: 4px 6px;
    min-width: 24px;
    font-size: 10px;
  }
}

/* Responsive: Small Mobile (max 480px) */
@media (max-width: 480px) {
  .chart-legend {
    top: 4px;
    left: 4px;
    padding: 5px 6px;
    gap: 6px;
    font-size: 8px;
    max-width: calc(100% - 8px);
  }

  .chart-legend.minimized {
    width: 32px;
    height: 32px;
    padding: 5px;
  }

  .legend-toggle {
    padding: 3px 5px;
    font-size: 7px;
    gap: 3px;
  }

  .legend-dot {
    width: 5px;
    height: 5px;
  }

  .legend-divider {
    height: 14px;
  }

  .legend-minimize-btn {
    padding: 3px 5px;
    min-width: 22px;
    font-size: 9px;
  }
}

/* Responsive: Large Desktop/4K (min 1920px) */
@media (min-width: 1920px) {
  .chart-legend {
    top: 12px;
    left: 12px;
    padding: 12px 14px;
    gap: 14px;
    font-size: 12px;
  }

  .legend-toggle {
    padding: 6px 12px;
    font-size: 11px;
    gap: 7px;
  }

  .legend-dot {
    width: 9px;
    height: 9px;
  }

  .legend-divider {
    height: 22px;
  }

  .legend-minimize-btn {
    padding: 6px 10px;
    min-width: 32px;
    font-size: 13px;
  }
}

/* Reduce Motion - Accessibility */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== TOAST NOTIFICATION SYSTEM ===== */
/* Global Toast Notification Styles for RDGH Capital */
/* Used across all pages: /index.php, /dashboard/, /admin/, /assets/, /settings/, /sentiment/, /pages/*.php */

/* Toast Container */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100001;
  max-width: 400px;
  pointer-events: none;
}

/* Toast Animations */
@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

/* =========================
   Portfolio Detail Modal Styles
   ========================= */
.portfolio-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10000;
  padding: 2rem;
  overflow-y: auto;
  animation: fadeIn 0.2s ease;
}

.portfolio-modal-content {
  max-width: 1000px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--bg-modal) 0%, var(--bg-modal) 100%);
  border-radius: 20px;
  border: 1px solid var(--border-titanium);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  position: relative;
  animation: slideUp 0.3s ease;
  padding: 2rem;
  overflow: visible; /* ✅ FIX: Allow tooltips to overflow modal content */
}

.portfolio-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.portfolio-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  transform: rotate(90deg);
}

.portfolio-modal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.portfolio-modal-icon {
  font-size: 2.5rem;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, rgba(168, 197, 218, 0.15) 0%, rgba(139, 169, 190, 0.15) 100%);
  border: 1px solid rgba(168, 197, 218, 0.3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.portfolio-modal-stock-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
}

.portfolio-modal-title-wrap {
  flex: 1;
}

.portfolio-modal-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0;
  line-height: 1.2;
}

.portfolio-modal-subtitle {
  font-size: 0.875rem;
  color: #94a3b8;
  margin: 0.25rem 0 0;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.portfolio-modal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2rem;
}

.portfolio-modal-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.portfolio-modal-stat-card {
  background: rgba(20, 27, 45, 0.6);
  border: 1px solid rgba(71, 85, 105, 0.25);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  transition: all 0.3s ease;
}

.portfolio-modal-stat-card:hover {
  background: rgba(20, 27, 45, 0.8);
  border-color: rgba(168, 197, 218, 0.3);
  transform: translateY(-2px);
}

.portfolio-modal-stat-label {
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.portfolio-modal-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f1f5f9;
  word-break: break-word;
  font-family: var(--font-numeric);
}

.portfolio-modal-stat-value.positive {
  color: #22c55e;
}

.portfolio-modal-stat-value.negative {
  color: #ef4444;
}

.portfolio-modal-chart-section {
  background: rgba(20, 27, 45, 0.4);
  border: 1px solid rgba(71, 85, 105, 0.25);
  border-radius: 16px;
  padding: 1.5rem;
  overflow: visible; /* ✅ FIX: Allow tooltips to overflow section */
}

.portfolio-modal-chart-title {
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.portfolio-modal-chart-wrapper {
  position: relative;
  min-height: 350px;
  overflow: visible; /* ✅ FIX: Allow tooltips to overflow on mobile */
}

#portfolioModalChart {
  width: 100%;
  height: 350px;
}

.portfolio-modal-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(20, 27, 45, 0.95);
  backdrop-filter: blur(4px);
  border-radius: 20px;
  z-index: 10;
}

.portfolio-modal-loading .spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(168, 197, 218, 0.2);
  border-top-color: #A8C5DA;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.portfolio-modal-loading p {
  margin-top: 1rem;
  color: #94a3b8;
  font-size: 0.875rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .portfolio-modal {
    padding: 1rem;
  }

  .portfolio-modal-content {
    border-radius: 16px;
    padding: 1.5rem;
  }

  .portfolio-modal-header {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
  }

  .portfolio-modal-icon {
    width: 50px;
    height: 50px;
    font-size: 2rem;
  }

  .portfolio-modal-title {
    font-size: 1.25rem;
  }

  .portfolio-modal-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .portfolio-modal-stat-card {
    padding: 0.75rem;
  }

  .portfolio-modal-stat-value {
    font-size: 1rem;
  }

  .portfolio-modal-chart-wrapper {
    min-height: 250px;
  }

  #portfolioModalChart {
    height: 250px;
  }

  .portfolio-modal-close {
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    font-size: 1.25rem;
  }
}
