/* IT-BALON.CZ support – v628 mobile comfort and final responsive consistency */
:root{
  --itb-m628-blue:#0969ff;
  --itb-m628-navy:#071c3d;
  --itb-m628-line:#d7e5f6;
  --itb-m628-soft:#f5f9fe;
  --itb-m628-muted:#607697;
}

@media(max-width:900px){
  body.unified-support-layout{
    overscroll-behavior-y:none!important;
    -webkit-text-size-adjust:100%!important;
  }
  body.unified-support-layout :is(a,button,input,select,textarea,summary){-webkit-tap-highlight-color:transparent!important}
  body.unified-support-layout :is(a,button,.btn,.itb-v555-btn):active{transform:translateY(1px)!important}
  body.unified-support-layout :is(p,span,strong,small,em,td,th,a){overflow-wrap:anywhere!important}

  /* Topbar remains readable even with long page names. */
  body.unified-support-layout .itb-mobile-topbar-logo-v562{padding:0 3px!important}
  body.unified-support-layout .itb-mobile-page-title-v627{max-width:min(45vw,190px)!important}

  /* Drawer ergonomics and a clean fixed bottom logout action. */
  body.unified-support-layout .client-portal-sidebar{
    height:100dvh!important;max-height:100dvh!important;overflow-y:auto!important;overflow-x:hidden!important;
    scrollbar-width:thin!important;scrollbar-color:#bfd3eb transparent!important;
  }
  body.unified-support-layout .client-side-nav{padding-bottom:7px!important}
  body.unified-support-layout .client-logout-link{
    bottom:calc(4px + env(safe-area-inset-bottom,0px))!important;margin-top:10px!important;
    box-shadow:0 -8px 18px rgba(255,255,255,.92)!important;
  }

  /* Horizontal strips show a subtle edge fade and a swipe hint. */
  body.unified-support-layout .itb-mobile-overflow-v628{
    position:relative!important;scrollbar-width:none!important;-webkit-overflow-scrolling:touch!important;
    mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 22px),transparent 100%)!important;
    -webkit-mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 22px),transparent 100%)!important;
  }
  body.unified-support-layout .itb-mobile-overflow-v628::-webkit-scrollbar{display:none!important}
  body.unified-support-layout .itb-mobile-overflow-v628.is-scrolled-v628{
    mask-image:linear-gradient(90deg,transparent 0,#000 20px,#000 calc(100% - 20px),transparent 100%)!important;
    -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 20px,#000 calc(100% - 20px),transparent 100%)!important;
  }
  body.unified-support-layout .itb-mobile-swipe-hint-v628{
    display:flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;
    margin:3px 0 8px!important;color:#6b819c!important;font-size:10px!important;font-weight:760!important;
  }
  body.unified-support-layout .itb-mobile-swipe-hint-v628::before{content:'↔';color:var(--itb-m628-blue)!important;font-size:14px!important}

  /* Collapsible secondary mobile cards, especially the invoice side column. */
  body.unified-support-layout .itb-mobile-collapsible-card-v628>.itb-mobile-collapse-head-v628{
    cursor:pointer!important;user-select:none!important;
  }
  body.unified-support-layout .itb-mobile-collapse-button-v628{
    display:grid!important;place-items:center!important;width:38px!important;height:38px!important;min-height:38px!important;
    margin-left:auto!important;border:1px solid #cfe0f4!important;border-radius:12px!important;background:#eef6ff!important;
    color:#075edc!important;font-size:20px!important;font-weight:900!important;line-height:1!important;
  }
  body.unified-support-layout .itb-mobile-collapsible-card-v628.is-collapsed-v628>*:not(.itb-mobile-collapse-head-v628){display:none!important}
  body.unified-support-layout .itb-mobile-collapsible-card-v628.is-collapsed-v628{padding-bottom:0!important;min-height:0!important}

  /* More concise stacked tables: suppress empty fields and highlight key rows. */
  body.unified-support-layout table.itb-mobile-stack-table-v626 td.is-empty-v627{display:none!important}
  body.unified-support-layout table.itb-mobile-stack-table-v626 td.is-key-v628{
    grid-column:1/-1!important;padding-top:9px!important;padding-bottom:9px!important;
    background:#f6faff!important;border-radius:10px!important;
  }
  body.unified-support-layout table.itb-mobile-stack-table-v626 td.is-key-v628::before{color:#075edc!important}
  body.unified-support-layout table.itb-mobile-stack-table-v626 tr{align-content:start!important}

  /* Dashboard mobile cards and filters. */
  body.unified-support-layout .itb-index-v338 .itb-filter-v338{border-radius:17px!important}
  body.unified-support-layout .itb-index-v338 .itb-filter-actions-v410>*{width:100%!important}
  body.unified-support-layout .itb-index-v338 .itb-ticket-card-v407{overflow:hidden!important}
  body.unified-support-layout .itb-index-v338 .itb-ticket-card-v407 .title{padding-right:4px!important}

  /* New ticket: reduce vertical noise and keep section hierarchy clear. */
  body.unified-support-layout .itb-new-ticket-main-v567 .panel{border-radius:18px!important}
  body.unified-support-layout .itb-new-ticket-main-v567 :is(.itb-priority-row-v525,.admin-ticket-owner-grid-v521){margin-top:10px!important}
  body.unified-support-layout .itb-new-ticket-main-v567 .itb-ticket-type-card-v525 strong{font-size:13px!important;line-height:1.22!important}
  body.unified-support-layout .itb-new-ticket-main-v567 .itb-ticket-type-card-v525 small{font-size:10px!important;line-height:1.35!important}
  body.unified-support-layout .itb-new-ticket-main-v567 textarea{min-height:132px!important}

  /* Service days: mobile toolbar, calendar and form remain compact. */
  body.unified-support-layout .svc618-month-form{align-items:end!important}
  body.unified-support-layout .svc618-month-form label small{display:block!important}
  body.unified-support-layout .svc618-day>strong{font-size:12px!important}
  body.unified-support-layout .svc618-side :is(input,select,textarea,button){font-size:16px!important}
  body.unified-support-layout .svc618-actions>*{flex:1 1 120px!important}

  /* Forms: selected detail is easier to reach and bulk controls stay contained. */
  body.unified-support-layout .itb-forms-bulk-toolbar-v590{overflow:hidden!important}
  body.unified-support-layout .itb-forms-bulk-actions-v590{min-width:0!important;width:100%!important}
  body.unified-support-layout .itb-forms-bulk-actions-v590>*{max-width:100%!important}
  body.unified-support-layout .itb-form-detail-v520.itb-mobile-target-v628{scroll-margin-top:calc(var(--itb-m627-topbar) + 10px)!important}
  body.unified-support-layout .itb-form-row-v520[aria-current="true"]{box-shadow:0 0 0 3px rgba(9,105,255,.10)!important}

  /* Invoice and hours: secondary content becomes manageable on a long mobile page. */
  body.itb-admin-page-invoice_dashboard .invoice791-overview,
  body.itb-admin-page-invoice_dashboard .invoice791-mainrow,
  body.itb-admin-page-invoice_dashboard .invoice791-bottom{gap:10px!important}
  body.itb-admin-page-invoice_dashboard .invoice791-chart{min-width:690px!important}
  body.itb-admin-page-invoice_dashboard .invoice791-card-head{align-items:center!important}
  body.unified-support-layout .itb-v555-side{gap:10px!important}

  /* Activity and client queries. */
  body.unified-support-layout .activity-item :is(h3,strong){line-height:1.25!important}
  body.unified-support-layout .contact-ticket-feed-count-v610{white-space:nowrap!important}
  body.unified-support-layout .contact-ticket-item-v610 p{display:-webkit-box!important;-webkit-line-clamp:4!important;-webkit-box-orient:vertical!important;overflow:hidden!important}

  /* Mobile empty states should not waste the whole screen. */
  body.unified-support-layout :is(.invoice791-empty,.invoice791-empty-state,.svc618-empty,.muted){min-height:0!important;padding:15px!important}
}

@media(max-width:560px){
  body.unified-support-layout .itb-mobile-page-title-v627{max-width:42vw!important}
  body.unified-support-layout .itb-index-v338 .itb-filter-actions-v410{grid-template-columns:1fr!important}
  body.unified-support-layout .itb-ticket-type-grid-v525{grid-template-columns:1fr!important}
  body.unified-support-layout .svc618-kpis{grid-template-columns:1fr 1fr!important}
  body.unified-support-layout .svc618-toolbar h2{font-size:22px!important}
  body.unified-support-layout .svc618-month-form{grid-template-columns:42px minmax(0,1fr) 42px!important}
  body.unified-support-layout .svc618-month-form button{grid-column:1/-1!important}
  body.unified-support-layout .itb-forms-filter-actions-v547{grid-template-columns:1fr 1fr!important}
}

@media(max-width:380px){
  body.unified-support-layout .itb-mobile-page-title-v627{display:none!important}
  body.unified-support-layout .itb-mobile-topbar-logo-v562 img{max-width:112px!important}
  body.unified-support-layout .svc618-kpis{grid-template-columns:1fr!important}
  body.unified-support-layout .itb-forms-filter-actions-v547{grid-template-columns:1fr!important}
  body.unified-support-layout table.itb-mobile-stack-table-v626 td{grid-template-columns:1fr!important;gap:3px!important}
}

/* Small landscape phones: reclaim vertical space without losing touch targets. */
@media(max-width:900px) and (orientation:landscape) and (max-height:560px){
  :root{--itb-m627-topbar:56px}
  body.unified-support-layout .itb-mobile-topbar-v562{height:56px!important;padding-top:5px!important;padding-bottom:5px!important}
  body.unified-support-layout .itb-mobile-sidebar-open-v542,
  body.unified-support-layout .itb-mobile-topbar-new-v562{width:40px!important;height:40px!important;min-width:40px!important}
  body.unified-support-layout .itb-mobile-topbar-logo-v562 img{height:22px!important}
  body.unified-support-layout .client-portal-sidebar{width:min(390px,68vw)!important;max-width:min(390px,68vw)!important}
  body.unified-support-layout .client-sidebar-sitebrand{min-height:50px!important}
  body.unified-support-layout .client-sidebar-dates{grid-template-columns:repeat(3,1fr)!important}
  body.unified-support-layout .client-sidebar-dates>*:first-child{grid-column:auto!important}
  body.unified-support-layout .client-side-nav>a,
  body.unified-support-layout .client-side-nav details>summary,
  body.unified-support-layout .client-side-nav details a{min-height:40px!important;padding-top:5px!important;padding-bottom:5px!important}
  body.unified-support-layout :is(.itb-dash-hero-v338,.itb-admin-unified-hero-v582,.activity-hero-card,.contact-admin-hero,.itb-forms-hero-v520,.svc619-hero,.invoice791-head,.itb-new-ticket-hero-v580){padding-top:15px!important;padding-bottom:15px!important}
}
