/* Shared producer navigation.  This is intentionally separate from screen
 * styling so the sidebar, drawer and bottom bar stay one component. */
.producer-workspace { min-height: 100dvh; }
.app-shell--producer .producer-shell { width: 100%; max-width: none; min-height: 100dvh; margin: 0; border: 0; border-radius: 0; background: var(--canvas); }
.producer-workspace__main { min-width: 0; }
.producer-mobile-header { display: flex; align-items: center; gap: 11px; min-height: 62px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--canvas) 94%, #fff); }
.producer-mobile-header > button { display: grid; place-items: center; flex: 0 0 44px; width: 44px; min-height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.producer-mobile-header > button:hover { background: var(--surface-soft); box-shadow: none; }
.producer-mobile-header .icon { width: 19px; height: 19px; }
.producer-mobile-header__title { display: grid; flex: 1 1 auto; min-width: 0; gap: 1px; }
.producer-mobile-header__business { display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0; }
.producer-mobile-header__business > span { min-width: 0; overflow: hidden; color: var(--muted); font-size: .7rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.producer-mobile-header__business .environment-tag { flex: 0 0 auto; margin: 0; }
.producer-mobile-header strong { overflow: hidden; color: var(--ink); font-family: var(--display); font-size: .95rem; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }

.producer-sidebar { z-index: 20; display: flex; flex-direction: column; flex-shrink: 0; width: min(86vw, 326px); height: 100dvh; border-right: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.producer-sidebar__top { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; min-height: 73px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.producer-sidebar__brand { display: inline-flex; align-items: center; min-width: 0; }
.producer-sidebar__brand img { display: block; width: 118px; height: auto; }
.producer-sidebar :is(.producer-sidebar__collapse, .producer-sidebar__close) { display: grid; place-items: center; flex: 0 0 44px; width: 44px; min-height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.producer-sidebar :is(.producer-sidebar__collapse, .producer-sidebar__close):hover { background: var(--surface-soft); box-shadow: none; }
.producer-sidebar__collapse .icon, .producer-sidebar__close .icon { width: 18px; height: 18px; }
.producer-sidebar .producer-sidebar__close { display: inline-flex; flex-basis: auto; gap: 6px; width: auto; padding: 0 11px; font-size: .78rem; }
.producer-sidebar__close span { font-weight: 750; }
.producer-sidebar__business { display: flex; flex-shrink: 0; align-items: center; gap: 10px; min-height: 64px; margin: 12px 12px 8px; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); color: inherit; text-decoration: none; }
a.producer-sidebar__business:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); background: #fff; }
a.producer-sidebar__business:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.producer-sidebar__business[aria-current="page"] { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); background: var(--brand-soft); }
.producer-sidebar__business-logo, .producer-sidebar__business-mark { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; overflow: hidden; border-radius: 10px; background: var(--brand); color: #fff; font-size: .84rem; font-weight: 850; object-fit: cover; }
.producer-sidebar__business-copy { display: grid; min-width: 0; gap: 1px; }
.producer-sidebar__business-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.producer-sidebar__business-copy strong { display: -webkit-box; overflow: hidden; color: var(--ink); font-size: .82rem; line-height: 1.25; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.producer-sidebar__business-copy span { color: var(--muted); font-size: .69rem; }
.producer-sidebar__identity { display: grid; justify-items: start; gap: 4px; min-width: 0; }
.environment-badge { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 2px 8px 2px 6px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface-soft); color: var(--brand-dark); font-size: .64rem; font-weight: 800; letter-spacing: .02em; line-height: 1.5; cursor: default; }
.environment-badge__dot { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.environment-badge__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.environment-badge--homologation { border-color: #ecd4ad; background: #fff5e7; color: #7a4a12; }
.environment-badge--homologation .environment-badge__dot { background: #c27a12; }
.environment-badge--development { border-color: #c9d6e8; background: #f2f6fc; color: #2c547f; }
.environment-badge--development .environment-badge__dot { background: #376ea8; }
.environment-tag { margin-left: 4px; padding: 1px 6px; border-radius: 99px; font-size: .62rem; font-style: normal; font-weight: 800; letter-spacing: .02em; }
.environment-tag--homologation { background: #fff1d6; color: #7a4a12; }
.environment-tag--development { background: #e6eef8; color: #2c547f; }
.producer-sidebar__nav { flex: 1 1 auto; min-height: 0; padding: 4px 10px 14px; overflow-y: auto; overscroll-behavior: contain; }
.producer-sidebar__group { padding: 12px 0; border-top: 1px solid var(--line); }
.producer-sidebar__group:first-child { border-top: 0; }
.producer-sidebar__group h2 { margin: 0 0 6px; padding: 0 9px; color: var(--muted); font-family: var(--body); font-size: .75rem; font-weight: 700; letter-spacing: .01em; line-height: 1.35; }
.producer-sidebar__group ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.producer-sidebar__group a { position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 9px; border-radius: 9px; color: #355147; font-size: .83rem; font-weight: 700; line-height: 1.25; text-decoration: none; }
.producer-sidebar__group a > span { min-width: 0; }
.producer-sidebar :is(a, button):focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.producer-navigation-tooltip { position: fixed; z-index: 30; max-width: 240px; padding: 9px 12px; border-radius: 8px; background: var(--ink); color: #fff; font-size: .8rem; line-height: 1.35; pointer-events: none; box-shadow: var(--elevation-1); }
.producer-navigation-tooltip[hidden] { display: none; }
.producer-sidebar__group a:hover { background: var(--surface-soft); color: var(--ink); }
.producer-sidebar__group a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-dark); font-weight: 800; }
.producer-sidebar__group a[aria-current="page"]::before { position: absolute; left: 0; width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: var(--brand); content: ""; }
/* Contador de itens que pedem ação (ex.: encomendas novas). Número + texto oculto, não só cor. */
.producer-sidebar__badge { display: inline-grid; place-items: center; min-width: 21px; height: 21px; margin-left: auto; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .7rem; font-style: normal; font-weight: 800; font-variant-numeric: tabular-nums; }
.producer-nav__badge { position: absolute; top: 2px; left: calc(50% + 6px); display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .62rem; font-weight: 800; line-height: 1; }
.producer-sidebar__group .icon { flex: 0 0 18px; width: 18px; height: 18px; color: currentColor; }
.producer-sidebar__footer { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 7px; min-height: 64px; padding: 11px 14px; border-top: 1px solid var(--line); }
.producer-sidebar__owner { min-width: 0; overflow: hidden; color: var(--muted); font-size: .7rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.producer-sidebar__footer form { flex: 0 0 auto; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.producer-sidebar .producer-sidebar__logout { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 9px; border: 0; border-radius: 8px; background: transparent; color: #875047; font-size: .8rem; }
.producer-sidebar .producer-sidebar__logout:hover { background: #fff1ee; color: #6f3d36; box-shadow: none; }
.producer-sidebar__logout .icon { width: 17px; height: 17px; }
.producer-drawer-backdrop { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-shell--producer .producer-nav { position: fixed; z-index: 12; display: grid; gap: 2px; margin: 0; right: 0; bottom: 0; left: 0; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 8px max(8px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); border-top: 1px solid var(--line); border-radius: 0; background: var(--surface); box-shadow: 0 -5px 20px rgba(20, 50, 44, .08); }
.app-shell--producer .producer-nav a, .app-shell--producer .producer-nav button { position: relative; display: grid; place-items: center; align-content: center; gap: 3px; min-width: 0; min-height: 48px; padding: 4px 2px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: 700 .68rem/1.15 var(--body); text-decoration: none; box-shadow: none; }
.app-shell--producer .producer-nav span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-shell--producer .producer-nav :is(a, button):focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.app-shell--producer .producer-nav button:hover, .app-shell--producer .producer-nav a:hover { background: var(--surface-soft); box-shadow: none; }
.app-shell--producer .producer-nav .icon { width: 18px; height: 18px; color: currentColor; }
.app-shell--producer .producer-nav span { color: currentColor; font-size: inherit; }
.app-shell--producer .producer-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-dark); }
.app-shell--producer .producer-nav a[aria-current="page"]:hover { background: #cdeed9; }
.app-shell--producer .producer-nav button[aria-expanded="true"] { background: var(--surface-soft); color: var(--ink); }

/* Phablets: keep the five targets grouped instead of spread across the screen. */
@media (min-width: 560px) and (max-width: 767px) {
  .app-shell--producer .producer-nav { padding-inline: max(8px, calc((100% - 540px) / 2)); }
}

@media (max-width: 359px) {
  .app-shell--producer .producer-nav { gap: 0; padding-inline: 2px; }
  .app-shell--producer .producer-nav a, .app-shell--producer .producer-nav button { padding-inline: 0; font-size: .6rem; letter-spacing: -.01em; }
  .producer-mobile-header { gap: 8px; padding-inline: 12px; }
}

@media (max-width: 1023px) {
  html.producer-navigation-ready .producer-sidebar { position: fixed; top: 0; bottom: 0; left: 0; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 14px 0 32px rgba(24, 49, 41, .16); }
  html.producer-navigation-ready.producer-drawer-open .producer-sidebar { transform: translateX(0); }
  html.producer-navigation-ready.producer-drawer-open .producer-drawer-backdrop { position: fixed; z-index: 19; inset: 0; display: block; background: rgba(17, 37, 29, .38); }
  html.producer-navigation-ready.producer-drawer-open, html.producer-navigation-ready.producer-drawer-open body { overflow: hidden; }
  .producer-sidebar .producer-sidebar__collapse { display: none; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .producer-mobile-header { min-height: 68px; padding-inline: 24px; }
  .app-shell--producer .container { width: min(100% - 48px, 1080px); padding-bottom: 48px; }
  .app-shell--producer .producer-nav { display: none; }
}

@media (min-width: 1024px) {
  .producer-workspace { display: grid; grid-template-columns: 260px minmax(0, 1fr); }
  .producer-sidebar { position: sticky; top: 0; width: 260px; }
  .producer-mobile-header { display: none; }
  .app-shell--producer .container { width: min(100% - 56px, 1220px); padding: 34px 0 56px; }
  .app-shell--producer .producer-nav { display: none; }
  .producer-sidebar .producer-sidebar__close { display: none; }
  html.producer-sidebar-collapsed .producer-workspace { grid-template-columns: 76px minmax(0, 1fr); }
  html.producer-sidebar-collapsed .producer-sidebar { width: 76px; }
  html.producer-sidebar-collapsed .producer-sidebar__top { justify-content: center; padding-inline: 8px; }
  html.producer-sidebar-collapsed .producer-sidebar__brand, html.producer-sidebar-collapsed .producer-sidebar__business-copy, html.producer-sidebar-collapsed .producer-sidebar__group h2, html.producer-sidebar-collapsed .producer-sidebar__group a > span, html.producer-sidebar-collapsed .producer-sidebar__footer .producer-sidebar__owner, html.producer-sidebar-collapsed .producer-sidebar__logout span { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  html.producer-sidebar-collapsed .producer-sidebar__business { justify-content: center; min-height: auto; margin: 12px 9px 7px; padding: 9px; }
  html.producer-sidebar-collapsed .producer-sidebar__group { padding-block: 8px; }
  html.producer-sidebar-collapsed .producer-sidebar__group a { justify-content: center; padding: 9px; }
  html.producer-sidebar-collapsed .producer-sidebar__badge { position: absolute; top: 3px; right: 6px; min-width: 17px; height: 17px; margin: 0; padding: 0 4px; font-size: .62rem; }
  html.producer-sidebar-collapsed .producer-sidebar__footer { justify-content: center; padding-inline: 8px; }
  html.producer-sidebar-collapsed .producer-sidebar__logout { width: 42px; padding: 0; justify-content: center; }
  html.producer-sidebar-collapsed .producer-sidebar__collapse .icon { transform: rotate(180deg); }
  html.producer-sidebar-collapsed .producer-sidebar__identity { justify-items: center; }
  html.producer-sidebar-collapsed .environment-badge { padding: 4px; }
  html.producer-sidebar-collapsed .environment-badge__text { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  .producer-sidebar, .producer-sidebar__collapse .icon { transition: none !important; }
}
