/* Strato mobile dell'applicazione Universal Bet.
   Si somma a tema.css (usa gli stessi colori, quindi segue anche il tema chiaro/scuro) e a mobile.js.
   Vale solo su schermi stretti: sul computer non cambia nulla.
   Per disattivarlo basta togliere da index.html le righe che caricano mobile.css e mobile.js. */

/* la chat e' a schermo intero (position: fixed): un filtro sul contenitore la renderebbe alta zero */
html[data-tema] body .content-card:has(.chat-layout), body .content-card:has(.chat-layout) { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; animation: none !important; transform: none !important; }

/* ---------- ovunque: comportamento da app ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: transparent; }
body a, body button, body .ant-btn, body .ant-select, body .ant-picker, body .ant-menu-item, body label { touch-action: manipulation; }

@media (max-width: 991px) {
  body { overscroll-behavior-y: none; }

  /* ---------- testata: barra compatta fissa + striscia di comandi ---------- */
  body .ant-layout-header {
    position: sticky !important; top: 0; z-index: 60;
    height: auto !important; min-height: 0; line-height: normal !important;
    padding: calc(8px + env(safe-area-inset-top)) 12px 8px !important;
    margin-bottom: var(--ub-strip, 48px);   /* spazio per la striscia dei comandi, che e' sospesa sotto la testata */
  }
  body .ant-layout-header > .ant-flex { flex-wrap: wrap; row-gap: 0; column-gap: 8px; align-items: center; }
  body .ant-layout-header [data-ub-h="sinistra"] { flex: 1 1 0; min-width: 0; max-width: calc(100% - 52px); gap: 8px; }
  body .ant-layout-header [data-ub-h="sinistra"] > a, body .ant-layout-header [data-ub-h="sinistra"] > .ant-dropdown-trigger {
    display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; line-height: 40px;
  }
  body .ant-layout-header .ub-h-titolo { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 650; letter-spacing: -.005em; color: #fff; line-height: 40px; text-transform: none; }
  body .ant-layout-header .mobile-menu-btn { display: flex !important; align-items: center; justify-content: center; flex: none; width: 42px; height: 42px; border-radius: 13px; background: transparent; border: 1px solid rgba(255, 255, 255, .25); color: #fff; cursor: pointer; font-size: 18px; }
  body .ant-layout-header [data-ub-h="logo"] { flex: none; }
  body .ant-layout-header [data-ub-h="logo"] img { height: 30px !important; width: auto !important; }

  body .ant-layout-header [data-ub-h="azioni"] {
    position: absolute; left: 0; right: 0; top: 100%; width: auto; margin: 0; padding: 4px 12px 8px;
    flex-wrap: nowrap !important; justify-content: flex-start !important; gap: 8px; align-items: center;
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    background: linear-gradient(115deg, #0b2c4d 0%, #123a63 52%, #0b2c4d 100%); box-shadow: 0 14px 22px -12px rgba(0, 0, 0, .5);
    transition: transform .22s cubic-bezier(.2, .7, .2, 1), opacity .2s ease, visibility 0s;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent);
  }
  html[data-tema="scuro"] body .ant-layout-header [data-ub-h="azioni"] { background: linear-gradient(115deg, #04101f 0%, #0a2543 55%, #04101f 100%); }
  body .ant-layout-header [data-ub-h="azioni"]::-webkit-scrollbar { display: none; }
  body .ant-layout-header [data-ub-h="azioni"] > * { flex: none; white-space: nowrap; }
  body .ant-layout-header [data-ub-h="azioni"] .ant-btn, body .ant-layout-header [data-ub-h="azioni"] > a { height: 36px !important; padding: 0 14px !important; font-size: 13px !important; display: inline-flex; align-items: center; }
  body .ant-layout-header [data-ub-h="azioni"] .ub-tema-btn { width: 36px; height: 36px; margin: 0; }
  body .ant-layout-header [data-ub-h="azioni"] .ant-avatar { width: 34px; height: 34px; line-height: 32px; }
  /* scorrendo verso il basso la striscia dei comandi si dissolve; la testata resta alta uguale, quindi il contenuto non salta mai */
  html.ub-scorre body .ant-layout-header [data-ub-h="azioni"] { transform: translateY(-10px); opacity: 0; visibility: hidden; pointer-events: none; transition: transform .22s cubic-bezier(.2, .7, .2, 1), opacity .2s ease, visibility 0s .22s; }
  html { scroll-padding-top: 116px; scroll-padding-bottom: 100px; }

  @media (max-width: 768px) {
    /* chat a schermo intero: testata a una riga e conversazione subito sotto */
    body:has(.chat-layout) .ant-layout-header [data-ub-h="azioni"] { display: none; }
    body:has(.chat-layout) .ant-layout-header { padding-bottom: 8px !important; }
    body .chat-layout { top: calc(58px + env(safe-area-inset-top)) !important; z-index: 20 !important; height: auto !important; }
    body .chat-layout .chat-main-header { padding-top: 10px !important; padding-bottom: 10px !important; }
    body .chat-layout .chat-input-form, body .chat-layout .chat-input-area { padding-bottom: calc(8px + env(safe-area-inset-bottom)) !important; }
    body .chat-layout textarea, body .chat-layout input { font-size: 16px !important; }

  }
  /* ---------- contenuto: tutta la larghezza disponibile ---------- */
  body .ant-layout, body .ant-layout > .ant-layout { min-width: 0; }
  body .main-content { margin: 0 !important; padding: 10px 8px calc(28px + env(safe-area-inset-bottom)) !important; }
  body .content-card { margin: 0 !important; padding: 12px !important; border-radius: 18px !important; }
  body .content-card > div[style*="padding: 24px"] { padding: 6px !important; }
  body .content-card .ant-typography { overflow-wrap: anywhere; }
  body .content-card div[style*="max-height"][style*="overflow"] { max-height: none !important; overflow: visible !important; }
  body .chat-layout div[style*="max-height"][style*="overflow"] { overflow: auto !important; }

  @media (max-width: 768px) {
    /* colonne a larghezza fissa pensate per il computer: a due a due, o a tutta larghezza */
    body .ant-row > .ant-col-1, body .ant-row > .ant-col-2, body .ant-row > .ant-col-3, body .ant-row > .ant-col-4,
    body .ant-row > .ant-col-5, body .ant-row > .ant-col-6 { flex: 0 0 50%; max-width: 50%; }
    body .ant-row > .ant-col-7, body .ant-row > .ant-col-8, body .ant-row > .ant-col-9, body .ant-row > .ant-col-10,
    body .ant-row > .ant-col-11, body .ant-row > .ant-col-12, body .ant-row > .ant-col-13, body .ant-row > .ant-col-14,
    body .ant-row > .ant-col-15, body .ant-row > .ant-col-16, body .ant-row > .ant-col-17, body .ant-row > .ant-col-18,
    body .ant-row > .ant-col-19, body .ant-row > .ant-col-20, body .ant-row > .ant-col-21, body .ant-row > .ant-col-22,
    body .ant-row > .ant-col-23 { flex: 0 0 100%; max-width: 100%; }
    body .ant-row { row-gap: 10px; }
    body .ant-row > .ant-col > .ant-btn, body .ant-row > .ant-col > .ant-select, body .ant-row > .ant-col > .ant-picker { width: 100% !important; }
    body .ant-row > .ant-col label { display: block; margin-bottom: 4px; }
    body .ant-row > .ant-col > div:not([class]) { max-width: 100%; }

    /* righe "elemento + dati + azione" dentro una scheda (es. elenco documenti): il nome sopra, il resto sotto */
    body .ant-card-body > .ant-row.ant-row-space-between > .ant-col-6:first-child { flex: 0 0 100%; max-width: 100%; }
    body .ant-card-body > .ant-row.ant-row-space-between > .ant-col-6:not(:first-child) { flex: 1 1 0; max-width: none; }
    body .ant-card-body > .ant-row.ant-row-space-between { row-gap: 10px; align-items: center; }
    body .ant-card-body .ant-btn-link { height: auto !important; min-height: 0 !important; justify-content: flex-start; text-align: left; padding: 0 !important; }
    body .content-card .ant-flex-wrap-wrap > .ub-cta { flex: 1 1 100%; }

  }
  /* ---------- comandi a misura di pollice ---------- */
  body .ant-btn:not(.ant-btn-sm):not(.ant-btn-icon-only):not(.ant-btn-link) { min-height: 44px; height: auto !important; padding: 8px 16px !important; border-radius: 13px !important; }
  body .ant-btn.ant-btn-sm { min-height: 36px; }
  body .ant-btn-icon-only { min-width: 44px; min-height: 44px; }
  body .content-card .ant-flex-vertical > .ant-btn.ub-cta, body .content-card .ant-btn-block.ub-cta { width: 100% !important; align-self: stretch; }

  body .ant-input, body .ant-input-affix-wrapper, body .ant-input-number, body .ant-input-number-input, body textarea.ant-input,
  body .ant-select-selection-search-input, body .ant-picker-input > input, body input[type="date"], body input[type="month"], body input[type="number"], body input[type="text"], body select {
    font-size: 16px !important;
  }
  body .ant-input, body .ant-input-affix-wrapper, body .ant-input-number, body .ant-picker, body input.ant-input, body select { min-height: 44px; border-radius: 12px !important; }
  body .ant-input-number-input { height: 42px; }
  body textarea.ant-input { min-height: 88px; }
  body .ant-select-single:not(.ant-select-sm) { height: 44px; min-width: 96px; }
  body .ant-select-single:not(.ant-select-sm) .ant-select-selector { height: 44px !important; align-items: center; border-radius: 12px !important; }
  body .ant-select-single:not(.ant-select-sm) .ant-select-selection-item, body .ant-select-single:not(.ant-select-sm) .ant-select-selection-placeholder { line-height: 42px !important; font-size: 16px; }
  body .ant-select-single:not(.ant-select-sm) .ant-select-selection-search-input { height: 42px !important; }
  body .ant-picker-calendar-header .ant-select { min-width: 0; }
  body .ant-select-multiple .ant-select-selector { min-height: 44px; }
  body .ant-select-dropdown { max-width: calc(100vw - 16px); }
  body .ant-select-item { min-height: 44px; display: flex; align-items: center; font-size: 15px; }
  body .ant-checkbox-inner, body .ant-radio-inner { width: 22px; height: 22px; }
  body .ant-checkbox-inner::after { inset-inline-start: 30%; }
  body .ant-switch { min-width: 48px; height: 28px; }
  body .ant-switch .ant-switch-handle { width: 24px; height: 24px; }
  body .ant-switch.ant-switch-checked .ant-switch-handle { inset-inline-start: calc(100% - 26px); }
  body .ant-form-item { margin-bottom: 14px; }
  body .ant-form-vertical .ant-form-item-label > label { height: auto; }
  body .ant-form-item-label { padding-bottom: 4px; }
  body .ant-tabs-nav .ant-tabs-tab { padding: 12px 14px; font-size: 14px; }
  body .ant-tabs-nav { margin-bottom: 10px; }
  body .ant-pagination { flex-wrap: wrap; justify-content: center; row-gap: 8px; }
  body .ant-pagination .ant-pagination-options { display: none; }
  body .ant-pagination-item, body .ant-pagination-prev, body .ant-pagination-next { min-width: 38px; height: 38px; line-height: 36px; }
  body .ant-card-small > .ant-card-body { padding: 12px 14px; }
  body .ant-statistic-content-value { font-size: 24px; }
  body .ant-collapse-header { padding: 14px 12px !important; }
  body .ant-alert { border-radius: 14px; }
  body .ant-descriptions-item-label, body .ant-descriptions-item-content { font-size: 13px; }

  /* ---------- finestre: fogli che salgono dal basso ---------- */
  body .ant-modal-wrap:not([style*="display: none"]) { display: flex !important; align-items: flex-end; justify-content: center; overflow: hidden !important; }
  body .ant-modal { top: 0 !important; margin: 0 !important; width: 100% !important; max-width: 100% !important; padding: 0 !important; }
  body .ant-modal .ant-modal-content {
    border-radius: 24px 24px 0 0 !important; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)) !important;
    max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  }
  body .ant-modal .ant-modal-content::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--ub-border-strong); margin: -6px auto 12px; }
  body .ant-modal .ant-modal-title { font-size: 17px; padding-right: 36px; }
  body .ant-modal .ant-modal-close { top: 14px; inset-inline-end: 12px; width: 40px; height: 40px; }
  body .ant-modal .ant-modal-footer { display: flex; flex-wrap: nowrap; gap: 10px; }
  body .ant-modal .ant-modal-footer > .ant-flex { flex: 1 1 100%; width: 100%; gap: 10px !important; flex-wrap: nowrap !important; }
  body .ant-modal .ant-modal-footer .ant-btn { flex: 1 1 0; min-width: 0; margin: 0 !important; width: auto; }
  body .ant-modal .ant-modal-body .ant-flex:not(.ant-flex-vertical) { flex-wrap: wrap; }
  body .ant-modal .ant-modal-body .ant-flex:not(.ant-flex-vertical) > .ant-input, body .ant-modal .ant-modal-body .ant-flex:not(.ant-flex-vertical) > .ant-select, body .ant-modal .ant-modal-body .ant-flex:not(.ant-flex-vertical) > .ant-input-affix-wrapper { flex: 1 1 100%; width: 100% !important; }
  body .ant-modal.ant-zoom-enter, body .ant-modal.ant-zoom-appear { animation-name: ubFoglio !important; animation-duration: .28s !important; animation-timing-function: cubic-bezier(.2, .8, .2, 1) !important; transform: none; opacity: 1; }
  body .ant-modal.ant-zoom-leave { animation-name: ubFoglioChiudi !important; animation-duration: .2s !important; }
  @keyframes ubFoglio { from { transform: translateY(100%); } to { transform: translateY(0); } }
  @keyframes ubFoglioChiudi { from { transform: translateY(0); } to { transform: translateY(100%); } }

  /* menu laterale (cassetto) */
  body .ant-drawer .ant-drawer-content-wrapper { width: min(86vw, 340px) !important; }
  body .ant-drawer .ant-drawer-content { border-radius: 0 24px 24px 0; padding-top: env(safe-area-inset-top); }
  body .ant-drawer .ant-drawer-header { padding: 16px 18px; }
  body .ant-drawer .ant-drawer-body { padding: 8px 10px calc(16px + env(safe-area-inset-bottom)); }
  body .ant-drawer .ant-menu-item, body .ant-drawer .ant-menu-submenu-title { height: 48px !important; line-height: 48px !important; font-size: 15px; border-radius: 12px; margin: 2px 0 !important; width: 100% !important; }
  body .ant-drawer .ant-menu-sub .ant-menu-item { height: 44px !important; line-height: 44px !important; font-size: 14px; padding-left: 28px !important; }

  /* calendari e selezioni di date */
  body .ant-picker-dropdown { max-width: calc(100vw - 12px); }
  body .ant-picker-dropdown .ant-picker-panels { flex-direction: column; }
  body .ant-picker-dropdown .ant-picker-panel-container { max-width: calc(100vw - 12px); overflow: auto; }
  body .ant-picker-dropdown .ant-picker-date-panel, body .ant-picker-dropdown .ant-picker-month-panel, body .ant-picker-dropdown .ant-picker-year-panel { width: min(320px, calc(100vw - 28px)); }
  body .ant-picker-cell .ant-picker-cell-inner { min-width: 34px; height: 34px; line-height: 34px; }
  body .ant-dropdown { max-width: calc(100vw - 16px); }
  body .ant-dropdown-menu-item { min-height: 44px; display: flex; align-items: center; }
  body .ant-popover { max-width: calc(100vw - 16px); }
  body .ant-popconfirm .ant-popconfirm-buttons { display: flex; gap: 8px; }
  body .ant-message { top: calc(8px + env(safe-area-inset-top)) !important; }
  body .ant-notification { width: calc(100vw - 16px) !important; margin-inline-end: 8px; }
  body .Toastify__toast-container { width: calc(100vw - 16px) !important; padding: 8px !important; left: 8px !important; margin: 0 !important; }

  /* tablet: i fogli non occupano tutta la larghezza */
  @media (min-width: 769px) {
    body .ant-modal { max-width: 600px !important; }
    body .main-content { padding: 14px 16px calc(28px + env(safe-area-inset-bottom)) !important; }
    body .content-card { padding: 18px !important; }
    body .accounting-summary > .ant-col { flex: 0 0 33.3333% !important; max-width: 33.3333% !important; }
  }
}

/* prestazioni su telefoni e tablet: niente effetti pesanti su elementi alti migliaia di pixel */
@media (max-width: 1099px) {
  html[data-tema="scuro"] body { background: #061629 !important; background-attachment: scroll !important; }
  html[data-tema="scuro"] body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(900px 480px at 88% -6%, rgba(233, 175, 49, .08), transparent 60%), radial-gradient(800px 520px at -8% 6%, rgba(47, 111, 176, .18), transparent 60%); }
  html body .content-card, html[data-tema] body .content-card { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  html[data-tema="scuro"] body .content-card { background: linear-gradient(160deg, #10263d 0%, #0b1b2e 100%) !important; box-shadow: 0 8px 26px rgba(0, 0, 0, .32) !important; }
  html:not([data-tema="scuro"]) body .content-card { box-shadow: 0 4px 18px rgba(15, 27, 45, .07) !important; }
  body .main-content > .content-card { animation: none !important; }
  body .ant-card, body .ant-table-wrapper { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
}

/* tabelle a schede: telefoni, tablet e schermi stretti con la barra laterale */
@media (max-width: 1099px) {
  /* ---------- tabelle: ogni riga diventa una scheda ---------- */
  body [data-ub-tab] .ant-table-container, body [data-ub-tab] .ant-table-content, body [data-ub-tab] .ant-table-body, body [data-ub-tab] .ant-table { overflow: visible !important; max-height: none !important; background: transparent !important; border: 0 !important; }
  body [data-ub-tab] .ant-table-header, body [data-ub-tab] .ant-table-sticky-holder, body [data-ub-tab] thead, body [data-ub-tab] colgroup, body [data-ub-tab] .ant-table-measure-row, body [data-ub-tab] .ant-table-cell-scrollbar { display: none !important; }
  body [data-ub-tab] table, body [data-ub-tab] tbody, body [data-ub-tab] tfoot { display: block; width: 100% !important; min-width: 0 !important; table-layout: auto; border: 0; background: transparent !important; }
  body [data-ub-tab] tr.ant-table-row, body [data-ub-tab] .ant-table-summary > tr, body [data-ub-tab] tfoot > tr {
    display: grid; grid-auto-flow: row dense; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px 16px; padding: 14px 16px; margin: 0 0 12px;
    border-radius: 16px; border: 1px solid var(--ub-border); background: var(--ub-surface-2) !important;
  }
  body [data-ub-tab] tr.ant-table-row > td, body [data-ub-tab] tfoot td, body [data-ub-tab] tfoot th, body [data-ub-tab] .ant-table-summary td, body [data-ub-tab] .ant-table-summary th {
    display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 0 !important; border: 0 !important; background: transparent !important;
    position: static !important; overflow-wrap: anywhere; text-align: left !important; font-size: 14px !important;
  }
  body [data-ub-tab] tr.ant-table-row > td::before, body [data-ub-tab] tfoot td::before, body [data-ub-tab] tfoot th::before, body [data-ub-tab] .ant-table-summary td::before {
    content: attr(data-label); font-size: 10.5px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--ub-muted); line-height: 1.3;
  }
  body [data-ub-tab] td[data-label=""]::before, body [data-ub-tab] td:not([data-label])::before { display: none; }
  body [data-ub-tab] tr.ant-table-row > td[data-ub-c="titolo"], body [data-ub-tab] tfoot td[data-ub-c="titolo"], body [data-ub-tab] tfoot th[data-ub-c="titolo"] { grid-column: 1 / -1; font-size: 16px !important; font-weight: 650; letter-spacing: -.01em; color: var(--ub-ink); }
  body [data-ub-tab] td[data-ub-c="titolo"]::before { display: none; }
  body [data-ub-tab] td[data-ub-c="largo"] { grid-column: 1 / -1; }
  body [data-ub-tab] td .ant-typography { font-size: 14px !important; line-height: 1.45; }
  body [data-ub-tab] td[data-ub-c="titolo"] .ant-typography { font-size: 16px !important; font-weight: 650; }
  body [data-ub-tab] td[data-ub-c="azioni"] { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 8px; padding-top: 4px !important; border-top: 1px solid var(--ub-border) !important; }
  body [data-ub-tab] td[data-ub-c="azioni"]::before { display: none; }
  body [data-ub-tab] td[data-ub-c="azioni"] .ant-btn, body [data-ub-tab] td[data-ub-c="azioni"] > .ant-space, body [data-ub-tab] td[data-ub-c="azioni"] > .ant-flex { flex: 1 1 auto; }
  body [data-ub-tab] td[data-ub-c="azioni"] .ant-space, body [data-ub-tab] td[data-ub-c="azioni"] .ant-flex { flex-wrap: wrap; gap: 8px; width: 100%; }
  body [data-ub-tab] td[data-ub-c="azioni"] .ant-space-item { flex: 1 1 auto; }
  body [data-ub-tab] td[data-ub-c="azioni"] .ant-space-item > .ant-btn { width: 100%; }
  body [data-ub-tab] td[data-ub-c="azioni"] .ant-row { margin: 0 !important; width: 100%; gap: 8px; flex-wrap: wrap; }
  body [data-ub-tab] td[data-ub-c="azioni"] .ant-row > .ant-col { flex: 1 1 auto; max-width: none; width: auto; padding: 0 !important; }
  body [data-ub-tab] td[data-ub-c="azioni"] .ant-row > .ant-col > .ant-btn { width: 100%; }
  body [data-ub-tab] td[data-ub-c="vuoto"] { display: none; }
  html body [data-ub-tab] .ant-table-tbody > tr.ant-table-row > td.ant-table-cell,
  html body [data-ub-tab] .ant-table-tbody > tr.ant-table-row:hover > td.ant-table-cell,
  html body [data-ub-tab] .ant-table-tbody > tr > td.ant-table-cell.ant-table-cell-row-hover,
  html[data-tema] body [data-ub-tab] .ant-table-tbody > tr.ant-table-row > td.ant-table-cell,
  html[data-tema] body [data-ub-tab] .ant-table-tbody > tr.ant-table-row:hover > td.ant-table-cell,
  html[data-tema] body [data-ub-tab] .ant-table-tbody > tr > td.ant-table-cell.ant-table-cell-row-hover { background: transparent !important; }
  body [data-ub-tab] td.ant-table-selection-column, body [data-ub-tab] td.ant-table-row-expand-icon-cell { grid-column: 1 / -1; flex-direction: row; }
  body [data-ub-tab] td.ant-table-selection-column::before, body [data-ub-tab] td.ant-table-row-expand-icon-cell::before { display: none; }
  body [data-ub-tab] td .ant-input, body [data-ub-tab] td .ant-input-number, body [data-ub-tab] td .ant-select, body [data-ub-tab] td .ant-picker { width: 100% !important; }
  body [data-ub-tab] tr.ant-table-placeholder, body [data-ub-tab] tr.ant-table-placeholder > td, body [data-ub-tab] tr.ant-table-expanded-row, body [data-ub-tab] tr.ant-table-expanded-row > td { display: block; padding: 12px 6px !important; border: 0 !important; background: transparent !important; text-align: center; }
  body [data-ub-tab] tr.ant-table-expanded-row > td { text-align: left; }
  body [data-ub-tab] .ant-table-title, body [data-ub-tab] .ant-table-footer { padding: 4px 2px 10px !important; background: transparent !important; border: 0 !important; }

}

/* telefoni stretti */
@media (max-width: 380px) {
  body .ant-layout-header [data-ub-h="sinistra"] > a, body .ant-layout-header [data-ub-h="sinistra"] > .ant-dropdown-trigger { font-size: 14px; }
  body .content-card { padding: 10px !important; }
  body [data-ub-tab] tr.ant-table-row { grid-template-columns: 1fr; }
}

/* telefono in orizzontale: meno altezza sprecata */
@media (max-width: 900px) and (max-height: 480px) {
  body .ant-layout-header { position: relative !important; }
  body .ant-modal .ant-modal-content { max-height: 96dvh; }
}

/* schermi medi con barra laterale (portatili piccoli, tablet in orizzontale): i comandi dell'admin non stanno in una riga */
@media (min-width: 992px) and (max-width: 1479px) {
  body .ant-layout-header { height: auto !important; min-height: 60px; line-height: normal !important; padding: 8px 22px 6px !important; }
  body .ant-layout-header > .ant-flex { flex-wrap: wrap; row-gap: 6px; align-items: center; }
  body .ant-layout-header [data-ub-h="azioni"] { flex: 0 0 100%; flex-wrap: wrap; row-gap: 6px; justify-content: flex-end !important; padding-bottom: 4px; }
}
