/* Theo Properties RC1.0.15.107 — Mobile Tenant Dashboard Architecture Lock
   Scope: authenticated Tenant dashboard on phones <=700px only.
   One canonical dashboard with pre-tenancy and active-tenancy states. */

@media (max-width:700px){
  body.signed-mode #tenant.ws30-tenant-pretenancy,
  body.signed-mode #tenant.ws30-tenant-active{
    min-width:0!important;
    padding-bottom:calc(118px + env(safe-area-inset-bottom))!important;
  }

  /* Suppress the obsolete static pre-tenancy shell once the canonical dashboard owns mobile. */
  body.signed-mode #tenant.ws30-tenant-pretenancy>.eyebrow,
  body.signed-mode #tenant.ws30-tenant-pretenancy>.view-head,
  body.signed-mode #tenant.ws30-tenant-pretenancy>.tenant-empty-grid{
    display:none!important;
  }

  body.signed-mode #tenant.ws30-tenant-pretenancy #ws30-tenant-dashboard,
  body.signed-mode #tenant.ws30-tenant-active #ws30-tenant-dashboard{
    display:grid!important;
    gap:11px!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
  }

  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-heading{
    gap:7px!important;
    padding:2px 1px 0!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-heading>div>span{
    margin-bottom:6px!important;
    font-size:10px!important;
    letter-spacing:.115em!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-heading h2{
    font-size:clamp(25px,7vw,31px)!important;
    line-height:1.04!important;
    letter-spacing:-.042em!important;
    text-wrap:balance!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-heading p{
    margin-top:7px!important;
    max-width:37rem!important;
    font-size:13px!important;
    line-height:1.45!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-status{
    min-height:31px!important;
    padding:6px 10px!important;
    border-radius:8px!important;
    font-size:10.5px!important;
  }

  /* Mobile dashboard summary should remain compact and scannable. */
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-kpi{
    min-width:0!important;
    min-height:94px!important;
    padding:13px 12px 12px!important;
    border-radius:12px!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-kpi>span{
    font-size:9px!important;
    line-height:1.2!important;
    letter-spacing:.06em!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-kpi strong{
    margin-top:6px!important;
    font-size:20px!important;
    line-height:1.05!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-kpi small{
    margin-top:5px!important;
    font-size:9.7px!important;
    line-height:1.3!important;
  }

  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-exec-grid{
    grid-template-columns:1fr!important;
    gap:9px!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-panel{
    min-width:0!important;
    border-radius:13px!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-panel-head{
    padding:14px 14px 11px!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-panel-head h3{
    font-size:14.5px!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-panel-head span{
    font-size:10px!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-panel-body{
    padding:11px 14px 14px!important;
  }

  /* Direct dashboard actions replace generic command-centre tiles. */
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-actions{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:7px!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-actions>button,
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-actions>a{
    display:grid!important;
    gap:3px!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:11px 12px!important;
    border:1px solid #dfe7eb!important;
    border-radius:9px!important;
    background:#fafcfd!important;
    color:#17364d!important;
    text-align:left!important;
    text-decoration:none!important;
    font:inherit!important;
    cursor:pointer!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-actions>button:first-child{
    border-color:#17364d!important;
    background:#17364d!important;
    color:#fff!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-active-actions>button:first-child{
    border-color:#dfe7eb!important;
    background:#fafcfd!important;
    color:#17364d!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-actions strong{
    color:inherit!important;
    font-size:12.5px!important;
    line-height:1.25!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-actions small{
    color:#80909b!important;
    font-size:10px!important;
    line-height:1.3!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-actions>button:first-child small{
    color:rgba(255,255,255,.74)!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-active-actions>button:first-child small{
    color:#80909b!important;
  }

  /* Keep the five-stage journey contained on one line; labels are short and intentional. */
  body.signed-mode #tenant.ws30-tenant-pretenancy #ws30-tenant-dashboard .ws30-journey{
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:1px!important;
    min-width:0!important;
  }
  body.signed-mode #tenant.ws30-tenant-pretenancy #ws30-tenant-dashboard .ws30-stage{
    gap:5px!important;
    min-width:0!important;
  }
  body.signed-mode #tenant.ws30-tenant-pretenancy #ws30-tenant-dashboard .ws30-stage b{
    width:26px!important;
    height:26px!important;
    border-radius:7px!important;
    font-size:8.5px!important;
  }
  body.signed-mode #tenant.ws30-tenant-pretenancy #ws30-tenant-dashboard .ws30-stage span{
    font-size:9px!important;
    line-height:1.1!important;
    white-space:nowrap!important;
  }
  body.signed-mode #tenant.ws30-tenant-pretenancy #ws30-tenant-dashboard .ws30-stage:not(:last-child):after{
    top:12px!important;
    left:66%!important;
    width:68%!important;
  }

  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-search-context,
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-home-context{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    overflow:hidden!important;
    border:1px solid #edf1f3!important;
    border-radius:9px!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-search-context>div,
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-home-context>div{
    min-width:0!important;
    padding:11px 10px!important;
    border-right:1px solid #edf1f3!important;
    border-bottom:1px solid #edf1f3!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-search-context>div:nth-child(2n),
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-home-context>div:nth-child(2n){border-right:0!important}
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-home-context>div:nth-last-child(-n+2){border-bottom:0!important}
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-search-context>div{border-bottom:0!important}
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-search-context span,
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-home-context span{
    display:block!important;
    color:#84939c!important;
    font-size:8.8px!important;
    font-weight:800!important;
    letter-spacing:.045em!important;
    text-transform:uppercase!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-search-context strong,
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-home-context strong{
    display:block!important;
    margin-top:4px!important;
    color:#17364d!important;
    font-size:14px!important;
    line-height:1.2!important;
    white-space:normal!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-search-context small,
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-home-context small{
    display:block!important;
    margin-top:4px!important;
    color:#8a98a1!important;
    font-size:9.3px!important;
    line-height:1.3!important;
  }
}

@media (max-width:340px){
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-kpis,
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-search-context,
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-home-context{
    grid-template-columns:1fr!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-search-context>div,
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-home-context>div{
    border-right:0!important;
    border-bottom:1px solid #edf1f3!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-search-context>div:last-child,
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-home-context>div:last-child{border-bottom:0!important}
}
