/* Moldura do painel: sidebar fixa + topbar + área de conteúdo. Montada uma vez; só o conteúdo troca na navegação. */
.sh-skip { position: absolute; left: 12px; top: -60px; z-index: 70; background: #fff; border: 2px solid var(--accent); border-radius: 8px; padding: 8px 12px; }
.sh-skip:focus { top: 12px; }

.sh-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--surface-sidebar); border-right: 1px solid var(--stroke); padding: 28px 18px 14px; display: flex; flex-direction: column; z-index: 20; overflow-y: auto; }
.sh-brand { display: flex; align-items: center; font-size: 27px; font-weight: 680; letter-spacing: -1.2px; padding: 0 10px; margin-bottom: 29px; text-decoration: none; color: var(--ink); }
.sh-brand-symbol { position: relative; width: 29px; height: 33px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--accent); border-radius: 9px 9px 9px 3px; color: var(--accent); font-size: 21px; margin-right: 8px; line-height: 1; }
.sh-brand-symbol i { position: absolute; right: -4px; bottom: -3px; width: 9px; height: 9px; border-radius: 50%; background: #dcaa81; }
.sh-brand-dot { color: var(--accent); }

.sh-workspace { display: flex; align-items: center; gap: 12px; padding: 16px 12px; border: 1px solid #e0e5da; background: var(--surface-muted); border-radius: var(--radius-lg); margin-bottom: 26px; }
.sh-shop-mark { flex: none; height: 43px; width: 43px; border-radius: 12px 12px 12px 4px; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 600; letter-spacing: -0.5px; background: #354936; color: #fff9ed; }
.sh-workspace > div { min-width: 0; display: flex; flex-direction: column; }
.sh-caption { font-size: 8px; letter-spacing: 1.15px; color: #697363; }
.sh-workspace strong { font-size: 14px; letter-spacing: -0.3px; margin: 3px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-role { font-size: 11px; color: #596d50; }

.sh-nav { display: flex; flex-direction: column; gap: 3px; }
.sh-nav-label { font-size: 10px; letter-spacing: 1.35px; color: #62705e; margin: 14px 0 6px 12px; font-weight: 600; }
.sh-nav-label:first-child { margin-top: 0; }
.sh-link { position: relative; display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 9px 13px; border: 1px solid transparent; border-radius: var(--radius); color: var(--ink-soft); font-size: 14px; text-decoration: none; background: transparent; width: 100%; }
.sh-link:hover { background: #f1f3ec; }
.sh-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent-line); padding-left: 17px; font-weight: 600; box-shadow: 0 1px 2px #7e543807; }
.sh-link[aria-current="page"]::before { content: ""; position: absolute; left: 7px; top: 50%; width: 3px; height: 15px; margin-top: -7px; border-radius: 3px; background: var(--accent); }
.sh-link .sh-ext { margin-left: auto; opacity: 0.7; }

.sh-note { display: none; }
.sh-bottom { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; gap: 4px; }
.sh-bottom .sh-link { min-height: 38px; font-size: 13px; }
.sh-profile { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 12px; border: 1px solid #e3e7de; border-radius: var(--radius-lg); background: #fff; }
.sh-avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #e8ecdf; color: #3f5139; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.sh-profile > div { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.sh-profile strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-profile > div > span { font-size: 11px; color: var(--secondary); }
.sh-logout { font-size: 12px; min-height: 34px; padding: 0 10px; border-radius: 8px; color: #5b3f33; background: transparent; border: 1px solid #e3e7de; }
.sh-logout:hover { background: var(--accent-soft); }

.sh-app { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.sh-topbar { position: sticky; top: 0; z-index: 10; position: sticky; height: var(--topbar-h); padding: 0 32px; display: flex; align-items: center; gap: 12px; background: #f7f8f5e6; backdrop-filter: blur(8px); border-bottom: 1px solid var(--stroke); }
.sh-crumb { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--muted); min-width: 0; margin-right: auto; white-space: nowrap; }
.sh-crumb strong { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.sh-actions { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sh-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: var(--radius); border: 1px solid #e0e5da; background: #fff; color: var(--ink); }
.sh-menu-btn { display: none; }
.sh-main { flex: 1; width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 35px 32px 40px; }
.sh-main:focus { outline: none; }
.sh-footer { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--stroke); }

.sh-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--accent); z-index: 80; opacity: 0; transition: width 0.4s ease, opacity 0.2s; }
.sh-progress[data-on="true"] { opacity: 1; width: 70%; }

/* status da conexão ao vivo */
.live-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid; border-radius: 99px; padding: 5px 12px; font-size: 13px; font-weight: 550; white-space: nowrap; }
.live-pill i { width: 9px; height: 9px; border-radius: 50%; }
.live-pill small { font-weight: 400; font-size: 11px; }
.live-pill[data-state="live"] { border-color: #b6dfc5; background: #ecf8f0; color: #1d5b36; }
.live-pill[data-state="live"] i { background: #22a35a; }
.live-pill[data-state="connecting"], .live-pill[data-state="reconnecting"] { border-color: #f0d9a4; background: #fdf7e7; color: #6f5310; }
.live-pill[data-state="connecting"] i, .live-pill[data-state="reconnecting"] i { background: #d9a221; }
.live-pill[data-state="offline"] { border-color: #f0c3b8; background: #fbefeb; color: #832f1f; }
.live-pill[data-state="offline"] i { background: #c8452c; }

.sh-bottom-nav { display: none; }
.sh-drawer { margin: 0 auto 0 0; height: 100dvh; max-height: 100dvh; width: min(320px, 88vw); padding: 22px 16px; border: 0; background: var(--surface-sidebar); color: var(--ink); overflow-y: auto; }
.sh-drawer::backdrop { background: #1d2a2088; }
.sh-drawer[open] { display: flex; flex-direction: column; }
.sh-drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }

@media (min-height: 960px) and (min-width: 901px) {
  .sh-note { display: block; margin-top: auto; padding: 16px; border: 1px solid #e3e7d9; border-radius: var(--radius-lg); background: var(--surface-muted); }
  .sh-note strong { display: block; font-size: 12px; margin: 6px 0 4px; }
  .sh-note p { font-size: 11px; line-height: 1.8; color: var(--muted); }
  .sh-note + .sh-bottom { margin-top: 14px; }
}
@media (max-width: 1200px) and (min-width: 901px) {
  :root { --sidebar-w: 220px; }
  .sh-sidebar { padding-inline: 12px; }
  .sh-topbar { padding-inline: 24px; }
  .sh-main { padding: 28px 24px 32px; }
}
@media (max-width: 900px) {
  .sh-sidebar { display: none; }
  .sh-app { margin-left: 0; }
  .sh-topbar { height: auto; min-height: 64px; padding: 10px 20px; flex-wrap: wrap; row-gap: 8px; }
  .sh-menu-btn { display: inline-flex; }
  .sh-main { padding: 24px 20px 96px; }
  .sh-bottom-nav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; inset: auto 0 0 0; z-index: 30; background: var(--surface-sidebar); border-top: 1px solid var(--stroke); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
  .sh-bottom-nav a, .sh-bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; font-size: 11px; color: #5e6c56; text-decoration: none; background: transparent; border: 0; border-radius: var(--radius); }
  .sh-bottom-nav [aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
  .live-pill small { display: none; }
}
@media (max-width: 560px) {
  .sh-crumb > span { display: none; }
  .sh-crumb { font-size: 0; }
  .sh-crumb strong { font-size: 13px; }
}

/* alertas de pedidos novos (barra do topo) */
.sound { display: inline-flex; border: 1px solid var(--stroke-strong); border-radius: 99px; overflow: hidden; background: #fff; }
.sound button { min-height: 36px; padding: 0 12px; border: 0; background: transparent; font-size: 12px; color: var(--ink-soft); }
.sound button + button { border-left: 1px solid var(--stroke); }
.sound button:hover { background: #f1f3ec; }
.sound button[aria-pressed="true"] { background: var(--accent); color: #fffaf5; font-weight: 600; }
.unseen { display: inline-flex; align-items: center; gap: 6px; }
.unseen[hidden] { display: none; }
.unseen-badge { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 99px; background: var(--accent); color: #fffaf5; font-size: 12px; font-weight: 700; text-decoration: none; animation: pop .3s ease; }
.unseen-ack { min-height: 36px; padding: 0 10px; border: 0; background: transparent; font-size: 12px; text-decoration: underline; color: var(--ink-soft); }
.sound-locked { position: absolute; right: 32px; top: calc(100% + 4px); background: var(--warn-soft); border: 1px solid #eadcc0; color: var(--warn); border-radius: 8px; padding: 6px 10px; font-size: 12px; }
.sound-locked[hidden] { display: none; }
.live-toast { position: fixed; top: 84px; right: 24px; z-index: 60; max-width: 360px; background: #fff; border: 1px solid var(--accent-line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 12px 16px; font-weight: 600; box-shadow: var(--shadow-2); animation: pop .3s ease; }
.live-toast[hidden] { display: none; }
.live-toast small { font-weight: 400; color: var(--secondary); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (max-width: 900px) {
  .sh-actions { flex-wrap: wrap; width: 100%; order: 3; }
  .sound button { padding: 0 9px; }
  .live-toast { top: auto; bottom: 86px; right: 16px; left: 16px; max-width: none; }
  .sound-locked { position: static; width: 100%; order: 4; }
}
