/* ===================================================================================================================
   DIMENSIUNI PE TELEFON (V2.4.8) — mărimile alese de utilizator (poza „01 · Glacier Chrome”), aceleași în toate temele:
   antet și bară de jos „plutitoare” (casete rotunjite cu margine), casete mai joase, texte și butoane mai mici.
   Doar mărimi și spații; culorile rămân ale temei (core/skins.css, about/about.css).
   =================================================================================================================== */
@media (max-width: 1024px), (pointer: coarse) and (max-width: 1400px) {
  /* ----- antetul: casetă rotunjită, cu margine ----- */
  :root body .m-top { gap: 6px; margin: 6px 8px 0; padding: 6px 8px 6px 6px; border: 0; border-radius: 20px; }
  :root body .m-top { margin-top: calc(6px + env(safe-area-inset-top)); padding-top: 6px; top: env(safe-area-inset-top, 0px); }
  :root body .m-top .brand-mark { width: 32px; height: 32px; }
  :root body .m-top strong { font-size: 14px; letter-spacing: .18em; }
  :root body .m-ver { font-size: 10.5px; }
  :root body .m-top .m-icon { min-width: 30px; height: 30px; padding: 0 9px; font-size: 12px; }
  :root body .m-top .m-icon svg { width: 16px; height: 16px; }
  :root body .m-top .fb-badge { height: 30px; padding: 0 9px; font-size: 12px; }
  :root body .m-top .fb-badge span { font-size: 12px; }
  :root body .m-top .flag { width: 18px; height: 12px; }
  :root body.metal .m-top { border-radius: 20px; }

  /* ----- bara de jos: pastilă plutitoare ----- */
  :root body.has-user .tabbar:not([hidden]) { left: 8px; right: 8px; bottom: max(4px, calc(env(safe-area-inset-bottom) - 16px)); gap: 0; padding: 4px; border: 0; border-radius: 22px; }
  :root body.has-user.metal .tabbar:not([hidden]) { border-radius: 22px; }
  :root body .tab { height: 42px; max-width: none; gap: 2px; border-radius: 15px !important; }
  :root body .tab svg { width: 18px; height: 18px; }
  :root body .tab[data-tab="home"] { flex: 1 1 0; }   /* „Start” (în locul lui „Despre”) — lat ca celelalte */
  :root body .tab span { font-size: 8.5px; }
  :root body.has-user .content { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  :root body .content-wide { padding: 10px 14px calc(76px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(70px + env(safe-area-inset-bottom)) !important; }

  /* ----- GRUPURI: cifrele de sus ----- */
  :root body #page-groups .g-stats { gap: 7px; margin-bottom: 9px; }
  :root body #page-groups .g-stat { gap: 2px; min-height: 0; padding: 8px 6px; border-radius: 16px; }
  :root body #page-groups .g-stat h3 { font-size: 12px; font-weight: 700; }
  :root body #page-groups .g-stat .num { font-size: 22px; line-height: 1.1; }
  :root body #page-groups .g-stat .num small { font-size: 13px; }

  /* ----- GRUPURI: căutare + filtre + TP | SL + reîmprospătare ----- */
  :root body #page-groups .g-panel { margin-bottom: 9px; border-radius: 18px; }
  :root body #page-groups .g-toolbar { gap: 6px; padding: 8px; }
  :root body #page-groups .g-search { min-height: 32px; padding: 0 10px; border-radius: 10px; }
  :root body #page-groups .g-search input { font-size: 13px; }
  :root body #page-groups .g-search svg { width: 15px; height: 15px; }
  :root body #page-groups .g-chips { padding: 2px; }
  :root body #page-groups .g-chips button { padding: 5px 4px; font-size: 12.5px; }
  :root body #page-groups .g-tpsl { min-height: 32px; gap: 6px; padding: 0 9px; border-radius: 11px; }
  :root body #page-groups .g-tpsl svg { width: 15px; height: 15px; }
  :root body #page-groups .g-tpsl b { font-size: 11.5px; }
  :root body #page-groups .g-tpsl small { font-size: 9px; }
  :root body #page-groups .g-tpsl i { width: 7px; height: 7px; margin-left: 2px; }
  :root body #page-groups .g-refresh { min-height: 32px; width: 34px; padding: 0; justify-content: center; border-radius: 11px; }
  :root body #page-groups .g-refresh svg { width: 15px; height: 15px; }
  :root body #page-groups .g-acc { margin-bottom: 9px; }

  /* ----- GRUPURI: cardurile ----- */
  :root body #page-groups .g-list { gap: 6px; }
  :root body #page-groups .g-list .g-row { gap: 8px; padding: 7px 10px 7px 8px; border-radius: 16px; }
  :root body #page-groups .g-list .g-row .grp { gap: 10px; }
  :root body #page-groups .g-list .g-row .ava { width: 46px; height: 46px; border-radius: 12px; font-size: 15px; }
  :root body #page-groups .g-list .g-row .grp b { font-size: 14px; }
  :root body #page-groups .g-list .g-row .grp small { margin-top: 0; font-size: 12px; }
  :root body #page-groups .g-list .g-row .kw { margin-top: 3px; }
  :root body #page-groups .g-list .g-row .kw span { padding: 1px 8px; font-size: 10px; }
  :root body #page-groups .g-side { gap: 5px; padding-left: 8px; }
  :root body #page-groups .g-side .g-edit { min-height: 26px; gap: 5px; padding: 0 7px 0 9px; font-size: 12.5px; }
  :root body #page-groups .g-side .g-edit svg { width: 13px; height: 13px; }
  :root body #page-groups .g-row .switch, :root body #page-groups .g-row .switch[aria-checked="true"],
  :root body #page-groups .g-row .read .switch[aria-checked="false"] { width: 68px; height: 24px; }
  :root body #page-groups .g-row .switch::after { width: 18px; height: 18px; }
  :root body #page-groups .g-row .switch[aria-checked="true"]::after { left: calc(100% - 21px); }
  :root body #page-groups .g-row .switch::before { right: 8px; padding-left: 10px; font-size: 10px; }
  :root body #page-groups .g-row .switch[aria-checked="true"]::before { right: auto; left: 8px; }
}

/* ===================================================================================================================
   PAGINILE DIN APLICAȚIE (V2.5.6) — aceeași compactare ca la GRUPURI, doar pe telefon: casete cu margini interioare mai
   mici, titluri și cifre mari mai mici, rânduri mai joase. Doar mărimi; textele, culorile și funcțiile rămân.
   =================================================================================================================== */
@media (max-width: 1024px), (pointer: coarse) and (max-width: 1400px) {
  :root body .content { padding: 10px 14px calc(76px + env(safe-area-inset-bottom)); }
  /* casetele de bază de pe toate paginile */
  :root body .content :is(.g-card, .af-box, .af-info, .af-wallet, .pp-box, .ad-panel, .ad-lock, .tu-hero, .tu-step, .fb-card) { padding: 12px 13px; border-radius: 16px; }
  :root body .content .g-card { margin-bottom: 9px; }
  :root body .content .g-card h2 { font-size: 15px; }
  :root body .content .tu-hero h1 { font-size: 21px; }
  :root body .content .tu-step { gap: 12px; }

  /* pagina unui grup */
  :root body #page-group .g-back { margin-bottom: 8px; font-size: 13px; }
  :root body #page-group .g-head h1 { font-size: 18px; margin-bottom: 2px; }
  :root body #page-group .ava.lg { width: 48px; height: 48px; border-radius: 13px; font-size: 17px; }
  :root body #page-group .g-head-act .button { min-height: 36px; font-size: 12.5px; }
  :root body #page-group .g-modes { gap: 8px; margin-bottom: 9px; }
  :root body #page-group .g-mode-btn { min-height: 44px; padding-block: 0; font-size: 14px; }
  :root body #page-group details.g-fold > summary { min-height: 0; }
  :root body #page-group .g-fold h2 { font-size: 14.5px; }

  /* LICENȚE */
  :root body #page-licenses .pl-head h1 { font-size: 21px; }
  :root body #page-licenses .pl-card { padding: 14px; border-radius: 18px; }
  :root body #page-licenses .pl-ico { width: 44px; height: 44px; border-radius: 13px; }
  :root body #page-licenses .pl-price strong { font-size: 32px; }
  :root body #page-licenses .pl-list li { padding-block: 6px; font-size: 13px; }
  :root body #page-licenses .pl-card .button, :root body #page-licenses .pl-card button.pl-btn { min-height: 40px; }

  /* PARTENERIAT */
  :root body #page-affiliate .af-stat { gap: 10px; padding: 10px 12px; }
  :root body #page-affiliate .af-ico { width: 34px; height: 34px; border-radius: 10px; }
  :root body #page-affiliate .af-cube { aspect-ratio: auto; padding: 8px 6px; border-radius: 14px; }
  :root body #page-affiliate .af-card { gap: 8px; padding: 12px 12px 12px; border-radius: 16px; }
  :root body #page-affiliate .af-emb { width: 50px; height: 50px; margin-bottom: 0; }
  :root body #page-affiliate .af-card h3 { font-size: 18px; margin-bottom: 4px; }
  :root body #page-affiliate .af-money { padding: 8px 6px; }
  :root body #page-affiliate .af-intro-g b { font-size: 19px; }

  /* STATISTICI și ADMIN: casetele de cifre mai joase */
  :root body #page-stats .g-card { padding: 11px 12px; }
  :root body #page-admin .ad-kpi { padding: 10px 12px; }
  :root body #page-admin .ad-row { padding: 9px 11px; }
}

/* ----- STATISTICI (V2.5.7, telefon): cele 9 casete mai mici și toate de aceeași mărime (aceeași ordine), spații mai mici
         între casete; „Activitate” cu filtrele Toate / TP / SL / BE / Deschise / Sărite pe același rând ----- */
@media (max-width: 1024px), (pointer: coarse) and (max-width: 1400px) {
  :root body #page-stats .st-main { gap: 9px; }
  :root body #page-stats .st-kpis { gap: 5px; margin-top: 9px; }
  :root body #page-stats .st-kpis .kpi { display: flex; flex-direction: column; justify-content: center; min-height: 48px; padding: 5px 6px; border-radius: 11px; text-align: center; }
  :root body #page-stats .st-kpis .kpi span { overflow: hidden; font-size: 10px; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
  :root body #page-stats .st-kpis .kpi b { margin-top: 3px; font-size: 14.5px; line-height: 1.1; }
  :root body #page-stats .st-head h2 { font-size: 15px; }
  :root body #page-stats .st-head:has(.st-period) { flex-wrap: nowrap; gap: 8px; }
  :root body #page-stats .st-head:has(.st-period) h2 { flex: 0 0 auto; }
  :root body #page-stats .st-head .st-period { flex: 1 1 auto; width: auto; min-width: 0; margin-left: 0; padding: 2px; gap: 1px; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  :root body #page-stats .st-head .st-period::-webkit-scrollbar { display: none; }
  :root body #page-stats .st-head .st-period button { flex: 0 0 auto; padding: 4px 7px; font-size: 11px; }
  :root body #page-stats .st-act { padding-block: 8px; font-size: 13px; }
}
/* STATISTICI → Rezultate pe grup: rânduri mai joase pe telefon */
@media (max-width: 1024px), (pointer: coarse) and (max-width: 1400px) {
  :root body #page-stats .gt th, :root body #page-stats .gt td { padding: 6px 8px; font-size: 12px; }
  :root body #page-stats .gt .gt-name b { font-size: 12.5px; }
  :root body #page-stats .gt .ava { width: 26px; height: 26px; border-radius: 8px; font-size: 10px; }
}

/* ----- V2.5.8 (telefon): spațiile dintre casete mai strânse — STATISTICI și PARTENERIAT (ca la GRUPURI) ----- */
@media (max-width: 1024px), (pointer: coarse) and (max-width: 1400px) {
  :root body #page-stats .st-main { gap: 7px; }
  :root body #page-stats .st-main > .g-card, :root body #page-stats .g-card { padding: 10px 11px; }
  :root body #page-stats .st-kpis { margin-top: 7px; }
  :root body #page-affiliate .guide-tabs { margin-bottom: 7px; padding: 3px; }
  :root body #page-affiliate .guide-tabs button { min-height: 34px; font-size: 12.5px; }
  :root body #page-affiliate .af-strip, :root body #page-affiliate .af-cubes { gap: 6px; margin-bottom: 7px; }
  :root body #page-affiliate .af-stat { min-height: 0; padding: 8px 10px; border-radius: 14px; }
  :root body #page-affiliate .af-stat small { font-size: 11px; }
  :root body #page-affiliate .af-stat b { font-size: 15px; }
  :root body #page-affiliate .af-lv b { font-size: 17px; letter-spacing: .04em; }
  :root body #page-affiliate .af-cube { padding: 6px 4px; gap: 1px; }
  :root body #page-affiliate .af-howbox { margin-bottom: 7px; }
  :root body #page-affiliate .af-howbox summary { padding: 8px 12px; gap: 10px; }
  :root body #page-affiliate .af-howbox summary b { font-size: 14px; }
  :root body #page-affiliate .af-grid { gap: 7px; }
}
