/* ==========================================================
   MARKET LEVELS
   CLASSIC PIVOT POINT TABLE
========================================================== */

.market-levels-section {
  padding: 2rem 0;
}

.market-levels-section .section-heading {
  margin-bottom: 1rem;
}

.market-levels-section .section-heading h2 {
  margin-bottom: 0.3rem;
}

.market-levels-section .section-heading p {
  margin: 0;
}

/* ==========================================================
   TABLE WRAPPER
========================================================== */

.market-levels-wrapper {
  width: 100%;
}

.market-levels-table-container {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

/* ==========================================================
   TABLE
========================================================== */
.market-levels-table {
  width: 960px;
  min-width: 960px;
  max-width: none;
  margin: 0 auto;

  table-layout: fixed;

  border-collapse: separate;
  border-spacing: 0;

  background: #ffffff;

  border: 1px solid #e2e6eb;
  border-radius: 12px;

  overflow: hidden;

  font-size: 0.88rem;
}

/* ==========================================================
   COLUMN WIDTHS
========================================================== */

/* First column */
.market-levels-table th:first-child {
  width: 160px;
}

.market-levels-table th:not(:first-child),
.market-levels-table td:not(:first-child) {
  width: 160px;
}

/* ==========================================================
   HEADER
========================================================== */

.market-levels-table thead th {
  padding: 0.65rem 0.45rem;

  background: #087df5;
  color: #ffffff;

  border: none;

  font-weight: 700;
  text-align: center;

  line-height: 1.15;

  white-space: nowrap;
}

.market-levels-table thead th:first-child {
  text-align: center;
}

/* ==========================================================
   BODY
========================================================== */

.market-levels-table tbody th,
.market-levels-table tbody td {
  padding: 0.48rem 0.35rem;

  border: none;

  text-align: center;

  white-space: nowrap;

  line-height: 1.2;

  font-weight: 500;
}

/* First column */
.market-levels-table tbody th {
  font-weight: 600;
}

/* ==========================================================
   TARGET ROWS
========================================================== */

.market-level-target th,
.market-level-target td {
  background: #ffffff;
}

/* ==========================================================
   PIVOT POINT
   ENTIRE ROW YELLOW
========================================================== */

.market-level-pivot th,
.market-level-pivot td {
  background: #ffff00 !important;
  color: #0000ff;

  font-weight: 800;
}

/* ==========================================================
   SUPPORT ROWS
========================================================== */

.market-level-support th,
.market-level-support td {
  background: #ffffff;
}

/* Support 2 slightly shaded */
.market-level-support:nth-child(6) th,
.market-level-support:nth-child(6) td {
  background: #eef6fd;
}

/* ==========================================================
   GAP BETWEEN SUPPORT 3 AND PREVIOUS DAY CLOSE
========================================================== */

/*
   Creates a small clean white separator between
   Support 3 and Previous Day Close.
*/

.market-level-close th,
.market-level-close td {
  border-top: 9px solid #ffffff !important;
}

/* ==========================================================
   PREVIOUS DAY CLOSE
   LIGHT PINK
========================================================== */

.market-level-close th,
.market-level-close td {
  background: #fde5e5;
  color: #4b4b4b;

  font-weight: 700;
}

/* ==========================================================
   PREVIOUS DAY HIGH
   RED
========================================================== */

.market-level-high th,
.market-level-high td {
  background: #ff0000 !important;
  color: #ffffff;

  font-weight: 800;
}

/* ==========================================================
   PREVIOUS DAY LOW
   CYAN
========================================================== */

.market-level-low th,
.market-level-low td {
  background: #12dce0 !important;
  color: #006b70;

  font-weight: 800;
}

/* ==========================================================
   HOVER
   DO NOT DESTROY SPECIAL ROW COLORS
========================================================== */

.market-levels-table tbody tr:hover th,
.market-levels-table tbody tr:hover td {
  filter: none;
}

/* ==========================================================
   ERROR MESSAGE
========================================================== */

.market-levels-error {
  margin-top: 0.75rem;

  padding: 0.75rem 1rem;

  border: 1px solid #fecaca;
  border-radius: 8px;

  background: #fef2f2;

  font-size: 0.88rem;
  text-align: center;
}

/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 900px) {
  .market-levels-table {
    min-width: 720px;
  }
}

/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 600px) {
  .market-levels-section {
    padding: 1.5rem 0;
  }

  .market-levels-table {
    width: 960px;
    min-width: 960px;
    max-width: none;
    font-size: 0.8rem;
  }

  .market-levels-table thead th {
    padding: 0.55rem 0.35rem;
  }

  .market-levels-table tbody th,
  .market-levels-table tbody td {
    padding: 0.45rem 0.3rem;
  }
}

/* ==========================================================
   MARKET PULSE
   AUTOMATIC CLASSIC PIVOT ANALYSIS
========================================================== */

.market-pulse-section {
  padding: 2rem 0;
}

/* ==========================================================
   SUMMARY
========================================================== */

.market-pulse-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;

  margin: 0 auto 1.25rem;

  padding: 0.8rem 1rem;

  max-width: 760px;

  border: 1px solid #e2e6eb;
  border-radius: 10px;

  background: #f8fafc;

  text-align: center;
}

.market-pulse-summary-number {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 36px;
  height: 36px;

  border-radius: 50%;

  background: #087df5;
  color: #ffffff;

  font-size: 1rem;
  font-weight: 800;
}

.market-pulse-summary-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
}

/* ==========================================================
   GRID
========================================================== */

.market-pulse-grid {
  display: grid;

  grid-template-columns: repeat(5, minmax(0, 1fr));

  gap: 0.65rem;

  width: 100%;
}

/* ==========================================================
   CARD
========================================================== */

.market-pulse-card {
  min-width: 0;

  padding: 0.8rem;

  border: 1px solid #e2e6eb;
  border-radius: 10px;

  background: #ffffff;

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);

  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.market-pulse-card:hover {
  transform: translateY(-2px);

  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.08);
}

/* ==========================================================
   CARD HEADER
========================================================== */

.market-pulse-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 0.4rem;

  margin-bottom: 0.7rem;

  padding-bottom: 0.55rem;

  border-bottom: 1px solid #e9edf2;
}

.market-pulse-card-header h3 {
  margin: 0;

  font-size: 0.9rem;
  font-weight: 800;

  color: #172033;

  white-space: nowrap;
}

/* ==========================================================
   STATUS
========================================================== */

.market-pulse-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0.2rem 0.4rem;

  border-radius: 5px;

  font-size: 0.62rem;
  font-weight: 800;

  white-space: nowrap;
}

/* Above */
.market-pulse-card.above {
  border-top: 3px solid #16a34a;
}

.market-pulse-card.above .market-pulse-status {
  background: #dcfce7;
  color: #166534;
}

/* Below */
.market-pulse-card.below {
  border-top: 3px solid #dc2626;
}

.market-pulse-card.below .market-pulse-status {
  background: #fee2e2;
  color: #991b1b;
}

/* At Pivot */
.market-pulse-card.at {
  border-top: 3px solid #d97706;
}

.market-pulse-card.at .market-pulse-status {
  background: #fef3c7;
  color: #92400e;
}

/* ==========================================================
   PREVIOUS CLOSE
========================================================== */

.market-pulse-close {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 0.4rem;

  margin-bottom: 0.55rem;
}

.market-pulse-close span {
  font-size: 0.68rem;
  color: #64748b;
}

.market-pulse-close strong {
  font-size: 0.95rem;
  color: #172033;
}

/* ==========================================================
   STAT ROWS
========================================================== */

.market-pulse-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 0.4rem;

  padding: 0.32rem 0;

  border-top: 1px solid #f0f2f5;
}

.market-pulse-stat span {
  font-size: 0.67rem;
  color: #64748b;
}

.market-pulse-stat strong {
  font-size: 0.75rem;
  color: #334155;
}

/* ==========================================================
   RANGE
========================================================== */

.market-pulse-range {
  margin-top: 0.5rem;

  padding-top: 0.45rem;

  border-top: 1px solid #e9edf2;

  font-size: 0.65rem;
  font-weight: 600;

  color: #64748b;

  text-align: center;
}

/* ==========================================================
   AUTOMATIC INSIGHT
========================================================== */

.market-pulse-insight {
  margin: 1rem auto 0;

  max-width: 960px;

  padding: 0.9rem 1rem;

  border-left: 4px solid #087df5;
  border-radius: 8px;

  background: #f8fafc;
}

.market-pulse-insight-label {
  margin-bottom: 0.25rem;

  font-size: 0.7rem;
  font-weight: 800;

  text-transform: uppercase;
  letter-spacing: 0.04em;

  color: #087df5;
}

.market-pulse-insight p {
  margin: 0;

  font-size: 0.82rem;
  line-height: 1.5;

  color: #475569;
}

/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 1000px) {
  .market-pulse-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 650px) {
  .market-pulse-section {
    padding: 1.5rem 0;
  }

  .market-pulse-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 0.55rem;
  }

  .market-pulse-card {
    padding: 0.7rem;
  }

  .market-pulse-card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .market-pulse-card-header h3 {
    font-size: 0.82rem;
  }

  .market-pulse-summary {
    align-items: center;

    padding: 0.7rem;

    font-size: 0.8rem;
  }
}

/* ==========================================================
   SMALL MOBILE
========================================================== */

@media (max-width: 420px) {
  .market-pulse-grid {
    grid-template-columns: 1fr;
  }

  .market-pulse-summary {
    justify-content: flex-start;

    text-align: left;
  }
}

/* ==========================================================
   NIFTY 50 STOCK DASHBOARD
========================================================== */

.nifty50-dashboard-section {
  padding: 2rem 0;
}

/* ==========================================================
   CONTROLS
========================================================== */

.nifty50-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;

  margin-bottom: 0.75rem;
}

.nifty50-search {
  flex: 1;
  max-width: 420px;
}

.nifty50-search input {
  width: 100%;
  box-sizing: border-box;

  padding: 0.65rem 0.8rem;

  border: 1px solid #d9dee5;
  border-radius: 8px;

  background: #ffffff;

  font-size: 0.85rem;
  color: #172033;

  outline: none;
}

.nifty50-search input:focus {
  border-color: #087df5;
  box-shadow: 0 0 0 2px rgba(8, 125, 245, 0.08);
}

/* ==========================================================
   SORT
========================================================== */

.nifty50-sort {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.nifty50-sort label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.nifty50-sort select {
  padding: 0.6rem 0.65rem;

  border: 1px solid #d9dee5;
  border-radius: 8px;

  background: #ffffff;

  font-size: 0.8rem;
  color: #172033;

  cursor: pointer;
}

/* ==========================================================
   RESULT COUNT
========================================================== */

.nifty50-result-count {
  margin-bottom: 0.5rem;

  font-size: 0.72rem;
  font-weight: 600;

  color: #64748b;
}

/* ==========================================================
   TABLE WRAPPER
========================================================== */

.nifty50-table-wrapper {
  width: 100%;

  overflow-x: auto;
  overflow-y: hidden;

  -webkit-overflow-scrolling: touch;

  border: 1px solid #e2e6eb;
  border-radius: 10px;
}

/* ==========================================================
   TABLE
========================================================== */

.nifty50-table {
  width: 100%;

  min-width: 1050px;

  border-collapse: separate;
  border-spacing: 0;

  background: #ffffff;

  font-size: 0.78rem;
}

/* ==========================================================
   HEADER
========================================================== */

.nifty50-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;

  padding: 0.65rem 0.55rem;

  background: #087df5;
  color: #ffffff;

  border-right: 1px solid rgba(255, 255, 255, 0.18);

  font-size: 0.72rem;
  font-weight: 700;

  text-align: center;

  white-space: nowrap;

  cursor: pointer;

  user-select: none;
}

.nifty50-table thead th:hover {
  background: #066dcc;
}

.nifty50-table thead th:last-child {
  border-right: none;
}

/* ==========================================================
   BODY
========================================================== */

.nifty50-table tbody td {
  padding: 0.48rem 0.55rem;

  border-right: 1px solid #edf0f3;
  border-bottom: 1px solid #edf0f3;

  text-align: right;

  white-space: nowrap;

  color: #334155;
}

.nifty50-table tbody tr:last-child td {
  border-bottom: none;
}

.nifty50-table tbody td:last-child {
  border-right: none;
}

/* ==========================================================
   STOCK IDENTIFICATION
========================================================== */

.nifty50-table .stock-symbol {
  text-align: left;

  font-weight: 800;

  color: #172033;
}

.nifty50-table .stock-name {
  text-align: left;

  font-weight: 600;

  color: #334155;
}

/* ==========================================================
   CURRENT PRICE
========================================================== */

.nifty50-table .stock-price {
  font-weight: 700;
  color: #172033;
}

/* ==========================================================
   CHANGE %
========================================================== */
.nifty50-table .stock-change {
  font-weight: 800;
  min-width: 68px;
}

.nifty50-table .stock-change.positive {
  background: #f0fdf4;
  color: #15803d;
}

.nifty50-table .stock-change.negative {
  background: #fef2f2;
  color: #dc2626;
}

.nifty50-table .stock-change.neutral {
  background: #f8fafc;
  color: #64748b;
}

/* ==========================================================
   PIVOT COLUMN
========================================================== */

.nifty50-table .stock-pivot {
  background: #fff3a6;

  color: #111827;

  font-weight: 800;

  border-left: 1px solid #e6d86a;
  border-right: 1px solid #e6d86a;
}

/* ==========================================================
   ROW HOVER
========================================================== */

.nifty50-table tbody tr:hover td {
  background: #f8fafc;
}

/*
   Keep Pivot highlight visible during hover.
*/

.nifty50-table tbody tr:hover .stock-pivot {
  background: #fff7b2;
}

/* ==========================================================
   SUPPORT COLUMNS
========================================================== */

.nifty50-table tbody td:nth-child(5),
.nifty50-table tbody td:nth-child(6),
.nifty50-table tbody td:nth-child(7) {
  color: #2563eb;
}

/* ==========================================================
   TARGET COLUMNS
========================================================== */

.nifty50-table tbody td:nth-child(9),
.nifty50-table tbody td:nth-child(10),
.nifty50-table tbody td:nth-child(11) {
  color: #15803d;
}

/* ==========================================================
   LOADING / NO RESULTS
========================================================== */

.nifty50-loading,
.nifty50-no-results {
  padding: 1.5rem !important;

  text-align: center !important;

  color: #64748b !important;
}

/* ==========================================================
   ERROR
========================================================== */

.nifty50-error {
  margin-top: 0.75rem;

  padding: 0.75rem 1rem;

  border: 1px solid #fecaca;
  border-radius: 8px;

  background: #fef2f2;

  color: #991b1b;

  font-size: 0.8rem;
}

/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 700px) {
  .nifty50-dashboard-section {
    padding: 1.5rem 0;
  }

  .nifty50-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .nifty50-search {
    max-width: none;
  }

  .nifty50-sort {
    justify-content: space-between;
  }

  .nifty50-sort select {
    flex: 1;
  }

  .nifty50-table {
    min-width: 1000px;

    font-size: 0.74rem;
  }

  .nifty50-table thead th {
    padding: 0.55rem 0.45rem;
  }

  .nifty50-table tbody td {
    padding: 0.45rem 0.45rem;
  }
}

/* ==========================================================
   NIFTY 50 — COMPACT COLUMN WIDTHS
========================================================== */

/* Symbol */
.nifty50-table th:nth-child(1),
.nifty50-table td:nth-child(1) {
  width: 95px;
}

/* Stock Name — fit content */
.nifty50-table th:nth-child(2),
.nifty50-table td:nth-child(2) {
  width: 145px;
  min-width: 145px;
  max-width: 145px;

  white-space: nowrap;
}

/* Price */
.nifty50-table th:nth-child(3),
.nifty50-table td:nth-child(3) {
  width: 95px;
}

/* Change */
.nifty50-table th:nth-child(4),
.nifty50-table td:nth-child(4) {
  width: 75px;
}

/* S3, S2, S1 */
.nifty50-table th:nth-child(5),
.nifty50-table td:nth-child(5),
.nifty50-table th:nth-child(6),
.nifty50-table td:nth-child(6),
.nifty50-table th:nth-child(7),
.nifty50-table td:nth-child(7) {
  width: 75px;
}

/* Pivot */
.nifty50-table th:nth-child(8),
.nifty50-table td:nth-child(8) {
  width: 85px;
}

/* T1, T2, T3 */
.nifty50-table th:nth-child(9),
.nifty50-table td:nth-child(9),
.nifty50-table th:nth-child(10),
.nifty50-table td:nth-child(10),
.nifty50-table th:nth-child(11),
.nifty50-table td:nth-child(11) {
  width: 75px;
}

/* ==========================================================
   CURRENT PRICE VS PIVOT
========================================================== */

.nifty50-table .stock-price.above-pivot {
  background: #f0fdf4;
  color: #15803d;
}

.nifty50-table .stock-price.below-pivot {
  background: #fef2f2;
  color: #dc2626;
}

.nifty50-table .stock-price.pivot-neutral {
  background: #fffbeb;
  color: #92400e;
}

.nifty50-table .stock-price strong {
  font-weight: 800;
}

/* ==========================================================
   SUPPORT / TARGET VISUAL GROUPING
========================================================== */

/* Supports */
.nifty50-table tbody td:nth-child(5),
.nifty50-table tbody td:nth-child(6),
.nifty50-table tbody td:nth-child(7) {
  color: #2563eb;
}

/* Targets */
.nifty50-table tbody td:nth-child(9),
.nifty50-table tbody td:nth-child(10),
.nifty50-table tbody td:nth-child(11) {
  color: #15803d;
}

/* First support and first target slightly stronger */
.nifty50-table tbody td:nth-child(7),
.nifty50-table tbody td:nth-child(9) {
  font-weight: 700;
}

/* ==========================================================
   WEEKLY MARKET OUTLOOK
========================================================== */

.weekly-market-outlook {
  padding: 2rem 0;
}

/* ==========================================================
   WEEK / DATE
========================================================== */

#weekly-outlook-week {
  margin: 0;

  font-size: 0.78rem;
  font-weight: 600;

  color: #64748b;
}

/* ==========================================================
   OVERALL MARKET VIEW
========================================================== */

.weekly-overall-view {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 0.75rem;

  max-width: 760px;

  margin: 0 auto 1rem;

  padding: 0.8rem 1rem;

  border: 1px solid #e2e6eb;
  border-radius: 10px;

  background: #f8fafc;

  text-align: center;
}

.weekly-overall-view .weekly-outlook-label {
  margin: 0;
}

.weekly-overall-view strong {
  padding: 0.3rem 0.65rem;

  border-radius: 6px;

  background: #fff3cd;

  color: #92400e;

  font-size: 0.78rem;
}

/* ==========================================================
   NIFTY + BANK NIFTY
========================================================== */

.weekly-outlook-grid {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 0.75rem;

  margin-bottom: 0.75rem;
}

/* ==========================================================
   OUTLOOK CARDS
========================================================== */

.weekly-outlook-card {
  padding: 0.85rem 1rem;

  border: 1px solid #e2e6eb;
  border-radius: 10px;

  background: #ffffff;
}

.weekly-outlook-card p {
  margin: 0.35rem 0 0;

  font-size: 0.82rem;

  line-height: 1.5;

  color: #475569;
}

/* ==========================================================
   LABELS
========================================================== */

.weekly-outlook-label {
  display: block;

  margin-bottom: 0.25rem;

  font-size: 0.68rem;
  font-weight: 800;

  text-transform: uppercase;
  letter-spacing: 0.04em;

  color: #087df5;
}

/* ==========================================================
   OBSERVATION + WATCH
========================================================== */

.weekly-outlook-details {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 0.75rem;
}

.weekly-outlook-detail {
  padding: 0.85rem 1rem;

  border-left: 3px solid #087df5;
  border-radius: 8px;

  background: #f8fafc;
}

.weekly-outlook-detail p {
  margin: 0.3rem 0 0;

  font-size: 0.82rem;

  line-height: 1.55;

  color: #475569;
}

/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 700px) {
  .weekly-outlook-grid,
  .weekly-outlook-details {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 480px) {
  .weekly-market-outlook {
    padding: 1.5rem 0;
  }

  .weekly-overall-view {
    align-items: flex-start;

    flex-direction: column;

    gap: 0.35rem;

    text-align: left;
  }

  .weekly-outlook-card,
  .weekly-outlook-detail {
    padding: 0.75rem 0.85rem;
  }
}

/* ==========================================================
   MARKET PAGE — COMPACT SECTION SPACING
========================================================== */

.market-levels-section,
.market-pulse-section,
.nifty50-dashboard-section,
.weekly-market-outlook,
.sector-performance,
.trading-checklist,
.market-disclaimer {
  padding-top: 36px;
  padding-bottom: 36px;
}

/* ==========================================================
   MARKET PAGE — COMPACT SECTION HEADINGS
========================================================== */

.market-levels-section .section-heading,
.market-pulse-section .section-heading,
.nifty50-dashboard-section .section-heading,
.weekly-market-outlook .section-heading,
.sector-performance .section-heading,
.trading-checklist .section-heading {
  margin-bottom: 28px;
}

/* ==========================================================
   MARKET LINKS
   Premium Compact Horizontal Directory
========================================================== */

.market-links-section {
  position: relative;
  padding: 38px 0 44px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-top: 1px solid #e8edf3;
  border-bottom: 1px solid #e8edf3;
}

/* ==========================================================
   SECTION HEADER
========================================================== */

.market-links-section .section-heading {
  max-width: 760px;
  margin: 0 auto 24px;
  text-align: center;
}

.market-links-section .section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  margin-bottom: 8px;
  padding: 5px 11px;

  color: #2563eb;
  background: #eff6ff;

  border: 1px solid #dbeafe;
  border-radius: 999px;

  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.market-links-section .section-kicker::before {
  content: '◈';

  font-size: 0.7rem;
}

.market-links-section .section-heading h2 {
  margin: 0 0 7px;

  color: #0f172a;

  font-family: 'Poppins', sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.25;
}

.market-links-section .section-heading p {
  max-width: 620px;
  margin: 0 auto;

  color: #64748b;

  font-size: 0.84rem;
  line-height: 1.55;
}

/* ==========================================================
   MAIN DIRECTORY PANEL
========================================================== */

.market-links-list {
  position: relative;

  max-width: 1180px;
  margin: 0 auto;

  overflow: hidden;

  background: rgba(255, 255, 255, 0.92);

  border: 1px solid #e2e8f0;
  border-radius: 16px;

  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

/* ==========================================================
   CATEGORY ROW
========================================================== */

.market-link-row {
  display: grid;

  grid-template-columns: 190px 1fr;

  align-items: center;

  gap: 18px;

  min-height: 68px;

  padding: 11px 18px;

  border-bottom: 1px solid #edf1f5;

  transition: background 0.2s ease;
}

.market-link-row:last-child {
  border-bottom: 0;
}

.market-link-row:hover {
  background: #fbfdff;
}

/* ==========================================================
   CATEGORY TITLE
========================================================== */

.market-link-row h3 {
  position: relative;

  display: flex;
  align-items: center;

  margin: 0;
  padding-left: 12px;

  color: #1e293b;

  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.market-link-row h3::before {
  content: '';

  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;

  width: 3px;

  background: #2563eb;

  border-radius: 4px;
}

/* Different category accent */

.market-link-row:nth-child(2) h3::before {
  background: #7c3aed;
}

.market-link-row:nth-child(3) h3::before {
  background: #d97706;
}

.market-link-row:nth-child(4) h3::before {
  background: #059669;
}

/* ==========================================================
   LINK AREA
========================================================== */

.market-link-items {
  display: flex;

  flex-wrap: wrap;

  align-items: center;

  gap: 7px;
}

/* ==========================================================
   MARKET LINK CHIPS
========================================================== */

.market-link-items a {
  position: relative;

  display: inline-flex;
  align-items: center;
  gap: 5px;

  min-height: 28px;

  padding: 5px 9px;

  color: #475569;
  background: #f8fafc;

  border: 1px solid #e5eaf0;
  border-radius: 6px;

  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.2;

  text-decoration: none;
  white-space: nowrap;

  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease,
    transform 0.18s ease, box-shadow 0.18s ease;
}

/* External arrow */

.market-link-items a::after {
  content: '↗';

  color: #94a3b8;

  font-size: 0.65rem;

  transition: color 0.18s ease, transform 0.18s ease;
}

/* Hover */

.market-link-items a:hover {
  color: #2563eb;
  background: #eff6ff;

  border-color: #bfdbfe;

  transform: translateY(-1px);

  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.08);
}

.market-link-items a:hover::after {
  color: #2563eb;

  transform: translate(1px, -1px);
}

/* ==========================================================
   SUBTLE CATEGORY TINTING
========================================================== */

.market-link-row:nth-child(2) .market-link-items a:hover {
  color: #7c3aed;
  background: #f5f3ff;
  border-color: #ddd6fe;
}

.market-link-row:nth-child(2) .market-link-items a:hover::after {
  color: #7c3aed;
}

.market-link-row:nth-child(3) .market-link-items a:hover {
  color: #b45309;
  background: #fffbeb;
  border-color: #fde68a;
}

.market-link-row:nth-child(3) .market-link-items a:hover::after {
  color: #b45309;
}

.market-link-row:nth-child(4) .market-link-items a:hover {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.market-link-row:nth-child(4) .market-link-items a:hover::after {
  color: #047857;
}

/* ==========================================================
   DESKTOP COMPACTING
========================================================== */

@media (min-width: 1100px) {
  .market-link-items {
    gap: 6px;
  }

  .market-link-items a {
    padding: 4px 8px;
    font-size: 0.75rem;
  }
}

/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 900px) {
  .market-link-row {
    grid-template-columns: 150px 1fr;
    gap: 14px;
    padding: 11px 14px;
  }

  .market-link-items {
    gap: 6px;
  }
}

/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 650px) {
  .market-links-section {
    padding: 30px 0 34px;
  }

  .market-links-section .section-heading {
    margin-bottom: 18px;
  }

  .market-links-section .section-heading h2 {
    font-size: 1.3rem;
  }

  .market-links-section .section-heading p {
    font-size: 0.8rem;
  }

  .market-links-list {
    border-radius: 12px;
  }

  .market-link-row {
    display: block;

    min-height: auto;

    padding: 14px;
  }

  .market-link-row h3 {
    margin-bottom: 9px;
  }

  .market-link-items {
    gap: 6px;
  }

  .market-link-items a {
    min-height: 27px;

    padding: 5px 8px;

    font-size: 0.73rem;
  }
}


/* ==========================================================
   SECTOR PERFORMANCE
========================================================== */

.sector-performance-data {
  width: 100%;
}


/* ----------------------------------------------------------
   HEADER
---------------------------------------------------------- */

.sector-performance-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.sector-performance-header h3 {
  margin: 0.35rem 0 0.35rem;
  font-size: 1.35rem;
}

.sector-performance-header p {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
}

.sector-update {
  flex-shrink: 0;
  color: #64748b;
  font-size: 0.78rem;
}


/* ----------------------------------------------------------
   TOP / WEAK GROUPS
---------------------------------------------------------- */

.sector-leaders-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.sector-group {
  padding: 1.25rem;
  background: #ffffff;
  border: 1px solid #e2e6eb;
  border-radius: 14px;
}

.sector-group-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.sector-group-title strong {
  display: block;
  font-size: 0.98rem;
}

.sector-group-title small {
  display: block;
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.76rem;
}

.sector-group-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f1f5f9;
  font-size: 0.9rem;
}


/* ----------------------------------------------------------
   MINI SECTOR CARDS
---------------------------------------------------------- */

.sector-mini-list {
  display: grid;
  gap: 0.65rem;
}

.sector-mini-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid #edf0f3;
  border-radius: 10px;
  background: #fafbfc;
}

.sector-mini-rank {
  font-size: 0.76rem;
  font-weight: 700;
  color: #64748b;
}

.sector-mini-main {
  min-width: 0;
}

.sector-mini-main strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
}

.sector-mini-main span {
  display: block;
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.72rem;
}

.sector-mini-value {
  font-weight: 700;
  font-size: 0.88rem;
}


/* ----------------------------------------------------------
   ALL SECTORS TABLE
---------------------------------------------------------- */

.sector-table-wrapper {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e2e6eb;
  border-radius: 14px;
}

.sector-table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e6eb;
}

.sector-table-heading h3 {
  margin: 0;
  font-size: 1rem;
}

.sector-table-heading span {
  color: #64748b;
  font-size: 0.76rem;
}

.sector-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.sector-performance-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.sector-performance-table th {
  padding: 0.8rem 0.75rem;
  background: #f8fafc;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.sector-performance-table td {
  padding: 0.78rem 0.75rem;
  border-top: 1px solid #edf0f3;
  white-space: nowrap;
}

.sector-performance-table tbody tr {
  transition: background 0.15s ease;
}

.sector-performance-table tbody tr:hover {
  background: #f8fafc;
}

.sector-performance-table strong {
  font-weight: 700;
}

.sector-rank-cell {
  width: 55px;
  font-weight: 700;
  color: #64748b;
}


/* ----------------------------------------------------------
   VALUE COLORS
---------------------------------------------------------- */

.sector-positive {
  color: #15803d;
  font-weight: 700;
}

.sector-negative {
  color: #dc2626;
  font-weight: 700;
}

.sector-neutral {
  color: #64748b;
}


/* ----------------------------------------------------------
   STATUS
---------------------------------------------------------- */

.sector-status {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.status-positive {
  background: #ecfdf3;
  color: #15803d;
}

.status-negative {
  background: #fef2f2;
  color: #dc2626;
}

.status-neutral {
  background: #f1f5f9;
  color: #475569;
}


/* ----------------------------------------------------------
   ROW HIGHLIGHT
---------------------------------------------------------- */

.sector-row-leading {
  background: #f7fcf8;
}

.sector-row-weak {
  background: #fffafa;
}


/* ----------------------------------------------------------
   LOADING
---------------------------------------------------------- */

.sector-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  min-height: 120px;
  padding: 2rem;
  border: 1px solid #e2e6eb;
  border-radius: 14px;
  background: #ffffff;
}

.sector-loading-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid #e2e6eb;
  border-top-color: #64748b;
  border-radius: 50%;
  animation: sector-spin 0.8s linear infinite;
}

.sector-loading strong {
  display: block;
  font-size: 0.9rem;
}

.sector-loading small {
  display: block;
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.75rem;
}

@keyframes sector-spin {
  to {
    transform: rotate(360deg);
  }
}


/* ----------------------------------------------------------
   ERROR
---------------------------------------------------------- */

.sector-error {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 1.25rem;
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: #fff7f7;
}

.sector-error > i {
  margin-top: 0.1rem;
  color: #dc2626;
}

.sector-error strong {
  display: block;
  font-size: 0.9rem;
}

.sector-error p {
  margin: 0.25rem 0 0;
  color: #64748b;
  font-size: 0.8rem;
}


/* ----------------------------------------------------------
   MOBILE
---------------------------------------------------------- */

@media (max-width: 700px) {

  .sector-performance-header {
    display: block;
  }

  .sector-update {
    margin-top: 0.75rem;
  }

  .sector-leaders-grid {
    grid-template-columns: 1fr;
  }

  .sector-group {
    padding: 1rem;
  }

  .sector-table-heading {
    padding: 0.9rem 1rem;
  }

  .sector-performance-table {
    min-width: 700px;
  }

}