.pnl-period-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(300px, 1.05fr);
  gap: 26px;
  margin-bottom: 18px;
  padding: 22px 24px;
  border: 1px solid rgba(72, 108, 103, .38);
  background:
    radial-gradient(circle at 18% 0%, rgba(0, 229, 138, .12), transparent 38%),
    radial-gradient(circle at 100% 100%, rgba(34, 211, 238, .07), transparent 42%),
    linear-gradient(145deg, rgba(20, 27, 37, .96), rgba(12, 18, 25, .96));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .2), inset 0 1px rgba(255, 255, 255, .025);
}

.pnl-period-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .2;
  background-image:
    linear-gradient(rgba(92, 132, 126, .14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 132, 126, .14) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(90deg, transparent, #000 45%, #000);
}

.pnl-period-copy,
.pnl-period-visual {
  position: relative;
  z-index: 1;
}

.pnl-period-head,
.pnl-period-chart-head,
.pnl-share-modal-head,
.pnl-share-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pnl-period-eyebrow,
.pnl-social-kicker {
  color: #91a09f;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.pnl-period-tabs {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(86, 111, 120, .32);
  border-radius: 9px;
  background: rgba(7, 12, 18, .68);
}

.pnl-period-tab {
  min-width: 68px;
  min-height: 30px;
  padding: 5px 10px;
  border: 0;
  border-radius: 6px;
  color: #7f8b99;
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: .18s ease;
}

.pnl-period-tab:hover { color: #dfe9e8; }
.pnl-period-tab.active {
  color: #05130e;
  background: #00e58a;
  box-shadow: 0 5px 18px rgba(0, 229, 138, .2);
}

.pnl-period-value {
  margin-top: 22px;
  color: #f3f8f7;
  font-family: var(--mono);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1;
}

.pnl-period-value.positive { color: #00e58a; text-shadow: 0 0 24px rgba(0, 229, 138, .14); }
.pnl-period-value.negative { color: #ff5876; text-shadow: 0 0 24px rgba(255, 88, 118, .12); }

.pnl-period-range {
  margin-top: 9px;
  color: #778595;
  font-size: 12px;
}

.pnl-period-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 21px;
}

.pnl-period-stat {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(84, 108, 117, .24);
  border-radius: 7px;
  background: rgba(15, 22, 30, .62);
}

.pnl-period-stat span {
  display: block;
  overflow: hidden;
  color: #6f7c89;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .09em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.pnl-period-stat strong {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: #e3ebeb;
  font-family: var(--mono);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pnl-period-visual {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 190px;
  padding: 16px 16px 13px;
  border: 1px solid rgba(89, 114, 122, .26);
  border-radius: 9px;
  background: rgba(7, 13, 19, .52);
}

.pnl-period-chart-title {
  color: #c4cece;
  font-size: 11px;
  font-weight: 650;
}

.pnl-share-open,
.pnl-modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(0, 229, 138, .3);
  border-radius: 7px;
  color: #9fffd3;
  background: rgba(0, 229, 138, .075);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.pnl-share-open svg,
.pnl-modal-btn svg { width: 14px; height: 14px; }
.pnl-share-open:hover,
.pnl-modal-btn:hover { background: rgba(0, 229, 138, .13); }

.pnl-period-spark {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 760 / 150;
  overflow: visible;
}

.pnl-spark-grid { stroke: rgba(101, 129, 136, .14); stroke-width: 1; }
.pnl-spark-line { fill: none; stroke: #00e58a; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.pnl-spark-area { fill: url(#pnlSparkGradient); }
.pnl-spark-dot { fill: #00e58a; filter: drop-shadow(0 0 5px rgba(0, 229, 138, .6)); }
.pnl-spark-zero { stroke: rgba(132, 158, 151, .24); stroke-width: 1; stroke-dasharray: 5 6; }
.pnl-spark-trade-dot { fill: #0b1516; stroke: #00e58a; stroke-width: 1.4; }
.pnl-spark-trade-dot.latest { fill: #00e58a; }

.pnl-share-backdrop {
  box-sizing: border-box;
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(2, 6, 9, .82);
  backdrop-filter: blur(16px);
}

.pnl-share-backdrop.hidden { display: none; }

.pnl-share-modal {
  box-sizing: border-box;
  width: min(980px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(83, 112, 116, .42);
  border-radius: 12px;
  background: #111821;
  box-shadow: 0 32px 110px rgba(0, 0, 0, .62);
}

.pnl-share-modal-title {
  color: #f0f5f4;
  font-size: 15px;
  font-weight: 750;
}

.pnl-share-modal-sub {
  margin-top: 3px;
  color: #7f8b98;
  font-size: 11px;
}

.pnl-share-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(90, 112, 120, .34);
  border-radius: 7px;
  color: #9ca8b3;
  background: rgba(20, 28, 38, .8);
  cursor: pointer;
}

.pnl-share-layout {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 18px;
  margin-top: 18px;
}

.pnl-social-card {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  position: relative;
  isolation: isolate;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 34px;
  border: 1px solid rgba(77, 118, 109, .5);
  border-radius: 10px;
  background:
    radial-gradient(circle at 18% 10%, rgba(0, 229, 138, .18), transparent 32%),
    radial-gradient(circle at 92% 85%, rgba(34, 211, 238, .12), transparent 34%),
    linear-gradient(145deg, #111922 0%, #07100f 100%);
  box-shadow: inset 0 1px rgba(255, 255, 255, .04);
}

.pnl-social-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .36;
  background-image:
    linear-gradient(rgba(77, 119, 109, .18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 119, 109, .18) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(135deg, transparent 5%, #000 45%, transparent 100%);
}

.pnl-social-top,
.pnl-social-footer,
.pnl-social-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pnl-social-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #edf5f3;
  font-size: 16px;
  font-weight: 750;
}

.pnl-social-logo {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(0, 229, 138, .28);
  border-radius: 7px;
  color: #00e58a;
  background: rgba(3, 16, 12, .8);
  box-shadow: 0 0 18px rgba(0, 229, 138, .12);
}

.pnl-social-logo svg { width: 18px; height: 18px; }
.pnl-social-period {
  padding: 6px 9px;
  border: 1px solid rgba(101, 130, 132, .3);
  border-radius: 6px;
  color: #a8b7b4;
  background: rgba(12, 19, 26, .7);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pnl-social-account {
  margin-top: 48px;
  color: #d4dfdd;
  font-size: 15px;
  font-weight: 650;
}

.pnl-social-user {
  margin-top: 5px;
  color: #74837f;
  font-size: 10px;
}

.pnl-social-value {
  margin-top: 12px;
  color: #00e58a;
  font-family: var(--mono);
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 680;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 0 28px rgba(0, 229, 138, .17);
}

.pnl-social-value.negative { color: #ff5876; }
.pnl-social-range {
  margin-top: 10px;
  color: #778681;
  font-size: 10px;
}

.pnl-social-chart {
  width: 100%;
  height: auto;
  aspect-ratio: 520 / 110;
  margin-top: 25px;
}

.pnl-social-stat-row {
  margin-top: 17px;
  padding-top: 15px;
  border-top: 1px solid rgba(101, 128, 130, .2);
}

.pnl-social-stat { flex: 1; }
.pnl-social-stat span {
  display: block;
  color: #687873;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.pnl-social-stat strong {
  display: block;
  margin-top: 4px;
  color: #d9e4e1;
  font-family: var(--mono);
  font-size: 12px;
}
.pnl-social-stat + .pnl-social-stat {
  padding-left: 14px;
  border-left: 1px solid rgba(101, 128, 130, .18);
}

.pnl-social-footer {
  position: absolute;
  right: 34px;
  bottom: 25px;
  left: 34px;
  color: #60716c;
  font-size: 8px;
}
.pnl-social-footer strong { color: #8da49d; font-weight: 650; }
.pnl-social-accent { color: #00e58a; }

.pnl-share-controls {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pnl-share-control-card {
  padding: 14px;
  border: 1px solid rgba(84, 108, 117, .28);
  border-radius: 8px;
  background: rgba(8, 13, 19, .46);
}
.pnl-share-control-label {
  margin-bottom: 9px;
  color: #788590;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.pnl-share-note {
  color: #778590;
  font-size: 10px;
  line-height: 1.55;
}
.pnl-share-actions {
  margin-top: auto;
  justify-content: stretch;
}
.pnl-share-actions .pnl-modal-btn { flex: 1; }
.pnl-modal-btn.primary {
  color: #05130e;
  border-color: #00e58a;
  background: #00e58a;
}
.pnl-modal-btn.primary:hover { background: #19ee99; }

@media (max-width: 900px) {
  .pnl-period-panel { grid-template-columns: 1fr; }
  .pnl-share-layout { grid-template-columns: 1fr; }
  .pnl-share-controls { order: -1; }
  .pnl-share-modal { width: min(620px, 100%); }
}

@media (max-width: 600px) {
  .pnl-period-panel {
    gap: 16px;
    margin-right: 0;
    margin-left: 0;
    padding: 16px;
  }
  .pnl-period-head { align-items: flex-start; flex-direction: column; }
  .pnl-period-tabs { width: 100%; }
  .pnl-period-tab { min-width: 0; }
  .pnl-period-value { margin-top: 17px; font-size: 36px; }
  .pnl-period-stats { gap: 6px; }
  .pnl-period-stat { padding: 9px 8px; }
  .pnl-period-stat strong { font-size: 11px; }
  .pnl-period-visual { min-height: 170px; padding: 13px; }
  .pnl-period-spark { height: 102px; }
  .pnl-share-backdrop { display: block; padding: 10px; }
  .pnl-share-modal { width: auto; max-width: none; max-height: calc(100dvh - 20px); margin: 0; overflow-x: hidden; padding: 13px; }
  .pnl-share-modal-head { align-items: flex-start; }
  .pnl-share-layout,
  .pnl-share-layout > *,
  .pnl-share-controls,
  .pnl-social-card { max-width: 100%; }
  .pnl-share-layout { gap: 12px; margin-top: 13px; }
  .pnl-social-card { padding: 16px; }
  .pnl-social-brand { font-size: 13px; }
  .pnl-social-logo { width: 27px; height: 27px; }
  .pnl-social-account { margin-top: 18px; font-size: 11px; }
  .pnl-social-user { margin-top: 2px; font-size: 8px; }
  .pnl-social-value { margin-top: 8px; font-size: 34px; }
  .pnl-social-range { margin-top: 6px; font-size: 8px; }
  .pnl-social-chart { height: 52px; margin-top: 10px; }
  .pnl-social-stat-row { margin-top: 6px; padding-top: 7px; }
  .pnl-social-stat span { font-size: 6px; }
  .pnl-social-stat strong { margin-top: 2px; font-size: 9px; }
  .pnl-social-footer { right: 16px; bottom: 7px; left: 16px; font-size: 6px; }
  .pnl-share-actions { position: sticky; bottom: 0; padding-top: 6px; background: #111821; }
}

/* ---------- CLEANER CONCEPT ---------- */
.pnl-period-panel {
  grid-template-columns: minmax(300px, .78fr) minmax(400px, 1.22fr);
  gap: 34px;
  padding: 23px 26px;
  border-color: rgba(89, 119, 114, .25);
  background:
    radial-gradient(circle at 5% 0%, rgba(0, 229, 138, .075), transparent 35%),
    linear-gradient(145deg, rgba(14, 22, 28, .94), rgba(9, 16, 21, .92));
  box-shadow: inset 0 1px rgba(255, 255, 255, .018);
}

.pnl-period-panel::after {
  display: none;
}

.pnl-period-head {
  align-items: flex-start;
}

.pnl-period-eyebrow {
  padding-top: 8px;
  color: #71817d;
  letter-spacing: .12em;
}

.pnl-period-tabs {
  gap: 0;
  padding: 2px;
  border-color: rgba(91, 116, 120, .2);
  border-radius: 7px;
  background: rgba(6, 11, 15, .45);
}

.pnl-period-tab {
  min-width: 61px;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 5px;
  color: #697680;
  font-size: 10px;
}

.pnl-period-tab.active {
  color: #dffbf0;
  background: rgba(0, 229, 138, .15);
  box-shadow: none;
}

.pnl-period-value {
  margin-top: 26px;
  font-size: clamp(34px, 3.4vw, 46px);
  font-weight: 610;
}

.pnl-period-value.positive,
.pnl-period-value.negative {
  text-shadow: none;
}

.pnl-period-range {
  margin-top: 7px;
  color: #687771;
  font-size: 11px;
}

.pnl-period-stats {
  gap: 0;
  margin-top: 27px;
  border-top: 1px solid rgba(93, 119, 119, .17);
}

.pnl-period-stat {
  padding: 13px 14px 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.pnl-period-stat + .pnl-period-stat {
  padding-left: 14px;
  border-left: 1px solid rgba(93, 119, 119, .17);
}

.pnl-period-stat span {
  color: #64726f;
  font-size: 8px;
}

.pnl-period-stat strong {
  margin-top: 5px;
  color: #cbd7d4;
  font-size: 12px;
  font-weight: 600;
}

.pnl-period-visual {
  min-height: 184px;
  padding: 7px 0 0 26px;
  border: 0;
  border-left: 1px solid rgba(93, 119, 119, .17);
  border-radius: 0;
  background: transparent;
}

.pnl-period-chart-title {
  color: #71807d;
  font-size: 10px;
}

.pnl-share-open {
  min-height: 30px;
  padding: 5px 8px;
  border-color: transparent;
  color: #75b79a;
  background: transparent;
  font-size: 10px;
}

.pnl-share-open:hover {
  border-color: rgba(0, 229, 138, .2);
  background: rgba(0, 229, 138, .055);
}

.pnl-period-spark {
  height: auto;
}

.pnl-spark-grid {
  stroke: rgba(101, 129, 136, .075);
}

.pnl-spark-line {
  stroke-width: 2;
}

.pnl-spark-dot {
  filter: none;
}

.pnl-spark-trade-dot {
  stroke-width: 1.25;
}

.pnl-share-backdrop {
  background: rgba(2, 6, 9, .88);
  backdrop-filter: blur(11px);
}

.pnl-share-modal {
  width: min(940px, 100%);
  padding: 20px;
  border-color: rgba(83, 112, 116, .3);
  border-radius: 10px;
  background: #10171f;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .56);
}

.pnl-share-modal-title {
  font-size: 14px;
}

.pnl-share-modal-sub {
  color: #6e7c86;
}

.pnl-share-close {
  border-color: transparent;
  background: transparent;
}

.pnl-share-layout {
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 20px;
  margin-top: 19px;
}

.pnl-social-card {
  padding: 36px;
  border-color: rgba(77, 118, 109, .3);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 2%, rgba(0, 229, 138, .105), transparent 36%),
    linear-gradient(150deg, #0d171b 0%, #08100f 100%);
}

.pnl-social-card::before {
  opacity: .14;
  background-size: 72px 72px;
}

.pnl-social-logo {
  width: 29px;
  height: 29px;
  border-color: rgba(0, 229, 138, .18);
  border-radius: 6px;
  background: rgba(3, 16, 12, .55);
  box-shadow: none;
}

.pnl-social-brand {
  font-size: 15px;
}

.pnl-social-period {
  padding: 5px 8px;
  border-color: rgba(101, 130, 132, .2);
  color: #879792;
  background: transparent;
}

.pnl-social-account {
  margin-top: 54px;
  font-size: 13px;
}

.pnl-social-user {
  color: #687772;
}

.pnl-social-value {
  margin-top: 14px;
  font-size: clamp(42px, 5vw, 60px);
  font-weight: 620;
  text-shadow: none;
}

.pnl-social-chart {
  height: auto;
  margin-top: 29px;
}

.pnl-social-stat-row {
  margin-top: 18px;
  padding-top: 14px;
  border-top-color: rgba(101, 128, 130, .14);
}

.pnl-social-stat + .pnl-social-stat {
  border-left-color: rgba(101, 128, 130, .12);
}

.pnl-social-footer {
  color: #53645e;
}

.pnl-share-controls {
  gap: 12px;
}

.pnl-share-control-card {
  padding: 13px 0 15px;
  border: 0;
  border-bottom: 1px solid rgba(84, 108, 117, .17);
  border-radius: 0;
  background: transparent;
}

.pnl-share-control-label {
  color: #667580;
}

.pnl-share-note {
  color: #687681;
}

.pnl-share-actions {
  gap: 8px;
}

.pnl-modal-btn {
  min-height: 36px;
  border-color: rgba(0, 229, 138, .18);
  color: #90d1b4;
  background: transparent;
}

.pnl-modal-btn.primary {
  color: #d9f8eb;
  border-color: rgba(0, 229, 138, .25);
  background: rgba(0, 229, 138, .14);
}

.pnl-modal-btn.primary:hover {
  background: rgba(0, 229, 138, .2);
}

@media (max-width: 900px) {
  .pnl-period-panel {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .pnl-period-visual {
    min-height: 160px;
    padding: 16px 0 0;
    border-top: 1px solid rgba(93, 119, 119, .17);
    border-left: 0;
  }

  .pnl-share-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .pnl-period-panel {
    gap: 16px;
    padding: 17px 16px;
  }

  .pnl-period-head {
    align-items: center;
    flex-direction: row;
  }

  .pnl-period-eyebrow {
    padding-top: 0;
  }

  .pnl-period-tabs {
    width: auto;
  }

  .pnl-period-tab {
    min-width: 58px;
  }

  .pnl-period-value {
    margin-top: 20px;
    font-size: 34px;
  }

  .pnl-period-stats {
    margin-top: 20px;
  }

  .pnl-period-stat {
    padding-top: 11px;
  }

  .pnl-period-stat + .pnl-period-stat {
    padding-left: 9px;
  }

  .pnl-period-visual {
    min-height: 145px;
    padding-top: 12px;
  }

  .pnl-period-spark {
    height: auto;
  }

  .pnl-social-chart {
    height: auto;
  }

  .pnl-share-modal {
    padding: 14px;
  }

  .pnl-social-card {
    padding: 17px;
  }
}
