/* Nardo Sistemas v6 — responsividade defensiva, em camadas sobre o design aprovado.
   Alterações apenas de dimensões/fluxo; identidade azul-marinho, dourado e menu são preservados. */
:root{--nardo-touch-target:44px}
html{min-width:0;width:100%;scroll-padding-top:82px;-webkit-text-size-adjust:100%}
body,#root,.nardo-app{width:100%;min-width:0;max-width:100%;margin:0}
.nardo-app,.workspace,.main-work,.right-rail,.brand-header,.toolbar,.agent-grid,.lots-grid,.lower-panels,.sources,.notes-page,.trello-workspace,.source-workspace,.pdf-import-workspace{min-width:0}
img,video,canvas,svg{max-width:100%}
img{height:auto}
button,input,select,textarea{max-width:100%}
input,select,textarea{font-size:16px}
a,button,label{touch-action:manipulation}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #ffbf4e!important;outline-offset:2px}
.nardo-app :is(.card,.lot-card,.agent-card,.indicator,.lower-panel,.source-card,.imported-link-card,.search-lot-card,.notes-col){min-width:0;max-width:100%}
.nardo-app :is(h1,h2,h3,h4,p,small,strong,span,code){overflow-wrap:break-word}
.nardo-app :is(code,pre,.source-url,.imported-link-card a){overflow-wrap:anywhere}
/* A home aprovada continua visualmente centralizada, mesmo em telas estreitas. */
.nardo-home-hero{width:100%;max-width:100%;min-width:0}
.nardo-home-search{width:min(790px,100%)!important;min-width:0!important;max-width:100%!important}
.nardo-home-search input{min-width:0!important;flex:1 1 0;width:100%;max-width:100%}
.nardo-home-search button{flex:0 0 auto;min-width:44px;min-height:44px}
.nardo-home-categories{max-width:100%;display:flex;flex-wrap:wrap;gap:9px;justify-content:center}
.nardo-home-categories button{min-width:0;min-height:44px;max-width:100%;white-space:normal;overflow-wrap:break-word}
.nardo-home-actions{max-width:100%;gap:9px}
.nardo-home-center-brand{max-width:100%;min-width:0;justify-content:center}
/* Manter foto de fundo original no início e login. */
.password-login.login-page{min-height:100svh;min-height:100dvh;background-position:center center!important;background-size:cover!important}
.password-login .login-card,.password-login .login-box,.password-login form{max-width:100%;min-width:0}
.password-login :is(input,button){min-height:44px;max-width:100%}
/* Evitar menus, cards e tabelas ultrapassando o viewport. */
.workspace{max-width:100%;min-width:0}
.workspace>.main-work{min-width:0;max-width:100%;overflow-wrap:break-word}
.lots-grid,.agent-grid,.indicators,.lower-panels,.module-grid{max-width:100%;min-width:0}
.lot-photo img{width:100%;height:100%;object-fit:cover}
.lot-card .lot-actions{display:flex;flex-wrap:wrap;gap:8px}
.lot-card .lot-actions>*{min-width:0;flex:1 1 110px}
.lot-card .type-badge{max-width:none}
.lot-tabs,.admin-tabs,.quick-filters{max-width:100%;overflow-x:auto;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
.generic-table,.source-workspace table,.admin-panel table{max-width:100%}
/* Tabelas largas podem rolar dentro de seu bloco, sem deslocar a página inteira. */
:is(.table-responsive,.table-scroll,[data-slot=table-container]){max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.nardo-app :is(.dialog-content,[data-slot=dialog-content],[role=dialog]){max-width:min(96vw,920px);max-height:calc(100dvh - 24px);overflow-y:auto}
/* Preservar botões acessíveis e reduzir ações duplicadas. */
body:has(.header-install) #nardo-install-entry{display:none!important}
@media (max-width:1399px) and (min-width:1101px){
 .workspace{grid-template-columns:180px minmax(0,1fr) 235px!important;gap:12px!important}
 .workspace>.main-work{padding:13px!important}
 .lots-grid,.agent-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .lower-panels{grid-template-columns:repeat(2,minmax(0,1fr))!important;margin-left:192px!important;margin-right:12px!important}
 .indicators{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media (max-width:1100px) and (min-width:768px){
 .workspace{grid-template-columns:172px minmax(0,1fr)!important;gap:12px!important}
 .workspace>.right-rail{display:none!important}
 .workspace>.main-work{padding:16px!important}
 .workspace .side-nav{width:172px!important}
 .lots-grid,.agent-grid,.all-agents .agent-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .lower-panels{grid-template-columns:repeat(2,minmax(0,1fr))!important;margin:15px 12px 0 184px!important}
 .indicators{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .brand-header{grid-template-columns:205px minmax(0,1fr) auto!important;gap:10px!important}
 .brand-header>.quick-filters{grid-column:2/4!important}
 .source-workspace .source-filter-grid,.pdf-import-filters{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media (max-width:767px){
 html,body,#root,.nardo-app{max-width:100%;min-width:0}
 .brand-header{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:auto auto auto!important;gap:10px!important;padding:10px 12px 13px!important;height:auto!important;min-height:0!important}
 .brand-header>.brand{grid-column:1!important;grid-row:1!important;min-width:0}
 .brand-header>.header-install{grid-column:2!important;grid-row:1!important;align-self:center}
 .brand-header>.toolbar{grid-column:1/-1!important;grid-row:2!important;min-width:0;width:100%!important;display:flex!important}
 .brand-header>.quick-filters{grid-column:1/-1!important;grid-row:3!important;display:flex!important;max-width:100%;overflow-x:auto;flex-wrap:nowrap!important;padding-bottom:5px}
 .brand-header .search-bar{flex:1 1 0;min-width:0;width:100%}
 .brand-header .search-bar input{flex:1 1 0;min-width:0;width:100%}
 .brand-header .search-bar .btn{min-height:44px}
 .workspace{display:block!important;max-width:100%!important;padding:12px!important}
 .workspace>.main-work{width:100%;padding:12px!important;min-width:0}
 .workspace>.right-rail{display:none!important}
 .workspace>.side-nav,.workspace .side-nav{display:none!important}
 .mobile-menu{display:flex!important;min-width:44px;min-height:44px;align-items:center;justify-content:center}
 .lower-panels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;margin:14px 12px 0!important}
 .lots-grid,.agent-grid,.all-agents .agent-grid,.indicators,.imported-link-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
 .module-cards,.notes-board,.kanban-board{grid-template-columns:1fr!important}
 .nardo-home-hero{min-height:0!important;padding:48px 16px!important;gap:14px!important;margin:0 0 18px}
 .nardo-home-hero h1{font-size:clamp(28px,6.2vw,40px)!important;line-height:1.18!important}
 .nardo-home-hero>p{font-size:14px!important;line-height:1.6}
 .nardo-home-search{min-height:58px!important}
 .nardo-home-search input{font-size:16px!important}
 .nardo-home-categories button{flex:1 1 130px;font-size:13px}
 .nardo-home-center-brand img{width:62px!important;height:62px!important}
 .notes-board,.source-workspace,.pdf-import-workspace{width:100%;min-width:0}
 .pdf-import-filters,.source-workspace .source-filter-grid,.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .source-workspace .source-filter-grid>*,.pdf-import-filters>*{min-width:0}
 .search-history-item,.ai-settings-heading{min-width:0}
 .password-login.login-page{padding:15px!important;overflow-y:auto!important}
 .password-login .login-card,.password-login .login-box{width:min(100%,460px)!important;margin:auto;max-height:none}
 .nardo-app :is(.lot-detail,.detail-layout){max-width:100%;min-width:0}
}
@media (max-width:540px){
 .brand-header{padding:10px 10px 13px!important}
 .brand-header .brand img{width:48px!important;height:48px!important;object-fit:contain}
 .brand-header .brand strong{font-size:16px!important}
 .brand-header .brand b{font-size:19px!important}
 .brand-header .brand small{font-size:9px!important}
 .brand-header>.header-install{max-width:120px;padding:9px!important;min-height:44px;font-size:12px!important}
 .workspace{padding:8px!important}
 .workspace>.main-work{padding:11px!important}
 .lots-grid,.agent-grid,.all-agents .agent-grid,.indicators,.lower-panels,.module-cards,.imported-link-grid,.import-summary-grid,.ai-slots{grid-template-columns:minmax(0,1fr)!important}
 .lower-panels{margin:12px 8px 0!important}
 .lot-card .lot-photo{height:215px!important}
 .lot-card .lot-actions>*{flex:1 1 100px}
 .nardo-home-hero{padding:42px 13px!important}
 .nardo-home-hero h1{font-size:clamp(26px,8vw,34px)!important;letter-spacing:-.02em!important}
 .nardo-home-center-brand{gap:8px!important}
 .nardo-home-center-brand img{width:54px!important;height:54px!important}
 .nardo-home-center-brand strong{font-size:24px!important}
 .nardo-home-search{gap:5px!important;padding:5px 5px 5px 12px!important;min-height:56px!important}
 .nardo-home-search button{width:46px;flex-basis:46px}
 .nardo-home-categories button{flex:1 1 calc(50% - 10px);font-size:12px!important;padding:11px!important}
 .pdf-import-filters,.source-workspace .source-filter-grid,.form-grid,.cpanel-user-form{grid-template-columns:minmax(0,1fr)!important}
 .notes-toolbar{align-items:stretch;flex-wrap:wrap}
 .notes-search{min-width:0;width:100%}
 .ai-settings-actions{display:flex;flex-direction:column;align-items:stretch}
 .ai-settings-actions>*{width:100%}
 .lot-tabs{scroll-snap-type:x proximity}
 .lot-tabs button{scroll-snap-align:start;min-height:42px;flex-shrink:0}
}
@media (max-width:365px){
 .brand-header{gap:6px!important}
 .brand-header .brand img{width:40px!important;height:40px!important}
 .brand-header .brand b{font-size:16px!important}
 .brand-header .brand strong{font-size:14px!important}
 .brand-header>.header-install{max-width:105px;font-size:11px!important;padding:8px!important}
 .nardo-home-hero h1{font-size:26px!important}
 .nardo-home-categories button{flex-basis:100%;min-height:44px}
 .nardo-home-examples{font-size:11px}
}
@media (prefers-reduced-motion:reduce){.lot-card,.nardo-home-hero,.nardo-home-search,.navbtn{transition:none!important;animation:none!important}}
