
/* ============================================================
   ZLOTIA V25.3 — MOBILE DENSITY
   Références : iOS 44 pt minimum, web mobile ~48 CSS px,
   viewport device-width, safe-area et aucun scroll horizontal.
============================================================ */
@media (max-width: 850px){
  .software-layout.authenticated .main-content{margin-left:0!important;min-width:0}
  .software-layout.authenticated .page-content{
    width:min(calc(100% - 32px),720px);
    max-width:720px;
    margin-inline:auto;
    padding-left:0!important;
    padding-right:0!important;
  }
}
@media (max-width: 700px){
  html,body{max-width:100%;overflow-x:hidden}
  body{font-size:15px}
  .software-layout.authenticated{
    min-height:100dvh;
    background:#fbfaf6;
  }
  .software-layout.authenticated .main-content{
    min-height:100dvh;
    padding-bottom:calc(78px + env(safe-area-inset-bottom));
  }
  .software-layout.authenticated .page-content{
    width:min(calc(100% - 24px),520px)!important;
    max-width:520px!important;
    margin:0 auto!important;
    padding:12px 0 calc(26px + env(safe-area-inset-bottom))!important;
  }
  .software-layout.authenticated .topbar{
    min-height:calc(58px + env(safe-area-inset-top))!important;
    height:auto!important;
    padding:calc(6px + env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 6px max(12px,env(safe-area-inset-left))!important;
    gap:8px!important;
  }
  .software-layout.authenticated .mobile-menu-button{
    width:48px!important;
    height:48px!important;
    min-width:48px!important;
    min-height:48px!important;
    border-radius:13px!important;
  }
  .software-layout.authenticated .topbar-actions{gap:7px!important}
  .software-layout.authenticated .topbar-actions .button,
  .software-layout.authenticated .topbar-utility-button{
    min-height:48px!important;
    padding:8px 12px!important;
    border-radius:12px!important;
    font-size:.75rem!important;
  }
  .software-layout.authenticated input:not([type="checkbox"]):not([type="radio"]),
  .software-layout.authenticated select,
  .software-layout.authenticated textarea{
    min-height:46px!important;
    font-size:16px!important;
    border-radius:10px!important;
  }
  .software-layout.authenticated textarea{min-height:88px!important}
  .software-layout.authenticated .button{
    min-height:44px;
    padding:8px 12px;
    border-radius:11px;
    font-size:.76rem;
  }
  @media(any-pointer:coarse){
    .software-layout.authenticated .button,
    .software-layout.authenticated .text-button,
    .software-layout.authenticated .navigation-link,
    .software-layout.authenticated .module-checkitem{
      min-height:48px!important;
    }
  }
  .software-layout.authenticated .content-card{
    padding:14px!important;
    border-radius:14px!important;
    box-shadow:0 7px 20px rgba(72,53,18,.045)!important;
  }
  .software-layout.authenticated .content-card-header{
    align-items:flex-start!important;
    gap:10px!important;
    margin-bottom:12px!important;
  }
  .software-layout.authenticated .content-card-header h3{font-size:.94rem!important}
  .software-layout.authenticated .content-card-header p{font-size:.71rem!important;line-height:1.45!important}
  .software-layout.authenticated .app-view:not(#dashboardView) .view-heading-row{
    padding:14px!important;
    margin-bottom:12px!important;
    border-radius:14px!important;
  }
  .software-layout.authenticated .app-view:not(#dashboardView) .view-heading-row h2{font-size:1.2rem!important;line-height:1.15!important}
  .software-layout.authenticated .app-view:not(#dashboardView) .view-heading-row>div>p:not(.eyebrow){font-size:.76rem!important;line-height:1.45!important}
  .zlotia-modules-view .module-hero{
    padding:15px!important;
    margin-bottom:12px!important;
    border-radius:15px!important;
  }
  .zlotia-modules-view .module-hero h2{font-size:1.22rem!important;line-height:1.16!important}
  .zlotia-modules-view .module-hero p{font-size:.75rem!important;line-height:1.45!important}
  .module-status-pill{padding:6px 9px!important;font-size:.66rem!important}
  .module-form-grid{gap:10px!important}
  .module-form-grid label{font-size:.72rem!important}
  .module-catalog-grid{gap:10px!important}
  .module-catalog-card{padding:14px!important;border-radius:14px!important}
  .module-catalog-card h3{font-size:.94rem!important}
  .module-catalog-card p{font-size:.73rem!important;line-height:1.45!important}
  .module-catalog-card .module-price{font-size:1.28rem!important}
  .module-grid-2{gap:12px!important}
  .module-table-wrap{
    max-width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    border-radius:11px;
  }
  .module-table{min-width:620px}
  .software-layout.authenticated #dashboardView.dashboard-premium .welcome-banner{
    padding:18px 16px!important;
    margin-bottom:14px!important;
    border-radius:15px!important;
  }
  .software-layout.authenticated #dashboardView.dashboard-premium .welcome-banner h2{font-size:1.45rem!important}
  .software-layout.authenticated #dashboardView.dashboard-premium .welcome-banner p:last-child{font-size:.77rem!important}
  .software-layout.authenticated #dashboardView.dashboard-premium .statistics-grid{gap:8px!important;margin-bottom:14px!important}
  .software-layout.authenticated #dashboardView.dashboard-premium .statistic-card{
    min-height:96px!important;
    padding:11px!important;
    border-radius:13px!important;
  }
  .software-layout.authenticated #dashboardView.dashboard-premium .statistic-icon{width:32px!important;height:32px!important}
  .software-layout.authenticated #dashboardView.dashboard-premium .statistic-card strong{font-size:1.06rem!important}
  .software-layout.authenticated .mobile-bottom-nav{
    left:max(10px,env(safe-area-inset-left))!important;
    right:max(10px,env(safe-area-inset-right))!important;
    bottom:max(8px,env(safe-area-inset-bottom))!important;
    min-height:64px!important;
    padding:5px!important;
    border-radius:18px!important;
  }
  .mobile-bottom-link,.mobile-bottom-create{min-height:52px!important}
  .mobile-bottom-create{width:56px!important;min-height:56px!important;margin-top:-14px!important}
  .mobile-bottom-link small,.mobile-bottom-create small{font-size:.58rem!important}
  .modal-content{
    width:min(calc(100% - 20px),520px)!important;
    max-height:calc(100dvh - 20px)!important;
    padding:16px!important;
    border-radius:17px!important;
  }
}
@media (max-width: 430px){
  .software-layout.authenticated .page-content{width:calc(100% - 20px)!important}
  .software-layout.authenticated .topbar-actions .topbar-utility-button{display:none!important}
  .module-kpi-grid{grid-template-columns:1fr 1fr!important}
  .module-kpi span{font-size:.61rem!important}
  .module-kpi small{font-size:.62rem!important}
  .module-record-top{gap:7px}
}
@media (max-width: 360px){
  .software-layout.authenticated .page-content{width:calc(100% - 16px)!important}
  .software-layout.authenticated .topbar{padding-left:8px!important;padding-right:8px!important}
  .software-layout.authenticated .topbar-actions .button{padding-inline:9px!important}
  .module-kpi-grid{gap:6px!important}
  .module-kpi{padding:10px!important}
  .module-heatmap{grid-template-columns:1fr!important}
}


/* V25.4 — Installed Android app: reserve the system status-bar area.
   Fallback 30px is intentional because some TWA/Custom Tab combinations
   report safe-area-inset-top as zero on Android edge-to-edge. */
@media (display-mode: standalone) and (max-width: 700px){
  :root{
    --zlotia-app-system-top:max(30px, env(safe-area-inset-top));
  }

  .software-layout.authenticated::before{
    content:"";
    position:fixed;
    z-index:2147482000;
    left:0;
    right:0;
    top:0;
    height:var(--zlotia-app-system-top);
    pointer-events:none;
    background:linear-gradient(180deg,#e8bd58,#c8952c);
  }

  .software-layout.authenticated .topbar{
    min-height:calc(58px + var(--zlotia-app-system-top))!important;
    padding-top:calc(var(--zlotia-app-system-top) + 6px)!important;
  }
}
