* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

body {
  min-height: 100vh;
  background: linear-gradient(165deg, #0c1018 0%, #0f1520 40%, #111a28 100%);
  font-family: "Nunito", sans-serif;
  color: #d8e0d0;
}

.page-wrapper {
  padding: 32px 16px 60px;
  display: flex;
  justify-content: center;
}

.page-content {
  max-width: 1100px;
  width: 100%;
}

/* Two-column layout */
.two-col {
  display: flex;
  gap: 28px;
}

.col-left {
  flex: 1;
  min-width: 0;
}

.col-right {
  flex: 1;
  min-width: 0;
}

@media (max-width: 768px) {
  .two-col {
    flex-direction: column;
  }
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 36px;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #c8e64a12;
  border: 1px solid #c8e64a20;
  border-radius: 20px;
  padding: 6px 16px;
  margin-bottom: 14px;
}

.header-badge-text {
  font-family: "Outfit", sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  color: #c8e64a;
  text-transform: uppercase;
  font-weight: 500;
}

.header-title {
  font-family: "Outfit", sans-serif;
  font-size: 26px;
  font-weight: 600;
  color: #f0f4e8;
  line-height: 1.3;
  margin: 0;
}

.header-subtitle {
  font-size: 13px;
  color: #4a6a5a;
  margin-top: 8px;
}

/* Section Card */
.section-card {
  background: #0e1525;
  border: 1px solid #1a2540;
  border-radius: 14px;
  padding: 18px 20px 20px;
  margin-bottom: 14px;
  transition: border-color 0.3s;
}

.section-card:hover {
  border-color: #253050;
}

.section-label {
  font-family: "Outfit", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #6a8a6a;
  margin-bottom: 12px;
}

/* Value Row */
.value-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 14px;
}

.rupee-sign {
  color: #5a7a5a;
  font-size: 20px;
}

.editable-number {
  font-size: 26px;
  font-weight: 700;
  font-family: "Outfit", sans-serif;
  color: #e0e8d8;
  cursor: text;
  border-bottom: 2px dashed #1e2e40;
  padding-bottom: 2px;
  transition: border-color 0.2s;
}

.editable-number:hover {
  border-color: #c8e64a44;
}

.editable-input {
  background: #1a2540;
  border: 1px solid #c8e64a44;
  border-radius: 8px;
  color: #e0e8d8;
  font-size: 26px;
  font-weight: 700;
  font-family: "Outfit", sans-serif;
  padding: 4px 10px;
  width: 160px;
  outline: none;
}

.editable-input.narrow {
  width: 100px;
}

.unit-text {
  color: #5a7a5a;
  font-size: 15px;
  font-family: "Outfit", sans-serif;
}

/* Range Slider */
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #1a2540;
  outline: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #c8e64a;
  cursor: pointer;
  border: 3px solid #0f1520;
  box-shadow: 0 0 12px #c8e64a44;
  transition: transform 0.15s;
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

input[type=range]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #c8e64a;
  cursor: pointer;
  border: 3px solid #0f1520;
}

/* Chips */
.chips-row {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  gap: 6px;
}

.chip {
  flex: 1;
  background: #080c14;
  border: 1px solid #151e30;
  border-radius: 6px;
  padding: 6px 2px;
  color: #3a4a4a;
  font-family: "Nunito", sans-serif;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.chip.active {
  background: #c8e64a1a;
  border-color: #c8e64a40;
  color: #c8e64a;
}

/* Result Card */
.result-card {
  background: linear-gradient(135deg, #131e10 0%, #0e1525 100%);
  border: 1px solid #c8e64a25;
  border-radius: 16px;
  padding: 24px 22px;
  margin-top: 4px;
  margin-bottom: 28px;
}

.result-label {
  font-size: 14px;
  color: #7a9a6a;
  margin: 0;
  font-family: "Outfit", sans-serif;
}

.result-capital {
  color: #c0d8b0;
}

.result-amount {
  font-family: "Outfit", sans-serif;
  font-size: 34px;
  font-weight: 700;
  color: #c8e64a;
  margin: 6px 0 4px;
  letter-spacing: -0.5px;
}

.result-amount.loss {
  color: #e64a4a;
}

.result-detail {
  font-size: 13px;
  color: #5a7a5a;
  margin: 0;
  font-family: "Outfit", sans-serif;
}

.result-pnl {
  color: #c8e64a;
}

.result-pnl.loss {
  color: #e64a4a;
}

.result-growth {
  color: #3a5a4a;
}

.result-growth.loss {
  color: #e64a4a;
}

/* Stats Row */
.stats-row {
  display: flex;
  gap: 1px;
  background: #1a2540;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 18px;
}

.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  background: #0e1525;
}

.stat-label {
  font-size: 10px;
  color: #3a5a4a;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: "Outfit", sans-serif;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 16px;
  font-weight: 600;
  color: #e0e8d8;
  font-family: "Outfit", sans-serif;
}

.stat-value.positive {
  color: #c8e64a;
}

.stat-value.negative {
  color: #e64a4a;
}

/* Stacked Bar */
.stacked-bar-wrapper {
  margin-top: 18px;
}

.stacked-bar {
  display: flex;
  border-radius: 6px;
  overflow: hidden;
  height: 8px;
}

.stacked-bar-capital {
  background: #2a4a2a;
  transition: width 0.4s;
}

.stacked-bar-pnl {
  flex: 1;
  background: #c8e64a;
  transition: width 0.4s;
}

.stacked-bar-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
}

.stacked-label-capital {
  color: #4a6a4a;
}

.stacked-label-pnl {
  color: #98b830;
}

/* Chart */
.chart-section {
  padding: 18px 10px 10px;
  margin-bottom: 20px;
}

.chart-title {
  font-family: "Outfit", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #7a8a6a;
  margin-bottom: 14px;
  padding-left: 8px;
}

.chart-wrapper {
  height: 220px;
  position: relative;
}

.legend-row {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-top: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-item span {
  font-size: 11px;
  color: #4a5a6a;
}

.legend-line {
  width: 14px;
  height: 3px;
  border-radius: 2px;
}

.legend-line-dashed {
  width: 14px;
  height: 0;
  border-top: 2px dashed #2a4a2a;
}

/* Table Toggle */
.table-toggle-btn {
  width: 100%;
  padding: 13px;
  background: transparent;
  border: 1px solid #1a2540;
  border-radius: 10px;
  cursor: pointer;
  font-family: "Outfit", sans-serif;
  font-size: 13px;
  color: #5a7a5a;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.table-toggle-btn:hover {
  border-color: #253050;
}

.toggle-arrow {
  font-size: 10px;
  display: inline-block;
  transition: transform 0.3s;
}

.toggle-arrow.open {
  transform: rotate(180deg);
}

/* Table */
.table-container {
  margin-top: 12px;
  background: #0e1525;
  border: 1px solid #1a2540;
  border-radius: 14px;
  overflow: hidden;
  animation: fadeUp 0.3s ease;
}

.table-scroll {
  max-height: 320px;
  overflow-y: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead tr {
  border-bottom: 1px solid #1a2540;
}

th {
  padding: 11px 18px;
  color: #3a5a4a;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  position: sticky;
  top: 0;
  background: #0e1525;
  font-family: "Outfit", sans-serif;
}

.th-center { text-align: center; }
.th-right { text-align: right; }

tbody tr {
  border-bottom: 1px solid #111828;
}

tbody tr:nth-child(odd) {
  background: transparent;
}

tbody tr:nth-child(even) {
  background: #0b1220;
}

td {
  padding: 9px 18px;
  font-size: 12px;
}

td.td-center {
  text-align: center;
  color: #3a4a5a;
}

td.td-amount {
  text-align: right;
  color: #c8e64a;
}

td.td-pnl {
  text-align: right;
  color: #c8e64a;
}

td.td-pnl.loss {
  color: #e64a4a;
}

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #1a2540;
  border-radius: 2px;
}
