/* Ranking Banner */

.rank-banner {
  margin-top: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  border-radius: 16px;
  background: radial-gradient(circle, var(--theme-color), var(--theme-color-950));
  color: white;
  position: relative;
  overflow: hidden;
}

/* left section */

.rank-left {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  max-width: 700px;
}

/* icon */

.rank-icon {
  min-width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-yellow), var(--color-yellow-light));
  font-size: 26px;
}

.rank-icon i {
  --defined-color: var(--theme-text-contrast);
}
/* text */

.rank-text h2 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  --defined-color: var(--theme-text-contrast);
}

.rank-text p {
  font-size: 14px;
  margin-top: 6px;
  --defined-color: var(--theme-text-contrast-90);
}

.rank-text p strong {
  font-size: 15px;
  --defined-color: var(--theme-text-contrast);
}

/* highlight */

.highlight {
  color: var(--color-yellow-light);
  font-weight: 700;
}

/* ---------- TABLET ---------- */

@media (max-width: 900px) {
  .rank-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
  }

  .rank-left {
    max-width: 100%;
  }
}

/* ---------- MOBILE ---------- */

@media (max-width: 600px) {
  .rank-left {
    flex-direction: column;
    align-items: flex-start;
  }

  .rank-icon {
    width: 50px;
    height: 50px;
    font-size: 22px;
  }

  .rank-text h2 {
    font-size: 18px;
  }

  .rank-text p {
    font-size: 13px;
  }

  .rank-btn {
    width: 100%;
    text-align: center;
    padding: 12px 18px;
  }
}

/* --- 16. Tabs (Navigation/Analysis) --- */

.analysis-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 50px;
  padding: 6px 0;
  border-bottom: 2px solid var(--theme-text-10);
}

.analysis-tab {
  position: relative;
  padding: 10px 18px;
  border: none;
  background: var(--theme-bg-400);
  color: var(--theme-text-100);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.analysis-tab i {
  color: var(--theme-color);
}

.analysis-tab:hover,
.analysis-tab.active {
  color: var(--theme-text-contrast);
  background: var(--theme-color);
  font-weight: 600;
}

.analysis-tab:hover i,
.analysis-tab.active i {
  color: var(--theme-text-contrast);
}

.analysis-tab::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--theme-color);
  transition: 0.35s;
  border-radius: 10px;
}

.analysis-tab.active::after {
  width: 100%;
}

@media (max-width: 768px) {
  .analysis-tabs {
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
  }
}

.top-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  background: var(--Badge-bg);
  color: var(--text-color, var(--theme-text-100));
  font-size: 12px;
  padding: 6px 12px;
  margin: 0 auto;
  border: 2px solid var(--border-color);
  border-radius: 20px;
  font-weight: 600;
  margin-bottom: 0px;
}

.top-badge i {
  color: var(--text-color);
}

.badge-bronze {
  --Badge-bg: linear-gradient(135deg, #996f5d, #f1d7c6, #996f5d);
  --border-color: #996f5d;
  --text-color: #442e21;
}

.badge-silver {
  --Badge-bg: linear-gradient(135deg, #c0c0c0, #f1d7c6, #c0c0c0);
  --border-color: #c0c0c0;
  --text-color: #474747;
}

.badge-gold {
  --Badge-bg: linear-gradient(135deg, #ec9d0f, #fae508, #ec9d0f);
  --border-color: #ec9d0f;
  --text-color: #8f4e0e;
}

.badge-platinum {
  --Badge-bg: linear-gradient(135deg, #e5e4e2, #f1d7c6, #e5e4e2);
  --border-color: #e5e4e2;
  --text-color: #555555;
}

.badge-diamond {
  --Badge-bg: linear-gradient(135deg, #b9f2ff, #f1d7c6, #b9f2ff);
  --border-color: #b9f2ff;
  --text-color: #4a8e8e;
}

/* =======================================================
   Stock Ranking Section (Modern Horizontal Scroll Cards)
======================================================== */
.stock-ranking-section {
  flex-grow: 1;
  margin-top: 25px;
}

.stock-ranking-section .ranking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 15px;
}

.stock-ranking-section .ranking-header .header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.stock-ranking-section .ranking-header .header-left span {
  margin: 0;
  font-size: 13px;
}
.stock-ranking-section .ranking-header .header-left .fa-ribbon {
  color: var(--color-yellow-dark);
}

.stock-ranking-section .sub-text {
  color: var(--theme-text-70);
  font-size: 13px;
  font-weight: 500;
}

.stock-ranking-section .ranking-cards-wrapper {
  margin-bottom: 24px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.stock-ranking-section .ranking-cards-wrapper::-webkit-scrollbar {
  display: none;
}

.stock-ranking-section .ranking-cards {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 10px 4px;
  scroll-snap-type: x mandatory;
}

.stock-ranking-section .ranking-cards-wrapper .rank-card {
  flex: 1;
  min-width: 120px;
  scroll-snap-align: center;
  border: 1px solid var(--theme-text-10);
  border-radius: 16px;
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--theme-bg-400);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.stock-ranking-section .ranking-cards-wrapper .rank-card:hover:not(.active) {
  transform: translateY(-5px);
  box-shadow: var(--shadow-sm);
}

.stock-ranking-section .ranking-cards-wrapper .rank-card.active {
  background: linear-gradient(145deg, var(--theme-color-a5), var(--theme-color-a10));
  border: 2px solid var(--theme-color);
  box-shadow: 0 8px 25px -5px var(--theme-color-a30);
  transform: scale(1.03);
}

.stock-ranking-section .ranking-cards-wrapper .logo-circle {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-white);
  border: 1px solid var(--theme-text-10);
  margin-bottom: 14px;
  padding: 10px;
  font-size: 24px;
}

.stock-ranking-section .ranking-cards-wrapper .rank-card.active .logo-circle {
  background: var(--color-white);
  box-shadow: var(--shadow-xs);
}
.stock-ranking-section .ranking-cards-wrapper .logo-circle img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}
.stock-ranking-section .ranking-cards-wrapper .rank-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}
.stock-ranking-section .ranking-cards-wrapper .rank-num {
  font-size: 12px;
  color: var(--theme-text-70);
  font-weight: 600;
  background: var(--theme-bg-650);
  padding: 2px 10px;
  border-radius: 12px;
}

.stock-ranking-section .ranking-cards-wrapper .rank-card.active .rank-name {
  color: var(--theme-color-dark);
}
.stock-ranking-section .ranking-cards-wrapper .rank-card.active .rank-num {
  background: var(--theme-color-a20);
  color: var(--theme-color-dark);
}

/* =======================================================
   Price Scenarios & Right Card Flex
======================================================== */
.right-card-flex {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.icon-circle-small {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--theme-color);
}

.icon-circle-small i {
  --defined-color: var(--theme-text-contrast);
}

.scenarios-container {
  flex-grow: 1; /* Pushes the content to fill available space */
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  gap: 12px;
}

.scenario-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--boader-color, var(--theme-text-10));
  background: var(--bg-color, var(--theme-bg-400));
}

.scenario-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.scenario-center {
  flex: 3;
}

.progress-bar-container {
  height: 8px;
  background-color: var(--theme-bg-700);
  border-radius: 20px;
  overflow: hidden;
}

.scenario-row .progress-bar {
  height: 100%;
  border-radius: 20px;
}

/* --- Scenario Theme Colors --- */
.scenario-row.success-theme {
  --boader-color: var(--color-green);
  --bg-color: var(--color-green-10);
}

.scenario-row.primary-theme {
  --boader-color: var(--color-blue);
  --bg-color: var(--color-blue-10);
}

.scenario-row.danger-theme {
  --boader-color: var(--color-red);
  --bg-color: var(--color-red-10);
}

.scenario-row.success-theme .scenario-left i,
.scenario-row.success-theme .label {
  color: var(--color-green);
  font-weight: 700;
}

.scenario-row.success-theme .progress-bar {
  background: linear-gradient(90deg, var(--color-green-light), var(--color-green));
}

.scenario-row.primary-theme .scenario-left i,
.scenario-row.primary-theme .label {
  color: var(--color-blue);
  font-weight: 700;
}

.scenario-row.primary-theme .progress-bar {
  background: linear-gradient(90deg, var(--color-blue-light), var(--color-blue));
}

.scenario-row.danger-theme .scenario-left i,
.scenario-row.danger-theme .label {
  color: var(--color-red);
  font-weight: 700;
}

.scenario-row.danger-theme .progress-bar {
  background: linear-gradient(90deg, var(--color-red-light), var(--color-red));
}

.scenario-right {
  flex: 1.5;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.scenario-right .price {
  font-size: 20px;
  font-weight: 700;
}

.scenario-right .change {
  font-size: 12px;
  font-weight: 600;
}

.sps-card-divider {
  border: 0;
  border-top: 1px solid var(--theme-text-10);
  margin: 24px 0;
}

/* =======================================================
   Risk Assessment & Ratings
======================================================== */
.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.section-header h5 {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
}

.risk-assessment-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.risk-gauge-container {
  width: 100%;
  height: fit-content;
}

.risk-gauge-container .chart {
  width: 100%;
  aspect-ratio: 1.3;
}

.ratings-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ratings-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--theme-text-70);
  font-weight: 500;
}

/* --- Rating Stars --- */
.rating-stars {
  display: flex;
  gap: 4px;
  font-size: 6px;
}

.rating-stars .fa-circle {
  color: var(--color-green);
}

.rating-stars.warning-rating .fa-circle {
  color: var(--color-yellow);
}

.rating-stars .fa-circle.empty-dot {
  color: var(--theme-bg-700);
  font-size: 6px;
}

/* =======================================================
   Key Metrics, Consensus & Quick Metrics (Modern Design)
======================================================== */

.metrics-grid {
  margin-top: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

.metric-box {
  background: var(--theme-bg-400);
  border: 1px solid var(--theme-text-10);
  border-radius: 12px;
  padding: 10px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin-top: 10px;
}

/* Hover Effect par halka blue glow */
.metric-box:hover {
  border-color: var(--theme-color-a50);
  background: var(--theme-color-a5);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.metric-title {
  font-size: 12px;
  color: var(--theme-text-70);
  font-weight: 500;
  margin-bottom: 6px;
}

.metric-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--theme-text-100);
}

/* Wall Street Consensus Modern Stacked Bar */
.consensus-wrapper {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 15px;
  flex-grow: 1;
}

.stacked-bar-container {
  width: 100%;
}

.stacked-bar {
  display: flex;
  height: 12px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--theme-bg-700);
  margin-bottom: 12px;
}

.stacked-bar .bar {
  height: 100%;
  transition: width 0.6s ease;
}
.stacked-bar .buy {
  background: var(--color-green);
  width: 68.4%;
} /* 26/38 */
.stacked-bar .hold {
  background: var(--color-yellow);
  width: 21%;
} /* 8/38 */
.stacked-bar .sell {
  background: var(--color-red);
  width: 10.6%;
} /* 4/38 */

.consensus-stats {
  display: flex;
  justify-content: space-between;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--theme-text-100);
}

.stat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-buy {
  background: var(--color-green);
}
.dot-hold {
  background: var(--color-yellow);
}
.dot-sell {
  background: var(--color-red);
}

.avg-target-box {
  text-align: center;
  margin-top: auto;
}

.avg-target-box span {
  font-size: 10px;
  color: var(--theme-text-70);
  font-weight: 500;
}
.avg-target-box h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--theme-text-100);
  margin: 3px 0;
}
.avg-target-box .down-val {
  color: var(--color-red);
  font-size: 14px;
  font-weight: 600;
  margin-left: 8px;
}

/* Quick Metrics Clean List */
.quick-metrics-list {
  display: flex;
  flex-direction: column;
  margin-top: 10px;
  flex-grow: 1;
  justify-content: space-evenly;
}

.qm-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px dashed var(--theme-text-10);
}

.qm-item:last-child {
  border-bottom: none;
}

.qm-label {
  font-size: 10px;
  color: var(--theme-text-70);
  font-weight: 500;
}
.qm-val {
  font-size: 10px;
  color: var(--theme-text-100);
  font-weight: 600;
}

/* =========================================
   Banner Theming Variables
========================================= */
.upgrade-banner {
  --banner-bg-color: #ffa80017;
  --banner-border-color: #ff5500;
  --banner-glow-rgb: 255, 153, 0;
  --banner-grad-start: #ffb300;
  --banner-grad-end: #ff7700;
  --banner-feat-icon-color: #ff7700;
  --banner-feat-border: #ffa200d0;
  /* Base Layout */
  align-items: center;
  background: var(--theme-bg-400);
  background-color: var(--banner-bg-color);
  border-radius: 20px;
  border: 3px solid var(--banner-border-color);
  margin: 40px 0;
  padding: var(--spacing-3);
  /* Dynamic Shadows */
  box-shadow: 0 10px 30px rgba(var(--banner-glow-rgb), 0.08);
  transition:
    transform var(--transition-speed-normal) var(--ease-out-cubic),
    box-shadow var(--transition-speed-normal) var(--ease-out-cubic);
  will-change: transform, box-shadow;
}

/* 🟣 PURPLE THEME (Expert) */
.upgrade-banner.theme-purple {
  --banner-bg-color: rgba(139, 92, 246, 0.05);
  --banner-border-color: #7e22ce;
  --banner-glow-rgb: 139, 92, 246;
  --banner-grad-start: #a855f7;
  --banner-grad-end: #7e22ce;
  --banner-feat-icon-color: #9333ea;
  --banner-feat-border: rgba(146, 51, 234, 0.699);
}

/* Banner Hover */
.upgrade-banner:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(var(--banner-glow-rgb), 0.15);
}

/* =========================================
   Left Section & Main Icon
========================================= */
.upgrade-banner .banner-info {
  display: flex;
  gap: var(--spacing-2);
  margin-bottom: var(--spacing-3);
}

.upgrade-banner .main-icon {
  /* Dynamic Gradient */
  background: linear-gradient(135deg, var(--banner-grad-start), var(--banner-grad-end));
  --defined-color: var(--color-white);
  min-width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(var(--banner-glow-rgb), 0.2);
  flex-shrink: 0;
  transition:
    transform var(--transition-speed-normal) var(--ease-spring),
    box-shadow var(--transition-speed-normal) var(--ease-out-cubic);
}
.upgrade-banner:hover .main-icon {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 8px 25px rgba(var(--banner-glow-rgb), 0.4);
}

/* Text Animations */
.upgrade-banner h4 {
  font-weight: var(--fw-bold);
  margin-bottom: var(--spacing-1);
  margin-top: 0;
  transition: transform var(--transition-speed-normal) var(--ease-out-cubic);
  transform-origin: left center;
}
.upgrade-banner p {
  margin-bottom: 0;
  font-size: var(--fs-body-sm);
  color: var(--theme-text-70-solid);
  transition: transform var(--transition-speed-normal) var(--ease-out-cubic);
  transform-origin: left center;
}
.upgrade-banner:hover h4 {
  transform: scale(1.04);
  transition-delay: 0.05s;
}
.upgrade-banner:hover p {
  transform: translateX(2px);
  transition-delay: 0.05s;
}

/* Optional: Small Badge from Image */
.upgrade-banner .feature-badge {
  display: inline-block;
  background-color: #fff3e0;
  color: #ff7700;
  font-size: 0.7rem;
  font-weight: var(--fw-bold);
  padding: 4px 10px;
  border-radius: 20px;
  margin-top: 8px;
  border: 1px solid #ffdcb0;
}

/* =========================================
   Center Section: Features
========================================= */
.upgrade-banner .banner-features {
  display: flex;
  justify-content: center;
  gap: var(--spacing-1);
  margin-bottom: var(--spacing-3);
}
.upgrade-banner .feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 98px;
  text-align: center;
  transition: transform var(--transition-speed-normal) var(--ease-spring);
}
.upgrade-banner:hover .feature-item {
  transform: scale(1.06);
}
.upgrade-banner:hover .feature-item:nth-child(1) {
  transition-delay: 0.1s;
}
.upgrade-banner:hover .feature-item:nth-child(2) {
  transition-delay: 0.15s;
}
.upgrade-banner:hover .feature-item:nth-child(3) {
  transition-delay: 0.2s;
}
.upgrade-banner:hover .feature-item:nth-child(4) {
  transition-delay: 0.25s;
} /* In case of 4 items */

.upgrade-banner .feature-icon {
  background: var(--theme-bg-500);
  /* Dynamic Feature Colors */
  --defined-color: var(--banner-feat-icon-color);
  color: var(--banner-feat-icon-color);
  border: 2px solid var(--banner-feat-border);

  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  font-size: 1.1rem;
}
.upgrade-banner .feature-text {
  font-size: 0.75rem;
  line-height: var(--line-height-tight);
  color: var(--theme-text-100);
  font-weight: var(--fw-bold);
}

/* =========================================
   Right Section: CTA Button
========================================= */
.upgrade-banner .banner-cta {
  text-align: center;
  margin-top: var(--spacing-2);
}
.upgrade-banner .btn-upgrade {
  /* Dynamic Button Gradient */
  background: linear-gradient(135deg, var(--banner-grad-start), var(--banner-grad-end));
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  box-shadow: 0 4px 15px rgba(var(--banner-glow-rgb), 0.3);
  font-weight: var(--fw-bold);
  width: 100%;
  transition:
    transform var(--transition-speed-normal) var(--ease-spring),
    box-shadow var(--transition-speed-normal) var(--ease-out-cubic),
    filter var(--transition-speed-normal) var(--ease-out-cubic);
}
.upgrade-banner:hover .btn-upgrade {
  transform: scale(1.08);
  box-shadow: 0 8px 25px rgba(var(--banner-glow-rgb), 0.5);
  filter: brightness(1.05);
  transition-delay: 0.25s;
}
.upgrade-banner .btn-upgrade:hover {
  transition-delay: 0s !important;
  transform: scale(1.1) !important;
  box-shadow: 0 6px 20px rgba(var(--banner-glow-rgb), 0.4);
  filter: brightness(1.1);
}

/* Stock Header */
.stock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
  background: none;
  padding: 24px 0;
  border-radius: 16px;
}

.stock-header .stock-right {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.stock-header .performance {
  display: flex;
  gap: 25px;
}

.stock-header .performance .label {
  display: block;
  font-size: 13px;
  color: var(--theme-text-100);
}

/* Replaced green colors with variables */
.stock-header .gain,
.stock-header .price-change,
.stock-header .text-success {
  color: var(--color-green) !important;
  font-weight: 600;
}

.stock-header .price-block {
  text-align: right;
}

.stock-header .price {
  font-size: 28px;
  font-weight: 700;
  color: var(--theme-text-100);
}

.price-change {
  font-size: 14px;
}

.stock-header .watchlist {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.stock-header.watch-btn {
  width: 100%;
}

.stock-header .watchlist a {
  font-size: 13px;
  color: var(--theme-color);
  text-decoration: none;
}

/* responsive */

@media (max-width: 768px) {
  .stock-header {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 18px;
  }

  /* Top section */
  .stock-header .stock-profile {
    align-items: center;
    gap: 14px;
  }

  .stock-header .stock-profile .stock-logo {
    --sp-logo-size: 48px;
    --sp-logo-radius: 10px;
    --sp-icon-size: 22px;
  }

  .stock-header .stock-profile .stock-title {
    --sp-title-size: 20px;
  }

  .stock-header .stock-profile .stock-meta {
    --sp-meta-size: 12px;
  }

  /* Right section becomes stacked */
  .stock-header .stock-right {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  /* Performance inline but spaced */
  .stock-header .performance {
    justify-content: space-between;
    gap: 10px;
  }

  .stock-header .performance div {
    text-align: center;
    flex: 1;
  }

  /* Price centered for visual focus */
  .stock-header .price-block {
    text-align: center;
  }

  .stock-header .price {
    font-size: 24px;
  }

  .stock-header .price-change {
    font-size: 13px;
  }

  /* Watchlist full width button */
  .stock-header .watchlist {
    align-items: stretch;
    width: 100%;
  }

  .stock-header .watch-btn {
    width: 100%;
  }

  .stock-header .watchlist a {
    text-align: center;
  }
}

/* =======================================================
   Core Analysis Metrics
======================================================== */

.core-analysis .row .card {
  text-align: center;
  margin-top: 1rem;
  height: stretch;
}

.card .core-analysis-chart {
  width: 100%;
  aspect-ratio: 1.2;
  min-height: 160px;
  flex-grow: 1; /* Chart takes space */
}

/* Target Price Elements */
.target-price-chart {
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1;
}

.target-price-chart .target-price {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
}

.row-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.row-info {
  width: 140px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.progress {
  display: flex;
  height: 1.5rem;
  overflow: hidden;
  width: 100%;
  background-color: var(--color-blue-10);
  border-radius: 8px;
  margin-bottom: 15px;
}

.progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background-color: var(--theme-color);
  font-size: 0.75rem;
  transition: width 0.6s ease;
}

/* Upside Badge */
.upside-badge {
  display: inline-flex;
  align-items: center;
  width: 100%;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  background-color: var(--color-green-30);
  border: 1px solid var(--color-green-60);
  border-radius: 8px;
  color: var(--color-green-dark);
}

.badge-icon {
  width: 20px;
  height: 20px;
  stroke: var(--color-green-dark);
}
.badge-text {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.text-top {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
}
.text-bottom {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.1;
}

/* =======================================================
   SPS Comparison Matrix (Formerly Modern Data Table)
======================================================== */

.sps-matrix-wrapper {
  width: 100%;
  height: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background-color: var(--theme-bg-400);
  border-radius: var(--radius-lg, 16px);
  border: 1px solid var(--theme-text-10);
  box-shadow: var(--shadow-xs);
  flex: 1;
  display: flex;
  flex-direction: column;
  
  /* MAGIC: Container query setup for fluid fonts */
  container-type: inline-size;
}

.sps-matrix-table {
  width: 100%;
  min-width: 800px; /* Forces scroll on mobile to protect layout */
  height: 100%;
  border-collapse: separate;
  border-spacing: 1px 0; /* horizontal gap between columns */
}

.sps-matrix-table th,
.sps-matrix-table td {
  /* FLUID PADDING: Scales smoothly based on container width */
  padding: clamp(14px, 2.5cqw, 20px) clamp(12px, 2cqw, 20px);
  text-align: center;
  border-bottom: 1px solid var(--theme-text-10);
  /* FLUID FONT: Min 11px, Ideal 1.5% of width, Max 14px */
  font-size: clamp(11px, 1.5cqw, 14px);
  vertical-align: middle;
}

/* STICKY COLUMN FIX FOR MOBILE */
.sps-matrix-table th:first-child,
.sps-matrix-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 10;
  background-color: var(--theme-bg-400); 
  text-align: left;
  border-right: 1px solid var(--theme-text-10); 
  font-weight: 500;
  color: var(--theme-text-70);
}

.sps-matrix-table table td:nth-child(3),
.sps-matrix-table table th:nth-child(3),
.sps-matrix-table table td:nth-child(5),
.sps-matrix-table table th:nth-child(5) {
  background-color: rgba(40, 255, 0, 0.04);
}

.sps-matrix-table table td:nth-child(4),
.sps-matrix-table table th:nth-child(4) {
  background-color: rgba(0, 60, 255, 0.04);
}

.sps-matrix-table tbody tr:last-child {
  height: 100%;
}

/* =======================================================
   Highlighted Active Column
======================================================== */
.table-col-highlight {
  border-top: 2px solid var(--theme-color);
  border-left: 2px solid var(--theme-color);
  border-right: 2px solid var(--theme-color);
  border-bottom: none;
  background: linear-gradient(90deg, var(--theme-color-a5) 0%, var(--theme-color-a6) 50%);
}

td.table-col-highlight {
  background: linear-gradient(90deg, var(--theme-color-a5) 0%, var(--theme-color-a6) 50%);
  border-top: 1px solid var(--theme-text-10);
  border-left: 2px solid var(--theme-color);
  border-right: 2px solid var(--theme-color);
  border-bottom: 1px solid var(--theme-text-10); 
  border-radius: 0px;
}

td.table-col-highlight.last {
  border-bottom: 2px solid var(--theme-color);
}

/* =======================================================
   Inner Matrix Components (Headers & Details)
======================================================== */
.header-company {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(4px, 1cqw, 8px);
}

.header-logo {
  width: clamp(38px, 5cqw, 44px);
  height: clamp(38px, 5cqw, 44px);
  border-radius: 12px;
  background: var(--theme-bg-400);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--theme-text-10);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(18px, 3cqw, 22px);
}

.header-name {
  font-size: clamp(12px, 1.8cqw, 14px);
  font-weight: 700;
  color: var(--theme-text-100);
  margin-bottom: 2px;
}

.header-ticker {
  font-size: clamp(9px, 1cqw, 10px);
  color: var(--theme-text-70);
  font-weight: 500;
  background: var(--theme-bg-650);
  padding: 2px 8px;
  border-radius: 6px;
}

/* Score Display with Mini Bar */
.score-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.score-box .val {
  font-size: clamp(14px, 2.5cqw, 18px);
  font-weight: 800;
}
.score-box .mini-bar-bg {
  width: clamp(45px, 8cqw, 60px);
  height: 4px;
  background: var(--theme-bg-700);
  border-radius: 4px;
  overflow: hidden;
}
.score-box .mini-bar-fill {
  height: 100%;
  border-radius: 4px;
}

/* Score Box Colors */
.score-box.success .val { color: var(--color-green); }
.score-box.primary .val { color: var(--color-blue); }
.score-box.warning .val { color: var(--color-yellow); }
.score-box.danger .val { color: var(--color-red); }

.score-box.success .mini-bar-fill { background: var(--color-green); }
.score-box.primary .mini-bar-fill { background: var(--color-blue); }
.score-box.warning .mini-bar-fill { background: var(--color-yellow); }
.score-box.danger .mini-bar-fill { background: var(--color-red); }

/* Ticker Price Style */
.price-ticker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.price-ticker .perc {
  font-size: clamp(11px, 1.8cqw, 13px);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}
.price-ticker .amt {
  font-size: clamp(10px, 1.5cqw, 12px);
  color: var(--theme-text-70);
  font-weight: 600;
}

/* Status Text Colors */
.text-excellent { color: var(--color-green-light); font-weight: 600; }
.text-good { color: var(--color-green); font-weight: 500; }
.text-fair { color: var(--color-yellow); font-weight: 500; }
.text-poor { color: var(--color-red); font-weight: 500; }
.text-vpoor { color: var(--color-red-light); font-weight: 600; }

/* =========================
   COMPONENT: ta-signal
========================= */
.ta-signal {
  --ta-card-bg: var(--theme-bg-400);
  --glow: var(--theme-color-a20);
  --color: var(--theme-color);
  background: var(--ta-card-bg);
  border: 2px solid var(--glow);
  border-radius: 8px;
  padding: 15px;
}

.ta-signal .header {
  justify-content: space-between;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.ta-signal .header h5 {
  color: var(--theme-text-100);
  font-size: 12pt;
}

.ta-signal .header i {
  color: var(--color);
  font-size: 14pt;
}

.ta-signal .value {
  color: var(--color);
  font-size: 16pt;
  font-weight: bold;
  margin-bottom: 7px;
}

.ta-signal .info {
  color: var(--theme-text-70-solid);
  font-size: 9pt;
}

.ta-signal .badge {
  --full: var(--color);
  --half: var(--glow);
  background: var(--half);
  color: var(--full);
  border-radius: 2px;
  padding: 10px;
  border: 1px solid var(--full);
}

.ta-signal .badge.primary {
  --full: var(--color-blue);
  --half: var(--color-blue-20);
}

.ta-signal .badge.success {
  --full: var(--color-green);
  --half: var(--color-green-20);
}

.ta-signal .badge.danger {
  --full: var(--color-red);
  --half: var(--color-red-20);
}

.ta-signal .badge.warning {
  --full: var(--color-yellow);
  --half: var(--color-yellow-20);
}

/* ==== COLOR VARIANTS ==== */
.ta-signal.primary {
  --color: var(--color-blue);
  --glow: var(--color-blue-20);
}

.ta-signal.success {
  --color: var(--color-green);
  --glow: var(--color-green-20);
}

.ta-signal.warning {
  --color: var(--color-yellow);
  --glow: var(--color-yellow-20);
}

.ta-signal.danger {
  --color: var(--color-red);
  --glow: var(--color-red-20);
}

.explorer-section .accordion {
  --surface-bg: var(--theme-bg-400);
  --surface-border: var(--theme-text-10);
  --text-primary: var(--theme-text-100);
  --surface-bg-hover: var(--themebg-450);
  --text-hover: var(--theme-text-100);
  --surface-bg-active: var(--theme-bg-400);
}

.explorer-section .accordion .accordion-header[aria-expanded="true"] {
  border-radius: 8px 8px 0 0;
}

.explorer-section .expandable-item .expandable-panel {
  background: var(--theme-bg-400);
  box-shadow: inset 0 0 0 1.5px var(--surface-border);
  border-radius: 0 0 8px 8px;
  padding: 0;
}

.explorer-section .accordion-item:not(:last-child) {
  margin-bottom: 10px;
}

.accordion-title .header {
  align-items: center;
}

.accordion-title .header h5 {
  margin-bottom: 4px;
}

.accordion-title .header .icon {
  --accordion-i-bg: var(--theme-color);
  --i-color: var(--theme-text-contrast);

  background: var(--accordion-i-bg);
  color: var(--i-color);
  padding: 0.71rem;
  font-size: 0.7rem;
  width: 36px;
  height: 36px;
}

.accordion-title .header .icon i {
  color: var(--i-color);
}

.explorer-section .table {
  width: 100%;
  border-collapse: collapse;
}

.explorer-section .table thead {
  background-color: var(--theme-color-a5);
  border-top: none;
}

.explorer-section .table th {
  padding: 1.2rem 1.5rem;
}

.explorer-section .table td {
  padding: 0.95rem 1.5rem;
}

.explorer-section .table th,
.explorer-section .table td {
  border-bottom: 1px solid var(--theme-bg-500);
  font-size: var(--fs-body-sm);
  text-align: left;
}

.explorer-section .expandable-trigger[aria-expanded="true"] + .expandable-panel {
  max-height: fit-content;
}

.explorer-section .table tbody tr:last-child td {
  border-bottom: none;
}

.explorer-section .table .badge {
  min-width: 90px;
}


/* =======================================================
   1. Fundamentals & Radar Legends
======================================================== */
.fund-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--theme-text-10);
  font-size: 12px;
}
.fund-item:last-child {
  border-bottom: none;
}

.custom-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 15px;
  font-family: system-ui, sans-serif;
}
.legend-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--theme-text-70, #64748b);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none; 
}
.legend-item:hover { background-color: rgba(0, 0, 0, 0.03); }
.legend-item.disabled { opacity: 0.4; filter: grayscale(100%); }

.legend-label { display: flex; align-items: center; gap: 8px; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }

.dot-apple { background-color: #a855f7; }
.val-apple { color: #a855f7; font-weight: bold; }
.dot-tech { background-color: var(--color-red, #b91c1c); }
.val-tech { color: var(--color-red, #b91c1c); font-weight: bold; }
.dot-usa { background-color: var(--color-blue, #0891b2); }
.val-usa { color: var(--color-blue, #0891b2); font-weight: bold; }

/* =======================================================
   2. Chart Layouts & Wrappers
======================================================== */

.mini-chart-container {
  width: 120px; 
  min-height: 100px;
  aspect-ratio: 1;
  margin-top: 30px;
  margin-bottom: 9px;
  display: flex;
  align-items: center;
}

.radar-canvas {
  width: 100%;
  height: 100%;
}

.technical-summary,
.quantitative-summary {
  border: 3px solid var(--theme-color);
  background: var(--theme-color-a5) !important;
  text-align: left;
  margin-top: 1rem;
}

.technical-summary .details,
.quantitative-summary .details {
  margin-top: 14px;
  text-align: left;
}

.technical-summary .details p,
.quantitative-summary .details p {
  font-size: 14.5px;
  color: var(--theme-text-70-solid);
  font-weight: 600;
  line-height: 1.9rem;
}

.market-dynamics .line-chart { margin-top: 1.5rem; width: 100%; aspect-ratio: 1.5; min-height: 220px; }
.market-dynamics .bar-chart { margin-top: 1.5rem; width: 100%; aspect-ratio: 2.2; min-height: 140px; }
.market-dynamics .chart-footer span,
.market-dynamics .chart-footer strong { font-size: 9pt; }

.multi-level-comparison .chart { width: 100%; aspect-ratio: 1; min-height: 110px; }
.price-performance .chart { margin-top: 1.8rem; width: 100%; min-height: 200px; aspect-ratio: 2.1; }
.Enhanced-Opportunity-Dashboard .card { background: none; }

/* =======================================================
   3. Piotroski F-Score Cards
======================================================== */
.piotroski-section .card.chart-container {
  text-align: center;
  background: var(--color-blue-10);
  border: 2px solid var(--color-blue);
}
.piotroski-section .card.chart-container .chart {
  min-width: 70%;
  min-height: 170px;
  max-height: 270px;
  align-items: center;
  margin: auto;
  aspect-ratio: 1;
}

.card.F-Score-card {
  --background: var(--theme-color-a5);
  --border: var(--theme-color);
  --color: var(--theme-color);
  background: var(--background);
  border: 2px solid var(--border);
}
.card.F-Score-card i, 
.card.F-Score-card h2 { color: var(--color); }

.card.F-Score-card.primary { --background: var(--color-blue-10); --border: var(--color-blue); --color: var(--color-blue); }
.card.F-Score-card.warning { --background: var(--color-yellow-10); --border: var(--color-yellow); --color: var(--color-yellow); }
.card.F-Score-card.success { --background: var(--color-green-10); --border: var(--color-green); --color: var(--color-green); }
.card.F-Score-card.danger { --background: var(--color-red-10); --border: var(--color-red); --color: var(--color-red); }

.card.F-Score-card-details {
  --background: var(--color-blue-10);
  --border: var(--color-blue);
  --color: var(--color-blue);
  background: var(--background);
  border: 2px solid var(--border);
}

/* =========================
   COMPONENT: ta-card
========================= */
.ta-card {
  --ta-card-bg: var(--theme-bg-400);
  --ta-card-border: var(--theme-text-10);

  background: var(--ta-card-bg);
  border: 1px solid var(--ta-card-border);
  border-radius: 14px;
  padding: 20px;
}

.ta-card .row-item {
  margin-top: 30px;
}

.ta-card .info {
  text-align: center;
}

.ta-card .info .main-number {
    --color: var(--theme-color);  
    font-size: 52px;
    color: var(--color);
    margin: 0;
    font-weight: 700;
}

.ta-card .info .primary { --color: var(--color-blue); }
.ta-card .info .success { --color: var(--color-green); }
.ta-card .info .warning { --color: var(--color-yellow); }
.ta-card .info .danger  { --color: var(--color-red); }

.ta-card .info .description {
    font-size: 16px;
    color: var(--theme-text-100);
    margin-top: 5px;
}

/* Variants */
.ta-card.compact { padding: 12px; }
.ta-card.outlined { background: transparent; }
.ta-card.primary { --ta-card-border: var(--color-blue-30); }
.ta-card.success { --ta-card-border: var(--color-green-30); }
.ta-card.warning { --ta-card-border: var(--color-yellow-30); }
.ta-card.danger  { --ta-card-border: var(--color-red-30); }

  .card.chart-container .chart {
    min-width: 70%;
    min-height: 170px;
    max-height: 270px;
    align-items: center;
    margin: auto;
    aspect-ratio: 1;
  }
  .signals-container {
    display: flex;
    align-items: center;
  }

  .signals-container .header {
    font-weight: var(--fw-bold);
    text-transform: uppercase;
  }

  .signals-container .badge {
    min-width: 22px;
    height: 22px;
    font-size: 12px;
    padding: 12px;
  }

  .signal-box {
    border-radius: 8px;
    padding: 15px 15px;
    border: 1px solid;
    font-family: "Inter", sans-serif;
    transition: all 0.25s ease;
  }

  .signal-box {
    border: 2px solid;
  }

  /* HEADER */
  .signal-box .header {
    display: flex;
    align-items: center;
    justify-content: left;
    gap: 10px;
    font-weight: 600;
    font-size: 12px;
    color: var(--theme-text-100);
  }

  /* ICON */
  .signal-box .icon {
    font-size: 14px !important;
    display: flex;
    align-items: center;
    padding: 0 !important;
    justify-content: center;
  }

  /* INFO (ROA) */
  .signal-box .info {
    margin-top: 4px;
    font-size: 10px;
    opacity: 0.8;
    --defined-color: var(--theme-text-100);
    letter-spacing: 0.5px;
  }

  /* VALUE ROW */
  .signal-box .value-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid var(--border-color-signal);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
  }

  /* NUMBER */
  .signal-box .value-wrapper .number {
    font-size: 13px;
    font-weight: 700;
  }

  /* DESCRIPTION */
  .signal-box .para-small {
    margin-top: 8px;
    font-size: 7.5pt;
    opacity: 0.85;
    line-height: 1.4;
    --defined-color: var(--theme-text-100);
  }

  /* ========================= */
  /* ✅ CHECKED STATE */
  /* ========================= */
  .signal-box.checked {
    background: var(--color-green-10);
    border-color: var(--color-green);
    --border-color-signal: var(--color-green-60);
  }

  .signal-box.checked .icon {
    color: #22c55e;
  }

  .signal-box.checked:hover {
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.15);
  }

  /* ========================= */
  /* ❌ UNCHECKED STATE */
  /* ========================= */
  .signal-box.unchecked {
    background: var(--color-red-10);
    border-color: var(--color-red);
    --border-color-signal: var(--color-red-60);
  }

  .signal-box.unchecked .icon {
    color: var(--color-red);
  }

  .signal-box.unchecked:hover {
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.15);
  }

/* =========================
   COMPONENT: LIST
========================= */

.list {
  min-height: 120px;
}

.list .badge {
  width: 100%;
}

.list-item {
  padding: 10px;
  border-radius: 8px;
  border: 2px solid var(--theme-text-10);
  text-align: center;

  background: var(--bg);
  color: var(--color);
}

.list-item.active { 
 border: 2px solid var(--color-blue);
}

.list-item .label {
  font-size: var(--fs-body-xs);
  font-weight: var(--fw-medium);
}

.list-item .value {
  font-size: var(--fs-body-md);
  color: var(--color);
  font-weight: var(--fw-bold);
}  

/* =======================================================
   4. Technical Analysis Header Elements
======================================================== */

.technical-analysis .primary {
  --bg: var(--color-blue-20);
  --color: var(--color-blue);
}

.technical-analysis .success {
  --bg: var(--color-green-20);
  --color: var(--color-green);
}

.technical-analysis .warning {
  --bg: var(--color-yellow-20);
  --color: var(--color-yellow);
}

.technical-analysis .danger {
  --bg: var(--color-red-20);
  --color: var(--color-red);
}

.card .note {
  padding: 10px;
  border: 1px solid var(--theme-text-10);
  border-radius: 8px;
  font-size: var(--fs-body-xs);
}

.tech-score-card {
  width: 220px;
  padding: 20px 18px;
  border-radius: 14px;
  background: var(--theme-bg-400);
  border: 1px solid var(--theme-text-10);
  text-align: center;
  font-family: inherit;
}

.tech-score-title {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--theme-text-100);
  font-weight: 600;
  margin-bottom: 10px;
}

.tech-score-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  color: var(--theme-text-100);
  margin-bottom: 8px;
}
.tech-score-value .score { font-size: 34px; font-weight: 800; color: var(--color-green, #16a34a); }
.tech-score-value .divider { font-size: 18px; color: var(--theme-text-70-solid); }
.tech-score-value .max { font-size: 14px; color: var(--theme-text-70-solid); }
.tech-score-label { font-size: 10px; color: var(--theme-text-100); font-weight: 500; }

.RSI .chart {
  margin: auto;
  margin-top: 30px;
  width: 80%;
  min-width: 175px;
  max-width: 260px;
  aspect-ratio: 1.2;
}

.progress-item {
  margin-top: 27px;
}

.progress-item:last-child {
  margin-bottom: 0;
}

.item-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

.item-value { font-weight: 700; color: var(--theme-text-100); }
.item-bar-container { display: flex; align-items: center; gap: 15px; }

/* =========================
   COMPONENT: PROGRESS
========================= */

.technical-analysis .progress {
  flex: 1;
  position: relative;
  align-items: center;
  gap: 12px;
  border-radius: 999px;
  margin-bottom: 0;
  height: 15px;
}

.technical-analysis .progress-track {
  flex: 1;
  height: 100%;
  background: var(--bg);
  border-radius: 999px;
  position: relative;
}

.technical-analysis .progress-fill {
  height: 100%;
  width: var(--value, 50%);
  background: linear-gradient(
  to right,
  rgba(255, 255, 255, 0.253),
  transparent
),
var(--color);
  border-radius: inherit;
  transition: width 0.4s ease;
}

.progress-dot {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);

  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--color);
}

  /* Header Alignment */
  .widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 41px;
  }

  .widget-title {
    color: var(--theme-text-100);
    font-size: 16px;
    font-weight: 600;
  }

  .widget-price {
    color: var(--color-cyan-dark); /* Bold Cyan color */
    font-size: 17px;
    font-weight: 700;
  }


  /* Progress Bar Flex Integration */
  .bar-container {
    flex: 1 1 auto; /* Takes up all available empty space */
  }

  .bar-track {
    background-color: #f1f5f9;
    height: 14px;
    border-radius: 20px;
    position: relative;
    display: flex;
    align-items: center;
  }

  .bar-fill {
    height: 100%;
    border-radius: 20px;
    transition: width 0.5s ease; /* Smooth animation if data changes */
  }

  /* End-of-track Dots */
  .track-dot {
    width: 6px;
    height: 6px;
    background-color: #ffffff;
    border-radius: 50%;
    position: absolute;
    right: 4px;
    border-style: solid;
    border-width: 2px;
  }

  /* SVG Checkmark Icon */
  .check-icon {
    width: 16px;
    height: 16px;
    color: #10b981; /* Green checkmark */
    flex-shrink: 0;
  }

/* =======================================================
   5. Custom Gauges (ADX, Bollinger Bands, Volatility)
======================================================== */

.score-system { max-width: 420px; margin: auto; text-align: center; }
.gauge-text { margin-top: 16px; padding: 14px; border-radius: 12px; background: var(--theme-bg-500); }
.gauge-controls { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.gauge-controls label { padding: 8px 12px; border-radius: 10px; background: var(--theme-bg-500); cursor: pointer; }

/* Semi-Circle Gauge (ADX) */
.ta-card.ADX .gauge-card {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #fff;
  border: 1px solid #d1d9ff;
  border-radius: 15px;
  padding: 14px 20px;
  max-width: 600px;
  margin: 20px auto;
  text-align: center;
}
.ta-card.ADX .gauge-container { position: relative; margin-bottom: 18px; container-type: inline-size; padding-top: 20px; }
.ta-card.ADX .gauge-bar { display: flex; height: 45px; border-radius: 12px; width: 100%; container-type: inline-size; overflow: hidden; }
.ta-card.ADX .segment { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.ta-card.ADX .weak { background-color: var(--color-red-20); color: var(--color-red); }
.ta-card.ADX .moderate { background-color: var(--color-yellow-20); color: var(--color-yellow); }
.ta-card.ADX .strong { background-color: var(--color-green-20); color: var(--color-green); }
.ta-card.ADX .very-strong { background-color: var(--theme-color-a5); color: var(--theme-color); }

.gauge-pointer-wrapper {
  position: absolute;
  top: 4px;
  left: var(--progress);
  transform: translateX(-50%);
  z-index: 10;
  transition: left 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.pointer-diamond {
  width: 14px;
  height: 14px;
  background: var(--theme-color);
  transform: rotate(45deg);
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.pointer-line {
  width: 4px;
  height: 53px;
  background: var(--theme-color);
  margin: -6px auto 0;
  border-radius: 2px;
}

@container (max-width: 400px) {
  .ta-card.ADX .gauge-bar { height: 35px; border-radius: 10px;}
  .ta-card.ADX .segment { font-size: 11px; font-weight: 600; }
  .ta-card.ADX .gauge-pointer-wrapper { top: 4px; }
  .ta-card.ADX .pointer-line { height: 43px; }
}
@container (max-width: 300px) {
  .ta-card.ADX .gauge-bar { height: 30px; border-radius: 6.5px; }
  .ta-card.ADX .segment { font-size: 6px; font-weight: 700; }
  .ta-card.ADX .gauge-pointer-wrapper { top: 4px; }
  .ta-card.ADX .pointer-line { height: 38px; }
}

.bollinger-bands .gauge-section { 
  position: relative; 
  container-type: inline-size;
}

.bollinger-bands .gauge-track {
  width: 100%;
  height: 30px;
  border-radius: 6px;
  background: linear-gradient(to right, var(--color-red-30) 0%, var(--color-blue-30) 20%, var(--color-blue-30) 70%, var(--color-red-30) 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  border: 1px solid var(--theme-text-10);
  position: relative;
  overflow: hidden;
}

.bollinger-bands .segment-label { 
  font-size: 11px; 
  font-weight: 700; 
  z-index: 2; 
}

.bollinger-bands .segment-label.below, .segment-label.above { 
  color: var(--color-red-dark); 
}

.bollinger-bands .segment-label.middle { 
  color: var(--theme-text-100); 
  margin-left: auto; 
  margin-right: auto; 
}

.bollinger-bands .marker-line {
  position: absolute;
  top: 0px;
  height: 61px;
  width: 2px;
  background-color: var(--theme-text-10);
  z-index: 1;
  pointer-events: none;
}
.left-cap { left: 0; border-radius: 6px 0 0 6px; }
.middle-sma { left: 50%; transform: translateX(-50%); }
.right-cap { right: 0; border-radius: 0 6px 6px 0; }

.slider-pointer-wrapper {
  position: absolute;
  top: -18px;
  left: var(--slider-value);
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: left 0.4s ease-out;
}
.pointer-head {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--color-yellow);
  border: 2px solid var(--theme-bg-400);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.pointer-stem {
  width: 4px;
  height: 35px;
  background-color: var(--color-yellow);
  margin-top: -3px;
  border-radius: 2px;
}
.value-box {
  background-color: var(--color-yellow);
  color: white;
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  margin-top: 4.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.gauge-labels-row {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}
.band-label { font-size: 13px; color: var(--theme-text-100); }
.band-label.middle-band { margin-left: auto; margin-right: auto; }

@container (max-width: 250px) { 
  .bollinger-bands .segment-label {
    font-size: 9.5px;
  }
  .bollinger-bands .value-box {
    margin-top: 5px;
    font-size: 8.5px;
    line-height: normal;
  }
  .bollinger-bands .band-label { 
    font-size: 8px;
  }
}

.price-box {
  flex: 1;
  background-color: var(--color-yellow-20);
  border: 1px solid var(--color-yellow);
  border-radius: 10px;
  padding: 10px 15px;
  text-align: left;
}
.box-label { font-size: 9px; color: var(--theme-text-100); margin: 0 0 5px 0; }
.box-value { font-size: 18px; font-weight: 700; color: var(--color-yellow); margin: 0; }

/* Volatility (ATR) Gauge */
.gauge-wrapper { position: relative; width: 95%; margin: 0 auto; padding-top: 10px; }
.vol-track {
  height: 14px;
  width: 100%;
  border-radius: 50px;
  background: linear-gradient(90deg, var(--color-green-60) 0%, var(--color-yellow-60) 50%, var(--color-red-60) 100%);
  border: 0.5px solid var(--theme-text-10);
}
.vol-pointer {
  position: absolute;
  top: 5px;
  left: var(--vol-position);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}
.p-line-top, .p-line-bottom { width: 3px; height: 8px; background-color: var(--color-yellow); border-radius: 2px; }
.p-circle {
  width: 16px;
  height: 16px;
  background-color: var(--color-yellow);
  border: 2.5px solid var(--theme-text-contrast);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  margin: -3px 0;
}

.gauge-labels {
  display: flex;
  justify-content: space-between;
  width: 96%;
  margin: 10px auto 35px;
  font-size: 13px;
  font-weight: 500;
}

/* Base text elements for Gauges */
.main-number { font-size: 52px; margin: 0; font-weight: 700; }
.description { font-size: 16px; color: var(--theme-text-100); margin-top: 5px; }
.description strong { font-weight: 700; }


@media (max-width: 768px) { 
  .stock-header {
    padding: 0;
  }
  .stock-header .stock-profile {
    padding: 20px;
    border-radius: 16px;
    background-color: var(--theme-color);
    --sp-title-color: var(--theme-text-contrast);
    --sp-meta-color: var(--theme-text-contrast-90);
  }
  .stock-header .stock-profile .stock-meta {
     --defined-color: var(--theme-text-contrast-90);
  }
}

@media (max-width: 576px) {

  .ta-card.ATR .gauge-labels {
    font-size: 8.5px;
  }

  .stock-header .stock-profile {
    display: block;
    align-items: center;
    text-align: center;
  }

  .stock-header .stock-profile .stock-logo {
    margin: auto;
  }

  .stock-header .stock-profile div {
    margin-top: 20px;
  }

  .stock-header .stock-profile .stock-meta {
    margin-top: 5px;
  }

  .analysis-tabs {
    gap: 4px;
    justify-content: space-around;
  }
  .analysis-tabs .analysis-tab {
   font-size: 0.70rem;
   padding: 10px 9px;
  }

  .frist.technical-analysis .header {

    display: block;

  }

  .frist.technical-analysis .header .tech-score-card {
    margin-top: 1rem;
    width: 100%;
  }

  .ta-card.EMA .row-item {
    display: block;
  }

  .ta-card.EMA .row-item .row-info {
    margin: 10px auto;
  }

   .ta-card.EMA .row-item .info {
    margin-top: 8px;
  }

   .ta-card.EMA .row-item .info p {
    font-size: 9pt;
  }

   .ta-card.EMA .row-item .value-wrapper {
    margin-top: 10px;
    padding-top: 10px;
  }

   .ta-card.EMA .row-item .value-wrapper .number {
    font-size: 12px;
   }

}