/* Üye dashboard popup — tüm sayfalarda paylaşılır */
:root {
  --dash-line: rgba(152, 104, 255, .34);
  --dash-line-soft: rgba(255, 255, 255, .08);
  --dash-muted: #c9bdf1;
}

.dashboard,
.member-coupon-modal,
.dashboard-dialog,
.dashboard-panel,
.member-payment-form,
.sms-verify-form {
  --line: var(--dash-line);
  --line-soft: var(--dash-line-soft);
  --muted: var(--dash-muted);
}

#memberDashboard .deposit,
.member-coupon-modal .deposit {
  background: linear-gradient(135deg, #8d55ff, #a260ff);
  color: #fff;
}

    .dashboard {
      position: fixed;
      inset: 0;
      z-index: 990;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 22px;
      background: rgba(8, 5, 28, .66);
      backdrop-filter: blur(12px);
    }

    .dashboard.open { display: flex; }

    .dashboard-dialog {
      width: min(1120px, 100%);
      max-height: min(820px, calc(100vh - 44px));
      overflow: auto;
      overflow-x: hidden;
      min-width: 0;
      box-sizing: border-box;
      display: grid;
      gap: 16px;
      padding: 18px;
      border: 1px solid var(--line);
      border-radius: 20px;
      background:
        radial-gradient(circle at 80% 0%, rgba(141, 85, 255, .35), transparent 20rem),
        linear-gradient(145deg, rgba(31, 22, 79, .98), rgba(18, 12, 52, .98));
      box-shadow: 0 28px 80px rgba(0,0,0,.44), inset 0 1px 0 rgba(255,255,255,.08);
      scrollbar-width: thin;
      scrollbar-color: rgba(160, 112, 255, .7) rgba(255,255,255,.08);
    }

    body.dashboard-lock { overflow: hidden; overflow-x: hidden; max-width: 100vw; }

    .dashboard-head {
      display: grid;
      gap: 12px;
      min-width: 0;
      padding: 4px 2px 0;
    }

    .dashboard-head-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      min-width: 0;
    }

    .dashboard-title {
      display: grid;
      gap: 5px;
      min-width: 0;
      flex: 1;
    }

    .dashboard-title span {
      color: #bfb2ec;
      font-size: 13px;
      font-weight: 800;
      text-transform: uppercase;
    }

    .dashboard-title h2 {
      margin: 0;
      font-size: 26px;
      line-height: 1.1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .dashboard-tabs-scroll {
      position: relative;
      min-width: 0;
      width: 100%;
      overflow: hidden;
    }

    .dashboard-tabs-scroll::after {
      content: "";
      position: absolute;
      right: 0;
      top: 0;
      bottom: 0;
      width: 28px;
      pointer-events: none;
      background: linear-gradient(to left, rgba(18, 12, 52, .92), transparent);
    }

    .dashboard-tabs {
      display: flex;
      gap: 8px;
      padding: 4px;
      border: 1px solid rgba(255,255,255,.08);
      border-radius: 12px;
      background: rgba(20, 13, 58, .58);
      overflow-x: auto;
      overflow-y: hidden;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      flex-wrap: nowrap;
      max-width: 100%;
    }

    .dashboard-tabs::-webkit-scrollbar {
      display: none;
    }

    .dashboard-tabs button {
      flex: 0 0 auto;
      height: 36px;
      border: 0;
      border-radius: 9px;
      padding: 0 14px;
      background: transparent;
      color: #bfb2ec;
      font-size: 13px;
      font-weight: 900;
      white-space: nowrap;
    }

    .dashboard-tabs button.active {
      background: linear-gradient(135deg, #8d55ff, #a260ff);
      color: #fff;
    }

    .dashboard-close {
      width: 40px;
      height: 40px;
      flex-shrink: 0;
      border: 1px solid rgba(255,255,255,.1);
      border-radius: 12px;
      display: grid;
      place-items: center;
      background: rgba(255,255,255,.08);
      color: #fff;
    }

    .dashboard-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 14px;
      align-items: stretch;
    }

    .dashboard-panel {
      min-height: 188px;
      min-width: 0;
      padding: 18px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background:
        radial-gradient(circle at 90% 0%, rgba(141, 85, 255, .28), transparent 13rem),
        rgba(31, 22, 79, .78);
      box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 16px 38px rgba(0,0,0,.13);
    }

    .dashboard-panel h3 {
      display: flex;
      align-items: center;
      gap: 9px;
      margin: 0 0 16px;
      font-size: 18px;
      line-height: 1.1;
    }

    .balance-total {
      display: grid;
      gap: 6px;
      margin-bottom: 16px;
    }

    .balance-total span,
    .activity-row span,
    .coupon-line span {
      color: #bfb2ec;
      font-size: 13px;
      font-weight: 700;
    }

    .balance-total strong {
      font-size: 36px;
      line-height: 1;
    }

    .balance-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .balance-actions button {
      height: 44px;
      border: 0;
      border-radius: 11px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      font-weight: 900;
    }

    .withdraw {
      background: rgba(255,255,255,.08);
      color: #e6dcff;
    }

    .activity-list,
    .coupon-list {
      display: grid;
      gap: 10px;
    }

    .activity-row,
    .coupon-line {
      min-height: 48px;
      display: grid;
      grid-template-columns: auto 1fr auto;
      align-items: center;
      gap: 10px;
      padding: 10px;
      border-radius: 12px;
      background: rgba(255,255,255,.055);
    }

    .activity-icon {
      width: 34px;
      height: 34px;
      border-radius: 10px;
      display: grid;
      place-items: center;
      background: rgba(141, 85, 255, .22);
      color: #fff;
    }

    .activity-row strong,
    .coupon-line strong {
      display: block;
      font-size: 14px;
      line-height: 1.2;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .amount-plus { color: #37f36a; font-weight: 900; }
    .amount-minus { color: #ffcc6d; font-weight: 900; }
    .amount-neutral { color: #bfb2ec; font-weight: 900; }

    .risk-list {
      display: grid;
      gap: 10px;
    }

    .risk-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      padding: 10px 0;
      border-bottom: 1px solid rgba(255,255,255,.06);
      font-size: 14px;
    }

    .risk-row:last-child {
      border-bottom: 0;
    }

    .risk-row span {
      color: #bfb2ec;
      font-weight: 700;
    }

    .tiny-note {
      margin: 0;
      font-size: 12px;
      font-weight: 700;
      color: #bfb2ec;
      line-height: 1.45;
    }

    .coupon-line {
      grid-template-columns: minmax(0, 1fr) auto auto;
      min-height: 54px;
      align-items: center;
    }

    .coupon-line-actions {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .coupon-icon-btn {
      width: 36px;
      height: 36px;
      border: 1px solid rgba(255,255,255,.12);
      border-radius: 10px;
      display: grid;
      place-items: center;
      background: rgba(141, 85, 255, .18);
      color: #fff;
      cursor: pointer;
      padding: 0;
    }

    .coupon-icon-btn:hover {
      background: rgba(141, 85, 255, .32);
    }

    .coupon-icon-btn svg {
      width: 18px;
      height: 18px;
    }

    .coupon-cashout-btn {
      height: 32px;
      padding: 0 10px;
      border: 0;
      border-radius: 999px;
      background: linear-gradient(135deg, #37f36a, #1fa84d);
      color: #062a12;
      font-size: 11px;
      font-weight: 950;
      cursor: pointer;
      white-space: nowrap;
    }

    .hidden { display: none !important; }

    .member-coupon-modal {
      position: fixed;
      inset: 0;
      z-index: 1000;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 16px;
      background: rgba(8, 5, 24, .78);
      backdrop-filter: blur(8px);
    }

    .member-coupon-modal.open {
      display: flex;
    }

    .member-coupon-dialog {
      width: min(640px, 100%);
      max-height: min(88vh, 820px);
      overflow: auto;
      padding: 18px 20px 20px;
      border: 1px solid var(--line);
      border-radius: 18px;
      background:
        radial-gradient(circle at 90% 0%, rgba(141, 85, 255, .28), transparent 12rem),
        rgba(31, 22, 79, .96);
      box-shadow: 0 24px 60px rgba(0,0,0,.45);
    }

    .member-coupon-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
      margin-bottom: 14px;
    }

    .member-coupon-head h3 {
      margin: 0;
      font-size: 20px;
    }

    .member-coupon-head p {
      margin: 4px 0 0;
      color: #bfb2ec;
      font-size: 13px;
      font-weight: 700;
    }

    .member-coupon-close {
      width: 40px;
      height: 40px;
      border: 0;
      border-radius: 12px;
      background: rgba(255,255,255,.08);
      color: #fff;
      font-size: 22px;
      cursor: pointer;
    }

    .coupon-detail-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      margin-bottom: 14px;
    }

    .coupon-detail-box {
      padding: 12px;
      border-radius: 12px;
      background: rgba(255,255,255,.06);
      display: grid;
      gap: 4px;
    }

    .coupon-detail-box span {
      font-size: 11px;
      font-weight: 800;
      color: #bfb2ec;
      text-transform: uppercase;
    }

    .coupon-detail-box strong {
      font-size: 16px;
    }

    .coupon-legs-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 12px;
    }

    .coupon-legs-table th,
    .coupon-legs-table td {
      padding: 8px 6px;
      text-align: left;
      border-bottom: 1px solid rgba(255,255,255,.08);
    }

    .coupon-legs-table th {
      color: #bfb2ec;
      font-weight: 850;
    }

    .member-coupon-foot {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 16px;
      padding-top: 14px;
      border-top: 1px solid rgba(255,255,255,.08);
    }

    .member-coupon-foot .coupon-cashout-btn {
      height: 44px;
      padding: 0 18px;
      font-size: 14px;
    }

    .coupon-state {
      padding: 7px 10px;
      border-radius: 999px;
      background: rgba(55, 243, 106, .12);
      color: #37f36a;
      font-size: 12px;
      font-weight: 900;
      white-space: normal;
      text-align: center;
      max-width: 100%;
      overflow-wrap: anywhere;
    }

    .dashboard-wide {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
    }

    .progress-wrap {
      display: grid;
      gap: 12px;
    }

    .progress-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      color: #efeaff;
      font-weight: 850;
    }

    .progress-bar {
      height: 12px;
      overflow: hidden;
      border-radius: 999px;
      background: rgba(255,255,255,.1);
    }

    .progress-bar i {
      display: block;
      height: 100%;
      width: 0%;
      border-radius: inherit;
      background: linear-gradient(90deg, #37f36a, #a260ff);
      transition: width .25s ease;
    }

    .dash-tab-panel { min-width: 0; overflow-x: hidden; }
    .dash-tab-panel.hidden { display: none; }

    .dashboard-panel h3 svg {
      width: 20px;
      height: 20px;
      flex-shrink: 0;
    }

    .activity-row {
      grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .activity-row > div:nth-child(2),
    .coupon-line > div:first-child {
      min-width: 0;
    }

    .progress-top {
      flex-wrap: wrap;
      gap: 8px;
    }

    .member-bonus-card__head {
      flex-wrap: wrap;
    }

    .member-bonus-card,
    .member-bonus-list,
    .coupon-list,
    .coupon-list--full,
    .payment-history,
    .sms-verify-panel-content,
    .member-messages-panel,
    .member-message-form,
    .member-message-list,
    .member-msg-categories {
      max-width: 100%;
      min-width: 0;
    }

    .member-payment-form {
      display: grid;
      gap: 12px;
      max-width: 360px;
      margin-bottom: 18px;
    }

    .member-payment-form label {
      display: grid;
      gap: 6px;
      font-size: 13px;
      font-weight: 700;
      color: var(--muted);
    }

    .member-payment-form input {
      min-height: 46px;
      padding: 0 14px;
      border-radius: 12px;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.06);
      color: #fff;
      font: inherit;
    }

    .payment-history {
      display: grid;
      gap: 10px;
    }

    .payment-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 14px;
      border-radius: 12px;
      border: 1px solid var(--line-soft);
      background: rgba(255,255,255,.04);
    }

    .payment-row strong { font-size: 15px; }
    .payment-row span { color: var(--muted); font-size: 12px; }

    .dash-empty {
      margin: 0;
      padding: 12px 0;
      color: #bfb2ec;
      font-size: 13px;
      font-weight: 700;
    }

    .wallet-split {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-bottom: 14px;
    }

    .wallet-split > div {
      padding: 10px 12px;
      border-radius: 12px;
      background: rgba(255,255,255,.06);
      display: grid;
      gap: 4px;
    }

    .wallet-split span {
      font-size: 11px;
      font-weight: 800;
      color: #bfb2ec;
      text-transform: uppercase;
    }

    .wallet-split strong {
      font-size: 16px;
    }

    .stats-mini-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 10px;
    }

    .stats-mini {
      padding: 12px;
      border-radius: 12px;
      background: rgba(255,255,255,.06);
      display: grid;
      gap: 4px;
    }

    .stats-mini span {
      font-size: 11px;
      font-weight: 800;
      color: #bfb2ec;
      text-transform: uppercase;
    }

    .stats-mini strong {
      font-size: 18px;
    }

    .dashboard-panel--full {
      min-height: auto;
    }

    .coupon-list--full {
      max-height: 420px;
      overflow-y: auto;
    }

    .sms-verify-status {
      display: grid; gap: 10px; margin-bottom: 16px;
    }
    .sms-verify-badge {
      display: inline-flex; align-items: center; gap: 8px;
      padding: 8px 12px; border-radius: 10px; font-size: 13px; font-weight: 700;
      width: fit-content;
    }
    .sms-verify-badge.ok { background: rgba(0, 231, 1, .12); color: #00e701; border: 1px solid rgba(0, 231, 1, .25); }
    .sms-verify-badge.warn { background: rgba(255, 180, 0, .12); color: #ffb400; border: 1px solid rgba(255, 180, 0, .25); }
    .sms-verify-badge.off { background: rgba(255,255,255,.06); color: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.1); }
    .sms-verify-form { display: grid; gap: 12px; max-width: 360px; }
    .sms-verify-form label {
      display: grid;
      gap: 6px;
      font-size: 13px;
      font-weight: 700;
      color: var(--muted);
    }
    .sms-verify-form input {
      min-height: 46px;
      padding: 0 14px;
      border-radius: 12px;
      border: 1px solid rgba(154, 104, 255, .35);
      background: rgba(12, 8, 36, .55);
      color: #fff;
      font: inherit;
      font-size: 18px;
      font-weight: 800;
      letter-spacing: 0.2em;
      text-align: center;
      caret-color: #b794ff;
    }
    .sms-verify-form input:focus {
      outline: none;
      border-color: rgba(141, 85, 255, .75);
      box-shadow: 0 0 0 3px rgba(141, 85, 255, .18);
      background: rgba(18, 12, 52, .75);
    }
    .sms-verify-form input::placeholder {
      color: #8a7ab8;
      letter-spacing: normal;
      font-weight: 600;
      font-size: 14px;
    }
    .sms-verify-form button { min-height: 44px; }
    .sms-verify-actions { display: flex; flex-wrap: wrap; gap: 10px; }
    .sms-send-notice {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 12px 14px;
      border-radius: 12px;
      border: 1px solid rgba(0, 231, 1, .28);
      background: rgba(0, 231, 1, .08);
    }
    .sms-send-notice.hidden { display: none !important; }
    .sms-send-notice__dot {
      width: 10px;
      height: 10px;
      margin-top: 4px;
      border-radius: 50%;
      background: #00e701;
      box-shadow: 0 0 10px rgba(0, 231, 1, .45);
      flex-shrink: 0;
    }
    .sms-send-notice__body {
      display: grid;
      gap: 4px;
      min-width: 0;
    }
    .sms-send-notice__body strong {
      font-size: 13px;
      font-weight: 900;
      color: #00e701;
    }
    #dashSmsCountdown {
      font-size: 12px;
      font-weight: 800;
      color: #bfb2ec;
    }
    .member-bonus-list {
      display: grid;
      gap: 12px;
      max-height: 480px;
      overflow-y: auto;
    }

    .member-bonus-card {
      padding: 14px;
      border-radius: 14px;
      border: 1px solid rgba(154, 104, 255, .28);
      background: rgba(12, 8, 36, .45);
      display: grid;
      gap: 10px;
    }

    .member-bonus-card__head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 10px;
    }

    .member-bonus-card__head strong {
      font-size: 15px;
      line-height: 1.25;
    }

    .member-bonus-badge {
      padding: 5px 10px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 900;
      background: rgba(55, 243, 106, .14);
      color: #37f36a;
      white-space: nowrap;
    }

    .member-bonus-badge.done {
      background: rgba(141, 85, 255, .2);
      color: #d5c4ff;
    }

    .member-bonus-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 8px 14px;
      font-size: 12px;
      font-weight: 800;
      color: #bfb2ec;
    }

    .member-bonus-meta b {
      color: #fff;
    }



@media (max-width: 960px) {
      .dashboard-grid,
      .dashboard-wide {
        grid-template-columns: minmax(0, 1fr);
      }
    }

@media (max-width: 768px) {
      .dashboard {
        align-items: flex-end;
        padding: 0;
      }
      .dashboard-dialog {
        width: 100%;
        max-height: min(92vh, 100dvh);
        padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px));
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 20px 20px 0 0;
      }
      .dashboard-title h2 { font-size: 20px; }
      .dashboard-tabs button {
        height: 34px;
        padding: 0 11px;
        font-size: 12px;
      }
      .dashboard-panel { padding: 14px; min-height: 0; }
      .dashboard-panel h3 { font-size: 16px; margin-bottom: 12px; }
      .balance-total strong { font-size: 28px; }
      .coupon-line { grid-template-columns: minmax(0, 1fr); gap: 8px; }
      .coupon-line-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
      .payment-row { flex-direction: column; align-items: flex-start; gap: 6px; }
      .risk-row { flex-direction: column; align-items: flex-start; gap: 4px; }
      .member-payment-form,
      .sms-verify-form,
      .member-message-form { max-width: none; width: 100%; }
      .stats-mini-grid { grid-template-columns: minmax(0, 1fr); }
    }


.member-messages-panel {
  min-width: 0;
  overflow-x: hidden;
}

.member-messages-panel .member-msg-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
  max-width: 100%;
}

.member-msg-categories button {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: inherit;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  flex: 0 0 auto;
  max-width: 100%;
  box-sizing: border-box;
  line-height: 1.25;
}

.member-msg-categories button.active {
  background: rgba(255,193,7,.18);
  border-color: rgba(255,193,7,.45);
  color: #ffd54f;
}

.member-message-form {
  display: grid;
  gap: 12px;
  max-width: 100%;
  margin-bottom: 16px;
  box-sizing: border-box;
}

.member-message-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  min-width: 0;
}

.member-message-form textarea {
  width: 100%;
  min-height: 110px;
  margin-top: 0;
  border-radius: 12px;
  border: 1px solid rgba(154, 104, 255, .35);
  background: rgba(12, 8, 36, .55);
  color: #fff;
  padding: 12px 14px;
  resize: vertical;
  font: inherit;
  font-size: 16px;
  line-height: 1.45;
  box-sizing: border-box;
  max-width: 100%;
}

.member-message-form textarea:focus {
  outline: none;
  border-color: rgba(141, 85, 255, .75);
  box-shadow: 0 0 0 3px rgba(141, 85, 255, .18);
  background: rgba(18, 12, 52, .75);
}

.member-message-form .deposit {
  margin-top: 4px;
  min-height: 44px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
}

.member-msg-form-note.is-ok { color: #7dcea0; }
.member-msg-form-note.is-err { color: #f1948a; }

.member-message-history {
  margin-top: 8px;
  min-width: 0;
}

.member-message-history h4 {
  margin: 0 0 10px;
  font-size: 14px;
  opacity: .85;
}

.member-message-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.member-msg-item {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255,255,255,.03);
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.member-msg-item.is-new { border-color: rgba(125,206,160,.45); }

.member-msg-item header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
}

.member-msg-item header strong {
  font-size: 13px;
  flex: 1 1 100%;
}

.member-msg-item header time {
  margin-left: 0;
  opacity: .65;
  font-size: 11px;
}

.member-msg-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  white-space: nowrap;
}

.member-msg-badge.ok { background: rgba(125,206,160,.2); color: #7dcea0; }
.member-msg-badge.wait { background: rgba(255,193,7,.15); color: #ffd54f; }
.member-msg-badge.progress { background: rgba(100,181,246,.18); color: #64b5f6; }
.member-msg-badge.muted { background: rgba(255,255,255,.08); opacity: .75; }

.member-msg-body {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.45;
  font-size: 14px;
}

.member-msg-reply {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255,255,255,.12);
}

.member-msg-reply p { margin: 6px 0; white-space: pre-wrap; }
.member-msg-reply small { opacity: .65; }

@media (max-width: 768px) {
  .member-messages-panel .member-msg-categories {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
  }

  .member-msg-categories button {
    width: 100%;
    border-radius: 12px;
    padding: 10px 8px;
    font-size: 12px;
    white-space: normal;
    text-align: center;
    min-height: 44px;
  }

  .member-message-form,
  .member-message-history,
  .member-message-list {
    width: 100%;
  }

  .member-msg-item header strong {
    flex-basis: auto;
  }

  .member-msg-item header time {
    width: 100%;
  }

  #dashTabMessages.dash-tab-panel {
    padding-bottom: 4px;
  }
}

@media (max-width: 430px) {
  .member-msg-categories button {
    font-size: 11px;
    padding: 9px 6px;
  }
}

.member-msg-wait-note { color: #ffb74d; margin: 0 0 12px; }
.member-message-form.is-disabled textarea {
  opacity: .55;
  cursor: not-allowed;
}
.member-message-form.is-disabled .deposit {
  opacity: .45;
  cursor: not-allowed;
}
.member-msg-categories button.is-waiting {
  opacity: .72;
  border-style: dashed;
}
.member-msg-item.is-waiting {
  border-color: rgba(255,193,7,.28);
}


/* —— Mesaj thread (inbox + görüşme) —— */
.member-msg-head { margin-bottom: 4px; }
.member-msg-head h3 { margin-bottom: 6px; }

.member-msg-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 14px;
  min-height: 420px;
  max-height: min(68vh, 640px);
  margin-top: 12px;
  min-width: 0;
}

.member-msg-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.02);
  overflow: hidden;
}

.member-msg-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 13px;
}

.member-msg-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255,193,7,.15);
  color: #ffd54f;
  font-size: 11px;
  font-weight: 800;
}

.member-msg-thread-list {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  min-height: 0;
}

.member-msg-list-empty {
  padding: 16px 8px;
  text-align: center;
  font-size: 13px;
}

.member-msg-thread-item {
  display: grid;
  gap: 4px;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  padding: 10px 11px;
  background: rgba(255,255,255,.03);
  color: inherit;
  cursor: pointer;
  font: inherit;
  box-sizing: border-box;
  transition: border-color .15s, background .15s;
}

.member-msg-thread-item:hover {
  border-color: rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
}

.member-msg-thread-item.is-active {
  border-color: rgba(255,193,7,.45);
  background: rgba(255,193,7,.08);
}

.member-msg-thread-item.is-unread {
  border-color: rgba(125,206,160,.35);
}

.member-msg-thread-item.is-unread .member-msg-thread-preview {
  font-weight: 700;
}

.member-msg-thread-item.is-waiting {
  border-style: dashed;
  border-color: rgba(255,193,7,.22);
}

.member-msg-thread-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
}

.member-msg-thread-cat {
  font-weight: 800;
  font-size: 12px;
  color: #ffd54f;
}

.member-msg-thread-item-top time {
  opacity: .6;
  white-space: nowrap;
}

.member-msg-thread-preview {
  font-size: 13px;
  line-height: 1.35;
  opacity: .88;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.member-msg-thread-item-foot {
  display: flex;
  align-items: center;
  gap: 6px;
}

.member-msg-new-btn {
  margin: 8px;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
}

.member-msg-thread-view {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.02);
  overflow: hidden;
}

.member-msg-thread-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 20px;
  text-align: center;
  min-height: 280px;
}

.member-msg-empty-icon {
  font-size: 36px;
  opacity: .75;
  line-height: 1;
}

.member-msg-thread-detail {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.member-msg-thread-detail-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}

.member-msg-back-btn {
  display: none;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: inherit;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

.member-msg-thread-detail-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.member-msg-thread-detail-title strong {
  font-size: 15px;
}

.member-msg-thread-detail-title span {
  font-size: 12px;
  opacity: .75;
}

.member-msg-conversation {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.member-msg-bubble {
  max-width: min(92%, 520px);
  border-radius: 14px;
  padding: 10px 12px;
  line-height: 1.45;
}

.member-msg-bubble--out {
  align-self: flex-end;
  background: rgba(141, 85, 255, .22);
  border: 1px solid rgba(141, 85, 255, .35);
  border-bottom-right-radius: 4px;
}

.member-msg-bubble--in {
  align-self: flex-start;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-bottom-left-radius: 4px;
}

.member-msg-bubble-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 11px;
  opacity: .75;
}

.member-msg-bubble-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
}

.member-msg-status-banner {
  align-self: center;
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 12px;
  text-align: center;
  background: rgba(255,193,7,.12);
  border: 1px dashed rgba(255,193,7,.35);
  color: #ffd54f;
}

.member-msg-status-banner.progress {
  background: rgba(100,181,246,.12);
  border-color: rgba(100,181,246,.35);
  color: #64b5f6;
}

.member-msg-compose-wrap {
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 12px 14px 14px;
  background: rgba(0,0,0,.12);
}

.member-msg-compose {
  margin-bottom: 0;
}

.member-msg-compose-cat select {
  width: 100%;
  margin-top: 4px;
  border-radius: 10px;
  border: 1px solid rgba(154, 104, 255, .35);
  background: rgba(12, 8, 36, .55);
  color: #fff;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .member-msg-layout {
    grid-template-columns: 1fr;
    max-height: none;
    min-height: 0;
  }

  .member-msg-layout.has-detail .member-msg-sidebar {
    display: none;
  }

  .member-msg-layout.has-detail .member-msg-thread-view {
    min-height: 420px;
  }

  .member-msg-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .member-messages-panel .member-msg-categories {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .member-messages-panel .member-msg-categories::-webkit-scrollbar {
    display: none;
  }

  .member-msg-categories button {
    flex: 0 0 auto;
    width: auto;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    white-space: nowrap;
    min-height: 36px;
  }
}


.member-msg-reply-btn {
  flex-shrink: 0;
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.member-msg-reply-note {
  color: #7dcea0;
  margin: 0 0 8px;
}

.member-msg-compose-wrap.is-reply {
  background: rgba(125, 206, 160, .06);
}

@media (max-width: 768px) {
  .member-msg-thread-detail-head {
    flex-wrap: wrap;
    align-items: center;
  }

  .member-msg-thread-detail-title {
    flex: 1 1 auto;
    min-width: 0;
  }

  .member-msg-reply-btn {
    margin-left: auto;
    min-height: 36px;
  }

  .member-msg-compose-wrap {
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .member-msg-thread-detail {
    min-height: 420px;
    max-height: min(72vh, 680px);
  }
}


.member-msg-pending-banner {
  margin: 0;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  color: #ffb74d;
  background: rgba(255, 183, 77, .1);
  border-bottom: 1px solid rgba(255, 183, 77, .22);
}

/* ── Para yatır / çek — modern koyu tema ── */
#memberDashboard #dashTabDeposit .dashboard-panel,
#memberDashboard #dashTabWithdrawals .dashboard-panel {
  background:
    radial-gradient(circle at 100% 0%, rgba(141, 85, 255, .22), transparent 18rem),
    linear-gradient(160deg, rgba(28, 18, 72, .94), rgba(14, 9, 42, .96));
}

#memberDashboard .member-payment-form {
  display: grid;
  gap: 14px;
  max-width: min(480px, 100%);
  margin-bottom: 20px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(141, 85, 255, .34);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02)),
    rgba(8, 5, 28, .55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
}

#memberDashboard .member-payment-form label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #c9bdf1;
}

#memberDashboard .member-payment-form input,
#memberDashboard .member-payment-form select,
#memberDashboard .payment-extra-fields input,
#memberDashboard .payment-extra-fields select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(154, 104, 255, .38);
  background: rgba(8, 5, 28, .72);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

#memberDashboard .member-payment-form label:has(select),
#memberDashboard .payment-extra-fields label:has(select) {
  position: relative;
}

#memberDashboard .member-payment-form label:has(select)::after,
#memberDashboard .payment-extra-fields label:has(select)::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 20px;
  width: 8px;
  height: 8px;
  border-right: 2px solid #b89cff;
  border-bottom: 2px solid #b89cff;
  transform: rotate(45deg) translateY(-2px);
  pointer-events: none;
}

#memberDashboard .member-payment-form select,
#memberDashboard .payment-extra-fields select {
  padding-right: 40px;
  cursor: pointer;
}

#memberDashboard .member-payment-form input::placeholder,
#memberDashboard .payment-extra-fields input::placeholder {
  color: rgba(201, 189, 241, .55);
  font-weight: 500;
}

#memberDashboard .member-payment-form input:focus,
#memberDashboard .member-payment-form select:focus,
#memberDashboard .payment-extra-fields input:focus,
#memberDashboard .payment-extra-fields select:focus {
  outline: none;
  border-color: rgba(141, 85, 255, .75);
  background: rgba(12, 8, 36, .88);
  box-shadow: 0 0 0 3px rgba(141, 85, 255, .22);
}

#memberDashboard .member-payment-form input[type="number"] {
  font-variant-numeric: tabular-nums;
}

#memberDashboard .member-payment-form button[type="submit"] {
  min-height: 48px;
  margin-top: 4px;
  border: 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

#memberDashboard .member-payment-form button[type="submit"].deposit {
  background: linear-gradient(135deg, #8d55ff, #a260ff);
  color: #fff;
  box-shadow: 0 10px 24px rgba(141, 85, 255, .32);
}

#memberDashboard .member-payment-form button[type="submit"].withdraw {
  background: linear-gradient(135deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .08));
  color: #ece4ff;
  border: 1px solid rgba(255, 255, 255, .16);
}

#memberDashboard .member-payment-form button[type="submit"]:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

#memberDashboard .member-payment-form button[type="submit"]:active {
  transform: translateY(0);
}

#memberDashboard .payment-manual-info {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(141, 85, 255, .32);
  border-left: 3px solid #8d55ff;
  background: linear-gradient(135deg, rgba(141, 85, 255, .14), rgba(8, 5, 28, .45));
  font-size: 13px;
  line-height: 1.55;
  color: #e8e0ff;
}

#memberDashboard .payment-manual-info p {
  margin: 0 0 8px;
}

#memberDashboard .payment-manual-info p:last-child {
  margin-bottom: 0;
}

#memberDashboard .payment-manual-info strong {
  color: #fff;
  font-weight: 800;
}

#memberDashboard .payment-extra-fields {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  border: 1px dashed rgba(141, 85, 255, .28);
  background: rgba(0, 0, 0, .18);
}

#memberDashboard .payment-extra-fields label {
  display: grid;
  gap: 7px;
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #c9bdf1;
}

#memberDashboard .payment-extra-fields:empty {
  display: none;
  padding: 0;
  border: 0;
  background: none;
}

#memberDashboard .payment-history {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

#memberDashboard .payment-history::before {
  content: "İşlem geçmişi";
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(201, 189, 241, .72);
}

#memberDashboard .payment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(135deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .025));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

#memberDashboard .payment-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

#memberDashboard .payment-row strong {
  font-size: 16px;
  color: #fff;
}

#memberDashboard .payment-row span {
  color: #bfb2ec;
  font-size: 12px;
  font-weight: 600;
}

#memberDashboard .payment-row .tiny-note {
  margin: 0;
  font-size: 11px;
  color: rgba(201, 189, 241, .65);
  font-weight: 600;
}

#memberDashboard .payment-row .coupon-state {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
  background: rgba(255, 255, 255, .08);
  color: #e6dcff;
  border: 1px solid rgba(255, 255, 255, .1);
}

#memberDashboard .dash-perm-note {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 180, 0, .28);
  background: rgba(255, 180, 0, .1);
  color: #ffd27a;
  font-size: 13px;
  font-weight: 700;
}

#memberDashboard .member-payment-form select option,
#memberDashboard .payment-extra-fields select option {
  background: #1a1248;
  color: #fff;
}

@media (max-width: 640px) {
  #memberDashboard .member-payment-form {
    padding: 14px;
  }

  #memberDashboard .payment-row {
    flex-direction: column;
    align-items: flex-start;
  }

  #memberDashboard .payment-row .coupon-state {
    align-self: flex-start;
  }
}

#memberDashboard .payment-status--ok {
  background: rgba(55, 243, 106, .14);
  color: #5cff8a;
  border-color: rgba(55, 243, 106, .28);
}
#memberDashboard .payment-status--bad {
  background: rgba(255, 107, 107, .14);
  color: #ff8a8a;
  border-color: rgba(255, 107, 107, .28);
}
#memberDashboard .payment-status--proc {
  background: rgba(100, 181, 246, .14);
  color: #82c4ff;
  border-color: rgba(100, 181, 246, .28);
}
#memberDashboard .payment-status--pending {
  background: rgba(255, 204, 109, .14);
  color: #ffd27a;
  border-color: rgba(255, 204, 109, .28);
}

#memberDashboard .dash-history-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  flex-wrap: wrap;
}

#memberDashboard .dash-history-tabs button {
  border: 1px solid rgba(152, 104, 255, .28);
  background: rgba(255, 255, 255, .04);
  color: #d8cff9;
  border-radius: 10px;
  padding: 10px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

#memberDashboard .dash-history-tabs button.active {
  background: linear-gradient(135deg, #8d55ff, #5b2fd4);
  border-color: transparent;
  color: #fff;
}

#memberDashboard .casino-history-table-wrap {
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(152, 104, 255, .22);
}

#memberDashboard .casino-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

#memberDashboard .casino-history-table th,
#memberDashboard .casino-history-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  white-space: nowrap;
}

#memberDashboard .casino-history-table th {
  color: #b9aee8;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

#memberDashboard .casino-history-table td.is-win {
  color: #7dffb0;
  font-weight: 800;
}

#memberDashboard .casino-history-table td.is-loss {
  color: #ff8f9d;
  font-weight: 800;
}

#memberDashboard .casino-status {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

#memberDashboard .casino-status--win {
  background: rgba(34, 223, 79, .14);
  color: #7dffb0;
}

#memberDashboard .casino-status--loss {
  background: rgba(255, 107, 129, .14);
  color: #ff9aaa;
}

#memberDashboard .casino-status--pending {
  background: rgba(255, 204, 109, .14);
  color: #ffd27a;
}
