.profile-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  padding: 24px 24px 20px;
  font-family: 'Roboto', sans-serif;
  gap: 16px;
  margin-top: 32px;
}

.profile-card h2 {
  font-size: 32px;
  font-weight: 600;
  color: #0F7075;
  margin: 0;
  border-bottom: 2px solid #e0e0e0;
  display: inline-block;
}

@media (max-width: 768px) {
  .card-heading {
    font-size: 18px;
  }
  
  .profile-card {
      padding: 5px;
  }
}

.nse-symbol {
  font-size: 0.5em;
  color: #555; /* or any subtle tone */
  margin-left: 4px;
}

.card-info-note {
  font-size: 13px;
  color: #777;
  align-self: flex-end;
  margin-top: -10px;
  margin-bottom: 0;
  padding-left: 10px;
}

@media (max-width: 768px) {
  .card-info-note {
    font-size: 12px;
    align-self: flex-start;
    text-align: left;
    margin-top: 0;
  }
}

.stock-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  padding: 20px 24px;
  font-family: 'Roboto', sans-serif;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pill-group {
    display: flex;
    justify-content: flex-start;   
    gap: 10px;                     
    padding: 1.75rem 0;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;              
}

.pill {
    display: block;
    background-color: #f8f8f8;
    font: normal 0.85rem 'Roboto', sans-serif;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 25px;
    padding: 0.75rem 1.25rem;
    white-space: nowrap;        
}

@media (max-width: 768px) {
  .pill-group {
    gap: 6px;
    padding: 1rem 0.25rem;
  }

  .pill {
    padding: 0.5rem 0.85rem;
    font-size: 0.78rem;
  }
}

.relative-container {
    position: relative;
    height: 100%;
    width: 100%;
}

.data-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    background-color: #fff;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
    border-radius: inherit;
}

.has-error::before {
    content: '!';
    background-color: #9c251a;
    font-weight: bold;
    color: #fff;
    padding: 0 0.75rem;
    margin-right: 0.55rem;
    border-radius: 100%;
}

.has-error::after {
    position: relative;
    content: attr(data-error);
    color: #9c251a;
}

.is-loading::before {
    position: absolute;
    content: '';
    height: 60px;
    width: 60px;
    margin: 0 auto;
    border: 8px solid #dfdfdf;
    border-bottom: 8px solid transparent;
    border-radius: 100%;
    animation: spin .7s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.stock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.stock-name {
  font-size: 28px;
  font-weight: 600;
  color: #072E33;
}
.stock-price {
  font-size: 24px;
  font-weight: 600;
  color: #136162;
}
.stock-datetime {
  font-size: 14px;
  color: #666;
  margin-top: 2px;
}

.stock-change {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
}
.stock-change.positive {
  color: #4caf50;
}
.stock-change.negative {
  color: #e74c3c;
}

.range-label {
  font-size: 14px;
  color: #666;
  margin: 6px 0;
}
.range-bar {
    display: flex;
    justify-content: center;
  background: #eee;
  height: 6px;
  border-radius: 4px;
  position: relative;
  margin-bottom: 6px;
}

.range-val {
    display: none;
    align-items: center;
    justify-content: center;
    position: absolute;
    font-size: 0.8rem;
    padding: 0.75rem;
    width: 20%;
    border-radius: 15px;
    background-color: #fff;
    box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2);
    top: -3.75rem;
}

.range-val::before {
    position: absolute;
    background-color: transparent;
    content: '';
    border-top: 8px solid #fff;
    border-right: 8px solid transparent;
    border-left: 8px solid transparent;
    border-bottom: 8px solid transparent;
    height: 10px;
    width: 10px;
    bottom: -1rem;
}

.range-fill {
  background: #136162;
  height: 100%;
  border-radius: 4px;
  position: absolute;
  top: 0;
  left: 0;
}

.range-bar:hover .range-val {
    display: flex;
}

.range-minmax {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

.stock-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 12px;
  column-gap: 20px;
}

.about-card {
  background: #ffffff;
  color: #1a1a1a;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  position: relative;
    max-height: 300px;
  overflow-y: auto;  
}

.distance-group {
  background: #f9fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.distance-heading {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0e9199;
  margin-bottom: 6px;
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 4px;
}

.distance-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.92rem;
}

.distance-label {
  color: #333;
}

.distance-value {
  font-weight: 500;
  color: #444;
}

.metrics-card {
  width: 100%;
  margin: 20px auto;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 24px;
  font-family: 'Roboto', sans-serif;
  display: flex;
  gap: 32px;
  overflow-x: auto; 
}

.metrics-section {
  flex: 1;
  min-width: 180px;
  max-width: 100%;
}

.metrics-section.full-width {
    min-width: 100%;
}

.metrics-group.hide {
    display: none;
  }

.metrics-group {
  margin-bottom: 24px;
}

.metrics-heading {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #136162;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 4px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed #eee;
  font-size: 0.95rem;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1;
}

.metric-col {
    display: flex;
}

@media only screen and (min-width: 1024px) {
    .metric-col {
        flex-direction: column;
    }
}

.metric-label {
  font-size: 13px;
  color: #666;
}

.metric-name {
  color: #666;
  flex: 1;
  min-width: 130px;
}

.metric-value {
  font-size: 15px;    
  color: #072E33;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 1024px) {
  .metrics-card {
    gap: 8px;
  }

  .metrics-section {
    width: 48%;
    max-width: 50%;
    flex: 0 0 100%;
    box-sizing: border-box;
  }

  .metrics-heading {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    padding-left: 2px;
    padding-right: 2px;
    word-wrap: break-word;
    width: 48%;
    box-sizing: border-box;
  }

  .metric-row {
    width: 50%;
    box-sizing: border-box;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
  }

  .metric-name, .metric-value {
    word-break: break-word;
  }
}


@media (max-width: 600px) {
  .metrics-card {
    flex-wrap: nowrap;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 16px;
  }

  .metrics-section {
    flex: 0 0 auto;
    min-width: 180px;
  }
}

.metrics-toggle {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.metrics-btn {
  padding: 6px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid #ccc;
  background: #f6f9fc;
  color: #083c71;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.metrics-btn.active {
  background: #0C7075;
  color: #fff;
  border-color: #083c71;
}

.charts-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.chart-card {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  flex: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  min-width: 280px;
}

.chart-card.wide {
  flex: 1.5;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  color: #136162;
  margin-bottom: 10px;
}

.chart-popup-icon {
  cursor: pointer;
  font-size: 16px;
  color: #aaa;
}

.chart-content {
  height: 200px;
  width: 100%;
  position: relative;
}

.chart-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
}

.modal-backdrop {
    position: fixed;
    height: 100%;
    width: 100%;
    left: 0;
    top: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: inherit;
}

.chart-modal-content {
  background: #fff;
  margin: 5% auto;
  padding: 20px;
  border-radius: 12px;
  width: 80%;
  z-index: 2001;
  max-width: 900px;
  position: relative;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 24px;
  cursor: pointer;
  color: #555;
}

.chart-range {
  margin-right: 20px;
  margin-bottom: 20px;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.chart-range button {
  background: transparent;
  border: 1px solid #ccc;
  padding: 6px 8px;
  font-size: 0.75rem;
  color: #444;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chart-range button.active,
.chart-range button:hover {
  background: transparent;
  color: #072E33;
  border-color: #0F7075;
}

@media (max-width: 1024px) {
  .chart-card {
    flex: 1 1 calc(50% - 20px);
  }

  .chart-card.wide {
    flex: 1 1 100%;
  }
  
  .chart-content {
      height: 300px;
  }
}

@media (max-width: 768px) {
  .charts-row {
    flex-direction: column;
    gap: 16px;
  }

  .chart-card,
  .chart-card.wide {
    width: 100%;
    flex: none;
  }

  .chart-content {
    height: 180px;
  }

  .chart-modal-content {
    width: 92%;
  }
}

.returns-period-container {
  margin-top: 10px;    
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-family: 'Roboto', sans-serif;
}

.return-circle {
  position: relative;
  width: 120px;
  height: 120px;
}

.return-circle svg {
  transform: rotate(-90deg);
}

.circle-bg,
.circle-progress {
  fill: none;
  stroke-width: 8;
}

.circle-bg {
  stroke: #eee;
}

.circle-progress {
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s;
}

.circle-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: 600;
}

.corporate-actions-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 1rem;
  justify-content: space-between;
}

.action-card {
  flex: 1 1 30%;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  max-height: 320px;
  display: flex;
  flex-direction: column;
}

.action-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #0C7075;
  border-bottom: 1px solid #ddd;
  padding-bottom: 4px;
}

.card-content {
  overflow-y: auto;
  padding-right: 4px; /* for scrollbar space */
  flex-grow: 1;
}

.action-row {
  padding: 8px 0;
  border-bottom: 1px dashed #ccc;
  font-size: 14px;
  color: #333;
}

.action-row:last-child {
  border-bottom: none;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  background: #fff;
  border-radius: 8px;
  margin: 1rem 0;
  border: 1px solid #e0f1ec;
}

.profile-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Roboto', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: #0F7075;
  letter-spacing: 0.02em;
}

.profile-table thead th {
  position: sticky;
  top: 0;
  text-align: center;
  padding: 10px 8px;
  font-weight: 500;
  font-size: 13px;
  color: #095647;
  background: transparent;
  white-space: nowrap;
  border: none;
}

.profile-table thead th:nth-child(2),
.profile-table thead th:nth-child(4n-2) {
  background-color: #dff6f0;
}

.profile-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  text-align: left;
  background: #fff;
  color: #083c35;
}

.profile-table tbody td {
  padding: 10px 8px;
  font-size: 0.91rem;
  text-align: right;
  vertical-align: middle;
  color: #2b3d3c;
  border: none;
  letter-spacing: 0.015em;
}

.profile-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left;
  background: #fff;
  color: #444;
  width: 200px;
  min-width: 160px;
  padding-left: 12px;
  font-size: 0.85rem;
}

.profile-table tbody tr:nth-child(even) {
  background-color: #f6fcfa;
}

.profile-table.quarter-results td:nth-child(2),
.profile-table.quarter-results td:nth-child(4n+2) {
  background-color: rgba(8, 60, 53, 0.035);
}

.profile-table tbody tr:hover {
  background-color: #edf8f5;
}

.highlight {
  font-weight: 600;
  border-top: 1px solid #d0eae2;
  border-bottom: 1px solid #d0eae2;
}

@media (max-width: 768px) {
  .profile-table {
    font-size: 12px;
  }

  .profile-table th,
  .profile-table td {
    padding: 6px 6px;
  }

  .profile-table td:first-child {
    padding-left: 8px;
    min-width: 140px;
  }

  .table-wrapper {
    margin: 0.5rem 0;
    border-radius: 6px;
  }
}

.shareholding-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  gap: 20px;
  align-items: center;
  max-width: 700px;
}

.shareholding-chart {
  width: 260px;
  height: 260px;
  position: relative;
}

.shareholding-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legend-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.legend-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-value {
  color: #072E33;
  font-weight: 500;
}

@media (max-width: 991px) {
  .shareholding-card {
    flex-direction: column;
    align-items: flex-start;
    max-width: 100%;
    padding: 16px;
  }

  .shareholding-chart {
    width: 180px;
    height: 180px;
    margin: 0 auto;
  }

  .shareholding-legend {
    width: 100%;
    margin-top: 16px;
  }

  .legend-item {
    justify-content: space-between;
  }

  .legend-label {
    font-size: 13px;
  }

  .legend-value {
    font-size: 14px;
  }
}

.color-promoters { background: #136162; }
.color-fii       { background: #3498db; }
.color-dii       { background: #9b59b6; }
.color-govt      { background: #f39c12; }
.color-public    { background: #e74c3c; }
.color-others    { background: #0F7075; }

