/* MYXA Music Move v0.7.2 — Camada responsiva geral */
:root{
  --mm-admin-sidebar:280px;
  --mm-admin-sidebar-tablet:250px;
  --mm-touch:44px;
}

/* Segurança geral */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
html,body{max-width:100%;overflow-x:hidden}
img,video,canvas,svg{max-width:100%;height:auto}
button,input,select,textarea{max-width:100%}
.btn,button,.side-link,.mm-mobile-nav a{min-height:var(--mm-touch)}
.wrap,.admin-wrap,.public-wrap{width:100%;min-width:0}
.card,.panel,.dashboard-hero,.public-section{min-width:0}
.row>*{min-width:0}
pre,code{max-width:100%;overflow-wrap:anywhere}

/* ADM desktop */
.admin-shell{grid-template-columns:var(--mm-admin-sidebar) minmax(0,1fr)!important}
.sidebar{width:var(--mm-admin-sidebar);max-width:100vw}
.sidebar-brand{
  min-height:118px!important;
  height:auto!important;
  padding:14px 14px 12px!important;
  justify-content:center!important;
}
.sidebar-brand img{
  width:clamp(210px,17vw,248px)!important;
  max-width:100%!important;
  height:auto!important;
  max-height:100px!important;
  object-fit:contain!important;
  margin:0 auto!important;
}
.admin-menu-toggle{
  display:none;
  width:46px;height:46px;min-width:46px;
  border-radius:12px;border:1px solid #294765;
  background:#10233a;color:#fff;font-size:24px;
  align-items:center;justify-content:center;cursor:pointer;
}
.admin-mobile-overlay{display:none}
.admin-top{gap:14px}
.admin-top>.row{justify-content:flex-end}
.admin-page-title{overflow-wrap:anywhere}
.dashboard-hero>*{min-width:0}
.grid4{grid-template-columns:repeat(4,minmax(0,1fr))}
.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.three{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.media-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.table{max-width:100%}
.table th,.table td{vertical-align:top}
.table .row{min-width:max-content}

/* Formulários */
label{min-width:0}
input,select,textarea{font-size:16px}
input[type="checkbox"],input[type="radio"]{min-width:18px}
textarea{resize:vertical}
.btn{white-space:normal;text-align:center}

/* Público */
.public-main,.public-app-shell{min-width:0}
.public-wrap{min-width:0}
.footer-grid{min-width:0}
.top-search{min-width:0}
.top-search input{min-width:0}
.mm-track-row,.mm-card,.artist-card,.release-card{min-width:0}

/* Notebook */
@media(max-width:1280px){
  :root{--mm-admin-sidebar:250px}
  .sidebar-brand img{width:220px!important;max-height:92px!important}
  .admin-wrap{padding:22px 20px!important}
  .grid4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .media-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Tablet: menu lateral vira gaveta */
@media(max-width:900px){
  .admin-shell{display:block!important}
  .admin-content{width:100%;min-height:100vh}
  .sidebar{
    position:fixed!important;left:0;top:0;bottom:0;
    width:min(320px,88vw)!important;height:100dvh!important;
    transform:translateX(-105%);transition:transform .22s ease;
    z-index:1000!important;box-shadow:18px 0 50px rgba(0,0,0,.42);
  }
  body.admin-nav-open .sidebar{transform:translateX(0)}
  .sidebar-scroll{display:block!important;overflow-y:auto!important;padding-bottom:110px!important}
  .sidebar-foot{display:block!important}
  .sidebar-brand{min-height:124px!important}
  .sidebar-brand img{width:min(245px,78vw)!important;max-height:102px!important}
  .admin-mobile-overlay{
    position:fixed;inset:0;background:rgba(0,0,0,.62);
    z-index:990;display:block;opacity:0;visibility:hidden;
    transition:.2s ease;
  }
  body.admin-nav-open .admin-mobile-overlay{opacity:1;visibility:visible}
  body.admin-nav-open{overflow:hidden}
  .admin-menu-toggle{display:inline-flex}
  .admin-top{
    position:sticky!important;top:0!important;
    padding:12px 14px!important;min-height:72px!important;
    align-items:center!important;
  }
  .admin-top>.admin-title-wrap{display:flex;align-items:center;gap:12px;min-width:0}
  .admin-top .muted{font-size:12px}
  .admin-page-title{font-size:20px!important;line-height:1.2}
  .admin-wrap{padding:18px 14px!important}
  .dashboard-hero{padding:20px!important;align-items:flex-start!important;flex-direction:column!important}
  .dashboard-hero h2{font-size:25px!important}
  .two,.three,.media-grid{grid-template-columns:1fr!important}
  .table{
    display:block!important;width:100%!important;overflow-x:auto!important;
    -webkit-overflow-scrolling:touch;white-space:nowrap;
    scrollbar-width:thin;
  }
  .table tbody,.table thead{width:max-content;min-width:100%}
  .card:has(.table){overflow:hidden}
  .card:has(.table) .table{margin-left:0;margin-right:0}
  .health-row,.health-card{grid-template-columns:18px minmax(0,1fr)!important}
  .health-row>*:last-child,.health-card>*:last-child{grid-column:2}
}

/* Celular */
@media(max-width:640px){
  .admin-top{flex-wrap:wrap}
  .admin-top>.row{width:100%;justify-content:flex-start}
  .admin-top>.row .btn{flex:1 1 auto}
  .admin-page-title{font-size:18px!important}
  .admin-wrap{padding:14px 10px!important}
  .card,.panel{padding:16px!important;border-radius:16px!important}
  .dashboard-hero{padding:17px!important;border-radius:18px!important}
  .dashboard-hero h2{font-size:22px!important}
  .grid4{grid-template-columns:1fr!important}
  .number{font-size:27px!important}
  .row{gap:8px}
  .row>.btn,.row>button{max-width:100%}
  .section-head,.list-row{align-items:flex-start!important;flex-direction:column!important}
  .login-box{margin:24px auto!important;width:calc(100% - 24px)!important}
  .login-logo img{width:min(230px,80vw)!important;height:auto!important;max-height:120px!important}
  .install-shell{padding:24px 12px!important}
  .steps{grid-template-columns:1fr 1fr!important}
  .public-section{padding:18px!important;border-radius:18px!important}
  .page-intro{padding-top:38px!important}
  .page-intro h1,.public-hero h1{font-size:clamp(32px,10vw,44px)!important}
  .footer-grid{grid-template-columns:1fr!important}
  .public-footer{padding-bottom:calc(82px + env(safe-area-inset-bottom))!important}
}

/* Celulares pequenos */
@media(max-width:430px){
  .admin-top{padding:10px!important}
  .admin-menu-toggle{width:42px;height:42px;min-width:42px}
  .sidebar{width:92vw!important}
  .sidebar-brand{min-height:112px!important}
  .sidebar-brand img{width:min(225px,78vw)!important;max-height:94px!important}
  .btn{width:100%}
  .row>.btn,.row>button,.row>form{width:100%}
  .row>form .btn,.row>form button{width:100%}
  .steps{grid-template-columns:1fr!important}
}

/* Landscape com pouca altura */
@media(max-height:560px) and (max-width:900px){
  .sidebar-brand{min-height:88px!important}
  .sidebar-brand img{max-height:68px!important;width:190px!important}
}

/* Preferência por menor animação */
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}
