/* Theo Properties RC1.0.11.20.32.7.9.4.5.7 — Final Production Unified Navigation Behaviour Lock
   Responsive navigation shell only. Desktop sidebars remain canonical.
   No role, permission, route, workflow, schema, RLS or backend changes. */

:root{
  --theo-unified-dock-height:68px;
  --theo-unified-dock-max:760px;
  --theo-unified-navy:#132f45;
  --theo-unified-gold:#c89758;
  --theo-unified-line:#dce5e9;
  --theo-unified-muted:#728592;
}

.theo-unified-dock{display:none}
.theo-unified-more-backdrop{display:none}

@media (max-width:700px),
       (orientation:portrait) and (min-width:701px) and (max-width:1366px),
       (orientation:landscape) and (max-width:1024px) and (max-height:600px){
  html.theo-unified-more-open,body.theo-unified-more-open{overflow:hidden!important}

  /* Authenticated marketplace workspaces: one compact shell. */
  body.signed-mode .app{
    display:block!important;
    grid-template-columns:1fr!important;
    width:100%!important;
    min-width:0!important;
  }
  body.signed-mode .sidebar{display:none!important}
  body.signed-mode .main{
    width:100%!important;
    min-width:0!important;
    margin:0!important;
  }
  body.signed-mode .content{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    padding-bottom:calc(98px + env(safe-area-inset-bottom))!important;
  }
  body.signed-mode .workspace-account-controls{display:none!important}
  body.signed-mode #owner .commercial-tabs{display:none!important}
  body.signed-mode #management .manager-command-nav{display:none!important}

  /* Canonical 5-position bottom dock. */
  body.signed-mode #mobile-nav.mobile-nav[data-theo-unified="1"],
  .theo-admin #theo-admin-mobile-nav.theo-unified-dock{
    display:grid!important;
    grid-template-columns:repeat(var(--theo-unified-dock-count,5),minmax(0,1fr))!important;
    position:fixed!important;
    left:50%!important;
    right:auto!important;
    bottom:max(10px,env(safe-area-inset-bottom))!important;
    transform:translateX(-50%)!important;
    width:min(calc(100vw - 24px),var(--theo-unified-dock-max))!important;
    min-height:var(--theo-unified-dock-height)!important;
    height:auto!important;
    padding:6px!important;
    gap:4px!important;
    border:1px solid rgba(207,218,223,.96)!important;
    border-radius:19px!important;
    background:rgba(252,253,253,.97)!important;
    -webkit-backdrop-filter:blur(24px) saturate(1.08)!important;
    backdrop-filter:blur(24px) saturate(1.08)!important;
    box-shadow:0 16px 42px rgba(13,34,50,.18),0 2px 8px rgba(13,34,50,.07)!important;
    z-index:8990!important;
    overflow:visible!important;
  }
  body.signed-mode #mobile-nav.mobile-nav[data-theo-unified="1"] button,
  .theo-admin #theo-admin-mobile-nav.theo-unified-dock button{
    appearance:none!important;
    border:0!important;
    min-width:0!important;
    min-height:54px!important;
    margin:0!important;
    padding:6px 3px!important;
    border-radius:13px!important;
    background:transparent!important;
    color:var(--theo-unified-muted)!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:4px!important;
    font:800 9.5px/1 Inter,system-ui,sans-serif!important;
    letter-spacing:0!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    box-shadow:none!important;
  }
  body.signed-mode #mobile-nav.mobile-nav[data-theo-unified="1"] button svg,
  .theo-admin #theo-admin-mobile-nav.theo-unified-dock button svg{
    width:20px!important;
    height:20px!important;
    flex:0 0 20px!important;
    fill:none!important;
    stroke:currentColor!important;
    stroke-width:1.8!important;
    stroke-linecap:round!important;
    stroke-linejoin:round!important;
  }
  body.signed-mode #mobile-nav.mobile-nav[data-theo-unified="1"] button.active,
  .theo-admin #theo-admin-mobile-nav.theo-unified-dock button.active{
    color:#173e58!important;
    background:#eef4f6!important;
  }
  body.signed-mode #mobile-nav.mobile-nav[data-theo-unified="1"] button.active::after,
  .theo-admin #theo-admin-mobile-nav.theo-unified-dock button.active::after{
    content:""!important;
    width:18px!important;
    height:2px!important;
    border-radius:999px!important;
    background:var(--theo-unified-gold)!important;
    position:absolute!important;
    bottom:4px!important;
  }
  body.signed-mode #mobile-nav.mobile-nav[data-theo-unified="1"] button,
  .theo-admin #theo-admin-mobile-nav.theo-unified-dock button{position:relative!important}

  /* Shared More surface. */
  .theo-unified-more-backdrop{
    position:fixed;
    inset:0;
    z-index:9000;
    display:block;
    background:rgba(8,22,34,.56);
    -webkit-backdrop-filter:blur(8px);
    backdrop-filter:blur(8px);
    opacity:0;
    visibility:hidden;
    transition:opacity .18s ease,visibility .18s ease;
    padding:18px;
  }
  .theo-unified-more-backdrop.open{opacity:1;visibility:visible}
  .theo-unified-more-sheet{
    position:absolute;
    left:50%;
    bottom:max(10px,env(safe-area-inset-bottom));
    transform:translate(-50%,18px);
    width:min(calc(100vw - 24px),780px);
    max-height:min(78dvh,760px);
    overflow:hidden;
    display:flex;
    flex-direction:column;
    background:#f8fafb;
    border:1px solid rgba(215,224,229,.98);
    border-radius:22px;
    box-shadow:0 28px 90px rgba(5,18,29,.28);
    opacity:0;
    transition:transform .2s ease,opacity .18s ease;
  }
  .theo-unified-more-backdrop.open .theo-unified-more-sheet{transform:translate(-50%,0);opacity:1}
  .theo-unified-more-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    padding:17px 18px 15px;
    background:#fff;
    border-bottom:1px solid var(--theo-unified-line);
  }
  .theo-unified-more-head span{
    display:block;
    margin-bottom:3px;
    color:#a3743f;
    font:850 9px/1 Inter,system-ui,sans-serif;
    letter-spacing:.13em;
    text-transform:uppercase;
  }
  .theo-unified-more-head h2{
    margin:0;
    color:#142f45;
    font:800 20px/1.15 "Inter Tight",Inter,system-ui,sans-serif;
    letter-spacing:-.03em;
  }
  .theo-unified-more-close{
    flex:0 0 38px;
    width:38px;
    height:38px;
    border:1px solid #dce5e9;
    border-radius:11px;
    background:#fff;
    color:#526a79;
    font:600 22px/1 system-ui,sans-serif;
  }
  .theo-unified-more-scroll{
    overflow:auto;
    overscroll-behavior:contain;
    padding:14px 14px 16px;
  }
  .theo-unified-more-grid{display:grid;grid-template-columns:1fr;gap:11px}
  .theo-unified-more-group{
    background:#fff;
    border:1px solid #e0e7eb;
    border-radius:14px;
    padding:7px;
    min-width:0;
  }
  .theo-unified-more-group-title{
    padding:8px 9px 6px;
    color:#84939d;
    font:850 9px/1 Inter,system-ui,sans-serif;
    letter-spacing:.11em;
    text-transform:uppercase;
  }
  .theo-unified-more-item{
    width:100%;
    border:0;
    background:transparent;
    border-radius:10px;
    display:grid;
    grid-template-columns:34px minmax(0,1fr) 18px;
    gap:10px;
    align-items:center;
    text-align:left;
    padding:10px 9px;
    color:#274257;
  }
  .theo-unified-more-item:hover,.theo-unified-more-item:focus-visible{background:#f2f6f7}
  .theo-unified-more-item.active{background:#eef4f5;color:#173e58}
  .theo-unified-more-icon{
    width:34px;height:34px;border-radius:10px;background:#f0f4f6;display:grid;place-items:center;color:#4b687a
  }
  .theo-unified-more-item.active .theo-unified-more-icon{background:#e3eef1;color:#173e58}
  .theo-unified-more-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .theo-unified-more-copy{min-width:0;display:grid;gap:2px}
  .theo-unified-more-copy strong{font:800 12px/1.2 Inter,system-ui,sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .theo-unified-more-copy small{font:600 10px/1.25 Inter,system-ui,sans-serif;color:#84939d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .theo-unified-more-arrow{font-size:18px;color:#9aa8b0;text-align:center}
  .theo-unified-more-account{margin-top:11px;padding-top:11px;border-top:1px solid #e2e8eb}
  .theo-unified-more-item.danger{color:#963f42}
  .theo-unified-more-item.danger .theo-unified-more-icon{background:#fbefef;color:#963f42}

  /* Administration adopts the same compact language. */
  .theo-admin .admin-shell{display:block!important;width:100%!important;min-width:0!important}
  .theo-admin .sidebar{display:none!important}
  .theo-admin #menuToggle{display:none!important}
  .theo-admin .main{width:100%!important;min-width:0!important;margin:0!important}
  .theo-admin .content{padding-bottom:calc(98px + env(safe-area-inset-bottom))!important}
  .theo-admin .topbar{padding-left:16px!important;padding-right:16px!important}
  .theo-admin .top-actions .marketplace-link,
  .theo-admin .top-actions .live-platform,
  .theo-admin .top-actions .admin-search{display:none!important}
}

@media (orientation:portrait) and (min-width:701px) and (max-width:1366px){
  .theo-unified-more-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
  .theo-unified-more-account{grid-column:1/-1}
  body.signed-mode #mobile-nav.mobile-nav[data-theo-unified="1"] button,
  .theo-admin #theo-admin-mobile-nav.theo-unified-dock button{font-size:10px!important}
}

@media (max-width:430px){
  .theo-unified-more-backdrop{padding:8px}
  .theo-unified-more-sheet{width:calc(100vw - 12px);border-radius:18px;max-height:84dvh}
  .theo-unified-more-head{padding:15px}
  .theo-unified-more-scroll{padding:10px}
  body.signed-mode #mobile-nav.mobile-nav[data-theo-unified="1"],
  .theo-admin #theo-admin-mobile-nav.theo-unified-dock{width:calc(100vw - 16px)!important;border-radius:17px!important}
  body.signed-mode #mobile-nav.mobile-nav[data-theo-unified="1"] button,
  .theo-admin #theo-admin-mobile-nav.theo-unified-dock button{font-size:8.5px!important;padding-inline:2px!important}
}

/* Genuine landscape/desktop room always returns to the established sidebar shell. */
@media (orientation:landscape) and (min-width:1025px) and (min-height:601px){
  .theo-unified-dock,.theo-unified-more-backdrop{display:none!important}
}

/* v1.0.0.8.5.13.2 — iPad 9th-gen landscape: keep the admin toolbar within 1024px.
   Only redundant status text is hidden; search, bell, account and navigation remain accessible. */
@media (min-width:901px) and (max-width:1100px) and (orientation:landscape) and (min-height:601px){
  .theo-admin .top-actions .live-platform{display:none!important}
  .theo-admin .top-actions{gap:7px!important;min-width:0!important}
  .theo-admin .top-brand{min-width:0!important}
  .theo-admin .top-context{min-width:0!important}
  .theo-admin .top-context strong{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
}
