/* WhisperKripto — mobil / dokunmatik uyum (public + müşteri sayfaları) */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

.whisper-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}

.whisper-nav-toggle:focus-visible {
  outline: 2px solid #58a6ff;
  outline-offset: 2px;
}

.whisper-nav-toggle[aria-expanded="true"] {
  border-color: #2ea043;
  background: rgba(35, 134, 54, 0.18);
}

.customer-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.customer-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 760px) {
  .public-shell,
  .info-shell,
  .customer-page {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: max(28px, env(safe-area-inset-bottom));
  }

  .public-nav,
  .info-nav,
  .customer-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 12px;
    margin-bottom: 18px;
  }

  .whisper-nav-toggle {
    display: inline-flex;
  }

  .public-actions,
  .info-actions,
  .customer-top-actions {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .public-actions.is-open,
  .info-actions.is-open,
  .customer-top-actions.is-open {
    display: flex;
  }

  .public-actions .public-btn,
  .info-actions .info-btn,
  .customer-top-actions .customer-dashboard-link,
  .customer-top-actions .btn-clear {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    padding: 12px 14px;
    font-size: 14px;
  }

  .public-contact {
    width: 100%;
  }

  .public-contact-toggle {
    width: 100%;
  }

  .public-contact-menu {
    position: static;
    top: auto;
    left: auto;
    min-width: 0;
    width: 100%;
    margin-top: 6px;
    box-shadow: none;
  }

  .public-contact-menu a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .public-brand .public-muted,
  .info-brand span,
  .customer-sub {
    display: none;
  }

  .public-logo {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    border-radius: 12px;
  }

  .public-title {
    font-size: 18px;
  }

  .public-hero,
  .info-hero {
    padding: 20px 16px;
    border-radius: 14px;
    margin-bottom: 14px;
  }

  .public-hero h1,
  .info-hero h1 {
    font-size: clamp(24px, 7vw, 32px);
    letter-spacing: -0.8px;
  }

  .public-hero p,
  .info-hero p {
    font-size: 14px;
    line-height: 1.6;
  }

  .public-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0;
  }

  .public-stat {
    padding: 12px;
    min-height: 78px;
    border-radius: 12px;
  }

  .public-stat-value {
    font-size: 16px;
    word-break: break-word;
  }

  .public-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .public-card,
  .info-section,
  .customer-page .card {
    padding: 16px;
    border-radius: 13px;
  }

  .public-card-title {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .public-chart-tabs,
  .public-table-switch {
    width: 100%;
  }

  .public-chart-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .public-chart-tab,
  .public-table-switch button {
    min-height: 40px;
    justify-content: center;
  }

  .public-table-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .public-table-switch button {
    width: 100%;
    padding: 10px 8px;
    font-size: 12px;
    line-height: 1.25;
  }

  .public-card-tools {
    width: 100%;
  }

  #publicInvestorPeriodTabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .public-chart {
    height: 190px;
  }

  .public-perf {
    grid-template-columns: 1fr;
  }

  .public-period-meta {
    text-align: left;
    line-height: 1.45;
  }

  .public-subtitle-row {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Geniş tablolar → mobil kart listesi */
  .public-table-wrap,
  .info-table-wrap,
  .invest-table-wrap,
  .table-wrap {
    overflow: visible;
    -webkit-overflow-scrolling: touch;
  }

  .public-table,
  .info-table,
  .customer-page table {
    min-width: 0 !important;
    width: 100%;
  }

  .public-table thead,
  .info-table thead,
  .customer-page table thead {
    display: none;
  }

  .public-table tbody,
  .info-table tbody,
  .customer-page table tbody {
    display: block;
  }

  .public-table tr,
  .info-table tr,
  .customer-page table tbody tr {
    display: block;
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface2);
  }

  .public-table td,
  .info-table td,
  .customer-page table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    text-align: right !important;
    padding: 8px 0;
    border-bottom: 1px solid rgba(48, 54, 61, 0.85);
    font-size: 13px;
    word-break: break-word;
  }

  .public-table td:last-child,
  .info-table td:last-child,
  .customer-page table tbody td:last-child {
    border-bottom: 0;
  }

  .public-table td::before,
  .info-table td::before,
  .customer-page table tbody td::before {
    content: attr(data-label);
    flex: 0 0 42%;
    max-width: 42%;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    text-align: left;
    line-height: 1.35;
  }

  html[lang="tr"] .info-table td:nth-child(1):not([data-label])::before { content: "Alan"; }
  html[lang="tr"] .info-table td:nth-child(2):not([data-label])::before { content: "Anlamı"; }
  html[lang="en"] .info-table td:nth-child(1):not([data-label])::before { content: "Field"; }
  html[lang="en"] .info-table td:nth-child(2):not([data-label])::before { content: "Meaning"; }

  .public-table td:first-child,
  .customer-page table tbody td:first-child {
    font-weight: 700;
  }

  .info-toc nav {
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }

  .info-toc a {
    padding: 10px 9px;
    min-height: 40px;
  }

  .info-grid,
  .info-flow {
    grid-template-columns: 1fr;
  }

  .customer-topbar {
    margin-bottom: 18px;
  }

  .customer-brand {
    font-size: 18px;
  }

  .customer-brand-logo {
    width: 42px;
    height: 42px;
  }

  .customer-login-card {
    margin-top: 12px;
    max-width: none;
  }

  .customer-code-input {
    font-size: 24px;
    letter-spacing: 6px;
    min-height: 52px;
  }

  .customer-actions {
    flex-direction: column;
  }

  .customer-actions .btn-save,
  .customer-actions .customer-tg-btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .customer-logout {
    margin-left: 0;
  }

  .customer-stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .customer-stat-value {
    font-size: 15px;
    word-break: break-word;
  }

  .customer-referral-link-field {
    grid-template-columns: 1fr;
  }

  .customer-referral-copy-btn {
    width: 100%;
    min-height: 42px;
  }
}

@media (max-width: 360px) {
  .public-grid,
  .customer-stat-grid {
    grid-template-columns: 1fr;
  }

  .public-table-switch button {
    font-size: 11px;
    padding: 9px 6px;
  }

  .info-toc nav {
    grid-template-columns: 1fr;
  }
}
