/* Portföy, alarm, Pro erken erişim ve beyanname dökümü ekranları.
   Renkler index.html'deki tema değişkenlerinden gelir; açık/koyu tema kendiliğinden uyar. */

.pv-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.pv-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; min-inline-size: 0; }
.pv-kpi-label { font-size: 12px; font-weight: 700; color: var(--text-muted); letter-spacing: .02em; }
.pv-kpi-value { font-size: clamp(20px, 3.6vw, 26px); font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 4px; overflow-wrap: anywhere; }
.pv-kpi-sub { font-size: 12.5px; color: var(--text-secondary); margin-top: 3px; }
.pv-up { color: var(--up); }
.pv-down { color: var(--down); }

.pv-form { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; }
.pv-form .field input, .pv-form .field select { min-height: 44px; padding: 8px 10px; inline-size: 100%; }
.pv-form .btn { min-height: 44px; }
.pv-section-title { font-size: 16px; font-weight: 800; margin: 26px 0 10px; }
.pv-hint { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.pv-status { font-size: 13px; font-weight: 600; min-height: 18px; }
.pv-status.err { color: var(--down); }
.pv-status.ok { color: var(--up); }

.pv-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.pv-table { inline-size: 100%; border-collapse: collapse; font-size: 13.5px; }
.pv-table th, .pv-table td { padding: 10px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.pv-table th { font-size: 12px; color: var(--text-muted); font-weight: 700; background: var(--surface-2); }
.pv-table th:first-child, .pv-table td:first-child { text-align: left; }
.pv-table tr:last-child td { border-bottom: 0; }
.pv-table tfoot td { font-weight: 800; background: var(--surface-2); }
.pv-table input, .pv-table select { min-height: 38px; padding: 6px 8px; inline-size: 100%; min-inline-size: 84px; font-size: 13px; }
.pv-table td.pv-cell-input { padding: 6px; }
.pv-icon-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary); border-radius: 9px; min-inline-size: 36px; min-block-size: 36px; cursor: pointer; font-size: 15px; }
.pv-icon-btn:hover { background: var(--surface-hover); color: var(--down); }

.pv-empty { border: 1px dashed var(--border); border-radius: 14px; padding: 26px 18px; text-align: center; color: var(--text-secondary); background: var(--surface); }
.pv-empty strong { display: block; font-size: 16px; color: var(--text); margin-bottom: 6px; }

.pv-share { display: grid; gap: 14px; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); align-items: start; }
.pv-share canvas { inline-size: 100%; block-size: auto; border-radius: 16px; border: 1px solid var(--border); }
@media (max-width: 720px) { .pv-share { grid-template-columns: 1fr; } }

.pv-pro { border: 1px solid var(--brand-border); background: var(--brand-soft); border-radius: 16px; padding: 18px; }
.pv-pro-cols { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 12px 0; }
.pv-pro-cols ul { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.7; }
.pv-checks { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13.5px; margin: 10px 0; }
.pv-checks label { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; cursor: pointer; }

.pv-notes { font-size: 12.5px; color: var(--text-secondary); line-height: 1.6; padding-left: 18px; margin: 8px 0 0; }
.pv-warn { border: 1px solid var(--warn-border); background: var(--warn-soft); border-radius: 12px; padding: 10px 14px; font-size: 13px; margin: 12px 0; }
.pv-warn ul { margin: 4px 0 0; padding-left: 18px; }

@media print {
  body.pv-printing > *:not(main), body.pv-printing main > *:not(#view-worksheet),
  body.pv-printing .pv-no-print { display: none !important; }
  body.pv-printing #view-worksheet { display: block !important; }
  body.pv-printing { background: #fff !important; color: #000 !important; }
  body.pv-printing .pv-table-wrap { overflow: visible; border-color: #999; }
  body.pv-printing .pv-table { font-size: 10.5px; }
  body.pv-printing .pv-table th, body.pv-printing .pv-table td { padding: 5px 6px; white-space: normal; }
}

/* Form kontrolleri: sitenin genel giriş alanı görünümüyle aynı çizgide */
.pv-form input, .pv-form select, .pv-table input, .pv-table select {
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2);
  color: var(--text); font: inherit; font-size: 14px;
}
.pv-form input:focus-visible, .pv-form select:focus-visible, .pv-table input:focus-visible, .pv-table select:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 1px;
}

/* Üyelik & Paketler */
.pv-plans { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(225px, 1fr)); align-items: stretch; }
.pv-plan { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px 18px; display: flex; flex-direction: column; gap: 8px; }
.pv-plan h2 { font-size: 17px; font-weight: 800; margin: 0; }
.pv-plan ul { margin: 4px 0 12px; padding-left: 18px; font-size: 13.5px; line-height: 1.65; flex: 1; }
.pv-plan .btn { min-height: 44px; inline-size: 100%; }
.pv-plan-featured { border: 2px solid var(--brand); background: var(--brand-soft); }
.pv-plan-badge { position: absolute; top: -11px; right: 14px; font-size: 11px; padding: 2px 9px; }
.pv-price { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pv-price small { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.pv-compare th:not(:first-child), .pv-compare td:not(:first-child) { text-align: center; }
.pv-compare td { white-space: normal; }
.pv-diff td { text-align: left !important; vertical-align: top; min-inline-size: 150px; line-height: 1.5; }
.pv-diff td:first-child { font-weight: 700; }
.pv-diff td:last-child { background: var(--brand-soft); }


/* ═════════════════════════ YATAY SEKME KAYDIRMA OKLARI (SCROLL AFFORDANCE ARROWS) ═════════════════════════ */
.nav-scroll-shell {
  position: relative;
  display: flex;
  align-items: center;
  min-inline-size: 0;
  max-inline-size: 100%;
}
.nav-scroll-shell > .nav-bar {
  flex: 1 1 auto;
  min-inline-size: 0;
  scroll-padding-inline: 44px;
}
.nav-scroll-arrow {
  position: absolute;
  inset-block: 5px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-inline-size: 36px;
  padding-inline: 9px;
  border-radius: 999px;
  border: 1.5px solid var(--brand);
  background: var(--surface);
  color: var(--brand);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.nav-scroll-arrow[hidden] {
  display: none !important;
}
.nav-scroll-arrow:hover {
  background: var(--brand);
  color: #ffffff;
}
.nav-scroll-arrow:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.nav-scroll-arrow.is-prev {
  inset-inline-start: 2px;
}
.nav-scroll-arrow.is-next {
  inset-inline-end: 2px;
}
.nav-scroll-arrow .arrow-glyph {
  font-size: 17px;
  line-height: 1;
}
[dir="rtl"] .nav-scroll-arrow .arrow-glyph {
  transform: scaleX(-1);
}
@media (max-width: 640px) {
  .nav-scroll-arrow .arrow-hint-txt {
    display: none;
  }
  .nav-scroll-arrow {
    min-inline-size: 32px;
    padding-inline: 7px;
  }
}

/* ═════════════════════════ PORTFÖY & BEYANNAME CANLI LOT ÖNİZLEME ÇUBUĞU ═════════════════════════ */
.pv-lot-preview {
  margin-top: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--brand-border);
  background: var(--brand-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.pv-lot-preview[hidden] {
  display: none !important;
}
.pv-lot-preview-val {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--brand);
}

/* ═════════════════════════ CANLI BORSA İSTANBUL (TÜM 640+ ŞİRKET) TERMİNALİ ═════════════════════════ */
.bist-jump-callout {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--brand-border);
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 10%, var(--surface)), var(--surface));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  flex-wrap: wrap;
}
.bist-indices-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.bist-idx-card {
  appearance: none;
  font: inherit;
  color: inherit;
  text-align: start;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-inline-size: 0;
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.bist-idx-card:hover,
.bist-idx-card[aria-pressed="true"] {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 7%, var(--surface));
}
.bist-breadth-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.bist-breadth-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
}
.bist-filter-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.bist-search-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}
@media (max-width: 780px) {
  .bist-search-grid {
    grid-template-columns: 1fr;
  }
}

.bist-board-containment {
  content-visibility: auto;
  contain-intrinsic-size: auto none auto 760px;
}
@supports not (content-visibility: auto) {
  .bist-board-containment {
    contain: layout style paint;
  }
}

.bist-table-region {
  overflow: auto;
  max-inline-size: 100%;
  max-block-size: min(74dvh, 760px);
  container-type: inline-size;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
}
.bist-all-table {
  inline-size: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
  --bist-col-2: "Son Fiyat";
  --bist-col-3: "Günlük %";
  --bist-col-4: "Gün İçi Aralık";
  --bist-col-5: "Hacim (TL)";
  --bist-col-6: "F/K · PD/DD";
  --bist-col-7: "İşlem";
}
.bist-all-table caption {
  text-align: start;
  padding: 11px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--surface-2);
  border-block-end: 1px solid var(--border);
}
.bist-all-table thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 3;
}
.bist-all-table thead th {
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  border-block-end: 1px solid var(--border);
  padding: 10px 12px;
  white-space: nowrap;
  text-align: end;
}
.bist-all-table thead th:first-child {
  text-align: start;
  position: sticky;
  inset-inline-start: 0;
  z-index: 4;
}
.bist-all-table thead th:has(> button) {
  padding: 0;
}
.bist-sort-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  inline-size: 100%;
  min-block-size: 40px;
  padding: 9px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  cursor: pointer;
}
.bist-all-table thead th:first-child .bist-sort-btn {
  justify-content: flex-start;
}
.bist-sort-btn:hover {
  color: var(--brand);
}
.bist-sort-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}
.bist-sort-icon::after {
  content: "↕";
  opacity: 0.45;
  font-size: 11px;
}
.bist-all-table thead th[aria-sort="ascending"] .bist-sort-icon::after {
  content: "▲";
  opacity: 1;
  color: var(--brand);
}
.bist-all-table thead th[aria-sort="descending"] .bist-sort-icon::after {
  content: "▼";
  opacity: 1;
  color: var(--brand);
}

.bist-all-table tbody tr.bist-row-deferred {
  content-visibility: auto;
  contain-intrinsic-size: auto none auto 56px;
}
.bist-all-table tbody th,
.bist-all-table tbody td {
  padding: 9px 12px;
  border-block-end: 1px solid var(--border);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.bist-all-table tbody td {
  text-align: end;
  white-space: nowrap;
}
.bist-all-table tbody th[scope="row"] {
  text-align: start;
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
  background: var(--surface);
  font-weight: 700;
  max-inline-size: 280px;
}
.bist-all-table tbody tr:hover th[scope="row"],
.bist-all-table tbody tr:hover td {
  background: var(--surface-hover);
}
.bist-row-title {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.bist-row-sub {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-inline-size: 255px;
}
.bist-tag-mini {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--brand-soft);
  color: var(--brand);
}
.bist-tag-ceil {
  background: var(--up-soft);
  color: var(--up);
}
.bist-tag-floor {
  background: var(--down-soft);
  color: var(--down);
}

/* Responsive Stacked Cards on Mobile Containers (< 680px) per `responsive-table` */
@container (width < 680px) {
  .bist-all-table,
  .bist-all-table caption,
  .bist-all-table tbody,
  .bist-all-table tr,
  .bist-all-table tbody th,
  .bist-all-table tbody td {
    display: block;
    box-sizing: border-box;
  }
  .bist-all-table caption {
    inline-size: 100%;
  }
  .bist-all-table thead {
    display: none;
  }
  .bist-all-table tbody tr {
    margin: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
  }
  .bist-all-table tbody tr.bist-row-deferred {
    contain-intrinsic-size: auto none auto 220px;
  }
  .bist-all-table tbody th[scope="row"] {
    position: static;
    max-inline-size: none;
    background: var(--surface-2);
    padding: 10px 12px;
  }
  .bist-row-sub {
    max-inline-size: none;
    white-space: normal;
  }
  .bist-all-table tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: end;
    white-space: normal;
    padding: 7px 12px;
  }
  .bist-all-table tbody td:last-child {
    border-block-end: 0;
  }
  .bist-all-table tbody td:nth-child(2)::before { content: var(--bist-col-2) ": "; font-weight: 700; color: var(--text-muted); font-size: 12px; }
  .bist-all-table tbody td:nth-child(3)::before { content: var(--bist-col-3) ": "; font-weight: 700; color: var(--text-muted); font-size: 12px; }
  .bist-all-table tbody td:nth-child(4)::before { content: var(--bist-col-4) ": "; font-weight: 700; color: var(--text-muted); font-size: 12px; }
  .bist-all-table tbody td:nth-child(5)::before { content: var(--bist-col-5) ": "; font-weight: 700; color: var(--text-muted); font-size: 12px; }
  .bist-all-table tbody td:nth-child(6)::before { content: var(--bist-col-6) ": "; font-weight: 700; color: var(--text-muted); font-size: 12px; }
  .bist-all-table tbody td:nth-child(7)::before { content: var(--bist-col-7) ": "; font-weight: 700; color: var(--text-muted); font-size: 12px; }
}

/* Canlı Kademe (Alış/Satış & Tavan/Taban) Modalı */
.depth-bid-ask-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.depth-box-bid {
  padding: 12px;
  border-radius: 12px;
  background: var(--up-soft);
  border: 1px solid var(--up-border);
}
.depth-box-ask {
  padding: 12px;
  border-radius: 12px;
  background: var(--down-soft);
  border: 1px solid var(--down-border);
}
.depth-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr));
  gap: 8px;
  margin-top: 12px;
}
.depth-meta-cell {
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12.5px;
}

/* ═════════════════════════ PORTFÖYÜM v2 — ÇOKLU VARLIK, GRAFİK, SEKME & SORUMLU TABLO ═════════════════════════ */
.pv-top-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin-bottom: 14px;
}
.pv-bucket-pills,
.pv-lens-group,
.pv-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.pv-pill-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 7px 13px;
  min-block-size: 38px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.pv-pill-btn:hover {
  border-color: var(--brand);
  color: var(--text);
}
.pv-pill-btn[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}
.pv-pill-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.pv-demo-banner {
  border: 1px solid var(--brand-border);
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 10%, var(--surface)), var(--surface));
  border-radius: 15px;
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.pv-hero-card {
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 9%, var(--surface)), var(--surface));
  border: 1px solid var(--brand-border);
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
}
.pv-hero-amt {
  font-size: clamp(26px, 4.4vw, 36px);
  font-weight: 900;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.pv-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.pv-hero-stat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

/* Dağılım (SVG Donut) + Portföy Röntgeni */
.pv-alloc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 14px;
  margin: 14px 0 18px;
}
@media (max-width: 860px) {
  .pv-alloc-grid {
    grid-template-columns: 1fr;
  }
}
.pv-card-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  min-inline-size: 0;
}
.pv-donut-wrap {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 12px;
}
@media (max-width: 540px) {
  .pv-donut-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}
.pv-donut-legend {
  inline-size: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-inline-size: 0;
}
.pv-leg-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  font-size: 12.5px;
  align-items: center;
}
.pv-leg-lbl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pv-leg-dot {
  inline-size: 10px;
  block-size: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pv-leg-bar-track {
  grid-column: 1 / -1;
  block-size: 5px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.pv-leg-bar-fill {
  block-size: 100%;
  border-radius: 999px;
}

.pv-xray-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.pv-xray-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}
.pv-xray-lbl {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 700;
}
.pv-xray-val {
  font-size: 15px;
  font-weight: 800;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

/* Portfolio sub-tabs per `tabs` guide (no margin/padding/border/bg on [role="tabpanel"] itself, underline via border-block-end on ::after) */
.pv-subtabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  border-block-end: 1px solid var(--border);
  margin-top: 16px;
}
.pv-subtabs::-webkit-scrollbar {
  display: none;
}
.pv-subtabs [role="tab"] {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  padding: 11px 16px;
  flex: none;
  position: relative;
  cursor: pointer;
  white-space: nowrap;
  min-block-size: 44px;
}
.pv-subtabs [role="tab"]:hover {
  color: var(--text);
}
.pv-subtabs [role="tab"]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}
.pv-subtabs [role="tab"][aria-selected="true"] {
  color: var(--brand);
}
.pv-subtabs [role="tab"][aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  border-block-end: 3px solid var(--brand);
}
.pv-panels-wrap {
  /* No flex/grid gap so hidden=until-found panels add zero spacing */
  display: block;
}
.pv-panel-inner {
  padding-block-start: 14px;
}

/* Responsive Portfolio Tables per `responsive-table` */
.pv-resp-table-region {
  overflow: auto;
  max-inline-size: 100%;
  container-type: inline-size;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.pv-resp-table {
  inline-size: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}
.pv-resp-table caption {
  text-align: start;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--surface-2);
  border-block-end: 1px solid var(--border);
}
.pv-resp-table thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
}
.pv-resp-table thead th {
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 10px 12px;
  text-align: end;
  white-space: nowrap;
  border-block-end: 1px solid var(--border);
}
.pv-resp-table thead th:first-child {
  text-align: start;
  position: sticky;
  inset-inline-start: 0;
  z-index: 3;
}
.pv-resp-table tbody th,
.pv-resp-table tbody td {
  padding: 10px 12px;
  border-block-end: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
.pv-resp-table tbody td {
  text-align: end;
  white-space: nowrap;
}
.pv-resp-table tbody th[scope="row"] {
  text-align: start;
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
  background: var(--surface);
  font-weight: 700;
}
.pv-resp-table tbody tr:last-child th,
.pv-resp-table tbody tr:last-child td {
  border-block-end: 0;
}
.pv-resp-table.is-positions {
  --pv-col-2: "Adet · Ort. Alış";
  --pv-col-3: "Güncel Fiyat";
  --pv-col-4: "Günlük %";
  --pv-col-5: "Maliyet";
  --pv-col-6: "Değer · Ağırlık";
  --pv-col-7: "Toplam Kâr/Zarar";
  --pv-col-8: "Dolar / Altına Göre";
}
.pv-resp-table.is-lots {
  --pv-col-2: "Adet";
  --pv-col-3: "Alış";
  --pv-col-4: "Güncel";
  --pv-col-5: "Maliyet";
  --pv-col-6: "Değer";
  --pv-col-7: "TL %";
  --pv-col-8: "Dolara Göre";
  --pv-col-9: "Altına Göre";
  --pv-col-10: "İşlem";
}
@container (width < 680px) {
  .pv-resp-table,
  .pv-resp-table caption,
  .pv-resp-table tbody,
  .pv-resp-table tr,
  .pv-resp-table tbody th,
  .pv-resp-table tbody td {
    display: block;
    box-sizing: border-box;
  }
  .pv-resp-table caption {
    inline-size: 100%;
  }
  .pv-resp-table thead {
    display: none;
  }
  .pv-resp-table tbody tr {
    margin: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
  }
  .pv-resp-table tbody th[scope="row"] {
    position: sticky;
    inset-block-start: 0;
    z-index: 2;
    background: var(--surface-2);
    padding: 10px 12px;
  }
  .pv-resp-table tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: end;
    white-space: normal;
    padding: 8px 12px;
  }
  .pv-resp-table tbody td:last-child {
    border-block-end: 0;
  }
  .pv-resp-table tbody td:nth-child(2)::before { content: var(--pv-col-2) ": "; font-weight: 700; color: var(--text-muted); font-size: 12px; }
  .pv-resp-table tbody td:nth-child(3)::before { content: var(--pv-col-3) ": "; font-weight: 700; color: var(--text-muted); font-size: 12px; }
  .pv-resp-table tbody td:nth-child(4)::before { content: var(--pv-col-4) ": "; font-weight: 700; color: var(--text-muted); font-size: 12px; }
  .pv-resp-table tbody td:nth-child(5)::before { content: var(--pv-col-5) ": "; font-weight: 700; color: var(--text-muted); font-size: 12px; }
  .pv-resp-table tbody td:nth-child(6)::before { content: var(--pv-col-6) ": "; font-weight: 700; color: var(--text-muted); font-size: 12px; }
  .pv-resp-table tbody td:nth-child(7)::before { content: var(--pv-col-7) ": "; font-weight: 700; color: var(--text-muted); font-size: 12px; }
  .pv-resp-table tbody td:nth-child(8)::before { content: var(--pv-col-8) ": "; font-weight: 700; color: var(--text-muted); font-size: 12px; }
  .pv-resp-table tbody td:nth-child(9)::before { content: var(--pv-col-9) ": "; font-weight: 700; color: var(--text-muted); font-size: 12px; }
  .pv-resp-table tbody td:nth-child(10)::before { content: var(--pv-col-10) ": "; font-weight: 700; color: var(--text-muted); font-size: 12px; }
}

/* Validation after interaction per `validate-input-after-interaction` */
.pv-hint-top {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.pv-field-error {
  display: none;
  color: var(--down);
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}
.pv-form :is(input, select):is(:user-invalid, .user-invalid-fallback) {
  border-color: var(--down);
  background: var(--down-soft);
}
.pv-form :is(input, select):is(:user-invalid, .user-invalid-fallback) + .pv-field-error {
  display: block;
}
.pv-form :is(input, select):is(:user-valid, .user-valid-fallback):not([type="date"]) {
  border-color: color-mix(in srgb, var(--up) 55%, var(--border));
}
