/* ConectaLocal — painel administrativo */
.ad-body { margin: 0; min-height: 100vh; background: #1a1512; color: #f6e9d2; font-family: var(--cl-sans); -webkit-font-smoothing: antialiased;
  --ad-line: #3a2f27; --ad-card: #241d18; --ad-input: #1f1915; --ad-muted: #aba191; --ad-gold: #cdb68a; --ad-gold2: #f6e9d2; --ad-red: #e5484d; --ad-green: #3fb27f;
  --accent: #cdb68a; --on-accent: #1a1512; --ink: #cdb68a; --text: #f6e9d2; }
.ad-body *, .ad-body *::before, .ad-body *::after { box-sizing: border-box; }
.ad-body [hidden] { display: none !important; }
.ad-body h1 { font-family: var(--cl-serif); font-size: 26px; margin: 0 0 6px; }
.ad-body h2 { font-family: var(--cl-serif); font-size: 22px; margin: 0 0 4px; }
.ad-body code { background: #2b2220; padding: 1px 6px; border-radius: 6px; color: var(--ad-gold2); font-size: .92em; }
.ad-muted { color: var(--ad-muted); margin: 0 0 14px; }
.ad-hint { display: block; color: var(--ad-muted); font-size: 12.5px; margin-top: 6px; line-height: 1.4; }
.ad-center-text { text-align: center; }

/* Topo */
.ad-top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px;
  background: rgba(26,21,18,.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--ad-line); }
.ad-brand { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.ad-brand b { color: var(--ad-gold2); }
.ad-brand small { color: var(--ad-muted); border-left: 1px solid var(--ad-line); padding-left: 8px; margin-left: 2px; }
.ad-brand .cl-brand-mark { width: 24px; height: 24px; }
.ad-top-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ad-user { color: var(--ad-muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }

/* Botões */
.ad-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font: 600 14.5px var(--cl-sans); cursor: pointer; color: #f6e9d2; background: #2b2220; text-decoration: none; white-space: nowrap; user-select: none; }
.ad-btn:disabled { opacity: .5; cursor: not-allowed; }
.ad-btn:active:not(:disabled) { transform: translateY(1px); }
.ad-primary { background: linear-gradient(135deg, var(--ad-gold2), var(--ad-gold)); color: #1b1505; }
.ad-ghost { background: transparent; border-color: #4a3c31; }
.ad-ghost:hover { background: #2b2220; }
.ad-danger { color: #ff8a8d; border-color: #4a2427; }
.ad-sm { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.ad-block { width: 100%; }
.ad-row { display: flex; gap: 10px; align-items: center; }
.ad-wrap-row { flex-wrap: wrap; }

/* Views */
.ad-center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.ad-panel { background: var(--ad-card); border: 1px solid var(--ad-line); border-radius: 20px; padding: 26px 22px; }
.ad-narrow { width: 100%; max-width: 420px; }
.ad-login-mark { display: flex; justify-content: center; margin-bottom: 10px; }
.ad-login-mark .cl-brand-mark { width: 54px; height: 54px; }
#loginForm h1, #loginForm .ad-muted { text-align: center; }
.ad-error { color: #ff8a8d; font-size: 14px; margin: 4px 0 12px; }
.ad-code { white-space: pre-wrap; word-break: break-all; background: #140f0d; border: 1px solid var(--ad-line); border-radius: 12px; padding: 12px; font-size: 12.5px; color: var(--ad-gold2); }

/* Campos */
.ad-field { display: block; margin-bottom: 14px; }
.ad-field > span { display: block; font-size: 13px; font-weight: 600; color: #cfccc4; margin-bottom: 6px; }
.ad-field input, .ad-field textarea, .ad-search { width: 100%; min-height: 46px; padding: 11px 13px; border-radius: 12px; border: 1px solid #3a2f27; background: var(--ad-input);
  color: #f6e9d2; font: 400 16px var(--cl-sans); outline: none; transition: border-color .15s; }
.ad-field textarea { resize: vertical; min-height: 70px; line-height: 1.4; }
.ad-field input:focus, .ad-field textarea:focus, .ad-search:focus { border-color: var(--ad-gold); }
.ad-field input.ad-invalid { border-color: var(--ad-red); }
.ad-prefix { display: flex; align-items: stretch; }
.ad-prefix em { display: flex; align-items: center; padding: 0 10px; border: 1px solid #3a2f27; border-right: 0; border-radius: 12px 0 0 12px; background: #1a1512; color: var(--ad-muted); font-style: normal; font-size: 13px; white-space: nowrap; max-width: 46%; overflow: hidden; text-overflow: ellipsis; }
.ad-prefix input { border-radius: 0 12px 12px 0; }
.ad-hint.ad-ok { color: var(--ad-green); } .ad-hint.ad-bad { color: #ff8a8d; }
.ad-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ad-checks { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding-top: 18px; }
.ad-check { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; cursor: pointer; }
.ad-check input { width: 20px; height: 20px; accent-color: var(--ad-gold); }

/* Lista */
.ad-wrap { max-width: 900px; margin: 0 auto; padding: 22px 16px 60px; }
.ad-list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ad-list-head .ad-muted { margin: 0; }
.ad-search { margin-bottom: 14px; }
.ad-list { display: grid; gap: 10px; }
.ad-item { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 12px; background: var(--ad-card); border: 1px solid var(--ad-line); border-radius: 16px; }
.ad-item.ad-off { opacity: .62; }
.ad-item-logo { width: 54px; height: 54px; border-radius: 50%; overflow: hidden; background: #2b2220; display: flex; align-items: center; justify-content: center; font-family: var(--cl-serif); color: var(--ad-gold2); font-size: 20px; }
.ad-item-logo img { width: 100%; height: 100%; object-fit: cover; }
.ad-item-main { min-width: 0; }
.ad-item-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; font-size: 15.5px; }
.ad-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(63,178,127,.15); color: #6fd3a5; }
.ad-badge.ad-badge-off { background: rgba(229,72,77,.15); color: #ff8a8d; }
.ad-item-sub { color: var(--ad-muted); font-size: 13px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-item-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.ad-empty-list { text-align: center; color: var(--ad-muted); padding: 40px 10px; border: 1px dashed #3a2f27; border-radius: 16px; }

/* Editor */
.ad-editor-bar { position: sticky; top: 57px; z-index: 40; display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: rgba(26,21,18,.92); border-bottom: 1px solid var(--ad-line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.ad-editor-bar strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-tabs { display: none; background: #211b16; border-radius: 10px; padding: 3px; }
.ad-tab { border: 0; background: transparent; color: var(--ad-muted); font: 600 13px var(--cl-sans); padding: 7px 12px; border-radius: 8px; cursor: pointer; }
.ad-tab.ad-on { background: #2b2b32; color: #fff; }
.ad-editor { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 26px; max-width: 1180px; margin: 0 auto; padding: 18px 16px 40px; align-items: start; }
.ad-form { min-width: 0; }
.ad-card { border: 1px solid var(--ad-line); background: var(--ad-card); border-radius: 18px; padding: 16px 16px 4px; margin: 0 0 14px; min-width: 0; }
.ad-card legend { font-family: var(--cl-serif); font-size: 18px; font-weight: 700; padding: 0 6px; margin-left: -6px; }
.ad-savebar { position: sticky; bottom: 0; z-index: 30; display: flex; justify-content: flex-end; gap: 10px; padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  background: #1a1512; border-top: 1px solid var(--ad-line); }
.ad-body .cl-toast { bottom: 96px; }
.ad-savebar .ad-primary { min-width: 140px; }

/* Temas */
.ad-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-bottom: 14px; }
.ad-theme { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 14px; border: 2px solid #3a2f27; background: #211b16; cursor: pointer; text-align: left; color: #f6e9d2; font: 600 12.5px var(--cl-sans); }
.ad-theme.ad-on { border-color: var(--ad-gold); }
.ad-theme-sw { display: flex; height: 26px; border-radius: 8px; overflow: hidden; }
.ad-theme-sw i { flex: 1; }
.ad-custom-color { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ad-custom-color input[type=color] { width: 48px; height: 36px; border: 1px solid #3a2f27; border-radius: 10px; background: transparent; padding: 2px; cursor: pointer; }
.ad-custom-color input[type=color]:disabled { opacity: .35; cursor: not-allowed; }

/* Fotos */
.ad-img-field { padding: 12px 0 14px; border-top: 1px solid var(--ad-line); }
.ad-img-field:first-of-type { border-top: 0; }
.ad-img-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.ad-img-label small { color: var(--ad-muted); font-size: 12px; }
.ad-img-row { display: flex; gap: 12px; align-items: center; }
.ad-img-btns { display: flex; flex-direction: column; gap: 6px; }
.ad-img-btns-row { flex-direction: row; flex-wrap: wrap; margin-top: 10px; }
.ad-img-btns label { cursor: pointer; }
.ad-thumbs { flex: none; }
.ad-thumb { position: relative; width: 92px; height: 92px; border-radius: 14px; overflow: hidden; background: #2b2220; border: 1px dashed #3a3a42; display: flex; align-items: center; justify-content: center; color: var(--ad-muted); font-size: 12px; text-align: center; }
.ad-thumbs-wide .ad-thumb { width: 150px; height: 92px; }
[data-thumbs="logo"] .ad-thumb { border-radius: 50%; }
.ad-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-thumb.ad-has { border-style: solid; border-color: #3a2f27; }
.ad-thumb-x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.72); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
[data-thumbs="logo"] .ad-thumb-x { top: 2px; right: 2px; }
.ad-prog { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 11.5px; font-weight: 600; }
.ad-prog-bar { width: 70%; height: 5px; border-radius: 5px; background: rgba(255,255,255,.25); overflow: hidden; }
.ad-prog-bar i { display: block; height: 100%; width: 0; background: var(--ad-gold2); transition: width .15s; }
.ad-gal { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ad-gal .ad-thumb { width: 100%; height: auto; aspect-ratio: 1 / 1; }
.ad-gal-ctrl { position: absolute; left: 4px; right: 4px; bottom: 4px; display: flex; justify-content: space-between; }
.ad-gal-ctrl button { width: 28px; height: 28px; border-radius: 8px; border: 0; background: rgba(0,0,0,.72); color: #fff; font-size: 14px; cursor: pointer; }
.ad-gal-ctrl button:disabled { opacity: .3; cursor: default; }
.ad-gal-num { position: absolute; top: 4px; left: 4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: rgba(0,0,0,.72); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ad-gal .ad-thumb.ad-drag-over { outline: 2px solid var(--ad-gold); }
.ad-gal-add { cursor: pointer; }

/* Prévia (celular) */
.ad-preview-col { position: sticky; top: 120px; }
.ad-phone { position: relative; width: 390px; max-width: 100%; height: min(780px, calc(100vh - 170px)); margin: 0 auto; border-radius: 46px; padding: 12px; background: #050505;
  box-shadow: 0 0 0 2px #2a2a2e, 0 30px 70px rgba(0,0,0,.6); }
.ad-phone-notch { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 104px; height: 28px; border-radius: 16px; background: #000; z-index: 10; }
.ad-phone-screen { width: 100%; height: 100%; border-radius: 36px; overflow-y: auto; overflow-x: hidden; background: #1a1512; scrollbar-width: none; }
.ad-phone-screen::-webkit-scrollbar { display: none; }
.ad-phone-screen .cl-top { padding-top: 52px; }

/* Modal */
.ad-modal { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.7); display: flex; align-items: flex-start; justify-content: center; padding: 24px 12px; overflow-y: auto; }
.ad-modal-box { position: relative; width: 100%; max-width: 460px; background: var(--ad-card); border: 1px solid var(--ad-line); border-radius: 22px; padding: 22px 20px; margin: auto 0; }
.ad-modal-x { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; background: transparent; color: var(--ad-muted); font-size: 26px; cursor: pointer; }
.ad-modal-foot { justify-content: space-between; margin-top: 16px; border-top: 1px solid var(--ad-line); padding-top: 14px; }
.ad-qr-wrap { background: #fff; border-radius: 16px; padding: 10px; margin: 14px auto 12px; width: 240px; max-width: 100%; }
.ad-qr-wrap canvas { width: 100%; height: auto; display: block; image-rendering: pixelated; }
.ad-nfc { margin-top: 14px; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.4; background: rgba(63,178,127,.12); color: #8be0b8; border: 1px solid rgba(63,178,127,.3); }
.ad-nfc.ad-nfc-bad { background: rgba(229,72,77,.12); color: #ff9c9f; border-color: rgba(229,72,77,.35); }
.ad-nfc b { color: #fff; }
#lmLong { color: var(--ad-gold2); word-break: break-all; }

/* Carregando */
.ad-loading { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; }
.ad-spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid rgba(255,255,255,.2); border-top-color: var(--ad-gold); animation: adSpin .8s linear infinite; }
@keyframes adSpin { to { transform: rotate(360deg); } }

/* Responsivo */
@media (max-width: 980px) {
  .ad-editor { grid-template-columns: minmax(0, 1fr); padding-top: 12px; }
  .ad-preview-col { min-width: 0; }
  .ad-tabs { display: inline-flex; }
  .ad-editor[data-show="form"] .ad-preview-col { display: none; }
  .ad-editor[data-show="preview"] .ad-form { display: none; }
  .ad-preview-col { position: static; }
  .ad-phone { height: calc(100vh - 150px); min-height: 520px; }
}
@media (max-width: 520px) {
  .ad-grid2 { grid-template-columns: 1fr; gap: 0; }
  .ad-checks { padding: 0 0 14px; }
  .ad-gal { grid-template-columns: repeat(3, 1fr); }
  .ad-phone { padding: 8px; border-radius: 38px; }
  .ad-phone-screen { border-radius: 30px; }
  .ad-user { display: none; }
  .ad-editor { padding-left: 12px; padding-right: 12px; }
}

/* Acesso do lojista (v2.2) */
.ad-link { color: var(--ad-gold2); text-decoration: underline; text-underline-offset: 2px; }
.ad-item-owner { color: var(--ad-gold); font-size: 12.5px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-item-owner.ad-none { color: var(--ad-muted); }
.ad-lojista-btns { margin-bottom: 4px; }
#lojistaCard { padding-bottom: 12px; }
.ad-body :focus-visible { outline: 2px solid var(--ad-gold2); outline-offset: 2px; }
.ad-body .ad-field input:focus-visible, .ad-body .ad-field textarea:focus-visible { outline: none; }

/* Painel do lojista (painel.html) */
.pn-skip { position: absolute; left: -9999px; top: 8px; z-index: 400; background: var(--ad-gold2); color: #1b1505; padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.pn-skip:focus { left: 8px; }
#conteudo:focus { outline: none; }
.pn-auth h1, .pn-auth > .ad-muted { text-align: center; }
.pn-label { display: block; font-size: 13px; font-weight: 600; color: #cfccc4; margin-bottom: 6px; }
.pn-pass { position: relative; }
.pn-pass input { width: 100%; min-height: 46px; padding: 11px 86px 11px 13px; border-radius: 12px; border: 1px solid #3a2f27; background: var(--ad-input); color: #f6e9d2; font: 400 16px var(--cl-sans); outline: none; }
.pn-pass input:focus { border-color: var(--ad-gold); }
.pn-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); min-width: 44px; height: 38px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--ad-gold2); font: 600 13px var(--cl-sans); cursor: pointer; }
.pn-linkbtn { display: block; margin: 14px auto 0; min-height: 44px; padding: 0 12px; border: 0; background: transparent; color: var(--ad-gold2); font: 600 14.5px var(--cl-sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pn-ok { color: #8be0b8; background: rgba(63,178,127,.12); border: 1px solid rgba(63,178,127,.3); border-radius: 12px; padding: 10px 12px; font-size: 14px; line-height: 1.45; margin: 4px 0 12px; }
.pn-warn { color: #ffcf9c; background: rgba(229,150,72,.12); border: 1px solid rgba(229,150,72,.35); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; line-height: 1.45; margin: 0 0 12px; }
.pn-head { padding-bottom: 14px; }
.pn-head-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pn-head-main { min-width: 0; }
.pn-head h1 { font-size: 23px; margin: 0; line-height: 1.15; }
.pn-head-link { margin: 2px 0 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-head .ad-hint { margin-top: 10px; }
.pn-select { width: 100%; min-height: 46px; padding: 0 12px; border-radius: 12px; border: 1px solid #3a2f27; background: var(--ad-input); color: #f6e9d2; font: 400 16px var(--cl-sans); }
.pn-body .ad-img-btns label, .pn-body .ad-gal-add { position: relative; }
.pn-file { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.pn-body label:focus-within { outline: 2px solid var(--ad-gold2); outline-offset: 2px; }
.pn-body .ad-field label:focus-within, .pn-body label.ad-field:focus-within { outline: none; }
.pn-dirty { flex: 1; align-self: center; color: var(--ad-gold); font-size: 13px; }
.pn-dirty:empty { display: none; }
.pn-body .ad-editor-bar { top: 57px; }
.pn-body .ad-savebar .ad-btn { padding: 0 14px; }
@media (max-width: 520px) {
  .pn-body .ad-savebar { flex-wrap: wrap; }
  .pn-dirty { flex-basis: 100%; text-align: center; }
  .pn-body .ad-savebar .ad-btn { flex: 1; }
  .pn-body .ad-savebar .ad-primary { min-width: 0; }
}

/* ---------- Editor do catálogo (v3) ---------- */
.ce { display: grid; gap: 14px; margin-top: 10px; }
.ce-empty { margin: 0; padding: 14px; border: 1px dashed var(--ad-line); border-radius: 14px; color: var(--ad-muted); font-size: 14px; line-height: 1.45; }
.ce-cat { border: 1px solid var(--ad-line); border-radius: 16px; padding: 12px; background: #1f1915; display: grid; gap: 10px; }
.ce-cat-head { display: flex; align-items: flex-end; gap: 8px; }
.ce-cat-name { flex: 1; min-width: 0; margin: 0; }
.ce-cat-name input { font-weight: 600; }
.ce-arrows { display: inline-flex; gap: 4px; flex: none; }
.ce-arrows button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid #4a3c31; background: transparent; color: var(--ad-gold2); font-size: 13px; cursor: pointer; }
.ce-arrows button:disabled { opacity: .3; cursor: default; }
.ce-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ce-item { border: 1px solid var(--ad-line); border-radius: 14px; background: var(--ad-card); overflow: hidden; }
.ce-item.ce-open { border-color: var(--ad-gold); }
.ce-item-head { display: flex; align-items: center; gap: 10px; padding: 8px; }
.ce-mini { flex: none; width: 44px; height: 44px; border-radius: 10px; overflow: hidden; background: #2b2220; display: grid; place-items: center; color: var(--ad-muted); font-size: 16px; }
.ce-mini img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.ce-item-title { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 4px 0; color: #f6e9d2; cursor: pointer; display: flex; flex-direction: column; gap: 2px; font: inherit; min-height: 44px; justify-content: center; }
.ce-item-title b { font: 600 14.5px/1.25 var(--cl-sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ce-item-title b i { color: var(--ad-muted); font-weight: 400; }
.ce-item-title small { color: var(--ad-gold); font-size: 12.5px; }
.ce-item-body { padding: 4px 12px 12px; display: grid; gap: 10px; border-top: 1px solid var(--ad-line); }
.ce-item-body .ad-field { margin: 0; }
.ce-row2 { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.ce-apartir { min-height: 46px; font-size: 13.5px; }
.ce-photo { display: flex; align-items: center; gap: 12px; }
.ce-photo-thumb { position: relative; flex: none; width: 88px; height: 88px; border-radius: 12px; overflow: hidden; background: #2b2220; display: grid; place-items: center; color: var(--ad-muted); font-size: 12px; text-align: center; }
.ce-photo-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.ce-prog { position: absolute; inset: auto 0 0 0; padding: 4px; background: rgba(0,0,0,.7); color: #fff; font-size: 11px; text-align: center; }
.ce-photo-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ce-photo-btns label { position: relative; }
.ce-item-foot, .ce-cat-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.ce-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ce-foot .ad-hint { margin: 0; }
@media (max-width: 380px) { .ce-row2 { grid-template-columns: 1fr; } .ce-arrows button { width: 36px; } }

/* =====================================================================
   v4 — Painel do lojista: aba Agenda
   ===================================================================== */
.pn-modes { display: inline-flex; background: #211b16; border-radius: 10px; padding: 3px; flex: none; }
.pn-mode { border: 0; background: transparent; color: var(--ad-muted); font: 600 13px var(--cl-sans); padding: 7px 12px; border-radius: 8px; cursor: pointer; }
.pn-mode.ad-on { background: var(--ad-gold); color: #1b1505; }
.pn-agenda { max-width: 980px; margin: 0 auto; padding: 14px 16px 60px; }
.pn-ag-wrap { display: grid; gap: 14px; }
.pn-ag-state { display: grid; gap: 4px; padding-left: 12px; border-left: 3px solid var(--ad-muted); }
.pn-ag-state.on { border-color: var(--ad-green); }
.pn-ag-state b { font-size: 16px; }
.pn-ag-state span { color: var(--ad-muted); font-size: 13.5px; }
.pn-ag-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.pn-seg { display: inline-flex; background: #1f1915; border: 1px solid var(--ad-line); border-radius: 10px; padding: 3px; }
.pn-seg button { border: 0; background: transparent; color: var(--ad-muted); font: 600 13px var(--cl-sans); padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.pn-seg button.ad-on { background: #2b2220; color: var(--ad-gold2); }
.pn-ag-count { margin: 0 0 10px; color: var(--ad-muted); font-size: 14px; }
.pn-ag-count b { color: var(--ad-gold2); }
.pn-day { margin: 16px 0 8px; font: 600 12px var(--cl-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ad-gold); }
.pn-bk { background: #1f1915; border: 1px solid var(--ad-line); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; }
.pn-bk.pn-aguardando { border-color: rgba(232,201,193,.45); }
.pn-bk.pn-cancelado { opacity: .55; }
.pn-bk-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pn-bk-t { font: 600 18px var(--cl-sans); color: var(--ad-gold); }
.pn-bk-t small { font-size: 12px; color: var(--ad-muted); font-weight: 500; margin-left: 2px; }
.pn-bk-n { font-size: 15.5px; }
.pn-chip { font: 600 11px var(--cl-sans); padding: 3px 8px; border-radius: 999px; margin-left: auto; }
.pn-chip-aguardando { background: #e8c9c1; color: #1a1512; }
.pn-chip-confirmado { background: #7fae86; color: #10140f; }
.pn-chip-cancelado { background: #3a302b; color: var(--ad-muted); }
.pn-bk-info { margin: 6px 0 0; color: #cfccc4; font-size: 13.5px; line-height: 1.4; }
.pn-bk-why { margin: 8px 0 0; padding-left: 18px; color: #f0d2c9; font-size: 13px; line-height: 1.45; }
.pn-bk-pix { margin: 8px 0 0; color: var(--ad-muted); font-size: 12.5px; line-height: 1.5; word-break: break-all; }
.pn-bk-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pn-bk-act .ad-btn { height: 38px; padding: 0 12px; font-size: 13px; flex: 1 1 auto; }
.pn-danger { color: #ffb3b5; border-color: rgba(229,72,77,.45); }
.pn-cols { display: grid; grid-template-columns: repeat(var(--pn-n, 3), minmax(0, 1fr)); gap: 6px; padding-bottom: 6px; }
.pn-col { min-width: 0; }
.pn-col h3 { margin: 0 0 6px; font: 600 14px var(--cl-sans); color: var(--ad-gold2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-mini { display: block; width: 100%; box-sizing: border-box; text-align: left; background: #1f1915; border: 1px solid var(--ad-line); border-left: 3px solid #7fae86; border-radius: 9px; padding: 5px 6px; margin: 0 0 5px; color: #f6e9d2; font: 400 12px/1.25 var(--cl-sans); cursor: pointer; }
.pn-mini.pn-aguardando { border-left-color: #e8c9c1; background: #2a201c; }
.pn-mini.pn-realizado { border-left-color: var(--ad-muted); opacity: .7; }
.pn-mini.pn-cancelado { border-left-color: #3a302b; opacity: .45; text-decoration: line-through; }
.pn-mini-on { outline: 2px solid var(--ad-gold); }
.pn-mini-t { display: block; font-weight: 600; color: var(--ad-gold); font-size: 12.5px; }
.pn-mini-n, .pn-mini-s { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-mini-n { font-weight: 600; font-size: 12px; }
.pn-mini-s { color: var(--ad-muted); font-size: 11px; }
.pn-sel { margin-top: 10px; }
.pn-sel-hint { margin-top: 8px; }
@media (min-width: 720px) { .pn-cols { gap: 10px; } .pn-mini { padding: 7px 9px; font-size: 13px; } .pn-mini-s { font-size: 12px; } }
.pn-col h3 small { color: var(--ad-muted); font-weight: 500; margin-left: 4px; }
.pn-col-day { font-size: 10px; color: var(--ad-muted); margin: 8px 0 3px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-ag-cfgbox summary { cursor: pointer; font-weight: 600; font-size: 15px; list-style: revert; }
.pn-ag-cfg { margin-top: 14px; }
.pn-switch { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; cursor: pointer; }
.pn-switch input { width: 22px; height: 22px; accent-color: var(--ad-gold); }
.pn-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin-top: 12px; }
.pn-ag-cfg fieldset { border: 1px solid var(--ad-line); border-radius: 12px; padding: 10px 12px 4px; margin: 4px 0 14px; }
.pn-ag-cfg legend { padding: 0 6px; font: 600 13px var(--cl-sans); color: #cfccc4; }
.pn-ag-cfg input[type=time], .pn-ag-cfg input[type=number], .pn-ag-cfg select, .pn-ag-cfg textarea, .pn-ag-cfg input[name] {
  box-sizing: border-box; min-height: 42px; border-radius: 10px; border: 1px solid var(--ad-line); background: var(--ad-input); color: #f6e9d2; font: 400 16px var(--cl-sans); padding: 0 10px; }
.pn-ag-cfg .ad-field input, .pn-ag-cfg .ad-field select, .pn-ag-cfg .ad-field textarea { width: 100%; }
.pn-ag-cfg textarea { padding: 10px; }
.pn-ag-cfg input[type=checkbox] { min-height: 0; width: 18px; height: 18px; accent-color: var(--ad-gold); }
.pn-dia { display: grid; grid-template-columns: 1fr 92px auto 92px; gap: 8px; align-items: center; margin-bottom: 8px; }
.pn-dia select { width: 100%; padding: 0 8px; }
.pn-dia-n { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.pn-dia span { color: var(--ad-muted); font-size: 13px; }
@media (max-width: 560px) {
  .pn-grid2 { grid-template-columns: 1fr; }
  .pn-dia { grid-template-columns: minmax(0, 1fr) 84px auto 84px; gap: 6px; }
  .pn-agenda { padding: 12px 12px 60px; }
  .pn-body .ad-editor-bar { flex-wrap: wrap; }
}
.ad-convite { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); } .ad-convite #conviteOut { margin-top: 8px; }

/* ConectaLocal comercial (v6): equipe, importação e agenda manual */
.pn-ag-tools, .pn-ag-team { display: grid; gap: 12px; }
.pn-ag-tools h3, .pn-ag-team h3 { margin: 0; }
.pn-ag-tools h4, .pn-ag-team h4 { margin: 12px 0 4px; }
#agImportBox, #agManualBox, #agBlockBox { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--ad-line, rgba(120,110,100,.22)); }
#agImportBox ul { margin: 10px 0 16px; padding-left: 20px; line-height: 1.7; }
#eqCode { display: block; padding: 12px; border-radius: 10px; overflow-wrap: anywhere; }
.pn-ag-tools .ad-row, .pn-ag-team .ad-row { flex-wrap: wrap; }

.pn-chip-realizado { background: rgba(130,150,170,.22); color: var(--ad-text, #eee); }

/* Importação revisável: todas as linhas são exibidas e podem ser corrigidas antes do envio. */
.ag-paste-box{margin-top:14px}.ag-paste-box textarea{display:block;width:100%;box-sizing:border-box;margin:12px 0;padding:10px;border:1px solid var(--ad-line);border-radius:10px;background:var(--ad-input);color:#f6e9d2;font:14px var(--cl-sans)}
.ag-import-table-wrap{max-height:520px;overflow:auto;border:1px solid var(--ad-line);border-radius:12px;margin:12px 0}.ag-import-table{border-collapse:collapse;min-width:1350px;width:100%;font-size:12px}.ag-import-table th{position:sticky;top:0;background:#1a1512;color:var(--ad-gold2);text-align:left;z-index:1}.ag-import-table th,.ag-import-table td{padding:7px;border-bottom:1px solid var(--ad-line);vertical-align:top}.ag-import-table input,.ag-import-table select{width:100%;min-width:95px;box-sizing:border-box;padding:7px;border:1px solid var(--ad-line);border-radius:7px;background:var(--ad-input);color:#f6e9d2;font:12px var(--cl-sans)}.ag-import-invalid td{background:rgba(229,72,77,.055)}.ag-import-error{display:block;min-width:180px;max-width:280px;color:#ff9b9e;line-height:1.4}.ag-import-ok{color:#6fd3a5;white-space:nowrap}
/* mensalidade ConectaLocal (painel da dona + admin) */
.mens-aviso { border: 1px solid var(--ad-gold); margin: 12px 0; }
.mens-aviso.mens-atraso, .mens-row.mens-atraso { border-color: var(--ad-red); background: rgba(229, 72, 77, .12); }
.mens-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.mens-tag { font-size: 13px; padding: 2px 10px; border-radius: 99px; background: #3a2f27; }
.mens-atraso .mens-tag { background: var(--ad-red); color: #fff; }
.mens-linha { margin: 6px 0 10px; }
.mens-pix { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.mens-qr { background: #fff; border-radius: 10px; line-height: 0; }
.mens-qr svg { width: 168px; height: 168px; }
.mens-cc { flex: 1 1 220px; min-width: 0; }
.mens-code { width: 100%; font-family: monospace; font-size: 12px; word-break: break-all; }
.mens-acoes { margin-top: 10px; }
.mens-anexar { cursor: pointer; }
.mens-mes { align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.mens-row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }

/* v7: grade por profissional */
.pn-gdias { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; -webkit-overflow-scrolling: touch; }
.pn-gdias button { flex: 0 0 auto; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--ad-line); background: transparent; color: var(--ad-gold2); font: 500 13px var(--cl-sans); }
.pn-gdias button.ad-on { background: var(--ad-gold); color: #1a1512; border-color: var(--ad-gold); font-weight: 600; }
.pn-gtitle { margin: 2px 0 8px; font: 600 14px var(--cl-sans); color: var(--ad-gold2); text-transform: capitalize; }
.pn-grade { --pn-h: 40px; }
.pn-ghead { display: grid; grid-template-columns: var(--pn-h) repeat(var(--pn-n), minmax(0, 1fr)); gap: 4px; margin-bottom: 6px; }
.pn-gpro { min-width: 0; text-align: center; }
.pn-gpro i { display: grid; place-items: center; width: 34px; height: 34px; margin: 0 auto 4px; border-radius: 50%; background: var(--pn-c); color: #1a1512; font: 700 15px var(--cl-sans); font-style: normal; }
.pn-gpro b { display: block; font: 600 13.5px var(--cl-sans); color: var(--ad-gold2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-gpro small { color: var(--ad-muted); font-size: 11px; }
.pn-gbody { position: relative; margin-bottom: 8px; }
.pn-ghoras { position: absolute; left: 0; top: 0; bottom: 0; width: var(--pn-h); }
.pn-ghoras span { position: absolute; left: 0; transform: translateY(-50%); font-size: 11px; color: var(--ad-muted); }
.pn-ghoras span:first-child { transform: none; }
.pn-gcols { position: absolute; left: var(--pn-h); right: 0; top: 0; bottom: 0; display: grid; grid-template-columns: repeat(var(--pn-n), minmax(0, 1fr)); gap: 4px;
  background-image: repeating-linear-gradient(to bottom, var(--ad-line) 0 1px, transparent 1px 64px); }
.pn-gcol { position: relative; min-width: 0; border-left: 1px solid rgba(255,255,255,.04); }
.pn-gbk { position: absolute; left: 2px; right: 2px; overflow: hidden; text-align: left; padding: 4px 6px; border-radius: 9px; border: 0; cursor: pointer;
  background: #2b231e; background: color-mix(in srgb, var(--pn-c) 26%, #1f1915); border-left: 3px solid var(--pn-c); color: #f6e9d2; font: 400 11.5px/1.25 var(--cl-sans); }
.pn-gbk b { display: block; font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-gbk span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #e6dccb; }
.pn-gbk em { display: block; font-style: normal; font-weight: 600; font-size: 11px; color: #8fd19e; white-space: nowrap; overflow: hidden; }
.pn-gbk.pn-aguardando { background: #3a2c1a; background: color-mix(in srgb, #f1b04c 30%, #1f1915); border-left-color: #f1b04c; }
.pn-gbk.pn-aguardando em { color: #f1b04c; }
.pn-gbk.pn-realizado { opacity: .6; }
.pn-gbk.pn-realizado em { color: var(--ad-muted); }
.pn-gcurto span, .pn-gcurto em { display: none; }
.pn-gcurto { padding-top: 2px; }
.pn-gagora { position: absolute; left: calc(var(--pn-h) - 5px); right: 0; height: 2px; background: #e5484d; pointer-events: none; }
.pn-gagora::before { content: ''; position: absolute; left: 0; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #e5484d; }
@media (min-width: 720px) { .pn-grade { --pn-h: 48px; } .pn-gbk { font-size: 12.5px; padding: 6px 8px; } .pn-gbk b { font-size: 13.5px; } }
