/* ============================================================================
   OrderCity — header do PAINEL DO LOJISTA (loja atual, sino, conta)
   ----------------------------------------------------------------------------
   Apenas apresentacao do header. Nao altera layout do conteudo, dados nem
   rotas. Para reverter: apague a linha que carrega este arquivo em
   pages/store-panel.html.

   As cores vem das variaveis do tema (--primary, --border, --surface...), entao
   o header acompanha a paleta esmeralda, a paleta azul e o modo escuro.
   ============================================================================ */

.panel-header {
  gap: 16px;
  flex-wrap: nowrap;
}

/* ------------------------------------------------- identidade da loja (1 de 2)
   Escolha do admin (Configuracoes > Identidade da loja). O atributo fica no
   <html> e troca qual dos dois lugares mostra a loja:
     data-oc-store-id="sidebar" (padrao) -> chip do header desligado
     data-oc-store-id="header"           -> nome da loja sai do menu lateral
   Sem o atributo nada muda: o padrao vale pelo fallback :not(). */
html:not([data-oc-store-id="header"]) #ocStoreWrap { display: none; }

@media (min-width: 901px) {
  html[data-oc-store-id="header"] .panel-sidebar .sidebar-store-name { display: none; }
}
/* Tela estreita: o chip ja se recolhe sozinho (regra do responsivo abaixo) e o
   nome da loja volta para o menu lateral, que abre pelo botao de menu. */
@media (max-width: 900px) {
  html[data-oc-store-id="header"] #ocStoreWrap { display: none; }
}

/* ------------------------------------------------------------------ esquerda */
.ochd-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1 1 auto;
}

/* ------------------------------------------------------- chip da loja atual */
.ochd-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.ochd-store {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  max-width: 260px;
  transition: background .18s ease, border-color .18s ease;
}
.ochd-store:hover {
  background: var(--primary-soft, rgba(14, 122, 102, .08));
  border-color: var(--border, #E4E5D9);
}
.ochd-store:focus-visible {
  outline: 2px solid var(--ring, rgba(14, 122, 102, .35));
  outline-offset: 2px;
}

.ochd-store-ava {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft, rgba(14, 122, 102, .12));
  color: var(--primary-dark, #0A5D4E);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .02em;
}

.ochd-store-txt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  line-height: 1.15;
}

.ochd-store-name {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-dark, var(--dark, #14312B));
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ochd-store-sub {
  font-size: .7rem;
  color: var(--muted, #7B8B84);
  margin-top: 2px;
  white-space: nowrap;
}

.ochd-chev {
  color: var(--muted, #7B8B84);
  flex: 0 0 auto;
  transition: transform .18s ease;
}
.ochd-store[aria-expanded="true"] .ochd-chev {
  transform: rotate(180deg);
}

/* ------------------------------------------------------------------ direita */
.panel-header .user-info {
  gap: 12px;
  flex: 0 0 auto;
  margin-left: auto;
}

.ochd-icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border, #E4E5D9);
  background: var(--surface, #fff);
  color: var(--text-dark, var(--dark, #14312B));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.ochd-icon-btn:hover {
  background: var(--primary-soft, rgba(14, 122, 102, .08));
  border-color: var(--primary-light, #4EA894);
  color: var(--primary-dark, #0A5D4E);
}
.ochd-icon-btn:focus-visible {
  outline: 2px solid var(--ring, rgba(14, 122, 102, .35));
  outline-offset: 2px;
}

/* Sino tocando quando entra pedido novo. */
@keyframes ochdRing {
  0%   { transform: rotate(0deg); }
  12%  { transform: rotate(-13deg); }
  26%  { transform: rotate(11deg); }
  40%  { transform: rotate(-8deg); }
  54%  { transform: rotate(6deg); }
  68%  { transform: rotate(-3deg); }
  82%  { transform: rotate(1.5deg); }
  100% { transform: rotate(0deg); }
}
.ochd-icon-btn.is-ringing svg {
  animation: ochdRing .9s ease-in-out 2;
  transform-origin: 50% 20%;
}

.ochd-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger, #C6402F);
  color: #fff;
  font-size: .66rem;
  font-weight: 800;
  line-height: 19px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--surface, #fff);
  pointer-events: none;
}

/* Avatar como botao (sem borda, mesma aparencia do circulo de antes). */
.ochd-avatar-btn {
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  border-radius: 50%;
  line-height: 0;
  transition: transform .18s ease, box-shadow .18s ease;
}
.ochd-avatar-btn:hover {
  transform: translateY(-1px);
}
.ochd-avatar-btn:focus-visible {
  outline: 2px solid var(--ring, rgba(14, 122, 102, .35));
  outline-offset: 3px;
}

/* ------------------------------------------------------------ dropdowns */
.ochd-pop {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 60;
  width: 350px;
  max-width: calc(100vw - 28px);
  background: var(--surface, #fff);
  color: var(--text-dark, var(--dark, #14312B));
  border: 1px solid var(--border, #E4E5D9);
  border-radius: 16px;
  box-shadow: 0 24px 60px -28px rgba(18, 48, 42, .45), 0 2px 6px rgba(18, 48, 42, .06);
  overflow: hidden;
  animation: ochdPop .16s ease-out;
}

@keyframes ochdPop {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ochd-pop-store {
  left: 0;
  right: auto;
  width: 236px;
}
.ochd-pop-user {
  width: 250px;
}

.ochd-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, #E4E5D9);
}

.ochd-pop-title {
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--muted, #7B8B84);
}

.ochd-pop-action {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--primary, #0E7A66);
  font-family: inherit;
  font-size: .76rem;
  font-weight: 700;
  cursor: pointer;
}
.ochd-pop-action:hover { text-decoration: underline; }

.ochd-pop-foot {
  padding: 10px 16px;
  border-top: 1px solid var(--border, #E4E5D9);
  font-size: .71rem;
  color: var(--muted, #7B8B84);
  text-align: center;
}

/* Itens de menu (loja e conta) */
.ochd-pop-store a,
.ochd-pop-user a,
.ochd-user-out {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  font-family: inherit;
  font-size: .86rem;
  font-weight: 600;
  color: var(--text-dark, var(--dark, #14312B));
  text-decoration: none;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  transition: background .14s ease, color .14s ease;
}
.ochd-pop-store a:hover,
.ochd-pop-user a:hover,
.ochd-user-out:hover {
  background: var(--primary-soft, rgba(14, 122, 102, .08));
  color: var(--primary-dark, #0A5D4E);
}

.ochd-mi-ico {
  display: inline-flex;
  color: var(--muted, #7B8B84);
  flex: 0 0 auto;
}
.ochd-pop-store a:hover .ochd-mi-ico,
.ochd-pop-user a:hover .ochd-mi-ico,
.ochd-user-out:hover .ochd-mi-ico {
  color: var(--primary, #0E7A66);
}

.ochd-user-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, #E4E5D9);
  background: var(--ocux-tint, #F6F8F1);
}
.ochd-user-name {
  font-size: .9rem;
  font-weight: 800;
  color: var(--text-dark, var(--dark, #14312B));
}
.ochd-user-mail {
  font-size: .74rem;
  color: var(--muted, #7B8B84);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ochd-user-out {
  border-top: 1px solid var(--border, #E4E5D9);
  color: var(--danger, #C6402F);
}
.ochd-user-out:hover {
  background: rgba(198, 64, 47, .08);
  color: var(--danger, #C6402F);
}
.ochd-user-out:hover .ochd-mi-ico { color: var(--danger, #C6402F); }

/* ------------------------------------------------------- lista de avisos */
.ochd-notif-list {
  max-height: 384px;
  overflow-y: auto;
  padding: 6px;
  scrollbar-width: thin;
}
.ochd-notif-list::-webkit-scrollbar { width: 8px; }
.ochd-notif-list::-webkit-scrollbar-thumb {
  background: var(--border, #E4E5D9);
  border-radius: 8px;
}

.ochd-nitem {
  position: relative;
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font-family: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .14s ease;
}
.ochd-nitem:hover { background: var(--ocux-tint, #F6F8F1); }

.ochd-nitem.is-unread { background: rgba(14, 122, 102, .055); }
.ochd-nitem.is-unread:hover { background: rgba(14, 122, 102, .09); }

.ochd-nitem-ico {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft, rgba(14, 122, 102, .1));
  color: var(--primary-dark, #0A5D4E);
}
.ochd-nitem[data-type="update"] .ochd-nitem-ico {
  background: rgba(47, 84, 235, .1);
  color: #2F54EB;
}
.ochd-nitem[data-type="admin"] .ochd-nitem-ico {
  background: rgba(223, 160, 23, .16);
  color: #9A6C05;
}

.ochd-nitem-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding-right: 12px;
}

.ochd-nitem-title {
  font-size: .84rem;
  font-weight: 700;
  color: var(--text-dark, var(--dark, #14312B));
  line-height: 1.25;
}

.ochd-nitem-text {
  font-size: .78rem;
  color: var(--gray, #55645D);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ochd-nitem-meta {
  font-size: .69rem;
  color: var(--muted, #7B8B84);
  margin-top: 3px;
}

.ochd-nitem-dot {
  position: absolute;
  top: 15px;
  right: 12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary, #0E7A66);
}

.ochd-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 22px 30px;
  text-align: center;
}
.ochd-empty strong {
  font-size: .86rem;
  font-weight: 700;
  color: var(--text-dark, var(--dark, #14312B));
}
.ochd-empty span:last-child {
  font-size: .76rem;
  color: var(--muted, #7B8B84);
  line-height: 1.45;
  max-width: 240px;
}
.ochd-empty-ico {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ocux-tint, #F6F8F1);
  color: var(--muted, #7B8B84);
  margin-bottom: 2px;
}


/* ------------------------------------------------- botao de menu (celular) */
.ochd-nav-btn {
  display: none;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 10px;
  border: 1px solid var(--border, #E4E5D9);
  background: var(--surface, #fff);
  color: var(--text-dark, var(--dark, #14312B));
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.ochd-nav-btn:hover { background: var(--primary-soft, rgba(14, 122, 102, .08)); }

/* ------------------------------------------------------------ gaveta */
.ochd-backdrop {
  position: fixed;
  inset: 0;
  z-index: 64;
  background: rgba(15, 32, 27, .42);
  -webkit-backdrop-filter: blur(1.5px);
  backdrop-filter: blur(1.5px);
  animation: ochdFade .16s ease-out;
}
@keyframes ochdFade { from { opacity: 0; } to { opacity: 1; } }

/* ------------------------------------------------------ menu recolhido (rail)
   As setas "<< >>" no topo do menu deixam o lojista escolher entre o menu
   completo e uma faixa estreita, so com os icones. Economiza largura em
   notebooks sem perder o caminho para as telas. Vale apenas no menu fixo
   (acima de 1100px); abaixo disso quem manda e a gaveta com o botao de menu. */

/* Botao das setas: canto superior direito do menu completo. */
.ochd-rail-btn {
  position: absolute;
  top: 15px;
  right: 12px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  background: rgba(255, 255, 255, .07);
  color: rgba(255, 255, 255, .78);
  cursor: pointer;
  z-index: 3;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.ochd-rail-btn:hover { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .28); }
.ochd-rail-btn:focus-visible { outline: 2px solid rgba(255, 255, 255, .6); outline-offset: 2px; }
.ochd-rail-ico-open { display: none; }

@media (max-width: 1100px) {
  /* Na gaveta do celular/tablet quem fecha e o X: as setas nao aparecem. */
  .ochd-rail-btn { display: none; }
}

@media (min-width: 1101px) {
  /* A largura tambem e aplicada por estilo inline (config do admin), entao
     aqui a faixa estreita manda com !important. O conteudo acompanha. */
  html.oc-hd-rail .panel-sidebar { width: 78px !important; padding-top: 58px; }
  html.oc-hd-rail .panel-main { margin-left: 78px !important; }
  /* No modo estreito o botao fica centralizado acima da marca. */
  html.oc-hd-rail .ochd-rail-btn {
    right: auto;
    left: 50%;
    top: 14px;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, .10);
  }
  html.oc-hd-rail .ochd-rail-ico-close { display: none; }
  html.oc-hd-rail .ochd-rail-ico-open { display: inline-block; }

  html.oc-hd-rail .panel-sidebar .sidebar-brand {
    padding: 0 !important;
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
  }
  html.oc-hd-rail .panel-sidebar .logo {
    padding: 0 !important;
    margin-bottom: 0 !important;
    display: flex;
    justify-content: center;
  }
  html.oc-hd-rail .logo-text,
  html.oc-hd-rail .sidebar-store-name { display: none !important; }
  /* A marca aparece sozinha na faixa: clareia o icone para nao sumir no verde. */
  html.oc-hd-rail .panel-sidebar .logo-icon { color: var(--ocux-gold, #E8D6A6) !important; }

  html.oc-hd-rail .panel-sidebar nav { padding: 0 10px; }
  html.oc-hd-rail .panel-sidebar nav > a,
  html.oc-hd-rail .panel-sidebar nav .nav-group-toggle {
    justify-content: center;
    gap: 0;
    width: 58px;
    height: 46px;
    margin: 4px auto;
    padding: 0 !important;
    font-size: 0;            /* esconde qualquer texto solto */
  }
  html.oc-hd-rail .nav-label,
  html.oc-hd-rail .nav-caret,
  html.oc-hd-rail .nav-group-sub { display: none !important; }
  html.oc-hd-rail .panel-sidebar nav .nav-icon { font-size: 1.22rem; line-height: 1; }
  html.oc-hd-rail .panel-sidebar nav .nav-icon svg { width: 21px; height: 21px; }
  /* Pilula dourada vira barra superior no item ativo da faixa. */
  html.oc-hd-rail .panel-sidebar nav > a.active,
  html.oc-hd-rail .panel-sidebar nav .nav-group.has-active > .nav-group-toggle,
  html.oc-hd-rail .panel-sidebar nav .nav-group-toggle.active {
    box-shadow: inset 0 3px 0 0 var(--ocux-gold);
  }
  html.oc-hd-rail .panel-main { min-width: 0; }
}

/* Botao de fechar dentro da gaveta: so aparece quando a gaveta existe. */
.ochd-sb-close {
  display: none;
  position: absolute;
  top: 14px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 10px;
  background: rgba(255, 255, 255, .10);
  color: #fff;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  z-index: 2;
  transition: background .16s ease, border-color .16s ease;
}
.ochd-sb-close:hover { background: rgba(255, 255, 255, .20); border-color: rgba(255, 255, 255, .34); }
.ochd-sb-close:focus-visible { outline: 2px solid rgba(255, 255, 255, .65); outline-offset: 2px; }

/* Ate 1100px o menu lateral vira gaveta: some da tela e volta pelo botao de
   menu (ou pelo X dentro dele). Assim o conteudo -- inclusive o PDV -- usa a
   largura toda em notebooks pequenos, tablets e celulares. */
@media (max-width: 1100px) {
  .ochd-nav-btn { display: inline-flex; }
  .ochd-sb-close { display: inline-flex; }

  /* Reserva o canto do X para a marca nao encostar no botao. */
  .panel-sidebar .sidebar-brand { padding-right: 62px !important; }

  .panel-sidebar {
    transform: translateX(-102%);
    transition: transform .24s ease, width .25s ease;
    z-index: 66 !important;
    box-shadow: 18px 0 48px -30px rgba(10, 30, 25, .8);
  }
  html.oc-hd-drawer .panel-sidebar { transform: translateX(0); }
  .panel-main { margin-left: 0 !important; min-width: 0 !important; }

  /* Com a gaveta aberta o fundo nao rola junto. */
  html.oc-hd-drawer, html.oc-hd-drawer body { overflow: hidden; }
}

@media (max-width: 620px) {
  .ochd-nav-btn { width: 36px; height: 36px; flex-basis: 36px; }
}

/* ------------------------------------------- alerta de pedidos pendentes */
/* Fica na ponta esquerda, ao lado do status da loja. Some quando a fila
   esta zerada e chama atencao (aneis + brilho) quando ha pedido esperando. */
.ochd-pending {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 11px 0 9px;
  border: 1px solid #F7CDB4;
  border-radius: 999px;
  background: #FFF4EC;
  color: #A63C08;
  font: inherit;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .06em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.ochd-pending[hidden] { display: none !important; }
.ochd-pending:hover {
  background: #FFE9DA;
  border-color: #F0AE86;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px -8px rgba(234, 88, 12, .55);
}
.ochd-pending:focus-visible {
  outline: none;
  border-color: #EA580C;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, .22);
}
.ochd-pending-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #D9530F;
}
.ochd-pending-num {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #EA580C;
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}
/* Anel que "respira" em volta do numero. */
.ochd-pending-num::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px solid rgba(234, 88, 12, .55);
  animation: ochdPendRing 2.4s cubic-bezier(.2, .6, .3, 1) infinite;
  pointer-events: none;
}
@keyframes ochdPendRing {
  0%   { transform: scale(1);    opacity: .65; }
  70%  { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}
/* Chegou pedido novo: pisca algumas vezes para o lojista notar. */
.ochd-pending.is-flash { animation: ochdPendFlash 1s ease-in-out 3; }
@keyframes ochdPendFlash {
  0%, 100% { background: #FFF4EC; border-color: #F7CDB4; }
  50%      { background: #FFD3B8; border-color: #EA580C; box-shadow: 0 0 0 3px rgba(234, 88, 12, .18); }
}
@media (prefers-reduced-motion: reduce) {
  .ochd-pending-num::after { animation: none; }
  .ochd-pending.is-flash { animation: none; background: #FFD3B8; }
}

/* ------------------------------------------------------------- responsivo */
@media (max-width: 1100px) {
  .ochd-store-sub { display: none; }
  .ochd-store-name { max-width: 150px; }
}

@media (max-width: 900px) {
  .ochd-store { padding-right: 6px; }
  .ochd-store-name { max-width: 120px; }
  .ochd-pop { width: 320px; }
}

@media (max-width: 620px) {
  .panel-header { gap: 8px; }
  .ochd-left { gap: 8px; }
  .ochd-store-txt { display: none; }
  .ochd-store { padding: 3px; }
  .ochd-chev { display: none; }
  .panel-header .user-info { gap: 8px; }
  .ochd-pop,
  .ochd-pop-store,
  .ochd-pop-user {
    position: fixed;
    left: 10px;
    right: 10px;
    top: 78px;
    width: auto;
    max-width: none;
  }
}

/* ============================================================================
   ATALHOS DA DIREITA — cardapio online, PDV em janela flutuante, tela cheia
   ============================================================================ */

/* Link "Ver cardapio online" (abre o cardapio publico em nova aba). */
.ochd-menu-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dark, var(--dark, #14312B));
  font-family: inherit;
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.ochd-menu-link:hover {
  background: var(--primary-soft, rgba(14, 122, 102, .08));
  border-color: var(--border, #E4E5D9);
  color: var(--primary-dark, #0A5D4E);
}
.ochd-menu-link:focus-visible {
  outline: 2px solid var(--ring, rgba(14, 122, 102, .35));
  outline-offset: 2px;
}
.ochd-menu-ico { color: var(--primary, #0E7A66); flex: 0 0 auto; }
.ochd-ext { color: var(--muted, #7B8B84); flex: 0 0 auto; }
.ochd-menu-link:hover .ochd-ext { color: var(--primary, #0E7A66); }

/* Botao azul do PDV. */
.ochd-pdv-btn {
  height: 38px;
  min-width: 52px;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  background: #2563EB;
  color: #fff;
  font-family: inherit;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .05em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 20px -14px rgba(37, 99, 235, .95);
  transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}
.ochd-pdv-btn:hover {
  background: #1D4ED8;
  box-shadow: 0 12px 22px -12px rgba(37, 99, 235, .85);
}
.ochd-pdv-btn:active { transform: translateY(1px); }
.ochd-pdv-btn:focus-visible {
  outline: 2px solid rgba(37, 99, 235, .45);
  outline-offset: 2px;
}

/* Tela cheia: setas para fora (entrar) / para dentro (sair). */
#ocFsBtn .ochd-ico-in { display: none; }
#ocFsBtn.is-fs .ochd-ico-out { display: none; }
#ocFsBtn.is-fs .ochd-ico-in { display: block; }

/* ============================================================================
   JANELA FLUTUANTE DO PDV (95% da tela nos dois sentidos)
   ============================================================================ */
html.ocpdv-lock,
html.ocpdv-lock body { overflow: hidden; }

.ocpdv-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5vh 2.5vw;
}
.ocpdv-modal[hidden] { display: none; }

.ocpdv-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 28, 24, .55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  animation: ochdFade .16s ease-out;
}

.ocpdv-window {
  position: relative;
  width: 95vw;
  height: 95vh;
  max-width: 95vw;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface, #fff);
  color: var(--text-dark, var(--dark, #14312B));
  border-radius: 18px;
  border: 1px solid var(--border, #E4E5D9);
  box-shadow: 0 40px 90px -40px rgba(9, 30, 25, .7), 0 4px 14px rgba(9, 30, 25, .08);
  animation: ocpdvIn .18s ease-out;
}
@keyframes ocpdvIn {
  from { opacity: 0; transform: scale(.985); }
  to   { opacity: 1; transform: none; }
}

.ocpdv-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border, #E4E5D9);
  background: var(--ocux-tint, #F6F8F1);
}
.ocpdv-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2563EB;
  color: #fff;
  flex: 0 0 auto;
}
.ocpdv-title {
  font-size: .92rem;
  font-weight: 800;
  letter-spacing: -.01em;
}
.ocpdv-hint {
  font-size: .72rem;
  color: var(--muted, #7B8B84);
  padding-left: 2px;
}
.ocpdv-close {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--border, #E4E5D9);
  background: var(--surface, #fff);
  color: var(--text-dark, var(--dark, #14312B));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.ocpdv-close:hover {
  background: rgba(198, 64, 47, .1);
  border-color: rgba(198, 64, 47, .35);
  color: var(--danger, #C6402F);
}

.ocpdv-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 18px;
  background: var(--light, #F7F8F3);
}
/* A secao do PDV volta a ser um bloco normal dentro da janela. */
.ocpdv-body > #sec-pdv { display: block; margin: 0; padding: 0; }

/* ------------------------------------------------------------- responsivo */
@media (max-width: 1180px) {
  .ochd-menu-link-txt { display: none; }
  .ochd-menu-link { padding: 0 10px; }
  .ochd-ext { display: none; }
}
@media (max-width: 1024px) {
  .ochd-menu-link { padding: 0 11px; }
}
@media (max-width: 700px) {
  #ocFsBtn { display: none; }
  .ochd-menu-link { display: none; }
}
@media (max-width: 620px) {
  .ochd-pdv-btn { min-width: 44px; height: 36px; padding: 0 9px; font-size: .74rem; }
  .ocpdv-modal { padding: 0; }
  .ocpdv-window { width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; border-radius: 0; border: 0; }
  .ocpdv-hint { display: none; }
  .ocpdv-body { padding: 12px; }
}

/* ============================================================================
   PAGINA ATUAL + STATUS DA LOJA (extrema esquerda do header)
   ============================================================================ */

/* Rotulo da pagina atual (letras miudas), acompanha o item do menu lateral. */
.ochd-page {
  flex: 0 0 auto;
  max-width: 190px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted, #7B8B84);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ochd-page-sep {
  width: 1px;
  height: 18px;
  flex: 0 0 1px;
  background: var(--border, #E4E5D9);
}

/* Chip de status: fundo verdinho (aberta) ou amarelinho (fechada). */
.ochd-status {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  flex: 0 0 auto;
  white-space: nowrap;
  cursor: default;
  transition: background .16s ease, border-color .16s ease;
}

.ochd-status-dot {
  width: 15px;
  height: 9px;
  border-radius: 999px;
  flex: 0 0 15px;
}

.ochd-status-txt {
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .06em;
}

.ochd-status-hours {
  font-size: .66rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  color: inherit;
  opacity: .95;
  cursor: pointer;
}
.ochd-status-hours:hover { opacity: 1; }

/* aberta */
.ochd-status.is-open {
  background: #EAF9F0;
  border-color: #BFE9CF;
  color: #0B7A48;
}
.ochd-status.is-open .ochd-status-dot { background: #16A34A; }

/* fechada */
.ochd-status.is-closed {
  background: #FFF7E0;
  border-color: #F2DFAE;
  color: #7A4B12;
}
.ochd-status.is-closed .ochd-status-dot { background: #F59E0B; }

/* Balão do status (aparece ao passar o mouse / focar). */
.ochd-status-tip {
  position: absolute;
  top: calc(100% + 9px);
  left: 0;
  z-index: 80;
  padding: 7px 11px;
  border-radius: 10px;
  background: #14312B;
  color: #fff;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  box-shadow: 0 12px 26px -14px rgba(9, 30, 25, .8);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
  pointer-events: none;
}
.ochd-status-tip::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 16px;
  width: 8px;
  height: 8px;
  background: #14312B;
  transform: rotate(45deg);
  border-radius: 2px;
}
.ochd-status:hover .ochd-status-tip,
.ochd-status:focus-within .ochd-status-tip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ------------------------------------------------------------- responsivo */
@media (max-width: 1300px) {
  .ochd-page { max-width: 130px; }
}
@media (max-width: 1100px) {
  /* Cabe "Frente de Caixa" inteiro: o hamburguer entrou, mas ainda sobra espaco. */
  .ochd-page { max-width: 150px; }
}
@media (max-width: 900px) {
  /* Espaço curto: o chip da loja sai (o nome dela continua no menu lateral)
     e o rotulo da pagina fica. */
  .ochd-store { display: none; }
  .ochd-page { max-width: 132px; }
  .ochd-status-hours { display: none; }
  .ochd-pending-txt { display: none; }
  .ochd-pending { padding: 0 10px 0 8px; gap: 6px; }
}
@media (max-width: 620px) {
  /* Cabecalho compacto: rotulo da pagina + status + atalhos, tudo numa linha. */
  .panel-header { padding-left: 12px; padding-right: 12px; gap: 6px; }
  .ochd-left { gap: 6px; }
  .panel-header .user-info { gap: 5px; }

  .ochd-page { max-width: 50px; font-size: .6rem; letter-spacing: .05em; flex: 0 0 auto; }
  .ochd-page-sep { display: none; }

  .ochd-status { height: 24px; padding: 0 7px; gap: 4px; flex: 0 0 auto; }
  .ochd-pending { height: 24px; padding: 0 8px 0 6px; gap: 4px; }
  .ochd-pending-num { min-width: 18px; height: 18px; font-size: .62rem; }
  .ochd-pending-ico svg { width: 15px; height: 15px; }
  .ochd-status-dot { width: 10px; height: 6px; flex-basis: 10px; }
  .ochd-status-txt { font-size: .56rem; letter-spacing: .03em; overflow: hidden; text-overflow: ellipsis; }

  .ochd-icon-btn { width: 36px; height: 36px; }
  html[data-ux-store="v2"] .panel-header .occhat-fab { width: 36px; height: 36px; margin-right: 0; }
  html[data-ux-store="v2"] .panel-header .avatar { width: 34px; height: 34px; font-size: .74rem; box-shadow: 0 0 0 2px #fff, 0 0 0 2px var(--ux-avatar-ring); }
  .ochd-pdv-btn { min-width: 38px; height: 34px; padding: 0 7px; font-size: .72rem; }
  .ochd-avatar-btn .avatar { width: 32px; height: 32px; font-size: .72rem; }
}

/* Em telas muito estreitas, quando ha pedido esperando, o alerta ganha o
   lugar do status da loja (o status volta assim que a fila zera). */
@media (max-width: 520px) {
  .ochd-left:has(.ochd-pending:not([hidden])) .ochd-status { display: none; }
}

@media (max-width: 380px) {
  .panel-header { gap: 4px; }
  .ochd-left { gap: 4px; }
  .ochd-status { padding: 0 6px; gap: 4px; }
}

@media (max-width: 430px) {
  /* Tela muito estreita: o rotulo da pagina sai de cena e o status da loja
     assume a ponta esquerda (o nome da secao segue no menu lateral). */
  .ochd-page, .ochd-page-sep { display: none; }
}
