/* VC Tools — mobile & tablet responsive */

@media (max-width: 900px) {
  :root {
    --nav-h: 52px;
    --vc-land-head-h: 60px;
  }

  html, body {
    overflow-x: clip;
    max-width: 100vw;
  }

  #toast {
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
  }
  #toast .msg { max-width: none; }
}

/* ── LANDING ───────────────────────────── */
@media (max-width: 900px) {
  body.vc-landing {
    --vc-land-head-h: 60px;
  }

  .vc-land-head {
    padding: 8px 10px 8px 6px;
    gap: 8px;
  }

  .vc-topbrand-compact {
    padding: 6px 8px !important;
    gap: 8px;
  }

  .vc-brand-hero {
    width: clamp(80px, 22vw, 112px);
    height: clamp(80px, 22vw, 112px);
    margin-bottom: 16px;
  }

  .vc-topbrand .vc-brand-img,
  .vc-topbrand .vc-brand-ic {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    flex-basis: 44px;
    border-radius: 10px;
  }

  .vc-topbrand b {
    font-size: 15px;
  }

  .vc-land-nav {
    display: none;
  }

  .vc-slide-rail {
    display: none;
  }

  .vc-deck {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  .vc-slide {
    min-height: auto;
    padding: calc(var(--vc-land-head-h) + 12px) 16px 40px;
  }

  .vc-slide-hero {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: calc(var(--vc-land-head-h) + 8px) 16px 32px;
  }

  .vc-slide-hero .vc-slide-inner,
  .vc-slide-hero .vc-scroll-hint {
    grid-column: auto;
    grid-row: auto;
  }

  .vc-land-bg {
    display: none !important;
  }

  .vc-slide-hero h1 {
    font-size: clamp(28px, 8.5vw, 42px);
    line-height: 1.06;
  }

  .vc-slide-lead {
    font-size: 15px;
    margin: 14px 0 20px;
    max-width: none;
  }

  .vc-hero-cta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .vc-hero-cta .vc-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    min-height: 46px;
  }

  .vc-hero-stats {
    flex-wrap: wrap;
    gap: 18px 24px;
    margin-top: 8px;
  }

  .vc-feats-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .vc-feat-card {
    min-height: auto;
    padding: 16px;
  }

  .vc-t-compact-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .vc-plat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .vc-info-row {
    grid-template-columns: 1fr;
  }

  .vc-land-cta-bottom {
    flex-direction: column;
  }

  .vc-land-cta-bottom .vc-btn {
    width: 100%;
    justify-content: center;
  }

  .vc-slide-eco {
    padding: calc(var(--vc-land-head-h) + 12px) 16px 0;
    min-height: auto;
  }

  .vc-slide-eco .vc-site-footer {
    padding: 16px 16px 10px;
    border-radius: 14px 14px 0 0;
  }

  .vc-scroll-hint {
    position: static;
    transform: none;
    margin-top: 8px;
    animation: none;
    opacity: .65;
  }

  .vc-footer-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .vc-footer-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* Bottom tab bar */
  .vc-mob-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    align-items: stretch;
    justify-content: space-around;
    gap: 4px;
    padding: 6px 8px max(8px, env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--card) 94%, transparent);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .vc-mob-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 44px;
    padding: 4px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--muted);
    text-decoration: none;
    transition: background .15s, color .15s;
  }

  .vc-mob-nav a:hover,
  .vc-mob-nav a.active {
    color: var(--accent);
    background: var(--accent-bg);
  }

  .vc-mob-nav a svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
  }
}

@media (max-width: 900px) {
  .vc-mob-nav { display: flex; }
}

@media (min-width: 901px) {
  .vc-mob-nav { display: none !important; }
}

/* ── AUTH / LOGIN ──────────────────────── */
@media (max-width: 600px) {
  .vc-page-lang {
    top: 10px;
    right: 10px;
  }

  .vc-back {
    padding: 12px 14px;
    font-size: 12px;
  }

  .vc-authwrap {
    align-items: flex-start;
    padding: 16px 14px 24px;
  }

  .vc-card {
    width: 100%;
    max-width: none;
    padding: 22px 18px;
    border-radius: 14px;
  }

  .vc-authpage .vc-site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ── TARIFFS PAGE ──────────────────────── */
@media (max-width: 900px) {
  .vc-tariffs-body {
    --vc-tariffs-top: 60px;
  }

  .vc-tariffs-page {
    padding: 8px 16px 20px;
  }

  .vc-tariffs-hero h1,
  .vc-tariffs-head h1 {
    font-size: 26px;
  }

  .vc-home-t-grid,
  .vc-tariffs-grid,
  .vc-tariff-grid {
    grid-template-columns: 1fr;
  }

  .vc-period-pick {
    flex-direction: column;
    max-width: none;
  }
}

/* ── APP / PARSER ──────────────────────── */
@media (max-width: 900px) {
  .navbar {
    flex-wrap: wrap;
    height: auto;
    min-height: var(--nav-h);
    padding: 8px 10px 6px;
    gap: 6px 8px;
    align-content: flex-start;
  }

  .nav-logo {
    order: 1;
    padding: 2px 6px 2px 2px;
    margin: 0;
  }

  .nav-logo-text {
    font-size: 15px;
  }

  .nav-logo-text small {
    display: none;
  }

  .nav-logo .vc-brand-img,
  .nav-logo-icon.vc-brand-ic {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    flex-basis: 32px !important;
  }

  .nav-sep,
  .nav-game {
    display: none;
  }

  .nav-right {
    order: 2;
    margin-left: auto;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .currency-wrap {
    gap: 4px;
  }

  #currencyRateBox {
    display: none !important;
  }

  #langSelect {
    display: none;
  }

  .nav-icon-btn {
    width: 38px;
    height: 38px;
    font-size: 14px;
  }

  .nav-tabs {
    order: 3;
    width: 100%;
    margin: 4px 0 0;
    height: auto;
    border-top: 1px solid var(--border);
    padding-top: 4px;
    gap: 4px;
  }

  .nav-tab {
    flex: 1;
    justify-content: center;
    padding: 10px 8px;
    font-size: 13px;
    border-bottom: none;
    border-radius: 8px;
    min-height: 40px;
  }

  .nav-tab.active {
    background: var(--accent-bg);
    border-bottom-color: transparent;
  }

  .page {
    flex-direction: column;
    min-height: 0;
  }

  body.sidebar-collapsed .content {
    padding-left: 0 !important;
  }

  .left-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, 88vw) !important;
    max-width: 88vw;
    z-index: 220;
    height: 100dvh !important;
    max-height: 100dvh !important;
    transform: translateX(0);
    transition: transform .28s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 12px 0 40px rgba(0, 0, 0, .45);
    border-right: 1px solid var(--border);
  }

  .left-panel.collapsed {
    transform: translateX(-105%);
    width: min(300px, 88vw) !important;
    overflow: hidden;
    border: none;
    box-shadow: none;
  }

  .sidebar-expand {
    display: flex !important;
    left: 8px;
    top: calc(var(--nav-h) + 58px);
    width: 36px;
    height: 40px;
    z-index: 210;
    border-radius: 0 10px 10px 0;
    box-shadow: 4px 4px 16px rgba(0, 0, 0, .35);
  }

  .vc-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 215;
    background: rgba(0, 0, 0, .55);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
  }

  body.vc-sidebar-open .vc-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .content {
    padding: 10px 10px 16px;
    width: 100%;
  }

  .table-toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .item-count {
    font-size: 15px;
    flex: 1 1 auto;
    min-width: 0;
  }

  .item-count-label {
    font-size: 14px;
  }

  .filterbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }

  .filterbar-items {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .f-search,
  .f-profit,
  .q-chips,
  .wt-chips,
  .st-chips {
    width: 100%;
    min-width: 0;
  }

  .f-profit input {
    width: 100%;
    flex: 1;
  }

  .btn-reset-wrap {
    width: 100%;
  }

  .btn-reset {
    width: 100%;
    justify-content: center;
  }

  .tbl-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
  }

  table {
    min-width: 680px;
  }

  thead th {
    font-size: 9px;
    padding: 10px 8px;
    letter-spacing: .4px;
  }

  tbody td {
    padding: 8px;
    font-size: 13px;
  }

  .skin-img {
    width: 44px;
    height: 34px;
    min-width: 44px;
    min-height: 34px;
  }

  .skin-name {
    font-size: 12px;
  }

  .detail-panel {
    padding: 14px 12px;
  }

  .stat-row {
    flex-direction: column;
  }

  .stat-box {
    min-width: 0;
    width: 100%;
  }

  .chart-box {
    height: 220px;
    padding: 10px 8px 6px;
  }

  .modal {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    margin: 10px;
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
  }

  .overlay {
    padding: 10px;
    align-items: flex-end;
  }

  .vc-chat-panel {
    width: calc(100vw - 16px) !important;
    right: 8px !important;
    left: 8px !important;
    max-height: min(70dvh, 520px);
  }

  .vc-profile-card,
  .vc-adm {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
  }

  .vc-user-sheet {
    max-height: 85dvh;
  }

  body.vc-site-page > .vc-site-footer {
    border-radius: 14px 14px 0 0;
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 480px) {
  :root {
    --vc-land-head-h: 56px;
  }

  .vc-topbrand small {
    display: none;
  }

  .vc-slide-head h2 {
    font-size: 24px;
  }

  .vc-plat-grid {
    grid-template-columns: 1fr;
  }

  .nav-right .currency-wrap .vc-dd-sm:first-child {
    min-width: 72px;
  }

  table {
    min-width: 620px;
  }

  .vc-mob-nav a span {
    font-size: 9px;
  }
}

/* ── ADMIN PANEL ───────────────────────── */
@media (max-width: 900px) {
  #vcAdminOv.overlay {
    padding: 0;
    align-items: stretch;
  }

  #vcAdminOv .vc-adm {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0;
    flex-direction: column;
  }

  #vcAdminOv .vc-adm-nav {
    width: 100%;
    flex: 0 0 auto;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 4px;
    padding: 10px 10px 8px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  #vcAdminOv .vc-adm-brand {
    display: none;
  }

  #vcAdminOv .vc-adm-sp {
    display: none;
  }

  #vcAdminOv .vc-tab {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 12px;
    border-left: none;
    border-radius: 8px;
  }

  #vcAdminOv .vc-tab.active {
    border-left: none;
  }

  #vcAdminOv .vc-adm-body {
    padding: 16px 14px;
  }

  #vcAdminOv .vc-grid4,
  #vcAdminOv .vc-grid3,
  #vcAdminOv .vc-grid2 {
    grid-template-columns: 1fr;
  }
}

/* ── PAYMENT PAGE ──────────────────────── */
@media (max-width: 600px) {
  #payActions {
    flex-direction: column !important;
  }

  #payActions .vc-btn {
    width: 100%;
    justify-content: center;
  }

  #payPrice {
    max-width: none !important;
  }
}
