/* IndiaOne — modern layer on Bootstrap 5 (+ legacy BS3/4 pages) */
:root {
  --io-primary: #0b5ed7;
  --io-primary-dark: #084298;
  --io-accent: #155d8f;
  --io-card-header: linear-gradient(135deg, #1a5f8a 0%, #0d3d5c 100%);
  --io-body-bg: #eef2f6;
  --io-body-bg-accent: radial-gradient(ellipse 120% 80% at 50% -20%, rgba(22, 105, 168, 0.12), transparent 55%);
  --io-text: #1a1f26;
  --io-text-muted: #5c6570;
  --io-radius: 0.5rem;
  --io-radius-lg: 0.75rem;
  --io-shadow: 0 0.125rem 0.5rem rgba(13, 27, 42, 0.08);
  --io-shadow-lg: 0 0.5rem 1.25rem rgba(13, 27, 42, 0.1);
  --io-border: rgba(15, 39, 68, 0.08);
}

html {
  scroll-behavior: smooth;
}

body.io-body {
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--io-text);
  background-color: var(--io-body-bg);
  background-image: var(--io-body-bg-accent);
  min-height: 100vh;
  font-size: 0.9375rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Master page main column */
main.io-content {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
}

/* Typography */
.io-body h1,
.io-body .h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f2744;
}

.io-body h2,
.io-body .h2,
.io-body h3,
.io-body .h3 {
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #152a3d;
}

.io-body h4,
.io-body .h4,
.io-body h5,
.io-body .h5,
.io-body h6,
.io-body .h6 {
  font-weight: 600;
  color: #1e3a52;
}

.io-body .text-muted {
  color: var(--io-text-muted) !important;
}

.io-body a:not(.btn):not(.nav-link):not(.dropdown-item):not(.page-link) {
  color: var(--io-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

.io-body a:not(.btn):not(.nav-link):not(.dropdown-item):not(.page-link):hover {
  color: var(--io-primary-dark);
}

.io-body .lead {
  color: var(--io-text-muted);
  font-weight: 400;
}

/* Top navigation */
.io-navbar {
  background: linear-gradient(90deg, #0c2238 0%, #1a4a7a 48%, #0c2238 100%) !important;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.io-navbar.sticky-top {
  z-index: 1030;
}

.io-navbar .navbar-brand {
  letter-spacing: 0.03em;
  font-weight: 700;
  font-size: 1.1rem;
}

.io-navbar .nav-link {
  color: rgba(255, 255, 255, 0.92) !important;
  font-weight: 500;
  padding: 0.45rem 0.55rem !important;
  border-radius: 0.35rem;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

@media (min-width: 992px) {
  .io-navbar .navbar-nav {
    flex-wrap: nowrap;
    align-items: center;
  }
}

.io-navbar .nav-link:hover,
.io-navbar .nav-link:focus {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.12);
}

.io-navbar .dropdown-menu {
  border: 1px solid var(--io-border);
  box-shadow: var(--io-shadow-lg);
  border-radius: var(--io-radius);
  padding: 0.35rem 0;
  margin-top: 0.35rem;
}

.io-navbar .dropdown-item {
  border-radius: 0.25rem;
  margin: 0 0.35rem;
  padding: 0.45rem 0.75rem;
  width: auto;
}

.io-navbar .dropdown-item:hover,
.io-navbar .dropdown-item:focus {
  background-color: rgba(13, 110, 253, 0.08);
  color: var(--io-primary-dark);
}

/* Cards */
.io-card {
  border-radius: var(--io-radius) !important;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  border: 1px solid var(--io-border) !important;
}

/* Left sidebar only: visible overflow so position:sticky on the card still works */
.io-sidebar-card {
  overflow: visible !important;
}

/* Sector peers card: keep default .io-card overflow hidden — overflow:visible was
   letting the peers grid expand document width past the viewport */

.io-card:hover {
  box-shadow: var(--io-shadow-lg) !important;
}

.io-card .card-body {
  padding: 1.1rem 1.25rem;
}

.io-card-header {
  background: var(--io-card-header) !important;
  color: #fff !important;
  border: none !important;
  font-weight: 600;
  padding: 0.65rem 1rem;
}

.io-card-header .io-card-title {
  color: #fff;
  font-weight: 600;
}

.io-card-header h4,
.io-card-header h5,
.io-card-header h6 {
  margin: 0;
  color: #fff !important;
}

.io-card-header a.headerText,
.io-card-header a {
  color: #fff !important;
  text-decoration: none;
}

.io-card-header a:hover {
  text-decoration: underline;
}

.io-card .table,
.io-card table {
  font-size: 0.875rem;
}

/* Buttons — align with brand */
.io-body .btn-primary {
  background: linear-gradient(180deg, var(--io-primary) 0%, var(--io-primary-dark) 100%);
  border-color: var(--io-primary-dark);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.io-body .btn-primary:hover {
  background: var(--io-primary-dark);
  border-color: #063a7a;
}

.io-body .btn-outline-primary {
  color: var(--io-accent);
  border-color: rgba(21, 93, 143, 0.45);
  font-weight: 500;
}

.io-body .btn-outline-primary:hover {
  background: var(--io-accent);
  border-color: var(--io-accent);
}

/* Forms */
.io-body .form-control,
.io-body .form-select {
  border-color: rgba(15, 39, 68, 0.12);
  border-radius: var(--io-radius);
}

.io-body .form-control:focus,
.io-body .form-select:focus {
  border-color: rgba(13, 110, 253, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.12);
}

/* Tables (Bootstrap + bare tables in content) */
.io-body .table {
  --bs-table-hover-bg: rgba(13, 110, 253, 0.04);
}

.io-body .table > :not(caption) > * > * {
  padding: 0.65rem 0.75rem;
}

.io-company-main .table-bordered {
  border-color: var(--io-border);
}

/* Pagination */
.io-body .pagination .page-link {
  border-radius: 0.3rem;
  margin: 0 0.1rem;
  border-color: rgba(15, 39, 68, 0.1);
  color: var(--io-accent);
  font-weight: 500;
}

.io-body .pagination .page-item.active .page-link {
  background: var(--io-accent);
  border-color: var(--io-accent);
}

/* Alerts & badges */
.io-body .alert {
  border-radius: var(--io-radius);
  border: 1px solid var(--io-border);
}

/* Hero / jumbotron (legacy) */
.jumbotron {
  border-radius: var(--io-radius-lg);
  box-shadow: var(--io-shadow);
}

/* Footer */
.io-footer {
  background: linear-gradient(180deg, #e4e9f0 0%, #d5dde8 100%);
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  margin-top: 2rem;
  padding-top: 2rem;
  padding-bottom: 1.5rem;
}

.io-footer .footericon {
  font-size: 1.75rem;
  color: var(--io-accent);
  text-decoration: none;
  transition: color 0.15s ease, transform 0.15s ease;
}

.io-footer .footericon:hover {
  color: var(--io-primary-dark);
  transform: scale(1.05);
}

/* Utilities */
.pageBackground {
  background-color: var(--io-body-bg) !important;
}

.img-mainstyle {
  width: 100%;
  height: 100px;
  object-fit: cover;
}

/* Home.aspx — neutralize loud GridView row colors inside cards */
.io-home .card .card-body table tbody tr td,
.io-home .card .card-body table tbody tr th,
.io-home .card .card-body table thead tr th {
  background-color: #fff !important;
  border-color: var(--io-border) !important;
  color: var(--io-text) !important;
  vertical-align: middle;
}

.io-home .card .card-body table tbody tr:nth-child(even) td {
  background-color: #f6f8fb !important;
}

.io-home .card .card-body table .btn.btn-light {
  background: #f0f3f7 !important;
  border: 1px solid var(--io-border) !important;
  color: var(--io-text) !important;
}

.io-home .card .card-body table .btn.btn-primary {
  font-size: 0.8rem !important;
  padding: 0.35rem 0.5rem;
  white-space: normal;
  text-align: left;
}

/* ----- Page sidebar scrollspy ----- */
.io-scrollspy-nav .io-spy-link {
  border-radius: 0.35rem;
  padding: 0.4rem 0.6rem;
  color: #155d8f !important;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.io-scrollspy-nav .io-spy-link:hover {
  background-color: rgba(13, 110, 253, 0.08);
}

.io-scrollspy-nav .io-spy-link.active {
  background-color: rgba(13, 110, 253, 0.1);
  border-left-color: var(--io-primary);
  color: var(--io-primary-dark) !important;
  font-weight: 600;
}

.io-company-main .io-kpi-tile {
  background: #fff !important;
  border: 1px solid var(--io-border) !important;
  border-radius: var(--io-radius);
  box-shadow: var(--io-shadow);
  padding: 0.75rem 1rem !important;
}

.io-company-main .io-kpi-tile .headertextValueStyle {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6c757d;
  margin-bottom: 0.25rem;
}

.io-company-main .io-kpi-tile .textValueStyle {
  font-size: 1.05rem;
  font-weight: 600;
}

.io-sector-peers .table {
  margin-bottom: 0;
}

.io-company-main {
  min-width: 0;
  overflow-x: hidden;
}

.io-company-main > .col-12 {
  max-width: 100%;
}

.io-home section > .card {
  margin-bottom: 0;
}

.io-home-tiles .io-card {
  height: 100%;
}

.io-home-tiles .img-mainstyle {
  width: 100%;
  display: block;
}

html.io-company-html {
  scroll-behavior: auto;
  scroll-padding-top: 6rem;
  max-width: 100%;
}

/* Do not set overflow-x on body here — it breaks position:sticky for side columns
   (sticky needs no non-visible overflow between the sticky node and the scrollport). */
html.io-company-html body.io-body {
  max-width: 100%;
}

/* Page shell: width only — overflow-x on this or .io-company-layout breaks sticky sidebars */
html.io-company-html .io-company-page-wrap {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

html.io-company-html .io-company-footer .container-fluid,
html.io-company-html .io-company-footer .row {
  max-width: 100%;
}

/* CompanyHome: no horizontal overflow on this block — would break sticky in asides */
.io-company-layout {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.io-company-layout > .row {
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.io-company-layout > .row > [class*="col-"] {
  min-width: 0;
}

/* Right column: flex-shrink; card clips wide tables (see .io-card / peers card) */
.io-company-layout > .row > aside.io-sector-peers {
  max-width: 100%;
  box-sizing: border-box;
}

.io-company-layout > .row > aside.io-sector-peers .io-sector-peers-card {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* Pager markup uses float:left on links — long pagers overflow unless contained */
.io-company-main .pagination-ys {
  display: block;
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.io-company-main .pagination-ys::after {
  content: "";
  display: table;
  clear: both;
}

/* Highcharts root often gets an explicit pixel width — keep within main column */
.io-company-main #container {
  width: 100% !important;
  max-width: 100%;
  box-sizing: border-box;
}

.io-company-main .highcharts-container {
  max-width: 100% !important;
}

.io-company-main .table-responsive {
  max-width: 100%;
}

.io-company-layout .io-sticky-col {
  position: -webkit-sticky;
  position: sticky;
  top: 5.75rem;
  z-index: 1010;
}

.io-company-layout .io-sector-peers {
  min-width: 0;
  max-width: 100%;
}

/* Sticky peers column: cap to viewport so the pager is not clipped at the screen bottom */
.io-company-layout aside.io-sector-peers.io-sticky-col {
  align-self: flex-start;
  max-height: calc(100vh - 6.5rem);
}

.io-sector-peers-card.io-card {
  max-height: calc(100vh - 6.5rem);
  display: flex;
  flex-direction: column;
}

.io-sector-peers-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.io-sector-peers-header {
  flex-shrink: 0;
}

/* Peer rows sized to fit the panel without a vertical scrollbar */
.io-sector-peers-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex: 0 0 auto;
  overflow-x: hidden;
  overflow-y: hidden;
}

.io-sector-peers-scroll .io-sector-peers-grid td.pagination-ys {
  position: sticky;
  bottom: 0;
  width: 100% !important;
  max-width: 100%;
  background: #fff;
  z-index: 5;
  border-top: 1px solid rgba(15, 39, 68, 0.08);
  box-shadow: 0 -6px 12px rgba(15, 39, 68, 0.08);
  padding: 0.35rem 0 0;
}

.io-sector-peers-scroll table,
.io-sector-peers-grid {
  table-layout: fixed;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

.io-sector-peers-scroll table th,
.io-sector-peers-scroll table td,
.io-sector-peers-grid th,
.io-sector-peers-grid td {
  vertical-align: middle;
}

/* Company/symbol: avoid mid-token breaks; wider column share for tickers */
.io-sector-peers-grid th:nth-child(1),
.io-sector-peers-grid td:nth-child(1):not(.pagination-ys) {
  width: 46%;
  overflow-wrap: break-word;
  word-break: normal;
}

.io-sector-peers-grid th:nth-child(2),
.io-sector-peers-grid td:nth-child(2):not(.pagination-ys),
.io-sector-peers-grid th:nth-child(3),
.io-sector-peers-grid td:nth-child(3):not(.pagination-ys) {
  width: 27%;
  overflow-wrap: break-word;
  word-break: normal;
  white-space: nowrap;
}

.io-sector-peers-grid .btn {
  max-width: 100%;
}

.io-sector-peers-grid td:nth-child(1) .btn {
  white-space: normal;
}

.io-sector-peers-grid td:nth-child(2) .btn,
.io-sector-peers-grid td:nth-child(3) .btn {
  white-space: nowrap;
}

.io-sector-peers .pagination-ys {
  display: block;
  width: 100%;
  overflow: visible;
  min-height: 2.25rem;
  margin: 0;
  padding: 0 0 0.35rem;
}

.io-sector-peers .pagination-ys table {
  width: 100%;
  margin: 0;
  table-layout: fixed;
}

.io-sector-peers .pagination-ys table > tbody > tr {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
}

.io-sector-peers .pagination-ys table > tbody > tr > td {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  float: none;
  padding: 0;
}

.io-sector-peers .pagination-ys table > tbody > tr > td > a,
.io-sector-peers .pagination-ys table > tbody > tr > td > span {
  flex: 1 1 auto;
  width: 100%;
  float: none;
  display: block;
  margin-left: 0;
  padding: 0.45rem 0.2rem;
  text-align: center;
  border-radius: 0;
  box-sizing: border-box;
}

.io-sector-peers .pagination-ys table > tbody > tr > td:first-child > a,
.io-sector-peers .pagination-ys table > tbody > tr > td:first-child > span {
  margin-left: 0;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

.io-sector-peers .pagination-ys table > tbody > tr > td:last-child > a,
.io-sector-peers .pagination-ys table > tbody > tr > td:last-child > span {
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

/* CompanyDashboard embed mode */
body.io-dashboard-mode {
  background: #0d1117 !important;
  color: #e6edf3;
}

body.io-dashboard-mode .io-company-layout {
  padding-top: 0.35rem !important;
}

body.io-dashboard-mode .io-company-main {
  color: #e6edf3;
}

body.io-dashboard-mode .txtboxStyle,
body.io-dashboard-mode .textValueStyle,
body.io-dashboard-mode .headertextValueStyle,
body.io-dashboard-mode .small,
body.io-dashboard-mode .text-muted {
  color: #c6d1dc !important;
}

body.io-dashboard-mode .io-page-sidebar .card,
body.io-dashboard-mode .io-company-main .io-card,
body.io-dashboard-mode .io-sector-peers .card,
body.io-dashboard-mode .io-kpi-tile {
  background: #161b22 !important;
  border-color: #30363d !important;
  color: #e6edf3 !important;
}

/* Fundamentals snapshot: equal 2-row spread */
body.io-dashboard-mode #section2 .row.g-2 {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 0.55rem;
}

body.io-dashboard-mode #section2 .row.g-2 > [class*="col-"] {
  width: auto !important;
  max-width: none !important;
  flex: initial !important;
  margin: 0 !important;
}

body.io-dashboard-mode #section2 .io-kpi-tile {
  min-height: 94px;
}

body.io-dashboard-mode .io-page-sidebar .card,
body.io-dashboard-mode .io-sector-peers .card {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35) !important;
}

body.io-dashboard-mode .io-scrollspy-nav .io-spy-link {
  color: #9cc7ff !important;
}

body.io-dashboard-mode .io-scrollspy-nav .io-spy-link.active {
  background: rgba(88, 166, 255, 0.18) !important;
  border-left-color: #58a6ff !important;
  color: #d8ebff !important;
}

body.io-dashboard-mode .textboxfontstyle,
body.io-dashboard-mode .bg-primary.text-white {
  background: linear-gradient(90deg, #1f6feb, #1a4e9b) !important;
  color: #ffffff !important;
  border: 1px solid #2f5f9a !important;
  border-radius: 8px !important;
}

body.io-dashboard-mode .io-kpi-tile {
  background: #151d27 !important;
  border: 1px solid #2f3d4f !important;
}

body.io-dashboard-mode .io-kpi-tile .textValueStyle {
  color: #f0f6fc !important;
  font-weight: 700;
}

body.io-dashboard-mode .io-kpi-tile .headertextValueStyle {
  color: #8ea6be !important;
}

body.io-dashboard-mode .input-group .form-control {
  background: #0d1117 !important;
  border-color: #30363d !important;
  color: #e6edf3 !important;
}

body.io-dashboard-mode .input-group .btn.btn-primary {
  background: #1f6feb !important;
  border-color: #1f6feb !important;
}

body.io-dashboard-mode #section3 .highcharts-background {
  fill: #161b22 !important;
}

body.io-dashboard-mode #section4.table-responsive,
body.io-dashboard-mode #section5.table-responsive,
body.io-dashboard-mode #section6.table-responsive {
  background: #0d1117;
  border-radius: 10px;
  padding: 0.25rem 0.25rem 0.75rem;
}

body.io-dashboard-mode #section4 table,
body.io-dashboard-mode #section5 table,
body.io-dashboard-mode #section6 table {
  background: #161b22 !important;
  color: #dce6ef !important;
  border-color: #30363d !important;
}

body.io-dashboard-mode #section4 table th,
body.io-dashboard-mode #section5 table th,
body.io-dashboard-mode #section6 table th {
  background: #243242 !important;
  color: #ffffff !important;
}

body.io-dashboard-mode #section4 table td,
body.io-dashboard-mode #section5 table td,
body.io-dashboard-mode #section6 table td {
  border-color: #2e3a48 !important;
}

body.io-dashboard-mode .io-sector-peers-grid .btn.btn-primary {
  background: linear-gradient(180deg, #1f6feb 0%, #1256c0 100%) !important;
  border-color: #1e5db8 !important;
}

@media (max-width: 767.98px) {
  .io-company-layout .io-page-sidebar .io-sticky-col {
    position: static;
  }

  /* Full-width stacked peers column: avoid sticky oddities on narrow viewports */
  .io-company-layout aside.io-sector-peers.io-sticky-col {
    position: static;
    max-height: none;
  }

  .io-sector-peers-card.io-card {
    max-height: none;
  }
}

/* ----- Legacy Bootstrap 3/4 pages (Forum, index.html, Blog, etc.) ----- */
body.io-legacy-bs3 {
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--io-text);
  background-color: var(--io-body-bg) !important;
  background-image: var(--io-body-bg-accent);
  font-size: 0.9375rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.io-legacy-bs3 .navbar.navbar-inverse {
  background: linear-gradient(90deg, #0c2238 0%, #1a4a7a 48%, #0c2238 100%) !important;
  border: none !important;
  border-radius: 0;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
  margin-bottom: 0;
}

.io-legacy-bs3 .navbar-inverse .navbar-brand {
  color: #fff !important;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.io-legacy-bs3 .navbar-inverse .navbar-nav > li > a {
  color: rgba(255, 255, 255, 0.92) !important;
  font-weight: 500;
  border-radius: 0.3rem;
  margin: 0.15rem 0.1rem;
}

.io-legacy-bs3 .navbar-inverse .navbar-nav > li > a:hover,
.io-legacy-bs3 .navbar-inverse .navbar-nav > li > a:focus {
  background-color: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
}

.io-legacy-bs3 .navbar-inverse .navbar-toggle {
  border-color: rgba(255, 255, 255, 0.35);
}

.io-legacy-bs3 .navbar-inverse .navbar-toggle .icon-bar {
  background-color: #fff;
}

.io-legacy-bs3 .panel {
  border: none;
  border-radius: var(--io-radius);
  box-shadow: var(--io-shadow);
  background: #fff;
  margin-bottom: 1rem;
}

.io-legacy-bs3 .panel-primary {
  border: 1px solid var(--io-border);
}

.io-legacy-bs3 .panel-primary > .panel-heading {
  background: var(--io-card-header) !important;
  color: #fff !important;
  border: none !important;
  font-weight: 600;
  border-radius: var(--io-radius) var(--io-radius) 0 0;
}

.io-legacy-bs3 .panel-primary > .panel-heading h1,
.io-legacy-bs3 .panel-primary > .panel-heading h2,
.io-legacy-bs3 .panel-primary > .panel-heading h3,
.io-legacy-bs3 .panel-primary > .panel-heading h4,
.io-legacy-bs3 .panel-primary > .panel-heading h5,
.io-legacy-bs3 .panel-primary > .panel-heading h6 {
  color: #fff !important;
  margin-top: 0;
}

.io-legacy-bs3 .panel-body {
  padding: 1rem 1.15rem;
}

.io-legacy-bs3 .well {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%);
  border: 1px solid var(--io-border);
  border-radius: var(--io-radius);
  color: var(--io-text);
  box-shadow: none;
}

.io-legacy-bs3 .jumbotron {
  border: 1px solid var(--io-border);
  background-color: rgba(255, 255, 255, 0.92) !important;
}

.io-legacy-bs3 .jumbotron h1,
.io-legacy-bs3 .jumbotron h2 {
  color: #0f2744;
}

.io-legacy-bs3 .btn-success {
  background: linear-gradient(180deg, #198754 0%, #146c43 100%);
  border-color: #146c43;
  font-weight: 500;
}

.io-legacy-bs3 .btn-primary {
  background: linear-gradient(180deg, var(--io-primary) 0%, var(--io-primary-dark) 100%);
  border-color: var(--io-primary-dark);
  font-weight: 500;
}

.io-legacy-bs3 table.table tbody tr td,
.io-legacy-bs3 .panel-body table td {
  border-color: var(--io-border) !important;
}

.io-legacy-bs3 .divforum .panel-body table tbody tr td,
.io-legacy-bs3 .divforum .panel-body table tbody tr th {
  background-color: #fff !important;
  color: var(--io-text) !important;
}

.io-legacy-bs3 .divforum .panel-body table tbody tr:nth-child(even) td {
  background-color: #f6f8fb !important;
}

/* Legacy footer strip (e.g. index.html) */
.io-legacy-bs3 .io-legacy-footer {
  background: linear-gradient(180deg, #e8ecf2 0%, #dde3ec 100%) !important;
  border-top: 1px solid var(--io-border);
  padding-top: 1.5rem !important;
  padding-bottom: 1rem !important;
}

.io-legacy-bs3 .footerheader {
  color: #0f2744;
  font-weight: 600;
}

.io-legacy-bs3 .footertext {
  color: var(--io-text-muted);
}

.io-legacy-bs3 .footertext:hover {
  color: var(--io-accent);
}

/* Blog / tools — accordion & search chrome */
.io-legacy-bs3 .headerCssClass {
  background: var(--io-card-header) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--io-radius);
  padding: 0.6rem 0.85rem !important;
}

.io-legacy-bs3 .headerSelectedCss {
  background: #0c2238 !important;
  color: #fff !important;
  border: none !important;
}

.io-legacy-bs3 .contentCssClass {
  background-color: #fff !important;
  color: var(--io-text) !important;
  border: 1px solid var(--io-border) !important;
  border-radius: 0 0 var(--io-radius) var(--io-radius);
  padding: 0.85rem 1rem !important;
}

.io-legacy-bs3 .searchbox_1 {
  background: #fff;
  border: 1px solid var(--io-border);
  box-shadow: var(--io-shadow);
}

/* ----- Equity home + analytics screens ----- */
.io-page-hero {
  background: linear-gradient(135deg, #0c2238 0%, #1a4a7a 55%, #155d8f 100%);
  color: #fff;
  border-radius: var(--io-radius-lg);
  padding: 1rem 1.25rem;
  box-shadow: var(--io-shadow-lg);
  margin-bottom: 0.85rem;
}

.io-page-hero h1 {
  color: #fff !important;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.io-page-hero .io-hero-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.78;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.io-page-hero .io-hero-sub {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.85rem;
  margin: 0.2rem 0 0;
}

.io-page-hero .btn-light {
  font-weight: 600;
}

.io-live-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #3ddc97;
  box-shadow: 0 0 0 0.2rem rgba(61, 220, 151, 0.25);
  display: inline-block;
}

.io-screen-nav {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.io-screen-nav .io-screen-group {
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--io-text-muted);
  font-weight: 700;
  padding: 0.55rem 0.35rem 0.15rem;
}

.io-screen-nav .io-screen-group:first-child {
  padding-top: 0;
}

a.io-screen-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.65rem;
  border-radius: 0.4rem;
  color: #1e3a52 !important;
  text-decoration: none !important;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid transparent;
  line-height: 1.3;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

a.io-screen-link i {
  width: 1rem;
  color: var(--io-accent);
  opacity: 0.85;
  font-size: 0.78rem;
}

a.io-screen-link:hover {
  background: rgba(13, 110, 253, 0.08);
  color: var(--io-primary-dark) !important;
}

a.io-screen-link.active {
  background: rgba(13, 110, 253, 0.12);
  border-color: rgba(13, 110, 253, 0.28);
  color: var(--io-primary-dark) !important;
}

a.io-screen-link.active i {
  color: var(--io-primary);
  opacity: 1;
}

.io-market-card .card-body {
  padding: 0;
}

.io-market-card .io-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.io-market-card .io-card-header .io-card-title {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
}

.io-overview-chg.btn-success,
.io-overview-chg.btn.btn-success {
  background: #e8f6ee;
  color: #146c43;
}

.io-overview-chg.btn-danger,
.io-overview-chg.btn.btn-danger {
  background: #fdecee;
  color: #b02a37;
}

.io-market-table table {
  width: 100% !important;
  max-width: 100%;
  margin: 0;
  background: #fff !important;
  border-collapse: collapse;
  table-layout: fixed !important;
}

.io-market-table table td,
.io-market-table table th {
  background-color: #fff !important;
  border-color: var(--io-border) !important;
  color: var(--io-text) !important;
  padding: 0.4rem 0.7rem !important;
  vertical-align: middle;
  font-size: 0.78rem;
  font-weight: 500;
}

.io-market-table table th {
  background: #f4f7fb !important;
  color: #3d4d5c !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.io-market-table table tbody tr:nth-child(even) td {
  background-color: #f7f9fc !important;
}

.io-market-table table tbody tr:hover td {
  background-color: #eef4fb !important;
}

/* Extra GridView group-title row (colspan header) — keep pagers */
.io-market-table table tr:has(> td[colspan]):not(.pagination-ys),
.io-market-table table tr:has(> th[colspan]):not(.pagination-ys) {
  display: none !important;
}

.io-market-table table tr:not(.pagination-ys) > th:first-child,
.io-market-table table tr:not(.pagination-ys) > td:first-child {
  text-align: left !important;
}

.io-market-table table tr:not(.pagination-ys) > th:not(:first-child),
.io-market-table table tr:not(.pagination-ys) > td:not(:first-child) {
  text-align: right !important;
}

.io-body a.io-ticker,
.io-market-table a.io-ticker,
.io-market-table a {
  color: var(--io-primary-dark) !important;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  text-decoration: none !important;
  white-space: nowrap;
}

.io-body a.io-ticker:hover,
.io-market-table a:hover {
  color: var(--io-primary) !important;
  text-decoration: underline !important;
}

.io-metric {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #1a1f26;
  white-space: nowrap;
}

.io-market-table .btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  width: auto !important;
  min-width: 0;
  padding: 0.12rem 0.5rem !important;
  font-size: 0.75rem !important;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  border-radius: 999px;
  line-height: 1.35;
  box-shadow: none !important;
  white-space: nowrap;
  text-align: right;
}

.io-market-table .btn.btn-primary {
  background: transparent !important;
  border: none !important;
  color: var(--io-primary-dark) !important;
  padding-left: 0 !important;
  font-weight: 700;
}

.io-market-table .btn.btn-success,
.io-market-table .btn-success {
  background: #e8f6ee !important;
  border-color: #c6ead4 !important;
  color: #146c43 !important;
}

.io-market-table .btn.btn-danger,
.io-market-table .btn-danger {
  background: #fdecee !important;
  border-color: #f5c2c7 !important;
  color: #b02a37 !important;
}

.io-market-table .btn.btn-warning,
.io-market-table .btn-warning {
  background: #f4f7fb !important;
  border-color: var(--io-border) !important;
  color: #1a1f26 !important;
}

.io-market-table .pagination-ys {
  margin: 0;
  padding: 0.45rem 0.55rem 0.55rem;
  background: #fff;
  border-top: 1px solid var(--io-border);
}

.io-market-table .pagination-ys table > tbody > tr > td > a,
.io-market-table .pagination-ys table > tbody > tr > td > span {
  padding: 0.28rem 0.55rem;
  color: var(--io-accent);
  border-color: var(--io-border);
  font-size: 0.78rem;
  font-weight: 600;
}

.io-market-table .pagination-ys table > tbody > tr > td > span {
  color: #fff;
  background: var(--io-accent);
  border-color: var(--io-accent);
}

.io-market-table .pagination-ys table > tbody > tr > td > a:hover {
  color: var(--io-primary-dark);
  background: #eef4fb;
}

.io-calendar-scroll {
  height: 220px !important;
  max-height: 220px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.io-calendar-scroll table thead th,
.io-calendar-scroll table tr:first-child th {
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 1px 0 var(--io-border);
}

.io-equity-home .io-equity-search .input-group > input[type="text"],
.io-equity-home .io-equity-search .input-group .form-control,
.io-page-hero .io-equity-search .input-group > input[type="text"],
.io-page-hero .io-equity-search .input-group .form-control {
  flex: 1 1 auto !important;
  width: 1% !important;
  min-width: 0 !important;
  margin: 0 !important;
  border: none;
  background: rgba(255, 255, 255, 0.96);
}

.io-page-hero .io-equity-search .input-group {
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.18);
}

.io-page-hero .io-quote-card {
  margin-top: 0.9rem;
  background: #fff;
  color: #0f2744;
  border-radius: 0.6rem;
  padding: 0.85rem 1rem 0.95rem;
  box-shadow: 0 0.35rem 1.1rem rgba(0, 0, 0, 0.16);
}

.io-overview-panel {
  background: #fff;
  border: 1px solid var(--io-border);
  border-radius: var(--io-radius);
  box-shadow: var(--io-shadow);
  padding: 0.9rem 1rem;
}

.io-overview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.85rem;
  margin-bottom: 0.7rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(15, 39, 68, 0.08);
}

.io-overview-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f2744;
  line-height: 1.2;
}

.io-overview-meta {
  font-size: 0.78rem;
  color: var(--io-text-muted);
  margin-top: 0.15rem;
}

.io-overview-chg {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.85rem;
}

.io-quote-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.45rem;
}

.io-kpi-mini {
  background: #f4f7fb;
  border: 1px solid var(--io-border);
  border-radius: 0.45rem;
  padding: 0.4rem 0.55rem;
  min-height: 0;
}

.io-kpi-mini .io-kpi-label {
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--io-text-muted);
  font-weight: 700;
  margin-bottom: 0.12rem;
}

.io-kpi-mini .io-kpi-value {
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f2744;
}

.io-analytics-page .io-sticky-col,
.io-equity-home .io-sticky-col {
  position: -webkit-sticky;
  position: sticky;
  top: 5.75rem;
  align-self: flex-start;
}

.io-analytics-page .io-dash-frame {
  width: 100%;
  height: 640px;
  border: 1px solid var(--io-border);
  border-radius: 0.5rem;
  background: #0d1117;
}

.io-ad-slot {
  min-height: 0;
}

@media (max-width: 991.98px) {
  .io-analytics-page .io-sticky-col,
  .io-equity-home .io-sticky-col {
    position: static;
  }

  .io-page-hero h1 {
    font-size: 1.15rem;
  }

  .io-quote-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .io-quote-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
