/* ═══════════════════════════════════════════════════════
   SMM TELEGRAM — AUTH MODAL + USER MENU + PROFILE
   ═══════════════════════════════════════════════════════ */

/* ── MODAL OVERLAY ── */
.smm-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(4, 9, 26, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.smm-modal-overlay.open {
  opacity: 1; pointer-events: all;
}

/* ── MODAL BOX ── */
.smm-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2.4rem 2.2rem 2rem;
  width: 100%; max-width: 480px;
  position: relative;
  transform: translateY(24px) scale(.97);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 40px 100px rgba(0,0,0,.55), 0 0 0 1px rgba(0,212,255,.06);
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
/* Prevent body scroll when modal open */
body.smm-modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}
.smm-modal-overlay.open .smm-modal {
  transform: translateY(0) scale(1);
}

/* ── CLOSE ── */
.smm-modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: var(--bg-glass); border: 1px solid var(--border);
  color: var(--text-muted); border-radius: 50%;
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s; font-size: .9rem;
}
.smm-modal-close:hover { background: rgba(255,255,255,.08); color: white; }

/* ── BRAND ── */
.smm-modal-brand {
  font-family: var(--heading); font-size: 1.5rem; font-weight: 800;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 1.4rem; text-align: center;
}
.smm-modal-brand span { -webkit-text-fill-color: white; }

/* ── TABS ── */
.smm-auth-tabs {
  display: flex; background: rgba(255,255,255,.04);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 4px; gap: 4px; margin-bottom: 1.6rem;
}
.smm-auth-tab {
  flex: 1; background: transparent; border: none; color: var(--text-muted);
  border-radius: 10px; padding: .55rem; font-weight: 600; font-size: .875rem;
  cursor: pointer; transition: all .25s;
}
.smm-auth-tab.active {
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: white; box-shadow: 0 4px 16px rgba(0,94,255,.35);
}

/* ── PANES ── */
.smm-auth-pane { display: none; }
.smm-auth-pane.active { display: block; }

.smm-auth-sub {
  color: var(--text-muted); font-size: .875rem; margin-bottom: 1.4rem; text-align: center;
}

/* ── FIELDS ── */
.smm-field { margin-bottom: 1rem; }
.smm-field label {
  display: block; font-size: .8rem; font-weight: 600; color: var(--text-muted);
  margin-bottom: .4rem; letter-spacing: .02em;
}
.smm-field label i { margin-right: .3rem; }
.smm-field input[type="text"],
.smm-field input[type="email"],
.smm-field input[type="password"],
.smm-field input[type="tel"],
.smm-field input[type="url"],
.smm-field textarea,
.smm-field select {
  width: 100%; background: rgba(255,255,255,.04);
  border: 1px solid var(--border); border-radius: 12px;
  color: white; padding: .7rem 1rem; font-size: .9rem;
  font-family: var(--body); transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.smm-field input:focus,
.smm-field textarea:focus,
.smm-field select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,212,255,.12);
}
.smm-field input::placeholder { color: var(--text-muted); opacity: .7; }

.smm-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
@media (max-width: 480px) { .smm-field-row { grid-template-columns: 1fr; } }

/* ── PASSWORD EYE ── */
.smm-pass-wrap { position: relative; }
.smm-pass-wrap input { padding-right: 2.8rem; }
.smm-eye {
  position: absolute; right: .8rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-size: .95rem; transition: color .2s; padding: 0;
}
.smm-eye:hover { color: var(--accent); }

/* ── PASSWORD STRENGTH ── */
.smm-strength-wrap {
  height: 4px; background: rgba(255,255,255,.07); border-radius: 99px;
  margin-top: .5rem; overflow: hidden;
}
.smm-strength-bar {
  height: 100%; width: 0; border-radius: 99px;
  transition: width .4s, background .4s;
}
.smm-strength-label {
  font-size: .72rem; font-weight: 600; margin-top: .3rem; display: block;
}

/* ── CHECKBOX ── */
.smm-check-label {
  display: flex; align-items: center; gap: .5rem;
  font-size: .82rem; color: var(--text-muted); cursor: pointer;
}
.smm-check-label input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer;
}
.smm-forgot { font-size: .82rem; color: var(--accent); text-decoration: none; font-weight: 600; }
.smm-forgot:hover { text-decoration: underline; }

/* ── ALERT ── */
.smm-alert {
  border-radius: 10px; padding: .65rem 1rem; font-size: .84rem;
  font-weight: 600; margin-bottom: .9rem; display: none;
}
.smm-alert.error { display: block; background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.3); color: #fca5a5; }
.smm-alert.success { display: block; background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.3); color: #6ee7b7; }

/* ── SUBMIT BUTTON ── */
.smm-btn-submit {
  width: 100%; padding: .8rem;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  border: none; border-radius: 12px; color: white;
  font-family: var(--heading); font-weight: 700; font-size: .95rem;
  cursor: pointer; transition: all .25s;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  box-shadow: 0 6px 24px rgba(0,94,255,.35);
}
.smm-btn-submit:hover { transform: translateY(-1px); box-shadow: 0 10px 32px rgba(0,212,255,.45); }
.smm-btn-submit:disabled { opacity: .6; cursor: default; transform: none; }

@keyframes spin { to { transform: rotate(360deg); } }
.spin { display: inline-block; animation: spin .7s linear infinite; }

/* ── DIVIDER ── */
.smm-auth-divider {
  display: flex; align-items: center; gap: .8rem;
  color: var(--text-muted); font-size: .78rem; margin: 1.2rem 0;
}
.smm-auth-divider::before,
.smm-auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── SOCIAL BUTTONS ── */
.smm-social-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.smm-social-btn {
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  color: var(--text-muted); border-radius: 10px; padding: .6rem;
  font-size: .84rem; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  transition: all .2s;
}
.smm-social-btn:hover:not(:disabled) { background: rgba(255,255,255,.08); color: white; border-color: rgba(255,255,255,.15); }
.smm-social-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── SUCCESS STATE ── */
.smm-success-icon {
  text-align: center; font-size: 3.5rem; color: var(--green);
  margin: .5rem 0 1rem; animation: popIn .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes popIn { from { transform: scale(0) rotate(-15deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
.smm-success-title { text-align: center; font-family: var(--heading); font-size: 1.6rem; margin-bottom: .5rem; }
.smm-success-sub { text-align: center; color: var(--text-muted); font-size: .9rem; }

/* ════════════════════════════════════════
   USER MENU / DROPDOWN
   ════════════════════════════════════════ */
.smm-user-menu { position: relative; }
.smm-avatar-btn {
  display: flex; align-items: center; gap: .55rem;
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  border-radius: 40px; padding: .3rem .8rem .3rem .3rem;
  cursor: pointer; transition: all .2s;
}
.smm-avatar-btn:hover { background: rgba(255,255,255,.09); border-color: rgba(0,212,255,.25); }
.smm-user-name { font-size: .85rem; font-weight: 600; color: white; }

.smm-dropdown {
  position: absolute; top: calc(100% + .6rem); right: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 18px; min-width: 230px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
  opacity: 0; pointer-events: none; transform: translateY(-8px);
  transition: all .25s cubic-bezier(.4,0,.2,1); z-index: 500;
}
.smm-dropdown.open { opacity: 1; pointer-events: all; transform: translateY(0); }

.smm-dropdown-header {
  padding: 1rem 1.1rem .8rem; border-bottom: 1px solid var(--border);
}
.smm-drop-name { font-weight: 700; font-size: .9rem; color: white; }
.smm-drop-email { font-size: .75rem; color: var(--text-muted); margin-top: .15rem; }

.smm-drop-item {
  display: flex; align-items: center; gap: .6rem;
  padding: .7rem 1.1rem; font-size: .85rem; font-weight: 500;
  color: var(--text-muted); text-decoration: none;
  transition: all .18s; cursor: pointer;
}
.smm-drop-item i { font-size: 1rem; width: 20px; }
.smm-drop-item:hover { background: rgba(255,255,255,.05); color: white; }
.smm-drop-divider { height: 1px; background: var(--border); margin: .3rem 0; }
.smm-drop-logout:hover { color: #fca5a5; background: rgba(239,68,68,.07); }

/* ════════════════════════════════════════
   PROFILE PAGE
   ════════════════════════════════════════ */
.profile-hero {
  background: linear-gradient(135deg, rgba(0,94,255,.15), rgba(0,212,255,.08));
  border-bottom: 1px solid var(--border);
  padding: 3rem 0 0;
}
.profile-cover {
  position: relative; height: 180px; border-radius: 20px 20px 0 0;
  background: linear-gradient(135deg, rgba(0,94,255,.4), rgba(124,58,237,.3), rgba(0,212,255,.25));
  overflow: hidden; margin-bottom: 0;
}
.profile-cover-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.profile-avatar-wrap {
  position: absolute; bottom: -48px; left: 2rem;
  display: flex; align-items: flex-end; gap: 1rem;
}
.profile-avatar {
  width: 96px; height: 96px; border-radius: 50%;
  border: 4px solid var(--bg-card); object-fit: cover;
}
.profile-avatar-fallback {
  width: 96px; height: 96px; border-radius: 50%;
  border: 4px solid var(--bg-card);
  background: linear-gradient(135deg, #005eff, #00d4ff);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--heading); font-size: 2rem; font-weight: 800; color: white;
}
.profile-meta { padding: 3.5rem 0 1.5rem 2rem; }
.profile-name { font-family: var(--heading); font-size: 1.6rem; font-weight: 800; margin-bottom: .2rem; }
.profile-role { color: var(--accent); font-size: .85rem; font-weight: 600; }
.profile-stats { display: flex; gap: 2rem; margin-top: 1rem; flex-wrap: wrap; }
.profile-stat-val { font-family: var(--heading); font-size: 1.4rem; font-weight: 800; color: white; }
.profile-stat-lbl { font-size: .75rem; color: var(--text-muted); }

/* ── PROFILE NAV TABS ── */
.profile-nav {
  display: flex; gap: 0; border-top: 1px solid var(--border);
  padding: 0 2rem; overflow-x: auto; scrollbar-width: none;
}
.profile-nav::-webkit-scrollbar { display: none; }
.profile-nav-item {
  display: flex; align-items: center; gap: .4rem;
  padding: .9rem 1.1rem; font-size: .85rem; font-weight: 600;
  color: var(--text-muted); text-decoration: none; border-bottom: 2px solid transparent;
  white-space: nowrap; transition: all .2s; cursor: pointer; background: none; border-top: none; border-left: none; border-right: none;
}
.profile-nav-item:hover { color: white; }
.profile-nav-item.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── PROFILE CONTENT ── */
.profile-section { padding: 2rem 0; display: none; }
.profile-section.active { display: block; }

.profile-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 20px; padding: 1.8rem; margin-bottom: 1.5rem;
}
.profile-card-title {
  font-family: var(--heading); font-size: 1.05rem; font-weight: 700;
  margin-bottom: 1.2rem; display: flex; align-items: center; gap: .5rem;
}
.profile-card-title i { color: var(--accent); }

/* ── STATS CARDS ── */
.profile-stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.psc {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; padding: 1.3rem 1.2rem;
  display: flex; flex-direction: column; gap: .3rem;
}
.psc-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; margin-bottom: .4rem; }
.psc-val { font-family: var(--heading); font-size: 1.5rem; font-weight: 800; }
.psc-lbl { font-size: .75rem; color: var(--text-muted); }

/* ── WALLET CARD ── */
.wallet-balance {
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  border-radius: 20px; padding: 2rem; color: white; position: relative; overflow: hidden;
  margin-bottom: 1.2rem;
}
.wallet-balance::before {
  content: ''; position: absolute;
  width: 250px; height: 250px; border-radius: 50%;
  background: rgba(255,255,255,.06); top: -80px; right: -60px;
}
.wallet-bal-lbl { font-size: .8rem; opacity: .8; margin-bottom: .3rem; }
.wallet-bal-val { font-family: var(--heading); font-size: 2.4rem; font-weight: 800; }
.wallet-add-btn {
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.25);
  color: white; border-radius: 10px; padding: .5rem 1.2rem;
  font-weight: 700; font-size: .85rem; cursor: pointer; transition: all .2s; margin-top: 1rem; display: inline-flex; align-items: center; gap: .4rem;
}
.wallet-add-btn:hover { background: rgba(255,255,255,.28); }

/* ── ORDERS TABLE ── */
.smm-table { width: 100%; border-collapse: collapse; }
.smm-table th {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); padding: .6rem .8rem; text-align: left;
  border-bottom: 1px solid var(--border);
}
.smm-table td {
  padding: .85rem .8rem; font-size: .85rem; border-bottom: 1px solid rgba(255,255,255,.04);
}
.smm-table tr:last-child td { border-bottom: none; }
.smm-table tr:hover td { background: rgba(255,255,255,.02); }
.order-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  border-radius: 100px; padding: .25rem .7rem; font-size: .75rem; font-weight: 700;
}
.badge-done    { background: rgba(16,185,129,.12); color: #6ee7b7; border: 1px solid rgba(16,185,129,.2); }
.badge-pending { background: rgba(251,191,36,.12); color: #fcd34d; border: 1px solid rgba(251,191,36,.2); }
.badge-proc    { background: rgba(0,212,255,.12); color: var(--accent); border: 1px solid rgba(0,212,255,.2); }
.badge-cancel  { background: rgba(239,68,68,.12); color: #fca5a5; border: 1px solid rgba(239,68,68,.2); }

/* ── SETTINGS FORM ── */
.smm-save-btn {
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  border: none; border-radius: 12px; color: white;
  padding: .7rem 1.8rem; font-weight: 700; font-size: .9rem;
  cursor: pointer; transition: all .25s; display: inline-flex; align-items: center; gap: .4rem;
  box-shadow: 0 4px 16px rgba(0,94,255,.3);
}
.smm-save-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,212,255,.4); }

.smm-danger-btn {
  background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.25);
  color: #fca5a5; border-radius: 12px; padding: .7rem 1.5rem;
  font-weight: 700; font-size: .875rem; cursor: pointer; transition: all .2s;
}
.smm-danger-btn:hover { background: rgba(239,68,68,.18); }

/* ── AVATAR UPLOAD ── */
.smm-avatar-upload { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1.5rem; }
.smm-avatar-upload img,
.smm-avatar-upload .smm-av-fallback {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
}
.smm-av-fallback {
  background: linear-gradient(135deg, #005eff, #00d4ff);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--heading); font-size: 1.4rem; font-weight: 800; color: white;
}
.smm-upload-btn {
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  color: var(--text-muted); border-radius: 10px; padding: .5rem 1.1rem;
  font-size: .83rem; font-weight: 600; cursor: pointer; transition: all .2s;
  display: inline-flex; align-items: center; gap: .4rem;
}
.smm-upload-btn:hover { background: rgba(255,255,255,.09); color: white; }

/* ── EMPTY STATE ── */
.smm-empty {
  text-align: center; padding: 3rem 1rem; color: var(--text-muted);
}
.smm-empty i { font-size: 2.5rem; margin-bottom: .8rem; display: block; opacity: .4; }
.smm-empty p { font-size: .9rem; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .smm-modal { padding: 1.8rem 1.4rem 1.5rem; }
  .profile-meta { padding-left: 1rem; }
  .profile-avatar-wrap { left: 1rem; }
  .profile-cover { height: 130px; }
  .profile-stats { gap: 1rem; }
}
