/* Theo Properties RC1.0.15.116 — iPad / Tablet Tenant Command Centre Premium Composition Lock
   Scope: authenticated Tenant dashboard at 701px–1180px only.
   Extends the approved phone cleanup to iPad/tablet without changing mobile <=700px,
   desktop >=1181px, dashboard authority, routing, auth, data, tenancy state or workflows. */

@media (min-width:701px) and (max-width:1180px){
  /* Restore the dashboard's intended grid authority on tablet.  The all-device
     command-centre authority layer deliberately forces display:block; tablet
     needs the grid again so vertical rhythm and panel gaps are deterministic. */
  body.signed-mode #tenant.ws30-tenant-enhanced #ws30-tenant-dashboard{
    display:grid!important;
    width:100%!important;
    min-width:0!important;
    gap:13px!important;
    margin:0 0 18px!important;
  }

  /* Tablet masthead: preserve the executive two-column heading while preventing
     the status badge from compressing the title/copy. */
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-heading{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:start!important;
    gap:18px!important;
    min-width:0!important;
    padding:1px 1px 2px!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-heading>div:first-child{
    min-width:0!important;
    max-width:760px!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-heading>div>span{
    margin:0 0 7px!important;
    font-size:10.5px!important;
    line-height:1.15!important;
    letter-spacing:.12em!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-heading h2{
    margin:0!important;
    max-width:100%!important;
    font-size:clamp(30px,3.75vw,38px)!important;
    line-height:1.04!important;
    letter-spacing:-.042em!important;
    text-wrap:balance!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-heading p{
    margin:8px 0 0!important;
    max-width:680px!important;
    font-size:13.5px!important;
    line-height:1.48!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-status{
    align-self:start!important;
    justify-self:end!important;
    min-height:34px!important;
    padding:7px 11px!important;
    border-radius:9px!important;
    font-size:11px!important;
    line-height:1!important;
  }

  /* Keep the approved 2 x 2 tablet summary, but tighten card height and hierarchy. */
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:11px!important;
    min-width:0!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-kpi{
    min-width:0!important;
    min-height:98px!important;
    padding:15px 16px 14px!important;
    border-radius:13px!important;
    box-shadow:0 9px 24px rgba(19,45,67,.035)!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-kpi>span{
    font-size:10px!important;
    line-height:1.2!important;
    letter-spacing:.07em!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-kpi strong{
    margin-top:6px!important;
    font-size:24px!important;
    line-height:1.04!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:10.5px!important;
    line-height:1.32!important;
  }

  /* Two principal panels across; Today's context remains a clean full-width row. */
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-exec-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:11px!important;
    min-width:0!important;
    align-items:stretch!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-exec-grid>.ws30-panel:last-child{
    grid-column:1 / -1!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-panel{
    min-width:0!important;
    border-radius:13px!important;
    box-shadow:0 9px 25px rgba(19,45,67,.035)!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-panel-head{
    padding:15px 16px 11px!important;
    gap:10px!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-panel-head h3{
    font-size:15px!important;
    line-height:1.2!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-panel-head span{
    margin-top:4px!important;
    font-size:10.5px!important;
    line-height:1.35!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-panel-body{
    padding:11px 16px 15px!important;
    min-width:0!important;
  }

  /* The tenant actions had phone-only styling, which left raw inline button/link
     text on iPad.  Make them explicit, touch-friendly command rows on tablet. */
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-actions{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:7px!important;
    min-width:0!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-actions>button,
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-actions>a{
    appearance:none!important;
    -webkit-appearance:none!important;
    display:grid!important;
    gap:2px!important;
    width:100%!important;
    min-width:0!important;
    min-height:48px!important;
    margin:0!important;
    padding:10px 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;
    box-shadow:none!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-actions strong{
    color:inherit!important;
    font-size:12px!important;
    line-height:1.2!important;
    white-space:normal!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-actions small{
    color:#80909b!important;
    font-size:9.8px!important;
    line-height:1.28!important;
    white-space:normal!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-actions>button:first-child small{
    color:rgba(255,255,255,.76)!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-active-actions>button:first-child small{
    color:#80909b!important;
  }

  /* Rental Journey remains a contained five-step visual, not a horizontal rail. */
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-journey{
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:2px!important;
    min-width:0!important;
    padding:8px 1px 3px!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-stage{
    gap:6px!important;
    min-width:0!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-stage b{
    width:29px!important;
    height:29px!important;
    border-radius:8px!important;
    font-size:9px!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-stage span{
    max-width:100%!important;
    font-size:9.5px!important;
    line-height:1.15!important;
    white-space:nowrap!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-stage:not(:last-child):after{
    top:14px!important;
    left:66%!important;
    width:68%!important;
  }

  /* Today's context had no tablet presentation rules and therefore collapsed into
     concatenated browser-default text.  Present the two signals as proper cells. */
  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;
    min-width:0!important;
    overflow:hidden!important;
    border:1px solid #edf1f3!important;
    border-radius:10px!important;
    background:#fff!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:13px 14px!important;
    border-right: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{
    border-bottom:1px solid #edf1f3!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 span,
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-tenant-home-context span{
    display:block!important;
    color:#84939c!important;
    font-size:9.5px!important;
    font-weight:800!important;
    line-height:1.2!important;
    letter-spacing:.05em!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:15px!important;
    line-height:1.2!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!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.8px!important;
    line-height:1.32!important;
    white-space:normal!important;
  }
}

/* Compact tablets / split-screen iPad: retain two-column summary, but protect
   the masthead and context cells when the available CSS viewport gets tight. */
@media (min-width:701px) and (max-width:820px){
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-heading{
    gap:12px!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-heading h2{
    font-size:clamp(29px,4.1vw,33px)!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-heading p{
    font-size:13px!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-status{
    padding:7px 10px!important;
    font-size:10.5px!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-panel-head{
    padding-inline:14px!important;
  }
  body.signed-mode #tenant #ws30-tenant-dashboard .ws30-panel-body{
    padding-inline:14px!important;
  }
}
