/**
 * Feira Social — overlay de marca para o admin do painel SMM (/painel/admin)
 * Linkado por último em themes/admin/header.php e themes/admin/login.php.
 * Light em :root; dark em html.theme-dark / body.dark-mode.
 * Preferência alinhada à loja: tablerColorScheme (+ admin_theme no DB).
 */

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../../fonts/dm-sans-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url("../../fonts/sora-latin.woff2") format("woff2");
}

:root {
  --gf-radius: 20px;
  --gf-radius-sm: 12px;
  --gf-accent: #c13584;
  --gf-accent-2: #e1306c;
  --gf-purple: #833ab4;
  --gf-gradient: linear-gradient(135deg, #833ab4 0%, #c13584 50%, #e1306c 100%);
  /* Light — iguais à loja */
  --gf-bg: #faf7f9;
  --gf-surface: #ffffff;
  --gf-surface-2: #f4f0f3;
  --gf-border: rgba(193, 53, 132, 0.12);
  --gf-text: #18181b;
  --gf-muted: #71717a;
  --gf-shadow: 0 8px 28px rgba(131, 58, 180, 0.08);
  --gf-adm-side-w: 276px;
  --gf-adm-top-h: 4rem;
  --gf-accent-2-rgb: 225, 48, 108;
}

html.theme-dark,
html.theme-dark body,
body.dark-mode {
  --gf-bg: #0f0f12;
  --gf-surface: #18181b;
  --gf-surface-2: #202024;
  --gf-border: rgba(255, 255, 255, 0.1);
  --gf-text: #f4f4f5;
  --gf-muted: #a7b0c0;
  --gf-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

html.theme-dark {
  background-color: #0f0f12;
}

/*
 * Escala tipográfica unificada com loja (/admin) e marketplace (/administration):
 * body/p 14px · h1 2 · h2 1.75 · h3 1.5 · h4 1.25 · h5 1 · h6 .875rem
 * (ver loja/app/Views/admin/elements/head.php e gf-mkt-admin-theme-v13.css)
 */
html {
  font-size: 14px;
}

html body {
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif !important;
  background: var(--gf-bg) !important;
  color: var(--gf-text) !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

html body h1,
html body h2,
html body h3,
html body h4,
html body h5,
html body h6,
html body .navbar-brand,
html body .h1,
html body .h2,
html body .h3,
html body .h4,
html body .h5,
html body .h6 {
  font-family: "Sora", "DM Sans", system-ui, sans-serif !important;
  color: var(--gf-text) !important;
  letter-spacing: -0.02em;
}

html body p {
  font-size: 0.875rem;
}
html body h1,
html body .h1 { font-size: 2rem; }
html body h2,
html body .h2 { font-size: 1.75rem; }
html body h3,
html body .h3 { font-size: 1.5rem; }
html body h4,
html body .h4 { font-size: 1.25rem; }
html body h5,
html body .h5 { font-size: 1rem; }
html body h6,
html body .h6 { font-size: 0.875rem; }

html body a {
  color: var(--gf-accent-2);
}
html body a:hover,
html body a:focus {
  color: var(--gf-accent);
}

/* ── Navbar (menu superior do admin) ── */
html body .navbar-default {
  background: var(--gf-surface) !important;
  border-color: var(--gf-border) !important;
  box-shadow: var(--gf-shadow);
}
html body .navbar-default .navbar-brand,
html body .navbar-default .navbar-text {
  color: var(--gf-text) !important;
}
html body .navbar-default .navbar-nav > li > a {
  color: var(--gf-muted) !important;
  font-weight: 500;
}
html body .navbar-default .navbar-nav > li > a:hover,
html body .navbar-default .navbar-nav > li > a:focus,
html body .navbar-default .navbar-nav > .open > a {
  color: var(--gf-text) !important;
  background: rgba(225, 48, 108, 0.1) !important;
}
html body .navbar-default .navbar-nav > .active > a,
html body .navbar-default .navbar-nav > .active > a:hover,
html body .navbar-default .navbar-nav > .active > a:focus {
  color: var(--gf-text) !important;
  background: rgba(225, 48, 108, 0.14) !important;
  box-shadow: inset 3px 0 0 var(--gf-accent-2);
}
html body .navbar-toggle {
  border-color: var(--gf-border) !important;
}
html body .navbar-toggle .icon-bar {
  background: var(--gf-text) !important;
}
html body .navbar-collapse {
  border-color: var(--gf-border) !important;
}
html body .nav-dark-mode a {
  color: var(--gf-muted) !important;
}

/* ── Badges de contagem (viram gradiente da marca, mesmo com cor inline) ── */
html body .badge,
html body .navbar-nav .badge {
  background: var(--gf-gradient) !important;
  color: #fff !important;
  border: none !important;
}

/* ── Containers / cards / painéis ── */
html body .panel,
html body .well,
html body .box {
  background: var(--gf-surface) !important;
  border: 1px solid var(--gf-border) !important;
  border-radius: var(--gf-radius) !important;
  box-shadow: var(--gf-shadow);
  color: var(--gf-text);
}
html body .panel-heading,
html body .box-header {
  background: var(--gf-surface-2) !important;
  border-color: var(--gf-border) !important;
  color: var(--gf-text) !important;
}
html body .panel-footer {
  background: var(--gf-surface-2) !important;
  border-color: var(--gf-border) !important;
}

/* ── Forms ── */
html body .form-control {
  height: auto !important;
  min-height: 2.6rem;
  padding: 0.7rem 0.95rem !important;
  background: var(--gf-surface-2) !important;
  border: 1px solid var(--gf-border) !important;
  color: var(--gf-text) !important;
  border-radius: var(--gf-radius-sm) !important;
  box-shadow: none !important;
  font-size: 1rem !important;
  line-height: 1.45 !important;
}
html body .form-control:focus {
  border-color: var(--gf-accent-2) !important;
  box-shadow: 0 0 0 3px rgba(225, 48, 108, 0.2) !important;
}
html body .form-control::placeholder {
  color: var(--gf-muted);
  opacity: 1;
  font-size: 1rem !important;
}
html body label,
html body .control-label {
  color: var(--gf-text) !important;
  font-size: 0.95rem !important;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
html body select.form-control option {
  background: var(--gf-surface-2);
  color: var(--gf-text);
}
html body .input-group-addon,
html body .input-group-btn .btn-default {
  background: var(--gf-surface-2) !important;
  border-color: var(--gf-border) !important;
  color: var(--gf-muted) !important;
  font-size: 1rem !important;
}

/* ── Buttons ── */
html body .btn {
  border-radius: var(--gf-radius-sm) !important;
  font-weight: 600;
  font-size: 0.95rem !important;
  padding: 0.48rem 0.9rem !important;
  line-height: 1.4 !important;
}
html body .btn-xs,
html body .btn-group-xs > .btn {
  font-size: 0.84rem !important;
  padding: 0.3rem 0.55rem !important;
}
html body .btn-sm,
html body .btn-group-sm > .btn {
  font-size: 0.88rem !important;
  padding: 0.4rem 0.7rem !important;
}
html body .btn-primary {
  background: var(--gf-gradient) !important;
  border: none !important;
  color: #fff !important;
}
html body .btn-primary:hover,
html body .btn-primary:focus {
  filter: brightness(1.08);
  color: #fff !important;
}
html body .btn-default {
  background: var(--gf-surface-2) !important;
  border: 1px solid var(--gf-border) !important;
  color: var(--gf-text) !important;
}
html body .btn-default:hover,
html body .btn-default:focus {
  background: rgba(225, 48, 108, 0.14) !important;
  border-color: var(--gf-accent-2) !important;
  color: var(--gf-text) !important;
}
html body .btn-link {
  background: transparent !important;
  border: none !important;
  color: var(--gf-accent-2) !important;
  font-weight: 600;
  text-decoration: none !important;
  box-shadow: none !important;
}
html body .btn-link:hover,
html body .btn-link:focus {
  color: var(--gf-accent) !important;
  background: rgba(225, 48, 108, 0.1) !important;
  text-decoration: none !important;
}
html body .btn-th.dropdown-toggle {
  background: var(--gf-surface-2) !important;
  border-color: var(--gf-border) !important;
  color: var(--gf-text) !important;
}
html body .btn-success {
  background: #1fb37a !important;
  border: none !important;
  color: #fff !important;
}
html body .btn-danger {
  background: #e1306c !important;
  border: none !important;
  color: #fff !important;
}
html body .btn-warning {
  background: #e2a926 !important;
  border: none !important;
  color: #1a1224 !important;
}
html body .smmcode-btn {
  background: var(--gf-gradient) !important;
}

/* ── Tables ── */
html body .table {
  color: var(--gf-text) !important;
  background: transparent;
  font-size: 1rem !important;
}
html body .table > thead > tr > th {
  border-bottom: 1px solid var(--gf-border) !important;
  color: var(--gf-muted) !important;
  font-weight: 600;
  font-size: 0.92rem !important;
  letter-spacing: 0.01em;
  text-transform: none !important;
  background: var(--gf-surface-2) !important;
}
html body .table > tbody > tr > td,
html body .table > tbody > tr > th {
  border-top: 1px solid var(--gf-border) !important;
  font-size: 1rem !important;
}
html body .table-striped > tbody > tr:nth-of-type(odd) {
  background: var(--gf-surface-2) !important;
}
html body .table-hover > tbody > tr:hover {
  background: rgba(225, 48, 108, 0.08) !important;
}
html body .table-grey {
  background: transparent !important;
}

/* ── Alerts ── */
html body .alert {
  border-radius: var(--gf-radius-sm) !important;
  border: 1px solid transparent !important;
  font-size: 1rem !important;
  line-height: 1.5;
  padding: 0.9rem 1.1rem !important;
}
html body .alert-success {
  background: rgba(31, 179, 122, 0.14) !important;
  border-color: rgba(31, 179, 122, 0.35) !important;
  color: #6fe3bb !important;
}
html body .alert-danger {
  background: rgba(225, 48, 108, 0.14) !important;
  border-color: rgba(225, 48, 108, 0.35) !important;
  color: #ff9cbe !important;
}
html body .alert-warning {
  background: rgba(226, 169, 38, 0.14) !important;
  border-color: rgba(226, 169, 38, 0.35) !important;
  color: #f2c766 !important;
}
/* Alertas com fundo claro herdado (ex.: inline style) — texto precisa contrastar */
html body .alert-warning,
html body .alert-warning * {
  color: #f5d78a !important;
}
html body .gf-r__alerta,
html body .gf-r__alerta * {
  color: #1a1224 !important;
}
html body .gf-r__alerta {
  background: #fff7e0 !important;
  border-color: #e2a926 !important;
}
html body .alert-info {
  background: rgba(131, 58, 164, 0.16) !important;
  border-color: rgba(131, 58, 164, 0.4) !important;
  color: #cfa9e6 !important;
}

/* ── Nav tabs (ex.: filtros de status em Orders) ── */
html body .nav-tabs {
  border-bottom-color: var(--gf-border) !important;
}
html body .nav-tabs > li > a {
  color: var(--gf-muted) !important;
  border-radius: var(--gf-radius-sm) var(--gf-radius-sm) 0 0 !important;
  background: transparent;
  font-size: 1rem !important;
}
html body .nav-tabs > li > a:hover {
  background: rgba(225, 48, 108, 0.08) !important;
  border-color: transparent !important;
}
html body .nav-tabs > li.active > a,
html body .nav-tabs > li.active > a:hover,
html body .nav-tabs > li.active > a:focus {
  background: var(--gf-surface-2) !important;
  border-color: var(--gf-border) !important;
  color: var(--gf-text) !important;
  box-shadow: inset 0 -2px 0 var(--gf-accent-2);
}

/* ── Dropdowns ── */
html body .dropdown-menu {
  background: var(--gf-surface-2) !important;
  border: 1px solid var(--gf-border) !important;
  border-radius: var(--gf-radius-sm) !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
html body .dropdown-menu > li > a {
  color: var(--gf-text) !important;
}
html body .dropdown-menu > li > a:hover,
html body .dropdown-menu > li > a:focus {
  background: rgba(225, 48, 108, 0.14) !important;
  color: var(--gf-text) !important;
}

/* ── Pagination / breadcrumb / list-group ── */
html body .pagination > li > a,
html body .pagination > li > span {
  background: var(--gf-surface-2) !important;
  border-color: var(--gf-border) !important;
  color: var(--gf-text) !important;
}
html body .pagination > .active > a {
  background: var(--gf-gradient) !important;
  border-color: transparent !important;
  color: #fff !important;
}
html body .breadcrumb {
  background: var(--gf-surface-2) !important;
  border-radius: var(--gf-radius-sm) !important;
}
html body .list-group-item {
  background: var(--gf-surface-2) !important;
  border-color: var(--gf-border) !important;
  color: var(--gf-text) !important;
}

/* ── Modal ── */
html body .modal-content {
  background: var(--gf-surface) !important;
  border-radius: var(--gf-radius) !important;
  border: 1px solid var(--gf-border) !important;
  color: var(--gf-text);
}
html body .modal-header,
html body .modal-footer {
  border-color: var(--gf-border) !important;
}
html body .close {
  color: var(--gf-text) !important;
  opacity: 0.7;
  text-shadow: none !important;
}
html body .close:hover {
  opacity: 1;
}

/* ── Toggles / checkboxes / iconpicker popover ── */
html body .popover {
  background: var(--gf-surface-2) !important;
  border-color: var(--gf-border) !important;
  color: var(--gf-text) !important;
}

/*
 * custom.css (dark-mode) zera o checkbox nativo (appearance:none) e desenha o
 * ✓ com font-family "Font Awesome 5 Pro". No admin da matriz e no painel do
 * revendedor só carregamos FA Free — o glifo some e a caixa fica 12px quase
 * da cor do fundo. Resultado: o input existe no DOM, mas “não aparece”.
 */
body.gf-adm.dark-mode input[type="checkbox"],
html.theme-dark body.gf-adm input[type="checkbox"],
body.dark-mode.gf-adm input[type="checkbox"] {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  width: 1.1rem !important;
  height: 1.1rem !important;
  margin: 0 0.5rem 0 0 !important;
  vertical-align: -0.2em;
  border: 1.5px solid rgba(255, 255, 255, 0.5) !important;
  border-radius: 4px !important;
  background-color: var(--gf-surface-2, #202024) !important;
  box-shadow: none !important;
  position: relative !important;
  cursor: pointer;
  flex-shrink: 0;
}
body.gf-adm.dark-mode input[type="checkbox"]:checked,
html.theme-dark body.gf-adm input[type="checkbox"]:checked,
body.dark-mode.gf-adm input[type="checkbox"]:checked {
  background-color: var(--gf-accent-2, #e1306c) !important;
  border-color: var(--gf-accent-2, #e1306c) !important;
}
body.gf-adm.dark-mode input[type="checkbox"]:checked::after,
body.gf-adm.dark-mode input[type="checkbox"]:checked:after,
html.theme-dark body.gf-adm input[type="checkbox"]:checked::after,
html.theme-dark body.gf-adm input[type="checkbox"]:checked:after,
body.dark-mode.gf-adm input[type="checkbox"]:checked::after,
body.dark-mode.gf-adm input[type="checkbox"]:checked:after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  left: 0.32rem !important;
  top: 0.08rem !important;
  width: 0.28rem !important;
  height: 0.55rem !important;
  border: solid #fff !important;
  border-width: 0 2px 2px 0 !important;
  transform: rotate(45deg);
  font-family: inherit !important;
  font-size: 0 !important;
  background: none !important;
  box-shadow: none !important;
}

/*
 * Pseudo-ícones do custom.css usam font-family "Font Awesome 5 Pro", mas o
 * admin só carrega FA 5 Free (CDN). Sem o Pro, o glifo vira □ (quadrado).
 * Remapeia para Free Solid — mesmos codepoints (\f0d7 caret, \f002 search…).
 */
body.gf-adm .search-select-wrap:before,
body.gf-adm .form-control__filter-icon:before,
body.gf-adm .custom-rates__copy-from:after,
body.gf-adm .twig-editor-list li:before,
body.gf-adm .file-modified:before {
  font-family: "Font Awesome 5 Free" !important;
  font-weight: 900 !important;
  font-style: normal !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: inline-block !important;
  speak: none;
}

/* caret do select de busca — contraste no dark */
body.gf-adm.dark-mode .search-select-wrap:before,
html.theme-dark body.gf-adm .search-select-wrap:before {
  color: var(--gf-muted, #a7b0c0);
}
body.gf-adm.dark-mode .form-control__filter-icon:before,
html.theme-dark body.gf-adm .form-control__filter-icon:before {
  color: var(--gf-muted, #a7b0c0);
}

/* ── Scrollbar ── */
html body ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
html body ::-webkit-scrollbar-track {
  background: var(--gf-bg);
}
html body ::-webkit-scrollbar-thumb {
  background: var(--gf-surface-2);
  border-radius: 10px;
}

/* ── Login (admin/login.php não inclui header.php) ── */
html body .container .form-group .form-control {
  background: var(--gf-surface-2) !important;
}

/* ===========================================================================
   SHELL ADMIN — sidebar no design do /admin da loja (gf-admin-theme)
   Markup: .gf-adm-shell > .gf-adm-side + .gf-adm-main > .gf-adm-top + .gf-adm-content
   =========================================================================== */

html body.gf-adm {
  padding: 0 !important;
  margin: 0 !important;
  overflow-x: hidden;
}

.gf-adm-shell {
  min-height: 100vh;
}

/* Sidebar escura — espelho de .navbar-side.navbar-dark da loja */
.gf-adm-side {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1040;
  width: var(--gf-adm-side-w);
  display: flex;
  flex-direction: column;
  background: #18181b;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.gf-adm-side__brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
  min-height: 3.75rem;
  padding: 0.85rem 0.75rem 0.55rem;
  text-decoration: none !important;
  border-bottom: none;
}
.gf-adm-side__lockup {
  display: block;
  height: 3rem;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  filter: none !important;
}

.gf-adm-side__nav {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  /* Mesmo respiro da sidebar do admin revenda / loja */
  padding: 0.55rem 0 1.25rem;
}

.gf-adm-side__sep,
h6.gf-adm-side__sep {
  margin: 1.25rem 0 0.55rem !important;
  padding: 0 1.15rem !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #71717a !important;
  font-family: "DM Sans", system-ui, sans-serif;
  background: transparent !important;
  border: 0 !important;
}
.gf-adm-side__nav > .gf-adm-side__sep:first-child,
.gf-adm-side__nav > h6.gf-adm-side__sep:first-child {
  margin-top: 0.45rem !important;
}

.gf-adm-side__link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 2.75rem;
  height: auto;
  margin: 0.18rem 0.65rem;
  padding: 0.5rem 0.9rem 0.5rem 0.75rem;
  border-radius: 0.55rem;
  color: #a1a1aa !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.3;
  text-decoration: none !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: background 0.2s ease, color 0.2s ease;
}
.gf-adm-side__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  min-width: 2.1rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  line-height: 1;
  transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
.gf-adm-side__icon i {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  font-size: 0.9rem !important;
  line-height: 1 !important;
  vertical-align: middle;
}
/* FA solid rende visualmente maior que Feather — alinha com loja/marketplace */
.gf-adm-side__icon .fas,
.gf-adm-side__icon .far,
.gf-adm-side__icon .fab {
  font-size: 0.88rem !important;
}
.gf-adm-side__icon .fa-external-link-alt {
  font-size: 0.82rem !important;
}
.gf-adm-side__text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  line-height: 1.3;
  padding-left: 0.1rem;
}
.gf-adm-side__link:hover,
.gf-adm-side__link:focus {
  background: rgba(225, 48, 108, 0.08) !important;
  color: #f9a8d4 !important;
}
.gf-adm-side__link:hover .gf-adm-side__icon,
.gf-adm-side__link:focus .gf-adm-side__icon {
  background: rgba(225, 48, 108, 0.18);
  color: #f9a8d4;
}
.gf-adm-side__link.is-active {
  background: rgba(225, 48, 108, 0.12) !important;
  color: #f9a8d4 !important;
  font-weight: 600 !important;
  box-shadow: inset 3px 0 0 0 var(--gf-accent-2) !important;
}
.gf-adm-side__link.is-active .gf-adm-side__icon {
  background: var(--gf-gradient) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(193, 53, 132, 0.4) !important;
}
.gf-adm-side__link.is-active .gf-adm-side__icon i {
  color: #fff !important;
}

.gf-adm-side__count {
  margin-left: auto;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--gf-gradient) !important;
  color: #fff !important;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gf-adm-side__foot {
  flex: 0 0 auto;
  padding: 0.75rem 0.65rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.gf-adm-main {
  margin-left: var(--gf-adm-side-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Topbar — mesma faixa clara + filete gradiente do admin da loja */
.gf-adm-top {
  position: sticky;
  top: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--gf-adm-top-h);
  height: auto;
  padding: 0.55rem 1.5rem;
  background: #ffffff !important;
  border-bottom: 1px solid rgba(193, 53, 132, 0.12);
  box-shadow: 0 8px 24px rgba(131, 58, 180, 0.06);
}
.gf-adm-top::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--gf-gradient);
  opacity: 0.9;
  pointer-events: none;
}
.gf-adm-top__title {
  margin: 0;
  font-family: "Sora", "DM Sans", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #18181b !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gf-adm-top__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.gf-adm-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.15rem;
  padding: 0 0.8rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(193, 53, 132, 0.14);
  background: #faf7f9;
  color: #71717a !important;
  font-size: 0.88rem !important;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
}
.gf-adm-chip:hover,
.gf-adm-chip:focus,
.gf-adm-chip.is-active {
  color: var(--gf-accent) !important;
  border-color: rgba(193, 53, 132, 0.35);
  background: rgba(193, 53, 132, 0.08);
}
.gf-adm-chip--danger:hover,
.gf-adm-chip--danger:focus {
  border-color: rgba(225, 48, 108, 0.45);
  background: rgba(225, 48, 108, 0.12);
  color: var(--gf-accent-2) !important;
}

.gf-adm-burger {
  display: none;
  width: 2.45rem;
  height: 2.45rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.7rem;
  border: 1px solid rgba(193, 53, 132, 0.14);
  background: #faf7f9;
  color: #18181b;
  cursor: pointer;
}

.gf-adm-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1035;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.gf-adm-content {
  flex: 1 1 auto;
  padding: 1.25rem 1.75rem 2.75rem;
  width: 100%;
  max-width: 100%;
  min-width: 0; /* evita que tabela larga esprema o flex */
  box-sizing: border-box;
}

/*
 * Páginas antigas usam .container (máx. 1170px) — com a sidebar isso vira uma
 * coluna estreita e o resto da tela fica vazio. Força largura total.
 */
html body.gf-adm .gf-adm-content > .container,
html body.gf-adm .gf-adm-content > .container-fluid {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

html body.gf-adm .gf-adm-content .row {
  margin-left: -10px;
  margin-right: -10px;
}

/* Tabelas: ocupam a largura e rolam na horizontal em vez de esmagar as colunas */
html body.gf-adm .gf-adm-content .table {
  width: 100% !important;
  max-width: none !important;
  margin-bottom: 0;
}
html body.gf-adm .gf-adm-content .table > thead > tr > th,
html body.gf-adm .gf-adm-content .table > tbody > tr > td {
  padding: 0.9rem 1.05rem !important;
  vertical-align: middle !important;
  white-space: nowrap;
  font-size: 1rem !important;
}
html body.gf-adm .gf-adm-content .table > thead > tr > th {
  font-size: 0.92rem !important;
  letter-spacing: 0.01em;
  text-transform: none !important;
}

html body.gf-adm .gf-adm-table-wrap,
html body.gf-adm .table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--gf-border);
  border-radius: var(--gf-radius-sm);
  background: var(--gf-surface);
  margin-bottom: 1.25rem;
}
html body.gf-adm .gf-adm-table-wrap > .table,
html body.gf-adm .table-responsive > .table {
  margin-bottom: 0 !important;
}

html body.gf-adm .gf-adm-content .nav-tabs {
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  width: 100%;
}
html body.gf-adm .gf-adm-content .nav-tabs > li {
  float: none;
  margin-bottom: 0;
}
html body.gf-adm .gf-adm-content .nav-tabs > li.pull-right {
  margin-left: auto;
}

/* Conteúdo das páginas antigas: sem o recuo da navbar fixa antiga */
html body.gf-adm .navbar-fixed-top {
  display: none !important;
}

@media (max-width: 991.98px) {
  .gf-adm-side {
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: none;
    width: min(276px, 86vw);
  }
  body.gf-adm-side-open .gf-adm-side {
    transform: none;
    box-shadow: 18px 0 40px rgba(0, 0, 0, 0.45);
  }
  .gf-adm-main {
    margin-left: 0;
  }
  .gf-adm-burger {
    display: inline-flex;
  }
  body.gf-adm-side-open .gf-adm-scrim {
    display: block;
  }
  .gf-adm-top {
    padding: 0.55rem 0.9rem;
  }
  .gf-adm-content {
    padding: 1rem 0.9rem 2rem;
  }
}

@media (max-width: 575.98px) {
  .gf-adm-top__actions .gf-adm-chip:first-child {
    display: none;
  }
}


/* Tipografia de painéis / menus laterais internos (settings, aparência) */
html body.gf-adm .panel-body,
html body.gf-adm .panel-heading,
html body.gf-adm .well {
  font-size: 1rem !important;
}
html body.gf-adm .panel-heading,
html body.gf-adm h4,
html body.gf-adm h5 {
  font-size: 1.15rem !important;
  line-height: 1.35;
}
html body.gf-adm .nav-pills > li > a,
html body.gf-adm .settings_menus > a {
  font-size: 1rem !important;
  padding: 0.65rem 0.9rem !important;
}
html body.gf-adm .nav-stacked > li + li {
  margin-top: 0.2rem;
}
html body.gf-adm p {
  font-size: 1rem !important;
  line-height: 1.55;
}
html body.gf-adm small,
html body.gf-adm .help-block {
  font-size: 0.9rem !important;
}


/* ── Dark mode: topbar/chips (hardcoded light no shell) ── */
html.theme-dark .gf-adm-top,
body.dark-mode .gf-adm-top {
  background: #18181b !important;
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
html.theme-dark .gf-adm-top__title,
body.dark-mode .gf-adm-top__title {
  color: #f4f4f5 !important;
}
html.theme-dark .gf-adm-chip,
body.dark-mode .gf-adm-chip {
  background: #202024;
  border-color: rgba(255, 255, 255, 0.1);
  color: #a1a1aa !important;
}
html.theme-dark .gf-adm-chip:hover,
html.theme-dark .gf-adm-chip:focus,
html.theme-dark .gf-adm-chip.is-active,
body.dark-mode .gf-adm-chip:hover,
body.dark-mode .gf-adm-chip:focus,
body.dark-mode .gf-adm-chip.is-active {
  color: #f9a8d4 !important;
  border-color: rgba(225, 48, 108, 0.35);
  background: rgba(225, 48, 108, 0.12);
}
html.theme-dark .gf-adm-burger,
body.dark-mode .gf-adm-burger {
  background: #202024;
  border-color: rgba(255, 255, 255, 0.1);
  color: #f4f4f5;
}
html.theme-dark .gf-adm-content,
body.dark-mode .gf-adm-content {
  color: var(--gf-text);
}

/* Toggle Dia/Noite */
.gf-theme-toggle {
  display: inline-flex;
  gap: 0.25rem;
  align-items: center;
}
.gf-theme-toggle__btn {
  border: 1px solid rgba(193, 53, 132, 0.14);
  background: #faf7f9;
  color: #71717a;
  border-radius: 0.55rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  font-family: "DM Sans", system-ui, sans-serif;
}
.gf-theme-toggle__btn.is-active {
  background: var(--gf-gradient);
  border-color: transparent;
  color: #fff;
}
html.theme-dark .gf-theme-toggle__btn,
body.dark-mode .gf-theme-toggle__btn {
  background: #202024;
  border-color: rgba(255, 255, 255, 0.1);
  color: #a1a1aa;
}
html.theme-dark .gf-theme-toggle__btn.is-active,
body.dark-mode .gf-theme-toggle__btn.is-active {
  background: var(--gf-gradient);
  border-color: transparent;
  color: #fff;
}

/* Top actions — alinhado ao header-wrap da loja */
.gf-adm-top__actions {
  gap: 0.35rem;
}
.gf-adm-top__actions .gf-adm-customize-btn {
  flex-shrink: 0;
}
.gf-adm-chip {
  height: 2.45rem;
  border-radius: 0.7rem;
  padding: 0 0.85rem;
}


/* User pill no topbar do painel */
.gf-adm-top__actions .gf-adm-user-dd {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.gf-adm-top__actions .gf-adm-user-dd > .dropdown-menu {
  right: 0;
  left: auto;
}
.gf-adm-top__actions .gf-admin-topbar__dropdown > li > a.dropdown-item {
  display: flex;
}

/* ===========================================================================
   PRIMEIROS PASSOS — lista de pendências do painel do revendedor
   Ver o comentário em themes/revenda/header.php: cada item diz a consequência
   e leva até a tela onde se resolve.
   =========================================================================== */

/* ===========================================================================
   SETUP / PENDÊNCIAS DO REVENDEDOR
   Card no visual do shell (surface + borda da marca). Claro e escuro via vars.
   =========================================================================== */

.gf-setup {
  margin: 0 0 1.25rem;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--gf-radius-sm, 12px);
  background:
    radial-gradient(700px 120px at 0% 0%, rgba(245, 158, 11, 0.12), transparent 55%),
    var(--gf-surface);
  box-shadow: var(--gf-shadow);
  color: var(--gf-text);
  overflow: hidden;
}
.gf-setup--trava {
  border-color: rgba(225, 48, 108, 0.4);
  background:
    radial-gradient(700px 140px at 0% 0%, rgba(225, 48, 108, 0.16), transparent 55%),
    var(--gf-surface);
}

.gf-setup__topo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--gf-border);
  background: var(--gf-surface-2);
}
.gf-setup__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.55rem;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-family: "Sora", "DM Sans", sans-serif;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}
.gf-setup--trava .gf-setup__ico {
  background: var(--gf-gradient);
  box-shadow: 0 4px 12px rgba(225, 48, 108, 0.4);
}
.gf-setup__topo strong {
  display: block;
  margin: 0;
  font-family: "Sora", "DM Sans", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--gf-text);
}
.gf-setup__sub {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gf-muted);
}

.gf-setup__lista {
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
}
.gf-setup__lista li + li {
  border-top: 1px solid var(--gf-border);
}
.gf-setup__lista a {
  display: grid;
  grid-template-columns: minmax(11rem, 15rem) 1fr auto;
  align-items: center;
  gap: 0.85rem 1.1rem;
  padding: 0.9rem 1.15rem;
  color: var(--gf-text) !important;
  text-decoration: none !important;
  transition: background 0.15s ease;
}
.gf-setup__lista a:hover,
.gf-setup__lista a:focus {
  background: rgba(var(--gf-accent-2-rgb), 0.08);
  color: var(--gf-text) !important;
  text-decoration: none !important;
}
.gf-setup__tit {
  font-family: "Sora", "DM Sans", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  color: var(--gf-text);
  line-height: 1.35;
}
.gf-setup__lista li.e-trava .gf-setup__tit::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 0.5rem;
  border-radius: 999px;
  background: var(--gf-accent-2);
  box-shadow: 0 0 0 3px rgba(225, 48, 108, 0.2);
  vertical-align: middle;
}
.gf-setup__txt {
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--gf-muted);
}
.gf-setup__ir {
  font-size: 0.82rem;
  font-weight: 700;
  color: #d97706;
  white-space: nowrap;
}
.gf-setup--trava .gf-setup__ir {
  color: var(--gf-accent-2);
}
.gf-setup__lista a:hover .gf-setup__ir {
  text-decoration: underline;
}

@media (max-width: 767.98px) {
  .gf-setup__lista a {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
  .gf-setup__ir {
    margin-top: 0.25rem;
  }
}
