/* A2 MESS HUB - whole-app responsive mobile compatibility */
html,body{width:100%;max-width:100%;overflow-x:hidden;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{min-width:0}
#app,.app,.main,.card,.panel,.list,.row,.top,.form,.field,.actions{min-width:0;max-width:100%}
img,video,canvas{max-width:100%;height:auto}
input,select,textarea,button{max-width:100%;min-width:0}
input,select,textarea{font-size:16px}
button{touch-action:manipulation}
.row>*,.top>*,.actions>*{min-width:0}
.row b,.row small,.row span,.muted,.small{overflow-wrap:anywhere;word-break:break-word}
.modal{padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));align-items:center}
.modal>.card{width:min(650px,calc(100vw - 20px));max-width:calc(100vw - 20px);max-height:calc(100dvh - 20px);overflow:auto;-webkit-overflow-scrolling:touch}
.main{width:100%;overflow-x:hidden}
.bottom{padding-bottom:max(6px,env(safe-area-inset-bottom))}
.billpreview img{width:100%;height:auto;max-height:52dvh;object-fit:contain}

@media(max-width:900px){
  .main{padding:14px 11px calc(92px + env(safe-area-inset-bottom))}
  .top{flex-wrap:wrap;align-items:flex-start}
  .top>button{flex:0 0 auto}
  .grid,.three{grid-template-columns:repeat(2,minmax(0,1fr))}
  .row{grid-template-columns:minmax(0,1.3fr) minmax(72px,.7fr) auto;align-items:start}
  .actions{justify-content:flex-start}
  .bottom{left:max(7px,env(safe-area-inset-left));right:max(7px,env(safe-area-inset-right));max-width:calc(100vw - 14px);scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .bottom::-webkit-scrollbar{display:none}
  .bottom button{flex:0 0 auto}
}

@media(max-width:700px){
  .card{padding:13px}
  .panel{padding:16px;border-radius:18px}
  .logo{font-size:clamp(48px,18vw,72px)}
  .top{gap:8px}
  .top h2{font-size:22px}
  .row{display:flex;flex-direction:column;gap:7px;align-items:stretch}
  .row>span{width:100%}
  .row .actions{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .row .actions .ghost{width:100%;white-space:normal}
  .billimg{width:86px;height:86px}
  .pickers{display:grid;grid-template-columns:1fr 1fr}
  .pickers .ghost{min-width:0;width:100%}
}

@media(max-width:560px){
  .main{padding-left:9px;padding-right:9px}
  .form,.grid,.three{grid-template-columns:1fr!important}
  .span2{grid-column:auto!important}
  .field{width:100%}
  .field input,.field select,.field textarea{width:100%;padding:12px 10px}
  .metric{font-size:24px}
  .btn,.ghost{min-height:44px}
  .top>button.btn{width:100%}
  .actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
  .actions>*{width:100%}
  .modal{padding:7px}
  .modal>.card{width:calc(100vw - 14px);max-width:calc(100vw - 14px);max-height:calc(100dvh - 14px);border-radius:16px;padding:13px}
  .bottom button{min-width:68px;padding:8px 4px;font-size:9px}
  .pickers{grid-template-columns:1fr}
}

@media(max-width:380px){
  .main{padding-left:7px;padding-right:7px}
  .card{padding:11px;border-radius:16px}
  .actions{grid-template-columns:1fr!important}
  .bottom button{min-width:62px;font-size:9px}
  .small,.muted{font-size:11px}
}

@media(orientation:landscape) and (max-height:520px){
  .modal{align-items:flex-start}
  .modal>.card{max-height:calc(100dvh - 14px)}
}

/* TM Solutions powered-by branding: image is rendered by app HTML */
.tm-powered,.powered.tm-powered{
  display:grid!important;
  justify-items:center!important;
  align-items:center!important;
  gap:5px!important;
  width:auto!important;
  max-width:100%!important;
  height:auto!important;
  min-height:0!important;
  margin:18px auto 8px!important;
  padding:0!important;
  overflow:visible!important;
  border:0!important;
  border-radius:0!important;
  background:none!important;
  box-shadow:none!important;
  isolation:auto!important;
  color:#7f9d91!important;
  font-size:9px!important;
  line-height:1.2!important;
}
.tm-powered::before,.tm-powered::after,.powered.tm-powered::before,.powered.tm-powered::after{
  content:none!important;
  display:none!important;
  background:none!important;
  animation:none!important;
}
.tm-powered span,.powered.tm-powered span{
  display:block;
  color:#7f9d91!important;
  font-size:9px!important;
  line-height:1.2!important;
  letter-spacing:.08em!important;
  text-transform:uppercase;
}
.tm-powered img,.powered.tm-powered img{
  display:block!important;
  width:116px!important;
  max-width:52vw!important;
  height:auto!important;
  object-fit:contain!important;
  margin:0 auto!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.settings-brand .tm-powered{margin-top:14px!important}
.settings-brand .tm-powered img{width:124px!important;max-width:58vw!important}
@media(max-width:560px){
  .tm-powered img,.powered.tm-powered img{width:108px!important}
  .settings-brand .tm-powered img{width:118px!important}
}

/* Approved TM Solutions branding — exact static logo, blue orbit effect only */
.tm-powered,.powered.tm-powered{display:grid!important;justify-items:center!important;align-items:center!important;place-items:center!important;justify-self:center!important;align-self:center!important;gap:5px!important;width:min(210px,calc(100% - 24px))!important;max-width:210px!important;height:auto!important;min-height:0!important;margin:18px auto 8px!important;margin-left:auto!important;margin-right:auto!important;padding:0!important;overflow:visible!important;border:0!important;border-radius:0!important;background:none!important;background-image:none!important;box-shadow:none!important;color:#839f95!important;text-align:center!important;float:none!important}
.tm-powered-label{display:block!important;width:100%!important;text-align:center!important;color:#8aa69c!important;font-size:9px!important;line-height:1.2!important;font-weight:800!important;letter-spacing:.14em!important;text-transform:uppercase!important}
.tm-approved-logo-wrap{position:relative!important;display:grid!important;place-items:center!important;width:154px!important;max-width:min(62vw,100%)!important;margin:0 auto!important;left:auto!important;right:auto!important;isolation:isolate!important;overflow:visible!important}
.tm-approved-logo-wrap::before{content:''!important;position:absolute!important;inset:16% 6%!important;border-radius:50%!important;background:radial-gradient(circle,rgba(35,155,255,.18),rgba(0,111,255,.08) 46%,transparent 72%)!important;filter:blur(12px)!important;opacity:.56!important;z-index:-2!important;animation:tmAuraPulse 2.8s ease-in-out infinite!important}
.tm-approved-logo-wrap::after{content:''!important;position:absolute!important;inset:7% -2%!important;border-radius:50%!important;background:conic-gradient(from 0deg,transparent 0deg,transparent 245deg,rgba(38,160,255,.10) 270deg,rgba(86,205,255,.95) 300deg,rgba(210,245,255,1) 312deg,rgba(44,169,255,.72) 326deg,transparent 346deg,transparent 360deg)!important;-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 2px),#000 calc(100% - 2px))!important;mask:radial-gradient(farthest-side,transparent calc(100% - 2px),#000 calc(100% - 2px))!important;filter:drop-shadow(0 0 5px rgba(42,171,255,.85))!important;z-index:2!important;pointer-events:none!important;animation:tmOrbitSpin 3.6s linear infinite!important}
.tm-approved-logo{position:relative!important;z-index:1!important;display:block!important;width:100%!important;height:auto!important;object-fit:contain!important;object-position:center center!important;margin:0 auto!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;filter:drop-shadow(0 0 8px rgba(31,161,255,.30)) drop-shadow(0 8px 16px rgba(0,0,0,.28))!important;animation:none!important;transform:none!important}
.tech.tm-powered{left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:min(210px,calc(100vw - 24px))!important;max-width:calc(100vw - 24px)!important;margin-left:0!important;margin-right:0!important}
.settings-brand .tm-powered{margin-top:14px!important;max-width:220px!important}.settings-brand .tm-approved-logo-wrap{width:162px!important}.side .tm-powered{margin-top:22px!important;width:100%!important;max-width:210px!important}.side .tm-approved-logo-wrap{width:126px!important}
@keyframes tmOrbitSpin{to{transform:rotate(360deg)}}
@keyframes tmAuraPulse{0%,100%{opacity:.38;transform:scale(.98)}50%{opacity:.68;transform:scale(1.04)}}
@media(max-width:560px){.tm-powered,.powered.tm-powered{width:min(190px,calc(100% - 20px))!important}.tech.tm-powered{width:min(190px,calc(100vw - 20px))!important}.tm-approved-logo-wrap{width:148px!important}.settings-brand .tm-approved-logo-wrap{width:156px!important}}
@media(prefers-reduced-motion:reduce){.tm-approved-logo-wrap::before,.tm-approved-logo-wrap::after{animation:none!important}}
