/* ===== MOBILE ONLY ===== */
@media (max-width:768px){

  /* Кнопки в шапке — без обрезаний, единый размер */
  .app-top .btn{
    display:inline-flex; align-items:center; justify-content:center;
    min-width:116px; padding:10px 12px; font-size:14px; line-height:1;
    white-space:nowrap
  }
  @media (max-width:360px){
    .app-top .btn{ min-width:100px; padding:8px 10px; font-size:13px }
  }

  /* Таблицы -> карточки */
  table.mh-responsive { border-collapse:separate; border-spacing:0; width:100% }
  table.mh-responsive thead{ display:none }
  table.mh-responsive tbody tr{
    display:block; margin:10px 0; padding:12px; border-radius:14px;
    background:rgba(255,255,255,.03)
  }
  table.mh-responsive td{
    display:flex; justify-content:space-between; align-items:center; gap:14px;
    padding:10px 0; border:none!important; text-align:left!important
  }
  table.mh-responsive td::before{
    content:attr(data-label); opacity:.75; font-weight:600; margin-right:12px
  }

  /* Действия у майнеров — сетка 2×2, подписи не переносятся */
  .miner-actions{
    display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:8px
  }
  .miner-actions .btn{
    width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
    padding:12px 10px; font-size:14px; line-height:1; text-align:center
  }
  @media (max-width:360px){
    .miner-actions .btn{ font-size:13px; padding:10px 8px }
  }

  /* Чипы/бейджи — не ломаются строками */
  .chip{ white-space:nowrap }
}
/* ===== /MOBILE ONLY ===== */

/* === Mobile only hard fixes (miners, tables, profile cards) === */
@media (max-width: 991.98px){

  /* Убрать зелёные заливки и ступеньки у любых таблиц на мобилке */
  table, .table { width: 100% !important; border-collapse: separate !important; border-spacing: 0 10px !important; }
  .table thead, table thead { display: none !important; }
  .table tr, table tr {
    display: block !important;
    background: var(--card) !important;
    border: 1px solid var(--edge) !important;
    border-radius: 14px !important;
    padding: 10px 12px !important;
    margin: 10px 0 !important;
    box-shadow: 0 1px 0 rgba(0,0,0,.15) inset;
  }
  .table td, .table th, table td, table th {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 8px 4px !important;
    background: transparent !important;     /* <- убираем зелёный фон */
    border: 0 !important;
    box-shadow: none !important;
  }
  /* полосование/hover тоже без фона */
  .table-striped>tbody>tr:nth-of-type(odd)>*,
  .table-hover>tbody>tr:hover>* { background: transparent !important; }

  /* Подписи колонок (для miners.php порядок: ID, Имя, Модель, Алг., База TH, t°, W, Статус, Группа) */
  .table tbody tr td:nth-child(1)::before  { content: "Время";        color: var(--muted); }
  .table tbody tr td:nth-child(2)::before  { content: "Токен";       color: var(--muted); }
  .table tbody tr td:nth-child(3)::before  { content: "Сумма";    color: var(--muted); }
  .table tbody tr td:nth-child(4)::before  { content: "Статус вывода";      color: var(--muted); }
  .table tbody tr td:nth-child(5)::before  { content: "Адрес вывода";   color: var(--muted); }
  .table tbody tr td:nth-child(6)::before  { content: "t°";        color: var(--muted); }
  .table tbody tr td:nth-child(7)::before  { content: "W";         color: var(--muted); }
  .table tbody tr td:nth-child(8)::before  { content: "Статус";    color: var(--muted); }
  .table tbody tr td:nth-child(9)::before  { content: "Группа";    color: var(--muted); }

  /* Карточки майнеров в профиле — на всю ширину */
  .mh-list .mh-card { width: 100% !important; margin: 12px 0 !important; }
  .mh-hero .card, .mh-hero .mini { width: 100% !important; }
  .card { margin-left: 0 !important; margin-right: 0 !important; }

  /* Кнопки на мобилке: текст не вылезает */
  .btn, button, .btn-primary, .btn-success, .btn-outline, .btn--primary{
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 14px !important;
    min-height: 40px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    max-width: 100% !important;
  }
}

/* ===== Universal mobile fixes (miners/profile) ===== */
@media (max-width: 991.98px){

  /* --- Таблицы (miners, deposit и т.п.) — компактные плитки --- */
  .app table{
    width:100% !important;
    border-collapse:separate !important;
    border-spacing:0 10px !important;
  }
  .app table thead{ display:none !important; }

  .app table tbody tr{
    display:block !important;
    background:var(--card) !important;
    border:1px solid var(--edge) !important;
    border-radius:14px !important;
    margin:10px 0 !important;
    overflow:hidden;
  }

  .app table td,
  .app table th{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:10px !important;
    padding:10px 12px !important;
    border:0 !important;
    box-shadow:none !important;
    background:transparent !important; /* <- убираем зелёную подложку */
    max-width:100% !important;
  }

  /* чтобы визуально не гуляли углы у ячеек */
  .app table td:first-child,
  .app table td:last-child{ border-radius:0 !important; }

  /* --- Плитки/карточки на profile — во всю ширину --- */
  .mh-hero, .mh-hero__left, .mh-hero__right{ width:100% !important; }
  .mh-list .mh-card,
  .mh-list .card,
  .mh-profile .mh-card,
  .mh-profile .card{
    width:100% !important;
    max-width:100% !important;
    margin-left:0 !important;
    margin-right:0 !important;
  }

  /* Кнопки не «ломаются» */
  .btn, button, .btn-primary, .btn-outline, .btn-success, .btn--primary{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    padding:10px 14px !important;
    min-height:40px !important;
    line-height:1.2 !important;
    white-space:nowrap !important;
    max-width:100% !important;
  }
}
