/* ==========================================================================
   PagCenter - layout com menu lateral (sobre o Nexus)
   Cores de marca: assets/meutema/css/theme.css (--mt-primary etc.).
   ========================================================================== */

:root {
  --pc-sidenav-w: 268px;
  --pc-topbar-h: 68px;
  --pc-primary: var(--mt-primary, #4f46e5);
  --pc-primary-hover: var(--mt-primary-hover, #4338ca);
  --pc-primary-soft: var(--mt-primary-soft, #eef2ff);
  --pc-accent: var(--mt-accent, #7c3aed);
  --pc-surface: var(--bg, #fff);
  --pc-page: var(--bg-lifted, #f4f5f7);
  --pc-border: var(--border-muted, #e4e4e7);
  --pc-text: var(--text, #111827);
  --pc-muted: var(--text-lifted, #6b7280);
}

html, body { background-color: var(--pc-page); }
body.pc-layout { min-height: 100vh; }

/* --- Menu lateral --------------------------------------------------------- */
.pc-sidenav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1045;
  width: var(--pc-sidenav-w);
  display: flex;
  flex-direction: column;
  background: var(--pc-surface);
  border-right: 1px solid var(--pc-border);
}
.pc-sidenav-brand {
  flex: 0 0 var(--pc-topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--pc-border);
}
.pc-layout .navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin: 0;
  padding: 0;
  color: var(--pc-text) !important;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -.02em;
}
.pc-layout .navbar-brand .logo-img { max-height: 36px; max-width: 180px; }
.pc-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--pc-primary), var(--pc-accent));
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
}
.pc-sidenav-close {
  border: 0;
  background: none;
  color: var(--pc-muted);
  font-size: 1.1rem;
  padding: .25rem;
}
.pc-sidenav-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1rem .75rem;
}
.pc-sidenav-footer {
  flex: 0 0 auto;
  padding: .75rem;
  border-top: 1px solid var(--pc-border);
}
.pc-nav-heading {
  display: block;
  padding: 0 .75rem .5rem;
  color: var(--pc-muted);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.pc-nav, .pc-subnav { list-style: none; margin: 0; padding: 0; }
.pc-nav-item { margin-bottom: 2px; }
.pc-nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  padding: .62rem .75rem;
  border: 0;
  border-radius: var(--rounding-md, .625rem);
  background: transparent;
  color: var(--pc-text) !important;
  font: inherit;
  font-size: .92rem;
  font-weight: 500;
  text-align: left;
  text-decoration: none !important;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}
.pc-nav-link:hover { background: var(--bg-lifted, #f4f5f7); }
.pc-nav-icon {
  flex: 0 0 20px;
  width: 20px;
  text-align: center;
  color: var(--pc-muted);
  font-size: 1rem;
}
.pc-nav-dot { font-size: .35rem; }
.pc-nav-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-nav-caret { font-size: .7rem; color: var(--pc-muted); transition: transform 200ms ease; }
.pc-nav-toggle:not(.collapsed) .pc-nav-caret { transform: rotate(180deg); }
.pc-nav-badge {
  margin-left: auto;
  padding: .1rem .45rem;
  border-radius: 999px;
  background: var(--pc-primary);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
}
.pc-nav-item.is-active > .pc-nav-link,
.pc-nav-link.is-active {
  background: var(--pc-primary-soft);
  color: var(--pc-primary) !important;
  font-weight: 600;
}
.pc-nav-item.is-active > .pc-nav-link .pc-nav-icon { color: var(--pc-primary); }
.pc-subnav { margin: 2px 0 6px; padding-left: 2.15rem; }
.pc-subnav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .75rem;
  border-radius: var(--rounding-sm, .375rem);
  color: var(--pc-muted) !important;
  font-size: .86rem;
  text-decoration: none !important;
}
.pc-subnav-link::before {
  content: "";
  position: absolute;
  left: -.9rem;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pc-border);
  transform: translateY(-50%);
}
.pc-subnav-link:hover { color: var(--pc-text) !important; background: var(--bg-lifted, #f4f5f7); }
.pc-subnav-link.is-active { color: var(--pc-primary) !important; font-weight: 600; }
.pc-subnav-link.is-active::before { background: var(--pc-primary); }
.pc-subnav-divider { height: 1px; margin: .35rem .75rem; background: var(--pc-border); }

/* --- Área principal ------------------------------------------------------- */
.pc-main { min-height: 100vh; display: flex; flex-direction: column; }
.pc-main > #main-body { flex: 1 0 auto; }
@media (min-width: 1200px) {
  .pc-layout:not(.pc-auth-page):not(.pc-clean-page) .pc-main { margin-left: var(--pc-sidenav-w); }
}
.pc-main .container { max-width: 1320px; }

/* Barra superior */
.pc-layout header.pc-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: var(--pc-topbar-h);
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--pc-border);
  box-shadow: none;
}
.pc-topbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 0 1.5rem;
}
.pc-search {
  position: relative;
  align-items: center;
  flex: 0 1 380px;
}
.pc-search i {
  position: absolute;
  left: .9rem;
  color: var(--pc-muted);
  font-size: .85rem;
  pointer-events: none;
}
.pc-search .form-control {
  height: 40px;
  padding-left: 2.4rem;
  background: var(--bg-lifted, #f4f5f7);
  border-color: transparent;
  border-radius: 999px;
  font-size: .9rem;
}
.pc-search .form-control:focus { background: var(--pc-surface); }
.pc-topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .35rem; }
.pc-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--pc-text);
  font-size: 1.05rem;
}
.pc-icon-btn:hover { background: var(--bg-lifted, #f4f5f7); color: var(--pc-primary); }
.pc-dot-badge {
  position: absolute;
  top: 3px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  border: 2px solid var(--pc-surface);
  background: var(--pc-primary);
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}
.pc-dot-badge.pc-dot-empty { display: none; }
.pc-user-btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-left: .35rem;
  padding: .3rem .6rem .3rem .3rem;
  border: 1px solid var(--pc-border);
  border-radius: 999px;
  background: var(--pc-surface);
  color: var(--pc-text);
  font-size: .88rem;
  font-weight: 600;
}
.pc-user-btn:hover { border-color: var(--pc-primary); color: var(--pc-text); }
.pc-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pc-primary), var(--pc-accent));
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
}
.pc-user-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-login-btn { margin-left: .35rem; border-radius: 999px; padding: .4rem 1rem; }

/* Breadcrumb e conteúdo */
.pc-layout .master-breadcrumb { background: transparent; border: 0; padding-top: 1.25rem; }
.pc-layout .master-breadcrumb .breadcrumb { background: transparent; padding: 0; margin: 0; font-size: .82rem; }
.pc-layout section#main-body { background: transparent; padding-top: 1rem; padding-bottom: 2.5rem; min-height: 0; }

/* Rodapé discreto */
.pc-layout footer.footer {
  background: transparent;
  border-top: 1px solid var(--pc-border);
  color: var(--pc-muted);
  padding: 1.25rem 0;
}
.pc-layout footer.footer .nav-link,
.pc-layout footer.footer .copyright { color: var(--pc-muted); font-size: .82rem; }
.pc-layout footer.footer .nav-link:hover { color: var(--pc-primary); }
.pc-layout footer.footer .btn-outline-light { color: var(--pc-text); border-color: var(--pc-border); }

/* --- Celular e tablet: menu em gaveta ------------------------------------ */
.pc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1044;
  background: rgba(15, 23, 42, .45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, visibility 200ms ease;
}
@media (max-width: 1199.98px) {
  .pc-sidenav {
    transform: translateX(-100%);
    transition: transform 220ms ease;
    box-shadow: 0 0 40px rgba(15, 23, 42, .2);
  }
  body.pc-nav-open .pc-sidenav { transform: none; }
  body.pc-nav-open .pc-backdrop { opacity: 1; visibility: visible; }
  body.pc-nav-open { overflow: hidden; }
  .pc-topbar-inner { padding: 0 1rem; }
}

/* --- Login em tela dividida ---------------------------------------------- */
.pc-auth-page header.pc-topbar { background: transparent; border-bottom: 0; position: static; }
.pc-auth-page .pc-topbar-inner { max-width: 1120px; margin: 0 auto; }
.pc-auth-page section#main-body { display: flex; align-items: center; padding-top: 0; }
.pc-auth-page section#main-body > .container { max-width: 1120px; }
.pc-auth-page footer.footer { border-top: 0; }

.pc-auth { padding: 1rem 0 2rem; }
.pc-auth-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1040px;
  margin: 0 auto;
  background: var(--pc-surface);
  border: 1px solid var(--pc-border);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .1);
  overflow: hidden;
}
.pc-auth-aside {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 560px;
  padding: 3rem;
  background: linear-gradient(150deg, var(--pc-primary) 0%, var(--pc-accent) 100%);
  color: #fff;
  overflow: hidden;
}
.pc-auth-aside-inner { position: relative; z-index: 1; }
.pc-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: 1.5rem;
  padding: .35rem .8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  font-size: .78rem;
  font-weight: 600;
}
.pc-auth-title {
  margin: 0 0 .75rem;
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.pc-auth-text { margin: 0 0 1.75rem; color: rgba(255, 255, 255, .85); font-size: 1rem; }
.pc-auth-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.pc-auth-list li { display: flex; align-items: center; gap: .75rem; font-weight: 500; }
.pc-auth-list i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .16);
}
.pc-auth-shape { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.pc-auth-shape-1 { width: 320px; height: 320px; top: -110px; right: -110px; }
.pc-auth-shape-2 { width: 180px; height: 180px; top: 120px; right: 90px; background: rgba(255, 255, 255, .07); }

.pc-auth-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 3.25rem;
}
.pc-auth-heading { margin: 0 0 .35rem; font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; }
.pc-auth-main .form-control { height: 46px; }
.pc-auth-main .input-group-text { background: var(--bg-lifted, #f4f5f7); }
.pc-auth-link { color: var(--pc-primary) !important; font-weight: 600; }
.pc-auth-remember { color: var(--pc-muted); font-size: .9rem; }
.pc-auth-remember .form-check-input { position: static; margin: 0 .35rem 0 0; }
.pc-auth-submit { padding: .8rem 1rem; font-size: 1rem; border-radius: var(--rounding-md, .625rem); }
.pc-auth-social:not(:empty) { margin-top: 1.25rem; }
.pc-auth-register {
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--pc-border);
  color: var(--pc-muted);
  text-align: center;
  font-size: .92rem;
}
.pc-auth-register a { color: var(--pc-primary) !important; }

@media (max-width: 991.98px) {
  .pc-auth-card { grid-template-columns: 1fr; max-width: 520px; }
  .pc-auth-aside { display: none; }
  .pc-auth-main { padding: 2.25rem 1.75rem; }
}

/* Outras páginas de acesso (recuperar senha) */
.pc-page-password-reset-container .primary-content > .card,
.pc-page-password-reset-container .primary-content .card {
  max-width: 520px;
  margin: 2rem auto;
  border-radius: 20px;
}

@media (prefers-reduced-motion: reduce) {
  .pc-sidenav, .pc-backdrop, .pc-nav-caret { transition: none !important; }
}

/* --- Modo limpo do pedido (carrinho): só o logo em cima ------------------ */
.pc-clean-page header.pc-topbar {
  background: var(--pc-surface);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.pc-clean-page .pc-topbar-inner,
.pc-clean-page footer.footer .container { max-width: 1320px; margin: 0 auto; }
.pc-clean-page .pc-topbar-inner { padding: 0 15px; }
.pc-clean-page .navbar-brand .logo-img { max-height: 42px; }
.pc-secure-note {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--pc-muted);
  font-size: .85rem;
  font-weight: 600;
}
.pc-secure-note i { color: var(--mt-success, #059669); }
.pc-clean-page section#main-body { padding-top: 1.75rem; }
.pc-footer-clean { text-align: center; }
.pc-footer-clean .copyright a { color: var(--pc-muted); text-decoration: underline; }
@media (max-width: 575.98px) {
  .pc-secure-note { font-size: 0; gap: 0; }
  .pc-secure-note i { font-size: 1rem; }
}
