.user-profile-toolbar { display:flex; gap:8px; flex-wrap:wrap; margin:0 0 12px; }
.user-profile-toolbar button { flex:1 1 135px; min-height:42px; }
.user-plus-card, .user-referral-card { margin:0 0 12px; padding:14px; border-radius:14px; background:var(--tg-theme-secondary-bg-color, #202020); }
.user-plus-head, .user-referral-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:10px; }
.user-plus-title, .user-referral-title { font-weight:700; font-size:16px; }
.user-plus-status { font-size:13px; color:var(--tg-theme-hint-color, #999); text-align:right; }
.user-plus-until { margin-top:3px; color:var(--tg-theme-text-color, #fff); font-weight:600; }
.user-plus-meta, .user-referral-meta { margin:0 0 10px; font-size:12px; color:var(--tg-theme-hint-color, #999); }
.user-plus-grants { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:7px; }
.user-plus-grants button { min-height:38px; padding:8px 6px; border-radius:10px; }
.user-plus-custom { display:flex; gap:7px; margin-top:8px; }
.user-plus-custom input { min-width:0; flex:1; box-sizing:border-box; border-radius:10px; padding:9px 10px; background:var(--tg-theme-bg-color, #111); color:var(--tg-theme-text-color, #fff); border:1px solid var(--tg-theme-section-separator-color, #444); }
.user-plus-custom button { flex:0 0 auto; min-height:38px; }
.user-plus-reset { width:100%; min-height:38px; margin-top:10px; border-radius:10px; }
.user-plus-reset:not([disabled]) { color:var(--tg-theme-destructive-text-color, #ff595a); }
.user-referral-head { margin-bottom:12px; }
.user-referral-head .user-plus-status { display:none; }
.user-referral-metrics { display:flex; flex-direction:column; gap:8px; margin-bottom:12px; }
.user-referral-metric { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:40px; box-sizing:border-box; padding:10px 12px; border-radius:10px; background:var(--tg-theme-bg-color, #111); }
.user-referral-metric span { display:block; font-size:13px; line-height:1.35; color:var(--tg-theme-hint-color, #999); }
.user-referral-metric strong { display:block; flex:0 0 auto; margin:0; font-size:18px; line-height:1.2; }
.user-referral-day-scale { margin:2px 0 12px; padding:12px; border-radius:12px; background:var(--tg-theme-bg-color, #111); }
.user-referral-day-scale-title { margin-bottom:10px; font-size:13px; font-weight:700; }
.user-referral-day-steps { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; }
.user-referral-day-step { min-width:0; padding:9px 10px; border:1px solid var(--tg-theme-section-separator-color, #444); border-radius:10px; }
.user-referral-day-step[data-status="earned"] { border-color:var(--tg-theme-button-color, #4f8cff); }
.user-referral-day-step[data-status="next"] { outline:1px solid var(--tg-theme-button-color, #4f8cff); }
.user-referral-day-step-head { display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:13px; font-weight:700; }
.user-referral-day-step-note { margin-top:5px; font-size:11px; line-height:1.35; color:var(--tg-theme-hint-color, #999); }
.user-referral-milestone { padding:9px 0; border-top:1px solid var(--tg-theme-section-separator-color, #444); }
.user-referral-milestone:first-child { border-top:0; }
.user-referral-milestone-line { display:flex; justify-content:space-between; gap:8px; align-items:center; }
.user-referral-milestone button { width:100%; min-height:38px; margin-top:7px; }
.referral-statistics-card { margin-top:12px; }
.referral-stat-grid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:8px; margin-top:10px; }
.referral-stat-grid .metric { min-width:0; display:flex; align-items:center; justify-content:space-between; gap:10px; }
.referral-stat-grid .metric strong { margin-left:auto; }
.referral-leaderboard { margin-top:12px; }
.referral-leader-row { display:flex; justify-content:space-between; gap:12px; padding:8px 0; border-top:1px solid var(--tg-theme-section-separator-color, #444); }
.user-message-composer { margin:0 0 12px; padding:12px; border-radius:14px; background:var(--tg-theme-secondary-bg-color, #202020); }
.user-message-composer textarea { width:100%; min-height:105px; resize:vertical; box-sizing:border-box; margin:0 0 8px; border-radius:10px; padding:10px; background:var(--tg-theme-bg-color, #111); color:var(--tg-theme-text-color, #fff); border:1px solid var(--tg-theme-section-separator-color, #444); }
.user-message-actions { display:flex; gap:8px; }
.user-message-actions button { flex:1; min-height:40px; }
.user-collapsible { margin:10px 0 0; border-top:1px solid var(--tg-theme-section-separator-color, #444); padding-top:8px; }
.user-collapsible > summary { cursor:pointer; list-style:none; font-weight:650; padding:7px 0; }
.user-collapsible > summary::-webkit-details-marker { display:none; }
.user-collapsible > summary::before { content:"›"; display:inline-block; margin-right:8px; transition:transform .15s ease; }
.user-collapsible[open] > summary::before { transform:rotate(90deg); }
.user-profile-disabled[disabled] { opacity:.45; cursor:default; }
@media (max-width:390px) {
  .user-plus-grants { grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width:360px) {
  .user-referral-day-steps { grid-template-columns:1fr; }
}
