/* TelegramVIP — sistema mobile global V4 */
:root {
  --mpro-bg: #07111f;
  --mpro-card: #0f1d2e;
  --mpro-line: rgba(220,236,248,.12);
  --mpro-muted: #93a8ba;
  --mpro-text: #f5f9fc;
  --mpro-blue: #2aabee;
  --mpro-green: #45d69a;
}

html, body { max-width: 100%; overflow-x: hidden; }
body { -webkit-tap-highlight-color: transparent; }
input, select, textarea, button, a { touch-action: manipulation; }
.tvip-mobile-nav { display: none; }

@media (max-width: 768px) {
  body { padding-bottom: calc(86px + env(safe-area-inset-bottom)) !important; }
  .wrap { width: 100% !important; max-width: 100% !important; padding-left: 15px !important; padding-right: 15px !important; }

  .topbar, .modern-header, .public-standard-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 950 !important;
    width: 100% !important;
    min-height: 0 !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
    background: rgba(5,12,23,.9) !important;
    box-shadow: none !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
  }
  .header-wrap, .topbar .wrap, .public-standard-header .wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 62px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 8px 15px !important;
    margin: 0 !important;
  }
  .brand-logo, .brand { width: auto !important; min-width: 0 !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; }
  .brand-logo img, .brand img { display: block !important; width: auto !important; height: 37px !important; max-width: 205px !important; object-fit: contain !important; }
  .modern-nav, .public-standard-nav, .desktop-nav, .nav { display: none !important; }

  input, select, textarea { max-width: 100%; font-size: 16px !important; }
  button, [type="submit"], [role="button"] { min-height: 44px; }
  h1 { letter-spacing: -.045em !important; }

  .tg-grid { grid-template-columns: repeat(2, minmax(0,1fr)) !important; gap: 12px !important; }
  .tg-card { min-width: 0 !important; overflow: hidden !important; border-radius: 18px !important; }
  .tg-thumb { border-radius: 18px 18px 0 0 !important; }
  .tg-body { padding: 12px !important; }
  .tg-title { min-height: 34px; font-size: 14px !important; line-height: 1.22 !important; display: -webkit-box !important; -webkit-line-clamp: 2 !important; -webkit-box-orient: vertical !important; overflow: hidden !important; }
  .tg-desc { display: none !important; }
  .tg-actions { margin-top: 10px !important; }
  .tg-btn, .tg-btn-primary { min-height: 44px !important; border-radius: 13px !important; justify-content: center !important; text-align: center !important; font-weight: 850 !important; }
  .tg-badge, .tg-chip { max-width: calc(100% - 16px); overflow: hidden; border-radius: 999px !important; text-overflow: ellipsis; white-space: nowrap; font-size: 9px !important; }
  .paper, .gv-glass, .gv-card, .tag-card, .admin-new-card, .account-group-card { max-width: 100%; border-radius: 20px !important; }

  .tvip-mobile-nav {
    position: fixed;
    z-index: 99999;
    left: 10px;
    right: 10px;
    bottom: max(8px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, minmax(0,1fr));
    gap: 3px;
    min-height: 68px;
    padding: 6px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(17,31,49,.96), rgba(6,15,27,.97));
    box-shadow: 0 18px 48px rgba(0,0,0,.52), inset 0 1px 0 rgba(255,255,255,.07);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
  }
  .tvip-mobile-nav a {
    position: relative;
    min-width: 0;
    min-height: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 2px;
    border-radius: 16px;
    color: #7f95a8;
    background: transparent;
    text-align: center;
    text-decoration: none !important;
    transition: color .18s ease, background .18s ease, transform .18s ease;
  }
  .tvip-mobile-nav a:active { transform: scale(.95); }
  .tvip-mobile-nav a:hover, .tvip-mobile-nav a:focus-visible, .tvip-mobile-nav a.is-active {
    color: #dff5ff;
    background: rgba(42,171,238,.11);
    outline: none;
  }
  .tvip-mobile-nav a.is-active::after {
    content: "";
    position: absolute;
    bottom: 5px;
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: var(--mpro-blue);
  }
  .tvip-mobile-nav .micon { width: 21px; height: 21px; display: inline-flex; align-items: center; justify-content: center; }
  .tvip-mobile-nav svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .tvip-mobile-nav .mlabel { max-width: 100%; overflow: hidden; font-size: 9px; font-weight: 800; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
  .tvip-mobile-nav .is-center {
    position: relative;
    top: auto;
    min-height: 56px;
    color: #07111f;
    background: var(--mpro-blue);
    border: 0;
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(42,171,238,.22);
  }
  .tvip-mobile-nav .is-center:hover, .tvip-mobile-nav .is-center:focus-visible, .tvip-mobile-nav .is-center.is-active { color: #07111f; background: #71d4ff; }
  .tvip-mobile-nav .is-center.is-active::after { background: #07111f; }

  .mobile-safe-bottom { padding-bottom: 104px !important; }
  .mobile-hide { display: none !important; }
  .mobile-full { width: 100% !important; }
  .mobile-card-grid { display: grid !important; grid-template-columns: 1fr !important; gap: 12px !important; }
  .mobile-two-actions { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 9px !important; }
  .mobile-two-actions .tg-btn { width: 100% !important; }
}

@media (max-width: 520px) {
  .tg-grid { grid-template-columns: 1fr !important; }
  .tg-card { display: grid !important; grid-template-columns: 124px minmax(0,1fr); min-height: 178px; }
  .tg-thumb { height: 100%; min-height: 178px; aspect-ratio: auto !important; border-radius: 0 !important; }
  .tg-body { min-width: 0; }
  .tg-title { min-height: 0; }
  .tg-actions { margin-top: auto !important; }
}

@media (max-width: 380px) {
  .wrap { padding-left: 11px !important; padding-right: 11px !important; }
  .tvip-mobile-nav { left: 6px; right: 6px; gap: 1px; padding: 5px; border-radius: 20px; }
  .tvip-mobile-nav a, .tvip-mobile-nav .is-center { min-height: 54px; border-radius: 14px; }
  .tvip-mobile-nav .mlabel { font-size: 8px; }
  .tvip-mobile-nav svg, .tvip-mobile-nav .micon { width: 19px; height: 19px; }
  .tg-card { grid-template-columns: 110px minmax(0,1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .tvip-mobile-nav a { transition: none; }
}
