/* IT-BALON.CZ Podpora v596 – celoplošný responzivní audit klienta i administrace
   Načítá se jako poslední vrstva. Desktop zachovává, na tabletu a mobilu sjednocuje shell,
   hlavičky, KPI, filtry, tabulky, formuláře, modaly a pomocné panely. */
:root{
  --itb596-blue:#0969ff;
  --itb596-blue2:#12a8ee;
  --itb596-navy:#061a3b;
  --itb596-text:#071c3d;
  --itb596-muted:#607693;
  --itb596-line:#d7e5f5;
  --itb596-bg:#eef5fc;
  --itb596-card:#fff;
  --itb596-radius:22px;
  --itb596-shadow:0 14px 36px rgba(15,45,85,.08);
}
html{max-width:100%;overflow-x:hidden;scroll-behavior:smooth}
body{max-width:100%;overflow-x:hidden}
body.unified-support-layout,body.itb-responsive-v596{background:var(--itb596-bg)!important;color:var(--itb596-text)!important}
body.unified-support-layout *,body.unified-support-layout *::before,body.unified-support-layout *::after,
body.itb-responsive-v596 *,body.itb-responsive-v596 *::before,body.itb-responsive-v596 *::after{box-sizing:border-box}
body.unified-support-layout :where(img,svg,video,canvas,iframe),body.itb-responsive-v596 :where(img,svg,video,canvas,iframe){max-width:100%;height:auto}
body.unified-support-layout :where(input,select,textarea,button),body.itb-responsive-v596 :where(input,select,textarea,button){max-width:100%;min-width:0;font:inherit}
body.unified-support-layout :where(h1,h2,h3,h4,p,strong,small,span,em,a,td,th,label),body.itb-responsive-v596 :where(h1,h2,h3,h4,p,strong,small,span,em,a,td,th,label){overflow-wrap:anywhere}
body.unified-support-layout :where(.client-portal-main,.admin-app-main,.itb-admin-unified-main-v582,.itb-index-wrap-v338,.client-card,.card,.panel,.content,.main-content),
body.itb-responsive-v596 :where(.client-portal-main,.admin-app-main,.itb-admin-unified-main-v582,.itb-index-wrap-v338,.client-card,.card,.panel,.content,.main-content){min-width:0;max-width:100%}

/* Desktop/tablet shell: hlavní obsah nesmí být ořezán sidebarom. */
@media (min-width:901px){
  body.unified-support-layout :where(.client-portal-shell,.itb-shell-v530,.itb-v555-shell,.itb-invoices-shell-v529,.admin-app-shell){
    width:100%!important;max-width:none!important;min-width:0!important;overflow:visible!important
  }
  body.unified-support-layout :where(.client-portal-main,.admin-app-main,.itb-admin-unified-main-v582){min-width:0!important;max-width:none!important;overflow:visible!important}
  body.unified-support-layout :where(.client-card,.card,.panel){max-width:100%!important}
}
@media (min-width:901px) and (max-width:1260px){
  body.unified-support-layout{--itb-v531-sidebar-w:214px;--itb-v531-sidebar-mini:72px}
  body.unified-support-layout .client-side-nav>a,
  body.unified-support-layout .client-side-nav>details>summary{font-size:12px!important;padding-left:10px!important;padding-right:10px!important}
  body.unified-support-layout :where(.client-portal-main,.admin-app-main,.itb-admin-unified-main-v582){padding-left:16px!important;padding-right:16px!important}
  body.unified-support-layout :where(.itb-dash-hero-v338,.itb-admin-unified-hero-v580,.itb-admin-unified-hero-v582,.activity-hero-card,.itb-forms-hero-v520,.contact-admin-hero,.itb-health-hero-v577,.invoice-admin-hero,.invoice791-hero){padding-left:28px!important;padding-right:28px!important}
}

/* Obecné hlavičky. */
body.unified-support-layout :where(
  .itb-dash-hero-v338,.itb-admin-unified-hero-v580,.itb-admin-unified-hero-v582,.itb-new-ticket-hero-v580,
  .activity-hero-card,.itb-forms-hero-v520,.contact-admin-hero,.itb-health-hero-v577,
  .invoice-admin-hero,.invoice791-hero,.invoice-dashboard-hero,.itb-v553-management-hero,
  .itb-invoices-hero-v521,.itb-billing-hero-v522,.contact-hero,.about-hero,.admin-page-head
){
  max-width:100%!important;overflow:hidden!important;background:
  radial-gradient(circle at 82% -10%,rgba(40,181,255,.52),transparent 34%),
  linear-gradient(118deg,#061a3b 0%,#0759bc 59%,#0b75ef 100%)!important;
  color:#fff!important;border:0!important;box-shadow:0 18px 46px rgba(4,48,112,.16)!important
}
body.unified-support-layout :where(
  .itb-dash-hero-v338,.itb-admin-unified-hero-v580,.itb-admin-unified-hero-v582,.itb-new-ticket-hero-v580,
  .activity-hero-card,.itb-forms-hero-v520,.contact-admin-hero,.itb-health-hero-v577,
  .invoice-admin-hero,.invoice791-hero,.invoice-dashboard-hero,.itb-v553-management-hero,
  .itb-invoices-hero-v521,.itb-billing-hero-v522,.contact-hero,.about-hero,.admin-page-head
) :where(h1,h2,h3,p,small,strong,span,.eyebrow){color:#fff!important}

/* Karty a KPI – stejný rytmus a nulové přetékání. */
body.unified-support-layout :where(.client-card,.card,.panel,.itb-card-v338,.invoice791-card,.service-card,.admin-module-card,.summary-card,.kpi-card){
  min-width:0!important;max-width:100%!important;border-color:var(--itb596-line)!important
}
body.unified-support-layout :where(
  .itb-kpis-v338,.client-kpi-row,.invoice-kpis,.invoice-kpis-v103,.service-kpis-v551,.notice-kpis-v551,
  .contact-message-kpis-v558,.itb-health-kpis-v577,.itb-v585-summary-grid,.itb-forms-kpis-v520,.kpis
)>*{min-width:0!important}
body.unified-support-layout :where(.itb-kpi-v338,.client-kpi,.invoice791-kpi,.service-kpis-v551>article,.notice-kpis-v551>article,.kpi-card){
  overflow:hidden!important;text-align:center!important
}

/* Filtry, formuláře a akce. */
body.unified-support-layout :where(
  .form-grid,.form-row,.itb-v555-form-grid,.itb-form-grid-v523,.itb-user-form-grid-v523,
  .invoice-filter-grid,.activity-filter-grid-v548,.contact-message-filter-grid-v584,.itb-forms-filter-v520,
  .itb-forms-filter-v547,.itb-hours-filter-grid-v586,.itb-health-filters-v577,.admin-grid,.grid
)>*{min-width:0!important}
body.unified-support-layout :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea){
  width:100%;min-height:44px
}
body.unified-support-layout textarea{resize:vertical}
body.unified-support-layout :where(.actions,.invoice-head-actions,.invoice-filter-actions,.activity-filter-actions-v548,.itb-forms-filter-actions-v547,.contact-message-filter-actions-v584,.itb-hours-filter-actions-v586,.itb-health-actions-v577,.admin-actions){
  min-width:0;max-width:100%
}
body.unified-support-layout :where(.btn,.admin-btn,button,a.btn,.primary,.secondary,.danger,.success,.ghost){touch-action:manipulation}

/* Všechny datové tabulky mají vlastní scroll a nešíří stránku. */
body.unified-support-layout :where(
 .itb-responsive-table-v596,.itb-table-wrap-v338,.client-table-wrap,.table-wrap,.invoice-table-wrap,.hours-table-wrap,
 .admin-table-wrap,.responsive-table,.itb-data-table-wrap-v571,.itb-v525-table-wrap,.invoice-table-shell
){
  width:100%!important;max-width:100%!important;min-width:0!important;overflow-x:auto!important;overflow-y:hidden!important;
  -webkit-overflow-scrolling:touch!important;scrollbar-gutter:stable!important
}
body.unified-support-layout :where(.itb-responsive-table-v596,.itb-table-wrap-v338,.client-table-wrap,.table-wrap,.invoice-table-wrap,.hours-table-wrap,.admin-table-wrap).is-scrollable-v596{
  background:linear-gradient(90deg,#fff 0,#fff 94%,rgba(9,105,255,.06) 100%)!important
}
body.unified-support-layout :where(table,.itb-table-v338,.client-ticket-table,.invoice-table,.itb-v525-table){
  width:100%!important;max-width:none!important;border-collapse:separate!important;border-spacing:0!important
}

/* Modaly a popupy. */
body.unified-support-layout :where(.modal,.dialog,.popup,.success-popup,.invoice-modal,.itb-modal,.modal-card,.dialog-card){max-width:calc(100vw - 24px)!important}

/* ========== TABLET ========== */
@media (max-width:1100px){
  body.unified-support-layout :where(
    .itb-grid-v338,.ticket-layout,.service-grid,.invoice-dashboard-grid,.invoice-main-grid,.invoice791-grid,
    .contact-admin-grid,.itb-forms-grid-v520,.admin-management-grid,.itb-v555-grid,.activity-layout,.stats-grid,
    .client-main-grid,.two-column,.two-col,.content-grid
  ){grid-template-columns:1fr!important}
  body.unified-support-layout :where(.right-column,.side-column,.itb-v555-side,.service-side-v551,.invoice-side,.quick-menu-card){position:static!important;width:100%!important;max-width:none!important}
  body.unified-support-layout :where(.client-kpi-row,.invoice-kpis,.invoice-kpis-v103,.service-kpis-v551,.notice-kpis-v551,.contact-message-kpis-v558,.itb-health-kpis-v577,.itb-v585-summary-grid){grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.unified-support-layout :where(.invoice-filter-grid,.activity-filter-grid-v548,.itb-forms-filter-v520,.itb-forms-filter-v547,.contact-message-filter-grid-v584,.itb-hours-filter-grid-v586){grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* ========== MOBILNÍ SHELL ========== */
@media (max-width:900px){
  html.itb-mobile-sidebar-open-v542,html.itb-mobile-sidebar-open-v542 body{overflow:hidden!important}
  body.unified-support-layout{padding:0!important;margin:0!important;min-width:0!important}
  body.unified-support-layout :where(.client-portal-shell,.itb-shell-v530,.itb-v555-shell,.itb-invoices-shell-v529,.admin-app-shell,.itb-admin-section-service_days){
    display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;min-height:100dvh!important;margin:0!important;padding:0!important;overflow:visible!important
  }
  body.unified-support-layout :where(.client-portal-main,.admin-app-main,.itb-admin-unified-main-v582,.invoices-main-v741){
    display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;padding:0 10px 28px!important;left:auto!important;right:auto!important;transform:none!important;overflow:visible!important
  }
  body.unified-support-layout .itb-mobile-topbar-v562{
    position:sticky!important;top:0!important;z-index:900000!important;display:grid!important;
    grid-template-columns:46px minmax(0,1fr) 46px!important;align-items:center!important;
    width:100%!important;height:64px!important;margin:0!important;padding:8px 10px!important;
    background:rgba(255,255,255,.98)!important;border-top:3px solid #17aaf2!important;border-bottom:1px solid #dbe7f5!important;
    box-shadow:0 10px 28px rgba(15,38,75,.11)!important;backdrop-filter:blur(16px)!important
  }
  body.unified-support-layout .itb-mobile-topbar-logo-v562{display:flex!important;align-items:center!important;justify-content:center!important;min-width:0!important;padding:0 8px!important}
  body.unified-support-layout .itb-mobile-topbar-logo-v562 img{display:block!important;width:auto!important;max-width:150px!important;max-height:34px!important;object-fit:contain!important}
  body.unified-support-layout :where(.itb-mobile-sidebar-open-v542,.itb-mobile-topbar-new-v562){
    display:grid!important;place-items:center!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;
    margin:0!important;padding:0!important;border-radius:14px!important;font-size:22px!important;font-weight:900!important;line-height:1!important
  }
  body.unified-support-layout .itb-mobile-sidebar-open-v542{border:1px solid #d7e5f5!important;background:#fff!important;color:#0969ff!important;box-shadow:0 7px 18px rgba(15,45,85,.07)!important}
  body.unified-support-layout .itb-mobile-topbar-new-v562{border:0!important;background:linear-gradient(135deg,#0969ff,#0d83ef)!important;color:#fff!important;box-shadow:0 9px 21px rgba(9,105,255,.25)!important}

  body.unified-support-layout .client-portal-sidebar,
  body.unified-support-layout .client-portal-shell>.client-portal-sidebar,
  body.unified-support-layout .itb-v555-shell>.client-portal-sidebar,
  body.unified-support-layout .itb-invoices-shell-v529>.client-portal-sidebar{
    position:fixed!important;inset:0 auto 0 0!important;z-index:950000!important;display:block!important;
    width:min(92vw,390px)!important;min-width:0!important;max-width:390px!important;height:100dvh!important;min-height:100dvh!important;
    margin:0!important;padding:16px 13px 26px!important;overflow-y:auto!important;overflow-x:hidden!important;
    background:linear-gradient(180deg,#fff 0%,#f5faff 100%)!important;border:0!important;border-right:1px solid #d9e6f5!important;
    box-shadow:28px 0 70px rgba(3,22,58,.28)!important;transform:translate3d(-105%,0,0)!important;
    transition:transform .24s ease!important;visibility:visible!important;opacity:1!important;pointer-events:none!important
  }
  html.itb-mobile-sidebar-open-v542 body.unified-support-layout .client-portal-sidebar,
  body.unified-support-layout.itb-mobile-sidebar-open-v542 .client-portal-sidebar{transform:translate3d(0,0,0)!important;pointer-events:auto!important}
  body.unified-support-layout .itb-sidebar-backdrop-v542{position:fixed!important;inset:0!important;z-index:940000!important;background:rgba(1,15,38,.58)!important;backdrop-filter:blur(3px)!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important;transition:.2s ease!important}
  html.itb-mobile-sidebar-open-v542 body.unified-support-layout .itb-sidebar-backdrop-v542,
  body.unified-support-layout.itb-mobile-sidebar-open-v542 .itb-sidebar-backdrop-v542{opacity:1!important;visibility:visible!important;pointer-events:auto!important}
  body.unified-support-layout .client-portal-sidebar .client-sidebar-sitebrand{display:flex!important;align-items:center!important;justify-content:flex-start!important;min-height:52px!important;margin:0 48px 12px 0!important;padding:0 0 12px!important;border-bottom:1px solid #dfe9f5!important}
  body.unified-support-layout .client-portal-sidebar .client-sidebar-sitebrand img.itb-sidebar-logo-full-v546{display:block!important;width:auto!important;max-width:180px!important;max-height:40px!important}
  body.unified-support-layout .client-portal-sidebar .client-sidebar-sitebrand img.itb-sidebar-logo-icon-v546{display:none!important}
  body.unified-support-layout .itb-mobile-sidebar-close-v542{position:absolute!important;top:12px!important;right:12px!important;z-index:4!important;display:grid!important;place-items:center!important;width:42px!important;height:42px!important;border:1px solid #d5e5f8!important;border-radius:14px!important;background:#fff!important;color:#14365f!important;font-size:27px!important;line-height:1!important}
  body.unified-support-layout .client-sidebar-dates{display:grid!important;grid-template-columns:1fr!important;gap:7px!important;margin:0 0 10px!important}
  body.unified-support-layout .client-today-pill{min-height:54px!important;padding:9px 12px!important;border-radius:14px!important;background:#f4f8fd!important;border:1px solid #dce8f5!important}
  body.unified-support-layout .itb-sidebar-primary-cta-v467{display:flex!important;min-height:50px!important;margin:0 0 10px!important;border-radius:14px!important}
  body.unified-support-layout .client-portal-sidebar .client-side-nav{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;width:100%!important;margin:0!important;padding:0!important;visibility:visible!important;opacity:1!important}
  body.unified-support-layout .client-portal-sidebar .client-side-nav>a,
  body.unified-support-layout .client-portal-sidebar .client-side-nav>details>summary,
  body.unified-support-layout .client-portal-sidebar .client-admin-submenu-v533 a{
    display:flex!important;align-items:center!important;gap:8px!important;min-width:0!important;min-height:58px!important;padding:9px 10px!important;
    border:1px solid #dde9f6!important;border-radius:15px!important;background:#fff!important;color:#29415f!important;text-decoration:none!important;
    font-size:12px!important;font-weight:850!important;line-height:1.2!important;white-space:normal!important;box-shadow:0 7px 20px rgba(12,48,93,.045)!important
  }
  body.unified-support-layout .client-portal-sidebar .client-side-nav>a.active,
  body.unified-support-layout .client-portal-sidebar .client-side-nav>a[aria-current="page"]{background:linear-gradient(135deg,#0969ff,#0b77e9)!important;border-color:#0969ff!important;color:#fff!important;box-shadow:0 10px 24px rgba(9,105,255,.20)!important}
  body.unified-support-layout .client-portal-sidebar .client-side-nav>a>span,
  body.unified-support-layout .client-portal-sidebar .client-side-nav>details>summary>span{
    flex:0 0 30px!important;display:grid!important;place-items:center!important;width:30px!important;height:30px!important;margin:0!important;border-radius:10px!important;background:#edf5ff!important;color:#0969ff!important
  }
  body.unified-support-layout .client-portal-sidebar .client-side-nav>a.active>span,
  body.unified-support-layout .client-portal-sidebar .client-side-nav>a[aria-current="page"]>span{background:rgba(255,255,255,.17)!important;color:#fff!important}
  body.unified-support-layout .client-portal-sidebar details{grid-column:1/-1!important;width:100%!important}
  body.unified-support-layout .client-portal-sidebar details>.itb-nav-group-links-v580{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;padding-top:8px!important}
  body.unified-support-layout .client-sidebar-help{display:none!important}
  body.unified-support-layout .itb-sidebar-floating-toggle-v544{display:none!important}
  body.unified-support-layout :where(.itb-mobile-menu-main-v420,.itb-mobile-menu-v417,.itb-mobile-menu-panel-v420,.itb-hard-mobile-topbar-v573){display:none!important}

  /* Hero přes celou šířku obsahu a bez náhodných mezer. */
  body.unified-support-layout :where(
    .itb-dash-hero-v338,.itb-admin-unified-hero-v580,.itb-admin-unified-hero-v582,.itb-new-ticket-hero-v580,
    .activity-hero-card,.itb-forms-hero-v520,.contact-admin-hero,.itb-health-hero-v577,
    .invoice-admin-hero,.invoice791-hero,.invoice-dashboard-hero,.itb-v553-management-hero,
    .itb-invoices-hero-v521,.itb-billing-hero-v522,.contact-hero,.about-hero,.admin-page-head
  ){
    width:calc(100% + 20px)!important;max-width:none!important;min-height:148px!important;margin:0 -10px 12px!important;padding:22px 17px!important;border-radius:0 0 23px 23px!important
  }
  body.unified-support-layout :where(
    .itb-dash-hero-v338,.itb-admin-unified-hero-v580,.itb-admin-unified-hero-v582,.itb-new-ticket-hero-v580,
    .activity-hero-card,.itb-forms-hero-v520,.contact-admin-hero,.itb-health-hero-v577,.invoice-admin-hero,
    .invoice791-hero,.invoice-dashboard-hero,.itb-v553-management-hero,.itb-invoices-hero-v521,.itb-billing-hero-v522,.contact-hero,.about-hero,.admin-page-head
  ) h1{font-size:clamp(27px,8vw,38px)!important;line-height:1.03!important;letter-spacing:-.04em!important;margin-top:5px!important;margin-bottom:8px!important}
  body.unified-support-layout :where(
    .itb-dash-hero-v338,.itb-admin-unified-hero-v580,.itb-admin-unified-hero-v582,.itb-new-ticket-hero-v580,
    .activity-hero-card,.itb-forms-hero-v520,.contact-admin-hero,.itb-health-hero-v577,.invoice-admin-hero,
    .invoice791-hero,.invoice-dashboard-hero,.itb-v553-management-hero,.itb-invoices-hero-v521,.itb-billing-hero-v522,.contact-hero,.about-hero,.admin-page-head
  ) p{max-width:100%!important;font-size:13px!important;line-height:1.45!important;margin-bottom:0!important}
  body.unified-support-layout :where(.itb-page-hero-company,.itb-admin-unified-identity-v582,.itb-admin-identity-v533,.itb-new-ticket-company-card-v588){position:static!important;width:100%!important;max-width:none!important;margin-top:15px!important;transform:none!important}

  /* KPI: profesionální 2sloupcové zobrazení. */
  body.unified-support-layout :where(
    .itb-kpis-v338,.client-kpi-row,.invoice-kpis,.invoice-kpis-v103,.service-kpis-v551,.notice-kpis-v551,
    .contact-message-kpis-v558,.itb-health-kpis-v577,.itb-v585-summary-grid,.itb-forms-kpis-v520,.kpis
  ){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;width:100%!important;margin-left:0!important;margin-right:0!important}
  body.unified-support-layout :where(.itb-kpi-v338,.client-kpi,.invoice791-kpi,.service-kpis-v551>article,.notice-kpis-v551>article,.kpi-card){
    min-height:112px!important;padding:12px 9px!important;border-radius:18px!important;display:grid!important;place-items:center!important;align-content:center!important
  }
  body.unified-support-layout :where(.itb-kpi-v338,.client-kpi,.invoice791-kpi,.service-kpis-v551>article,.notice-kpis-v551>article,.kpi-card) :where(strong,.num){font-size:clamp(20px,6vw,28px)!important;line-height:1.05!important}
  body.unified-support-layout :where(.itb-kpi-v338,.client-kpi,.invoice791-kpi,.service-kpis-v551>article,.notice-kpis-v551>article,.kpi-card) :where(small,em,p){font-size:10px!important;line-height:1.3!important;text-align:center!important}
  body.unified-support-layout :where(.itb-wait-bubble-v338,.itb-admin-nav-badge-v561,.itb-service-request-heading-badge-v560){min-width:22px!important;height:22px!important;padding:0 6px!important;font-size:9px!important;border-width:2px!important}

  /* Formuláře a filtry do jednoho sloupce. */
  body.unified-support-layout :where(
    .form-grid,.itb-v555-form-grid,.itb-form-grid-v523,.itb-user-form-grid-v523,.invoice-filter-grid,
    .activity-filter-grid-v548,.contact-message-filter-grid-v584,.itb-forms-filter-v520,.itb-forms-filter-v547,
    .itb-hours-filter-grid-v586,.itb-health-filters-v577,.admin-grid,.brand-upload-grid,.admin-ticket-owner-grid-v521
  ){display:grid!important;grid-template-columns:1fr!important;gap:11px!important;width:100%!important}
  body.unified-support-layout :where(.wide,.field-full,.span-2,.col-12,.col-8,.col-6,.col-4,.col-3){grid-column:auto!important;width:100%!important}
  body.unified-support-layout :where(.form-row,label){min-width:0!important}
  body.unified-support-layout :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea){width:100%!important;min-height:46px!important;border-radius:13px!important;font-size:16px!important}
  body.unified-support-layout textarea{min-height:120px!important}
  body.unified-support-layout :where(.actions,.invoice-head-actions,.invoice-filter-actions,.activity-filter-actions-v548,.itb-forms-filter-actions-v547,.contact-message-filter-actions-v584,.itb-hours-filter-actions-v586,.itb-health-actions-v577,.admin-actions){
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;width:100%!important;margin-left:0!important;margin-right:0!important
  }
  body.unified-support-layout :where(.actions,.invoice-head-actions,.invoice-filter-actions,.activity-filter-actions-v548,.itb-forms-filter-actions-v547,.contact-message-filter-actions-v584,.itb-hours-filter-actions-v586,.itb-health-actions-v577,.admin-actions)>*{
    width:100%!important;min-height:46px!important;margin:0!important;display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important
  }

  /* Karty, pravé sloupce a obecné gridy. */
  body.unified-support-layout :where(
    .itb-grid-v338,.ticket-layout,.service-grid,.invoice-dashboard-grid,.invoice-main-grid,.invoice791-grid,
    .contact-admin-grid,.itb-forms-grid-v520,.admin-management-grid,.itb-v555-grid,.activity-layout,.stats-grid,
    .client-main-grid,.two-column,.two-col,.content-grid,.invoice-admin-grid
  ){display:grid!important;grid-template-columns:1fr!important;gap:12px!important;width:100%!important}
  body.unified-support-layout :where(.client-card,.card,.panel,.itb-card-v338,.invoice791-card,.service-card,.admin-module-card,.summary-card,.kpi-card){
    width:100%!important;max-width:100%!important;margin-left:0!important;margin-right:0!important;padding:14px!important;border-radius:18px!important;box-shadow:0 10px 25px rgba(15,45,85,.06)!important
  }
  body.unified-support-layout :where(.right-column,.side-column,.itb-v555-side,.service-side-v551,.invoice-side,.quick-menu-card){position:static!important;top:auto!important;width:100%!important;max-width:none!important;margin:0!important}

  /* Tabulky. */
  body.unified-support-layout :where(table,.itb-table-v338,.client-ticket-table,.invoice-table,.itb-v525-table){min-width:720px!important;font-size:12px!important}
  body.unified-support-layout :where(th,td){white-space:normal!important}
  body.unified-support-layout .itb-responsive-table-v596{border:1px solid #d7e5f5!important;border-radius:16px!important;background:#fff!important}
  body.unified-support-layout .itb-responsive-table-v596::after{content:'Posuňte tabulku do stran';position:sticky;left:8px;display:inline-flex;margin:7px;padding:5px 9px;border-radius:999px;background:#eef6ff;color:#356183;font-size:10px;font-weight:800;pointer-events:none}
  body.unified-support-layout .itb-responsive-table-v596:not(.is-scrollable-v596)::after{display:none}

  /* stránkování, záložky a horizontální lišty */
  body.unified-support-layout :where(.pagination,.pager,.itb-pager-v390,.activity-pagination-v548,.invoice-pagination,.itb-pagination-v583){display:flex!important;flex-wrap:wrap!important;gap:7px!important;align-items:center!important;justify-content:center!important;width:100%!important}
  body.unified-support-layout :where(.tabs,.status-tabs,.invoice-status-tabs,.mon-tabs,.preset-row,.quick-periods){max-width:100%!important;overflow-x:auto!important;flex-wrap:nowrap!important;-webkit-overflow-scrolling:touch!important;scrollbar-width:thin!important}

  /* Detail ticketu. */
  body.unified-support-layout :where(.ticket-flow,.ticket-flow-grid,.ticket-steps,.itb-flow-timeline-v345,.itb-timeline-steps-v345){max-width:100%!important;overflow-x:auto!important;display:flex!important;gap:9px!important;scroll-snap-type:x proximity!important;padding-bottom:7px!important}
  body.unified-support-layout :where(.ticket-flow>* ,.ticket-flow-grid>* ,.ticket-steps>* ,.itb-timeline-steps-v345>* ){flex:0 0 min(82vw,290px)!important;scroll-snap-align:start!important}
  body.unified-support-layout :where(.ticket-summary-grid,.ticket-kpis,.ticket-meta-grid){grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.unified-support-layout :where(.ticket-main-grid,.ticket-detail-grid){grid-template-columns:1fr!important}

  /* Servisní kalendář admina i klienta. */
  body.unified-support-layout :where(.service-head-row,.service-month-head,.service-calendar-head){grid-template-columns:1fr!important;gap:12px!important}
  body.unified-support-layout .service-month-nav{display:grid!important;grid-template-columns:42px minmax(0,1fr) 42px!important;gap:7px!important;width:100%!important}
  body.unified-support-layout .service-month-nav button[type="submit"],body.unified-support-layout .service-month-nav .btn{grid-column:1/-1!important}
  body.unified-support-layout :where(.service-calendar-scroll-v551,.service-calendar-wrap,.calendar-scroll){width:100%!important;max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
  body.unified-support-layout :where(.service-calendar-weekdays-v559,.service-calendar){min-width:780px!important;grid-template-columns:repeat(7,minmax(100px,1fr))!important}
  body.unified-support-layout .service-day{min-height:112px!important}

  /* Formuláře – master/detail se skládá pod sebe. */
  body.unified-support-layout .itb-forms-grid-v520{grid-template-columns:1fr!important}
  body.unified-support-layout .itb-forms-list-v520{max-height:none!important;overflow:visible!important}
  body.unified-support-layout .itb-form-list-v520{max-height:420px!important;overflow:auto!important}

  /* Modaly. */
  body.unified-support-layout :where(.modal,.dialog,.popup,.success-popup,.invoice-modal,.itb-modal){inset:10px!important;width:auto!important;max-width:none!important;max-height:calc(100dvh - 20px)!important;margin:0!important;overflow:auto!important;border-radius:20px!important}
}

/* ========== MALÝ TELEFON ========== */
@media (max-width:560px){
  body.unified-support-layout :where(.client-portal-main,.admin-app-main,.itb-admin-unified-main-v582,.invoices-main-v741){padding-left:8px!important;padding-right:8px!important}
  body.unified-support-layout :where(
    .itb-dash-hero-v338,.itb-admin-unified-hero-v580,.itb-admin-unified-hero-v582,.itb-new-ticket-hero-v580,
    .activity-hero-card,.itb-forms-hero-v520,.contact-admin-hero,.itb-health-hero-v577,.invoice-admin-hero,
    .invoice791-hero,.invoice-dashboard-hero,.itb-v553-management-hero,.itb-invoices-hero-v521,.itb-billing-hero-v522,.contact-hero,.about-hero,.admin-page-head
  ){width:calc(100% + 16px)!important;margin-left:-8px!important;margin-right:-8px!important;padding:20px 14px!important;min-height:140px!important}
  body.unified-support-layout .client-portal-sidebar{width:min(94vw,370px)!important;padding-left:11px!important;padding-right:11px!important}
  body.unified-support-layout .client-portal-sidebar .client-side-nav{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
  body.unified-support-layout .client-portal-sidebar .client-side-nav>a,
  body.unified-support-layout .client-portal-sidebar .client-side-nav>details>summary,
  body.unified-support-layout .client-portal-sidebar .client-admin-submenu-v533 a{min-height:55px!important;padding:8px!important;font-size:11px!important}
  body.unified-support-layout :where(.client-card,.card,.panel,.itb-card-v338,.invoice791-card,.service-card,.admin-module-card,.summary-card,.kpi-card){padding:12px!important;border-radius:16px!important}
  body.unified-support-layout :where(.actions,.invoice-head-actions,.invoice-filter-actions,.activity-filter-actions-v548,.itb-forms-filter-actions-v547,.contact-message-filter-actions-v584,.itb-hours-filter-actions-v586,.itb-health-actions-v577,.admin-actions){grid-template-columns:1fr!important}
  body.unified-support-layout :where(.ticket-summary-grid,.ticket-kpis,.ticket-meta-grid){grid-template-columns:1fr 1fr!important}
}
@media (max-width:330px){
  body.unified-support-layout :where(.itb-kpis-v338,.client-kpi-row,.invoice-kpis,.invoice-kpis-v103,.service-kpis-v551,.notice-kpis-v551,.contact-message-kpis-v558,.itb-health-kpis-v577,.itb-v585-summary-grid,.itb-forms-kpis-v520,.kpis){grid-template-columns:1fr!important}
  body.unified-support-layout .client-portal-sidebar .client-side-nav{grid-template-columns:1fr!important}
}

/* Přihlašovací a chybové stránky. */
@media (max-width:720px){
  body.login-body :where(.login-card,.auth-card,.support-login-card,.reset-card){width:calc(100% - 20px)!important;max-width:none!important;margin:10px auto!important;padding:20px 16px!important;border-radius:22px!important}
  body.login-body :where(.login-grid,.auth-grid){grid-template-columns:1fr!important}
  body.login-body :where(input,button,.btn){width:100%!important;min-height:48px!important}
}
