/* TODA CHIC v6.30.4 — Reestruturação operacional limpa de layout, menu e rolagem
   Analogia aplicada: chassi monobloco. O shell, menu e conteúdo têm responsabilidades separadas,
   evitando que telas internas disputem largura/altura com o layout global. */
:root{
  --tc-v6304-sidebar: clamp(264px, 17vw, 316px);
  --tc-v6304-pad: clamp(14px, 1.8vw, 28px);
  --tc-v6304-gap: clamp(10px, 1.35vw, 18px);
  --tc-v6304-radius: 22px;
  --tc-v6304-line: rgba(70,45,24,.12);
  --tc-v6304-bg: #f8f3ea;
  --tc-v6304-card: #fffdf8;
  --tc-v6304-ink: #2a1b12;
  --tc-v6304-muted: #7a6a5d;
  --tc-v6304-gold: #c6a13b;
  --tc-v6304-shadow: 0 18px 50px rgba(42,27,18,.10);
}
html,body{min-width:0;max-width:100%;overflow-x:hidden;}
body{background:var(--tc-v6304-bg);}
body.tc-layout-v6304{min-height:100dvh;}
body.tc-layout-v6304 *{box-sizing:border-box;}
body.tc-layout-v6304 .tc-shell-v6304:not(.pdv-shell-mode),
body.tc-layout-v6304 .shell:not(.pdv-shell-mode){
  display:grid!important;
  grid-template-columns:var(--tc-v6304-sidebar) minmax(0,1fr)!important;
  width:100vw!important;
  max-width:100vw!important;
  height:100dvh!important;
  min-height:100dvh!important;
  overflow:hidden!important;
  background:var(--tc-v6304-bg)!important;
}
body.tc-layout-v6304 .tc-sidebar,
body.tc-layout-v6304 .sidebar{
  position:relative!important;
  inset:auto!important;
  width:var(--tc-v6304-sidebar)!important;
  max-width:var(--tc-v6304-sidebar)!important;
  height:100dvh!important;
  max-height:100dvh!important;
  display:flex!important;
  flex-direction:column!important;
  gap:12px!important;
  overflow:hidden!important;
  padding:16px 14px!important;
  border-right:1px solid rgba(224,207,173,.16)!important;
  box-shadow:12px 0 34px rgba(42,27,18,.12)!important;
  z-index:20!important;
}
body.tc-layout-v6304 .tc-sidebar-brand{
  flex:0 0 auto!important;
  border-radius:24px!important;
  padding:16px!important;
}
body.tc-layout-v6304 .tc-brand-top{gap:10px!important;align-items:flex-start!important;}
body.tc-layout-v6304 .tc-version-pill{white-space:nowrap!important;}
body.tc-layout-v6304 .tc-menu-search{
  margin-top:14px!important;
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  min-height:42px!important;
  border-radius:16px!important;
  background:rgba(255,255,255,.08)!important;
  border:1px solid rgba(255,255,255,.12)!important;
  padding:0 12px!important;
}
body.tc-layout-v6304 .tc-menu-search input{
  border:0!important;
  outline:0!important;
  background:transparent!important;
  color:#fff8e8!important;
  width:100%!important;
  min-width:0!important;
  font-size:13px!important;
  padding:0!important;
}
body.tc-layout-v6304 .tc-menu-search input::placeholder{color:rgba(255,248,232,.58)!important;}
body.tc-layout-v6304 .tc-nav-scroll{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:auto!important;
  padding:2px 4px 10px 2px!important;
  overscroll-behavior:contain!important;
  scrollbar-width:thin;
}
body.tc-layout-v6304 .tc-menu-section{margin:0 0 13px!important;}
body.tc-layout-v6304 .tc-section-title{
  position:sticky!important;
  top:0!important;
  z-index:1!important;
  margin:0 0 7px!important;
  padding:9px 7px 5px!important;
  backdrop-filter:blur(12px)!important;
  background:linear-gradient(180deg,rgba(42,27,18,.96),rgba(42,27,18,.80))!important;
  border-radius:12px!important;
  font-size:11px!important;
  letter-spacing:.09em!important;
  text-transform:uppercase!important;
  color:#e8d8b8!important;
}
body.tc-layout-v6304 .tc-menu-list{display:grid!important;gap:6px!important;}
body.tc-layout-v6304 .tc-menu-item{
  min-height:48px!important;
  display:grid!important;
  grid-template-columns:34px minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:9px!important;
  width:100%!important;
  padding:9px 10px!important;
  border-radius:16px!important;
  text-align:left!important;
  transition:background .16s ease, transform .16s ease, border-color .16s ease!important;
}
body.tc-layout-v6304 .tc-menu-item:hover{transform:translateX(2px)!important;}
body.tc-layout-v6304 .tc-menu-item.active{
  box-shadow:inset 0 0 0 1px rgba(255,248,232,.18),0 10px 26px rgba(0,0,0,.18)!important;
}
body.tc-layout-v6304 .tc-menu-icon{
  width:34px!important;height:34px!important;
  display:grid!important;place-items:center!important;
  border-radius:12px!important;
  flex:0 0 auto!important;
}
body.tc-layout-v6304 .tc-menu-text{min-width:0!important;display:grid!important;gap:1px!important;}
body.tc-layout-v6304 .tc-menu-label{font-size:13px!important;line-height:1.1!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
body.tc-layout-v6304 .tc-menu-hint{font-size:11px!important;line-height:1.15!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;opacity:.76!important;}
body.tc-layout-v6304 .tc-menu-badge{min-width:22px!important;height:22px!important;display:grid!important;place-items:center!important;border-radius:999px!important;font-size:11px!important;}
body.tc-layout-v6304 .tc-sidebar-footer{
  flex:0 0 auto!important;
  margin-top:0!important;
  padding-top:12px!important;
  max-height:38dvh!important;
  overflow:auto!important;
}
body.tc-layout-v6304 .tc-status-card{border-radius:18px!important;padding:12px!important;}
body.tc-layout-v6304 .tc-main-v6304,
body.tc-layout-v6304 .main{
  height:100dvh!important;
  min-height:0!important;
  overflow:auto!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
  padding:var(--tc-v6304-pad)!important;
  scroll-behavior:auto!important;
}
body.tc-layout-v6304 .topbar{
  position:sticky!important;
  top:0!important;
  z-index:10!important;
  margin:calc(var(--tc-v6304-pad) * -1) calc(var(--tc-v6304-pad) * -1) var(--tc-v6304-gap)!important;
  padding:var(--tc-v6304-pad)!important;
  background:linear-gradient(180deg,rgba(248,243,234,.98),rgba(248,243,234,.92))!important;
  backdrop-filter:blur(14px)!important;
  border-bottom:1px solid var(--tc-v6304-line)!important;
}
body.tc-layout-v6304 .tc-route-kicker{
  font-size:11px!important;
  font-weight:900!important;
  letter-spacing:.12em!important;
  text-transform:uppercase!important;
  color:var(--tc-v6304-gold)!important;
  margin:0 0 5px!important;
}
body.tc-layout-v6304 .topbar h1{font-size:clamp(25px,3.1vw,44px)!important;line-height:.98!important;}
body.tc-layout-v6304 .topbar .actions{
  display:flex!important;
  justify-content:flex-end!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  min-width:0!important;
}
body.tc-layout-v6304 .topbar .actions .pill,
body.tc-layout-v6304 .topbar .actions .btn{white-space:nowrap!important;}
body.tc-layout-v6304 .tc-view-v6304,
body.tc-layout-v6304 #view{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  display:block!important;
}
body.tc-layout-v6304 .card,
body.tc-layout-v6304 .panel,
body.tc-layout-v6304 .table-wrap,
body.tc-layout-v6304 .empty,
body.tc-layout-v6304 .stat,
body.tc-layout-v6304 .admin-list-card,
body.tc-layout-v6304 .order-card-clean,
body.tc-layout-v6304 .receivable-note-card,
body.tc-layout-v6304 .catalog-editor-panel,
body.tc-layout-v6304 .catalog-preview-column{
  max-width:100%!important;
  min-width:0!important;
  border-radius:var(--tc-v6304-radius)!important;
}
body.tc-layout-v6304 .grid,
body.tc-layout-v6304 .admin-summary,
body.tc-layout-v6304 .order-card-grid,
body.tc-layout-v6304 .admin-mini-grid{
  gap:var(--tc-v6304-gap)!important;
}
body.tc-layout-v6304 .grid.g4,
body.tc-layout-v6304 .g4,
body.tc-layout-v6304 .admin-summary:not(.compact){grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))!important;}
body.tc-layout-v6304 .grid.g3,
body.tc-layout-v6304 .g3{grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr))!important;}
body.tc-layout-v6304 .grid.g2,
body.tc-layout-v6304 .g2{grid-template-columns:repeat(auto-fit,minmax(min(100%,310px),1fr))!important;}
body.tc-layout-v6304 .form-row,
body.tc-layout-v6304 .form-row-3,
body.tc-layout-v6304 .labels-form-grid,
body.tc-layout-v6304 .settings-control-grid,
body.tc-layout-v6304 .pdv-close-grid{
  grid-template-columns:repeat(auto-fit,minmax(min(100%,245px),1fr))!important;
  gap:var(--tc-v6304-gap)!important;
}
body.tc-layout-v6304 .row-actions{display:flex!important;flex-wrap:wrap!important;gap:8px!important;align-items:center!important;}
body.tc-layout-v6304 .table-wrap{overflow:auto!important;-webkit-overflow-scrolling:touch!important;}
body.tc-layout-v6304 table{min-width:720px;}
body.tc-layout-v6304 input,
body.tc-layout-v6304 select,
body.tc-layout-v6304 textarea,
body.tc-layout-v6304 button{max-width:100%;}
body.tc-layout-v6304 .modal-backdrop{z-index:1000!important;overflow:auto!important;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important;}
body.tc-layout-v6304 .modal{max-width:min(860px,calc(100vw - 24px))!important;max-height:calc(100dvh - 24px)!important;overflow:auto!important;}
body.tc-layout-v6304 .mobile-menu{display:none!important;}
body.tc-layout-v6304 .tc-sidebar-backdrop{display:none!important;}
body.tc-layout-v6304.tc-menu-open .tc-sidebar-backdrop{display:block!important;}
body.tc-layout-v6304.tc-menu-open{overflow:hidden!important;}
body.tc-layout-v6304.tc-menu-open .main{pointer-events:none!important;}
@media (min-width:1600px){
  body.tc-layout-v6304 .grid.g4,
  body.tc-layout-v6304 .g4,
  body.tc-layout-v6304 .admin-summary:not(.compact){grid-template-columns:repeat(4,minmax(0,1fr))!important;}
  body.tc-layout-v6304 .main{padding:clamp(22px,1.6vw,34px)!important;}
}
@media (max-width:1180px){
  :root{--tc-v6304-sidebar:260px;--tc-v6304-pad:18px;}
  body.tc-layout-v6304 .topbar{display:grid!important;grid-template-columns:1fr!important;}
  body.tc-layout-v6304 .topbar .actions{justify-content:flex-start!important;overflow:auto!important;flex-wrap:nowrap!important;padding-bottom:4px!important;}
}
@media (max-width:900px), (pointer:coarse) and (max-width:1180px){
  body.tc-layout-v6304 .tc-shell-v6304:not(.pdv-shell-mode),
  body.tc-layout-v6304 .shell:not(.pdv-shell-mode){display:block!important;height:auto!important;min-height:100dvh!important;overflow:visible!important;}
  body.tc-layout-v6304 .tc-sidebar,
  body.tc-layout-v6304 .sidebar{
    position:fixed!important;
    left:0!important;top:0!important;
    width:min(330px,88vw)!important;
    max-width:min(330px,88vw)!important;
    height:100dvh!important;
    transform:translateX(-105%)!important;
    transition:transform .22s ease!important;
    z-index:80!important;
    box-shadow:22px 0 54px rgba(0,0,0,.24)!important;
  }
  body.tc-layout-v6304 .tc-sidebar.open,
  body.tc-layout-v6304 .sidebar.open{transform:translateX(0)!important;}
  body.tc-layout-v6304 .tc-sidebar-backdrop{position:fixed!important;inset:0!important;z-index:79!important;background:rgba(25,17,12,.48)!important;backdrop-filter:blur(2px)!important;}
  body.tc-layout-v6304 .tc-main-v6304,
  body.tc-layout-v6304 .main{height:auto!important;min-height:100dvh!important;overflow:visible!important;padding:calc(14px + env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) calc(92px + env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left))!important;}
  body.tc-layout-v6304 .mobile-menu{display:inline-flex!important;align-items:center!important;justify-content:center!important;}
  body.tc-layout-v6304 .topbar{position:sticky!important;top:0!important;margin:calc((14px + env(safe-area-inset-top)) * -1) max(-14px,calc(env(safe-area-inset-right) * -1)) 14px max(-14px,calc(env(safe-area-inset-left) * -1))!important;padding:calc(12px + env(safe-area-inset-top)) 14px 12px!important;border-radius:0 0 22px 22px!important;}
  body.tc-layout-v6304 .topbar h1{font-size:clamp(24px,8vw,34px)!important;}
  body.tc-layout-v6304 .topbar .actions{display:flex!important;overflow-x:auto!important;flex-wrap:nowrap!important;justify-content:flex-start!important;-webkit-overflow-scrolling:touch!important;scroll-snap-type:x proximity!important;}
  body.tc-layout-v6304 .topbar .actions>*{flex:0 0 auto!important;scroll-snap-align:start!important;}
  body.tc-layout-v6304 .row-actions{display:grid!important;grid-template-columns:1fr!important;align-items:stretch!important;}
  body.tc-layout-v6304 .row-actions .btn,
  body.tc-layout-v6304 .row-actions .mini{width:100%!important;justify-content:center!important;min-height:42px!important;}
  body.tc-layout-v6304 .grid.g2,
  body.tc-layout-v6304 .grid.g3,
  body.tc-layout-v6304 .grid.g4,
  body.tc-layout-v6304 .g2,
  body.tc-layout-v6304 .g3,
  body.tc-layout-v6304 .g4,
  body.tc-layout-v6304 .form-row,
  body.tc-layout-v6304 .form-row-3,
  body.tc-layout-v6304 .labels-form-grid,
  body.tc-layout-v6304 .settings-control-grid{grid-template-columns:1fr!important;}
  body.tc-layout-v6304 .admin-summary:not(.compact){grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  body.tc-layout-v6304 table{min-width:680px;}
}
@media (max-width:430px){
  body.tc-layout-v6304 .admin-summary:not(.compact){grid-template-columns:1fr!important;}
  body.tc-layout-v6304 .modal{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;border-radius:20px!important;}
  body.tc-layout-v6304 table{min-width:620px;}
}
@media print{
  body.tc-layout-v6304 .topbar,
  body.tc-layout-v6304 .tc-sidebar,
  body.tc-layout-v6304 .sidebar,
  body.tc-layout-v6304 .tc-sidebar-backdrop{display:none!important;}
  body.tc-layout-v6304 .main{height:auto!important;overflow:visible!important;padding:0!important;}
}
