/* ============================================================================
   THEO PROPERTIES — RC1.0.15.129.2
   ADMIN MOBILE + TABLET DASHBOARD RESPONSIVE AUTHORITY LOCK
   Presentation-only. Loaded after RC1.0.15.129.1.
   Purpose: prevent desktop dashboard grids from surviving on tablet/mobile,
   protect Conversion Funnel labels, and give Current Properties / Platform
   Systems deterministic responsive compositions.
   ============================================================================ */

/* Shared mobile/tablet authority, including iPhone "desktop website" widths. */
@media (max-width:1180px){
  body.theo-admin #content,
  body.theo-admin .content,
  body.theo-admin .executive-grid,
  body.theo-admin .lower-dashboard,
  body.theo-admin .executive-grid > .panel,
  body.theo-admin .lower-dashboard > .panel{
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }

  /* Kill the desktop grid contract completely below desktop. */
  body.theo-admin .executive-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-auto-flow:row!important;
    align-items:start!important;
    width:100%!important;
    gap:12px!important;
  }
  body.theo-admin .executive-grid > .panel:first-child{
    grid-column:1/-1!important;
  }

  body.theo-admin .lower-dashboard{
    display:block!important;
    width:100%!important;
    margin:0 0 14px!important;
  }
  body.theo-admin .lower-dashboard > .panel{
    display:block!important;
    width:100%!important;
    margin:0 0 12px!important;
    float:none!important;
    clear:both!important;
    grid-column:1/-1!important;
  }
  body.theo-admin .lower-dashboard > .panel:last-child{margin-bottom:0!important}

  /* Conversion Funnel: labels always own the available line width. */
  body.theo-admin .conversion-list{
    display:grid!important;
    grid-template-columns:1fr!important;
    width:100%!important;
    gap:8px!important;
  }
  body.theo-admin .conversion-step{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    gap:12px!important;
  }
  body.theo-admin .conversion-step > div:first-child{
    display:block!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
  }
  body.theo-admin .conversion-step > div:first-child strong{
    display:block!important;
    width:auto!important;
    max-width:none!important;
    white-space:normal!important;
    word-break:normal!important;
    overflow-wrap:normal!important;
    hyphens:none!important;
    line-height:1.28!important;
  }
  body.theo-admin .conversion-number{
    min-width:54px!important;
    width:auto!important;
    justify-self:end!important;
    text-align:right!important;
  }

  /* Current Properties becomes responsive cards, never a squeezed table. */
  body.theo-admin .lower-dashboard .recent-table{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    table-layout:auto!important;
    overflow:visible!important;
    border:0!important;
    background:transparent!important;
  }
  body.theo-admin .lower-dashboard .recent-table thead{display:none!important}
  body.theo-admin .lower-dashboard .recent-table tbody{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    width:100%!important;
    gap:10px!important;
  }
  body.theo-admin .lower-dashboard .recent-table tr{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:0 12px!important;
    width:100%!important;
    min-width:0!important;
    padding:14px!important;
    border:1px solid #dfe8ec!important;
    border-radius:14px!important;
    background:linear-gradient(145deg,#fff,#fbfdfe)!important;
    box-shadow:0 6px 18px rgba(18,49,72,.03)!important;
  }
  body.theo-admin .lower-dashboard .recent-table td{
    display:block!important;
    width:auto!important;
    min-width:0!important;
    max-width:100%!important;
    padding:8px 0!important;
    border:0!important;
    border-bottom:1px solid #eef3f5!important;
    background:transparent!important;
    white-space:normal!important;
    word-break:normal!important;
    overflow-wrap:anywhere!important;
  }
  body.theo-admin .lower-dashboard .recent-table td::before{
    display:block!important;
    margin:0 0 4px!important;
    color:#82939d!important;
    font-size:7px!important;
    font-weight:900!important;
    line-height:1!important;
    letter-spacing:.06em!important;
    text-transform:uppercase!important;
  }
  body.theo-admin .lower-dashboard .recent-table td:nth-child(1){grid-column:1/-1!important;padding-top:0!important}
  body.theo-admin .lower-dashboard .recent-table td:nth-child(1)::before{content:"Property"!important}
  body.theo-admin .lower-dashboard .recent-table td:nth-child(2)::before{content:"Type"!important}
  body.theo-admin .lower-dashboard .recent-table td:nth-child(3){grid-column:1/-1!important}
  body.theo-admin .lower-dashboard .recent-table td:nth-child(3)::before{content:"Location"!important}
  body.theo-admin .lower-dashboard .recent-table td:nth-child(4)::before{content:"Rent"!important}
  body.theo-admin .lower-dashboard .recent-table td:nth-child(5)::before{content:"Status"!important}
  body.theo-admin .lower-dashboard .recent-table td:nth-child(4),
  body.theo-admin .lower-dashboard .recent-table td:nth-child(5){border-bottom:0!important;padding-bottom:0!important}

  /* Platform Systems: remove the empty decorative square on constrained screens. */
  body.theo-admin .lower-dashboard .health-list{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:9px!important;
    width:100%!important;
  }
  body.theo-admin .lower-dashboard .health-row{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
    width:100%!important;
    min-width:0!important;
    min-height:58px!important;
    gap:10px!important;
    padding:11px 12px!important;
  }
  body.theo-admin .lower-dashboard .health-row::before{display:none!important;content:none!important}
  body.theo-admin .lower-dashboard .health-row strong{
    grid-column:1!important;
    grid-row:1!important;
    min-width:0!important;
    white-space:normal!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }
  body.theo-admin .lower-dashboard .health-status{
    grid-column:2!important;
    grid-row:1!important;
    justify-self:end!important;
    max-width:100%!important;
  }
  body.theo-admin .lower-dashboard .health-row:last-child:nth-child(odd){grid-column:1/-1!important}
}

@media (max-width:700px){
  body.theo-admin .content{overflow-x:hidden!important}

  /* Mobile: every executive surface is a true single column. */
  body.theo-admin .executive-grid,
  body.theo-admin .lower-dashboard{
    display:block!important;
    width:100%!important;
  }
  body.theo-admin .executive-grid > .panel,
  body.theo-admin .lower-dashboard > .panel{
    width:100%!important;
    max-width:100%!important;
    margin:0 0 10px!important;
  }

  body.theo-admin .conversion-step{
    min-height:54px!important;
    padding:11px 12px!important;
    border-radius:12px!important;
  }
  body.theo-admin .conversion-step > div:first-child strong{
    font-size:11px!important;
    line-height:1.25!important;
  }
  body.theo-admin .conversion-number{min-width:48px!important}
  body.theo-admin .conversion-number strong{font-size:14px!important}
  body.theo-admin .conversion-number small{font-size:9px!important}

  body.theo-admin .lower-dashboard > .panel .panel-head{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:10px!important;
    min-width:0!important;
  }
  body.theo-admin .lower-dashboard > .panel .panel-head h3{
    min-width:0!important;
    white-space:normal!important;
    word-break:normal!important;
    overflow-wrap:normal!important;
  }

  body.theo-admin .lower-dashboard .recent-table tbody{
    grid-template-columns:1fr!important;
    gap:9px!important;
  }
  body.theo-admin .lower-dashboard .recent-table tr{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    padding:13px!important;
  }
  body.theo-admin .lower-dashboard .recent-table td:nth-child(1) strong{
    font-size:10.5px!important;
    line-height:1.35!important;
  }

  body.theo-admin .lower-dashboard .health-list{
    grid-template-columns:1fr!important;
    gap:8px!important;
  }
  body.theo-admin .lower-dashboard .health-row{
    grid-template-columns:1fr!important;
    gap:6px!important;
    min-height:64px!important;
    padding:11px 12px!important;
  }
  body.theo-admin .lower-dashboard .health-row strong{
    grid-column:1!important;
    grid-row:1!important;
    font-size:10px!important;
  }
  body.theo-admin .lower-dashboard .health-status{
    grid-column:1!important;
    grid-row:2!important;
    justify-self:start!important;
    width:auto!important;
    min-height:25px!important;
    padding:4px 8px!important;
    font-size:7.8px!important;
  }
}

@media (max-width:390px){
  body.theo-admin .lower-dashboard .recent-table tr{grid-template-columns:1fr!important}
  body.theo-admin .lower-dashboard .recent-table td,
  body.theo-admin .lower-dashboard .recent-table td:nth-child(1),
  body.theo-admin .lower-dashboard .recent-table td:nth-child(3),
  body.theo-admin .lower-dashboard .recent-table td:nth-child(4),
  body.theo-admin .lower-dashboard .recent-table td:nth-child(5){grid-column:1!important}
  body.theo-admin .lower-dashboard .recent-table td:nth-child(4){border-bottom:1px solid #eef3f5!important;padding-bottom:7px!important}
  body.theo-admin .conversion-step{grid-template-columns:minmax(0,1fr) 46px!important;gap:8px!important}
}
