/* ================================================================
   APP-MOBILE.CSS — мобильная оболочка приложения (≤768px)
   ----------------------------------------------------------------
   Включается классом body.app-mobile (ставит static/js/app-shell.js).
   Образец — современные банковские/обучающие приложения:
   верхняя панель с заголовком экрана, нижний таббар, экран «Ещё»,
   одна сетка отступов (16px), одна типографика, карточки без рамок-шума.
   Переопределяет !important-правила mobile.css, поэтому тоже с !important.
   ================================================================ */

/* Элементы оболочки существуют в DOM всегда (их создаёт JS), но видны
   только в мобильном режиме — на десктопе страница выглядит как раньше. */
.app-title,
.app-actions,
.app-tabbar,
.app-sheet-overlay { display: none !important; }

@media (max-width: 768px) {
  body.app-mobile .app-title { display: block !important; }
  body.app-mobile .app-actions { display: flex !important; }
  body.app-mobile .app-tabbar { display: flex !important; }
  body.app-mobile .app-sheet-overlay:not([hidden]) { display: flex !important; }

  /* ==================== ТОКЕНЫ ОБОЛОЧКИ ==================== */
  body.app-mobile {
    --app-topbar-h: 56px;
    --app-tabbar-h: 60px;
    --app-gutter: 16px;
    --app-radius: 16px;
    --app-gap: 12px;
    --app-safe-b: env(safe-area-inset-bottom, 0px);
    background: var(--bg) !important;
    font-size: 15px;
    line-height: 1.45;
  }

  /* ==================== ВЕРХНЯЯ ПАНЕЛЬ ==================== */
  body.app-mobile header {
    height: var(--app-topbar-h) !important;
    min-height: var(--app-topbar-h) !important;
    padding: 0 !important;
    background: color-mix(in srgb, var(--bg) 88%, transparent) !important;
    border-bottom: 1px solid transparent !important;
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    backdrop-filter: saturate(160%) blur(16px);
  }
  @supports not (background: color-mix(in srgb, red 50%, blue)) {
    body.app-mobile header { background: var(--bg) !important; }
  }
  body.app-mobile .header-content {
    height: var(--app-topbar-h) !important;
    padding: 0 8px 0 var(--app-gutter) !important;
    gap: 8px !important;
    display: flex !important;
    align-items: center !important;
  }
  /* Логотип, гамбургер, переключатель темы и старое меню — не для приложения */
  body.app-mobile .header-content .logo,
  body.app-mobile .header-content .menu-toggle[data-hi-menu],
  body.app-mobile .header-content .theme-toggle,
  body.app-mobile .header-content nav { display: none !important; }

  body.app-mobile .app-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.app-mobile .app-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
  }
  body.app-mobile .app-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
  }
  body.app-mobile .app-icon-btn:active { background: var(--surface-light); }
  body.app-mobile .app-icon-btn svg,
  body.app-mobile .app-ico svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
  }
  body.app-mobile .app-menu-btn {
    background: var(--surface-light);
    width: 36px;
    height: 36px;
    margin-left: 4px;
  }
  body.app-mobile .app-menu-btn svg { width: 20px; height: 20px; }

  /* Колокольчик, перенесённый в панель */
  body.app-mobile .app-bell { display: inline-flex !important; width: auto !important; padding: 0 !important; border: none !important; }
  body.app-mobile .app-bell .notifications-bell {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
  }
  /* PNG-колокольчик с градиентом заменяем на линейную иконку —
     в панели все иконки должны быть одного рисунка */
  body.app-mobile .app-bell .notifications-bell img,
  body.app-mobile .app-bell .notifications-bell .notifications-bell-icon { display: none !important; }
  body.app-mobile .app-bell .notifications-bell::before {
    content: '';
    width: 24px;
    height: 24px;
    background: var(--text);
    -webkit-mask: var(--bell-ico) no-repeat center / contain;
    mask: var(--bell-ico) no-repeat center / contain;
    --bell-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 16v-5a6 6 0 0 1 12 0v5l1.5 2h-15z'/%3E%3Cpath d='M10 20a2 2 0 0 0 4 0'/%3E%3C/svg%3E");
  }
  body.app-mobile .app-bell .notifications-badge {
    top: 4px !important;
    right: 4px !important;
    min-width: 16px !important;
    height: 16px !important;
    font-size: 10px !important;
    line-height: 16px !important;
    padding: 0 4px !important;
    border-radius: 8px !important;
    background: var(--danger) !important;
  }
  body.app-mobile .app-bell .notifications-dropdown {
    top: calc(var(--app-topbar-h) + 4px) !important;
    left: 8px !important;
    right: 8px !important;
    border-radius: var(--app-radius) !important;
  }

  /* ==================== КОНТЕНТ ==================== */
  body.app-mobile.app-dashboard .section,
  body.app-mobile.app-admin .section {
    padding: var(--app-topbar-h) 0 0 !important;
  }
  body.app-mobile .container { padding: 0 var(--app-gutter) !important; }

  body.app-mobile .dashboard-container { display: block !important; margin: 0 !important; min-height: 0 !important; }
  body.app-mobile .sidebar { display: none !important; }
  body.app-mobile .dashboard-content {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 8px 0 0 !important;
    margin: 0 0 calc(var(--app-tabbar-h) + var(--app-safe-b) + 16px) !important;
    border-radius: 0 !important;
    min-height: 0 !important;
  }
  body.app-mobile.app-admin main,
  body.app-mobile.app-admin .section > .container { padding-bottom: calc(24px + var(--app-safe-b)) !important; }

  /* Футер сайта на экранах приложения не нужен — ссылки живут в «Ещё» */
  body.app-mobile.app-dashboard footer,
  body.app-mobile.app-admin footer { display: none !important; }

  /* Секция при переключении вкладки — без «прыжка» */
  body.app-mobile .dashboard-section.active { animation: none !important; }

  /* ==================== ТИПОГРАФИКА ЭКРАНА ==================== */
  /* Заголовок раздела дублирует заголовок панели — прячем (кроме приветствия в Обзоре) */
  body.app-mobile .dashboard-section > h2:first-child,
  body.app-mobile .dashboard-section > .competitor-header > h2,
  body.app-mobile .dashboard-section > .section-header > h2 { display: none !important; }
  body.app-mobile .dashboard-section > .competitor-header { margin-bottom: var(--app-gap) !important; }
  body.app-mobile .dashboard-section > .competitor-header .btn { width: 100% !important; }

  body.app-mobile #overview > div:first-child { margin-bottom: 16px !important; }
  body.app-mobile #overview > div:first-child h2 {
    font-size: 24px !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    line-height: 1.15 !important;
    margin: 4px 0 6px !important;
  }
  body.app-mobile #overview > div:first-child p { font-size: 14px !important; margin: 0 !important; }

  body.app-mobile .dashboard-section > p,
  body.app-mobile .dashboard-section > .section-header p {
    font-size: 14px !important;
    color: var(--text-muted) !important;
    margin: 0 0 16px !important;
    line-height: 1.45 !important;
  }
  body.app-mobile .dashboard-section h3 {
    font-size: 17px !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em !important;
    margin: 20px 0 10px !important;
  }
  body.app-mobile .dashboard-section h4 { font-size: 15px !important; font-weight: 600 !important; }
  body.app-mobile .dashboard-section p { font-size: 14px; }
  body.app-mobile .dashboard-section small,
  body.app-mobile .dashboard-section .field-hint { font-size: 13px; }

  /* ==================== КАРТОЧКИ ==================== */
  body.app-mobile .dashboard-grid { gap: var(--app-gap) !important; margin-bottom: 20px !important; }
  body.app-mobile .dashboard-card,
  body.app-mobile .form-card,
  body.app-mobile .form-card-compact,
  body.app-mobile .sp-card,
  body.app-mobile .pricing-card-dashboard,
  body.app-mobile .subscription-card,
  body.app-mobile .monitoring-panel,
  body.app-mobile .table-container,
  body.app-mobile .settings-card,
  body.app-mobile .section-card,
  body.app-mobile .resource-card {
    border-radius: var(--app-radius) !important;
    border: 1px solid var(--border) !important;
    box-shadow: none !important;
    padding: 16px !important;
  }
  body.app-mobile .dashboard-card:hover,
  body.app-mobile .pricing-card-dashboard:hover { transform: none !important; box-shadow: none !important; }
  body.app-mobile .dashboard-card { min-height: 108px; display: flex; flex-direction: column; }
  body.app-mobile .dashboard-card h4 {
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.06em !important;
    color: var(--text-soft) !important;
    margin: 0 0 8px !important;
  }
  body.app-mobile .dashboard-card .value {
    font-size: 26px !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    line-height: 1.1 !important;
  }
  body.app-mobile .dashboard-card .value span {
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 4px 10px !important;
    border-radius: 8px !important;
    border: none !important;
    letter-spacing: 0 !important;
    background: rgba(196, 138, 17, 0.12) !important;
  }
  body.app-mobile .dashboard-card p { font-size: 13px !important; margin-top: 6px !important; }
  body.app-mobile .dashboard-card .form-control { font-size: 14px !important; min-height: 40px !important; padding: 6px 10px !important; }
  body.app-mobile .table-container { padding: 0 !important; margin: 0 !important; width: 100% !important; overflow-x: auto !important; }
  body.app-mobile .table-container:has(table.table-cards) { overflow: hidden !important; }
  body.app-mobile .table-container > table.table-cards { min-width: 0 !important; }
  body.app-mobile .table-container table:not(.table-cards) { min-width: 560px !important; }
  body.app-mobile .table-container:has(table:not(.table-cards)) { overflow-x: auto !important; }
  body.app-mobile table.table-cards tr { margin: 0 !important; border: none !important; border-bottom: 1px solid var(--border) !important; border-radius: 0 !important; padding: 10px 16px !important; }
  body.app-mobile table.table-cards tr:last-child { border-bottom: none !important; }
  body.app-mobile .monitoring-panel { border: none !important; padding: 16px !important; margin-bottom: 20px !important; }
  body.app-mobile .monitoring-panel h3 { font-size: 17px !important; color: #fff !important; margin: 0 0 6px !important; }
  body.app-mobile .monitoring-panel p { font-size: 13px !important; }
  body.app-mobile .subscription-card { border: none !important; }
  body.app-mobile .alert { border-radius: 12px !important; padding: 12px 14px !important; font-size: 14px !important; margin-bottom: 16px !important; }
  body.app-mobile .empty-state { padding: 36px 16px !important; }

  /* Кнопки: единая высота, без «гигантов» */
  body.app-mobile .dashboard-section .btn,
  body.app-mobile.app-admin .btn { min-height: 44px; font-size: 15px; border-radius: 12px; padding: 10px 16px; }
  body.app-mobile .btn-sm { min-height: 36px !important; font-size: 13px !important; padding: 6px 12px !important; border-radius: 10px !important; }
  body.app-mobile .btn-pricing-dashboard { min-height: 44px !important; font-size: 15px !important; }
  body.app-mobile .form-control,
  body.app-mobile input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  body.app-mobile select,
  body.app-mobile textarea { min-height: 46px; border-radius: 12px !important; font-size: 16px !important; }
  body.app-mobile textarea { min-height: 96px; }
  body.app-mobile .form-group label { font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
  body.app-mobile .form-group { margin-bottom: 14px; }

  /* ==================== АДМИНКА ==================== */
  body.app-mobile.app-admin h1 { display: none !important; }              /* заголовок уже в панели */
  body.app-mobile.app-admin .admin-nav { margin: 8px calc(-1 * var(--app-gutter)) 16px !important; padding: 0 var(--app-gutter) !important; background: transparent !important; border: none !important; box-shadow: none !important; }
  body.app-mobile.app-admin .admin-nav .btn { border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); min-height: 36px; padding: 6px 14px; font-size: 13px; }
  body.app-mobile.app-admin .admin-nav .btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
  body.app-mobile.app-admin .section-card h3,
  body.app-mobile.app-admin .section-card h2 { font-size: 17px !important; margin-bottom: 12px !important; }
  body.app-mobile.app-admin .section-card { margin-bottom: var(--app-gap) !important; }
  body.app-mobile.app-admin .user-header { border-radius: var(--app-radius) !important; padding: 16px !important; }
  body.app-mobile.app-admin .user-header h1 { display: block !important; font-size: 20px !important; }
  body.app-mobile.app-admin .tabs { border-radius: var(--app-radius) !important; }

  /* Шапка админки (градиентная плашка) не нужна — заголовок в верхней панели */
  body.app-mobile.app-admin .admin-header { display: none !important; }

  /* Фильтры и любые многоколоночные гриды админки — в одну колонку */
  body.app-mobile.app-admin [style*="grid-template-columns"] { grid-template-columns: 1fr !important; gap: 12px !important; }
  body.app-mobile.app-admin label[style*="font-weight: 600"] { font-size: 13px !important; font-weight: 600 !important; margin-bottom: 6px !important; }

  /* Таблицы админки: компактные строки, читается при прокрутке вбок */
  body.app-mobile.app-admin .data-table td,
  body.app-mobile.app-admin .user-table td { padding: 10px 12px !important; font-size: 13px !important; white-space: nowrap !important; }
  body.app-mobile.app-admin .data-table th,
  body.app-mobile.app-admin .user-table th { padding: 8px 12px !important; font-size: 11px !important; }
  body.app-mobile.app-admin .section-card > h2,
  body.app-mobile.app-admin .container > h2 { font-size: 18px !important; margin: 20px 0 10px !important; }

  /* ==================== AUTH / LEGAL ==================== */
  body.app-mobile .auth-container { padding: calc(var(--app-topbar-h) + 16px) var(--app-gutter) 32px !important; min-height: 0 !important; }
  body.app-mobile .auth-card { border: none !important; box-shadow: none !important; padding: 8px 0 0 !important; border-radius: 0 !important; background: transparent !important; }
  body.app-mobile .auth-header { text-align: left !important; margin-bottom: 20px !important; }
  body.app-mobile .auth-header h1 { display: none !important; }
  body.app-mobile .auth-header p { font-size: 15px !important; }
  body.app-mobile .auth-links { text-align: left !important; }

  /* ==================== НИЖНИЙ ТАББАР ==================== */
  body.app-mobile .app-tabbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: calc(var(--app-tabbar-h) + var(--app-safe-b));
    padding: 0 4px var(--app-safe-b);
    display: flex;
    align-items: stretch;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    backdrop-filter: saturate(160%) blur(16px);
    border-top: 1px solid var(--border);
    z-index: 9000;
  }
  @supports not (background: color-mix(in srgb, red 50%, blue)) {
    body.app-mobile .app-tabbar { background: var(--surface); }
  }
  body.app-mobile .app-tab {
    flex: 1 1 0;
    min-width: 0;
    border: none;
    background: transparent;
    color: var(--text-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 2px 4px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  body.app-mobile .app-tab .app-ico { display: inline-flex; padding: 3px 12px; border-radius: 999px; transition: background-color 0.15s; }
  body.app-mobile .app-tab-label { font-size: 11px; font-weight: 500; letter-spacing: 0; line-height: 1; white-space: nowrap; }
  body.app-mobile .app-tab.is-active { color: var(--primary); }
  body.app-mobile .app-tab.is-active .app-ico { background: var(--primary-soft); }
  body.app-mobile .app-tab.is-active .app-ico svg { stroke-width: 2.2; }
  body.app-mobile .app-tab.is-active .app-tab-label { font-weight: 600; }

  /* ==================== НИЖНИЙ ЛИСТ «ЕЩЁ» ==================== */
  body.app-mobile .app-sheet-overlay {
    position: fixed; inset: 0;
    background: var(--overlay);
    z-index: 9600;
    display: flex; align-items: flex-end;
    opacity: 0; transition: opacity 0.2s ease;
  }
  body.app-mobile .app-sheet-overlay[hidden] { display: none !important; }
  body.app-mobile .app-sheet-overlay.is-open { opacity: 1; }
  body.app-mobile .app-sheet {
    width: 100%;
    max-height: 86vh;
    background: var(--bg);
    border-radius: 20px 20px 0 0;
    padding-bottom: calc(12px + var(--app-safe-b));
    transform: translateY(24px);
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex; flex-direction: column;
    overflow: hidden;
  }
  body.app-mobile .app-sheet-overlay.is-open .app-sheet { transform: translateY(0); }
  body.app-mobile .app-sheet-handle { width: 36px; height: 4px; border-radius: 2px; background: var(--border-strong); margin: 8px auto 0; flex-shrink: 0; }
  body.app-mobile .app-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 4px var(--app-gutter); flex-shrink: 0; }
  body.app-mobile .app-sheet-title { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
  body.app-mobile .app-sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px var(--app-gutter) 8px; }
  body.app-mobile.app-sheet-open { overflow: hidden; }

  body.app-mobile .app-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--app-radius); margin: 12px 0; overflow: hidden; }
  body.app-mobile .app-group-title { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-soft); padding: 12px 16px 4px; }
  body.app-mobile .app-row {
    display: flex; align-items: center; gap: 12px;
    width: 100%; min-height: 52px;
    padding: 8px 12px 8px 16px;
    background: transparent; border: none; border-bottom: 1px solid var(--border);
    color: var(--text); font: inherit; font-size: 15px; font-weight: 500; text-align: left; text-decoration: none;
    cursor: pointer;
  }
  body.app-mobile .app-group .app-row:last-child { border-bottom: none; }
  body.app-mobile .app-row:active { background: var(--surface-light); }
  body.app-mobile .app-row-ico { width: 32px; height: 32px; border-radius: 10px; background: var(--surface-light); color: var(--text); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
  body.app-mobile .app-row-ico svg { width: 20px; height: 20px; }
  body.app-mobile .app-row-label { flex: 1 1 auto; min-width: 0; }
  body.app-mobile .app-row-chev { color: var(--text-soft); flex-shrink: 0; }
  body.app-mobile .app-row-chev svg { width: 18px; height: 18px; }
  body.app-mobile .app-row-danger { color: var(--danger); }
  body.app-mobile .app-row-danger .app-row-ico { background: rgba(212, 72, 62, 0.1); color: var(--danger); }
  body.app-mobile .app-row-danger .app-row-chev { display: none; }

  /* Переключатель темы */
  body.app-mobile .app-switch { width: 44px; height: 26px; border-radius: 13px; background: var(--border-strong); position: relative; flex-shrink: 0; transition: background-color 0.2s; }
  body.app-mobile .app-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: transform 0.2s; }
  body.app-mobile .app-row-theme.is-on .app-switch { background: var(--primary); }
  body.app-mobile .app-row-theme.is-on .app-switch::after { transform: translateX(18px); }

  body.app-mobile .app-legal { display: flex; gap: 16px; justify-content: center; padding: 8px 0 4px; }
  body.app-mobile .app-legal a { font-size: 12px; color: var(--text-soft); text-decoration: none; }

  /* Одиночная кнопка-действие в карточке — во всю ширину карточки.
     Так все формы кабинета и админки выглядят одинаково, без «плавающих»
     кнопок разной длины. Группы кнопок и .btn-sm не трогаем. */
  body.app-mobile .form-card > .btn,
  body.app-mobile .form-card > form > .btn,
  body.app-mobile .form-card > form button[type="submit"],
  body.app-mobile .section-card > .btn,
  body.app-mobile .dashboard-section > form > .btn,
  body.app-mobile .sp-card > .btn {
    display: flex !important;
    width: 100% !important;
    justify-content: center !important;
  }

  /* ==================== ТОЧЕЧНЫЕ ПРАВКИ РАЗМЕТКИ ==================== */

  /* Строки «поле + кнопка», собранные inline-флексом (админка, 2FA, формы):
     на телефоне — колонка, кнопка на всю ширину, поля тоже */
  body.app-mobile .section-card [style*="display:flex"],
  body.app-mobile .section-card [style*="display: flex"],
  body.app-mobile .form-card [style*="justify-content: space-between"][style*="align-items: center"] {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  body.app-mobile .section-card [style*="display:flex"] > div,
  body.app-mobile .section-card [style*="display: flex"] > div { width: 100% !important; }
  body.app-mobile .section-card [style*="display:flex"] input,
  body.app-mobile .section-card [style*="display: flex"] input,
  body.app-mobile .section-card [style*="display:flex"] .btn,
  body.app-mobile .section-card [style*="display: flex"] .btn,
  body.app-mobile .form-card [style*="justify-content: space-between"][style*="align-items: center"] .btn {
    width: 100% !important;
    max-width: none !important;
    justify-content: center !important;
  }
  /* Админ-навигация — исключение: она горизонтальная лента */
  body.app-mobile .admin-nav { flex-direction: row !important; align-items: center !important; }
  body.app-mobile .admin-nav .btn { width: auto !important; }

  /* Панель мониторинга: инструкция мельче, поля крупные */
  body.app-mobile .monitoring-panel > div[style*="font-size: 0.8rem"] { font-size: 12.5px !important; line-height: 1.45 !important; margin-bottom: 16px !important; }
  body.app-mobile .monitoring-panel label { font-size: 13px !important; margin-bottom: 6px !important; }
  body.app-mobile .monitoring-panel .form-control { border-radius: 12px !important; }

  /* Бейдж «Популярный» не наезжает на карточку */
  body.app-mobile .pricing-card-dashboard.popular { margin-top: 14px !important; }
  body.app-mobile .pricing-badge-dashboard { top: -11px !important; font-size: 10px !important; padding: 4px 12px !important; }
  body.app-mobile .pricing-card-dashboard { margin-bottom: 12px !important; }
  body.app-mobile .pricing-header h3 { font-size: 17px !important; }
  body.app-mobile .price-amount { font-size: 28px !important; }

  /* Регистрация / вход: подсказка под паролем не липнет к следующему полю */
  body.app-mobile .password-requirements { margin: -6px 0 16px !important; font-size: 13px !important; }
  body.app-mobile .auth-card label[style*="display: flex"] span { font-weight: 400 !important; font-size: 14px !important; }
  body.app-mobile .auth-card .form-group[style*="margin-bottom: 0.75rem"],
  body.app-mobile .auth-card .form-group[style*="margin-bottom: 1rem"] { margin-bottom: 14px !important; }

  /* Legal: заголовок уже в верхней панели */
  body.app-mobile .legal-content > h1:first-child { display: none !important; }
  body.app-mobile .legal-content { border-radius: var(--app-radius) !important; padding: 16px !important; }
  body.app-mobile .legal-container { padding: calc(var(--app-topbar-h) + 12px) var(--app-gutter) 32px !important; }
  body.app-mobile .legal-content h2 { font-size: 19px !important; }
  body.app-mobile .legal-toc { border-radius: 12px !important; }

  /* Тосты над таббаром */
  body.app-mobile.app-dashboard .toast-container { bottom: calc(var(--app-tabbar-h) + var(--app-safe-b) + 12px) !important; top: auto !important; }
  /* Панель фильтра конкурентов и модалки — над таббаром */
  body.app-mobile .competitor-modal-content,
  body.app-mobile .confirm-modal-content { padding-bottom: var(--app-safe-b) !important; }
}
