﻿:root {
  --admin-sidebar-width: 220px;
  --admin-sidebar-width-compact: 60px;
  --admin-sidebar-width-mobile: min(86vw, 300px);
  --admin-header-height: 58px;
}

html,
body {
  font-family: Inter, "Helvetica Neue", Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  font-size: 0.875rem;
  line-height: 1.5;
}

body.admin-body {
  min-height: 100vh;
}

.admin-shell {
  align-items: stretch;
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.admin-sidebar {
  max-width: var(--admin-sidebar-width);
  min-width: var(--admin-sidebar-width);
  transition: margin-left 0.24s ease, margin-right 0.24s ease, transform 0.24s ease;
  z-index: 1035;
}

.admin-sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
}


.admin-sidebar .admin-sidebar-inner {
  padding: 0;
}

.admin-sidebar .sidebar-brand {
  display: block;
  margin: 0;
  padding: 1.15rem 1.5rem 0.85rem;
}

.admin-sidebar .sidebar-header {
  margin: 0.9rem 0 0.35rem;
  padding: 0 1.5rem;
}

.admin-sidebar .sidebar-nav {
  margin: 0;
  padding: 0;
}

.admin-sidebar .sidebar-item {
  margin: 0;
}

.admin-sidebar .sidebar-link {
  background-color: transparent;
}

.admin-sidebar .sidebar-link-badge {
  margin-left: auto;
}

.admin-sidebar .sidebar-helper {
  display: none;
}

.admin-main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  overflow: hidden;
  width: auto;
}

.admin-header {
  border-bottom: 0;
  min-height: var(--admin-header-height);
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 1020;
}

.admin-header-inner {
  min-height: var(--admin-header-height);
}

.admin-content {
  flex: 1 1 auto;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  padding-top: var(--admin-header-height);
  width: 100%;
}

.admin-container {
  max-width: 100%;
  padding: 1.5rem 1.5rem 0.75rem;
  width: 100%;
}

.sidebar-brand-title,
.sidebar-brand-text {
  align-items: center;
  display: inline-flex;
  gap: 0.4rem;
}

.sidebar-brand-title span,
.sidebar-brand-badge {
  border-radius: 0.2rem;
  font-size: 0.625rem;
  line-height: 1;
  padding: 0.2rem 0.35rem;
  text-transform: uppercase;
}


.sidebar-brand-badge-compact {
  display: none;
}
.sidebar-link-main {
  align-items: center;
  display: inline-flex;
  gap: 0.75rem;
}

.sidebar-link-label {
  white-space: nowrap;
}

.sidebar-link-toggle {
  align-items: center;
  border: 0;
  display: flex;
  text-align: left;
  width: 100%;
  justify-content: space-between;
}

.sidebar-link-chevron {
  margin-left: auto;
  transition: transform 0.2s ease;
}

.sidebar-link-toggle[aria-expanded="true"] .sidebar-link-chevron {
  transform: rotate(180deg);
}

.sidebar-submenu {
  list-style: none;
  margin: 0;
  padding: 0 0 0.35rem;
}

.sidebar-submenu .sidebar-link {
  font-size: 0.8125rem;
  gap: 0.35rem;
  padding-left: 2.45rem;
}

.sidebar-link-subicon {
  flex: 0 0 auto;
  font-size: 0.9rem;
  line-height: 1;
  margin-left: 0.1rem;
  opacity: 0.8;
}

.sidebar-link-badge {
  margin-left: auto;
}

.sidebar-helper {
  font-size: 0.8rem;
  margin-top: auto;
  padding: 1rem 1.5rem;
}

.admin-search {
  align-items: center;
  border: 0;
  border-radius: 0.2rem;
  display: inline-flex;
  gap: 0.45rem;
  padding: 0.375rem 0.75rem;
  width: min(100%, 260px);
}

.admin-search input {
  background: transparent;
  border: 0;
  outline: 0;
  width: 100%;
}

.admin-top-link {
  border-radius: 0.2rem;
  padding: 0.35rem 0.55rem;
  text-decoration: none;
}

.admin-top-link:hover {
  text-decoration: none;
}

.admin-icon-btn {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0.2rem;
  display: inline-flex;
  height: 35px;
  justify-content: center;
  width: 35px;
}

/* Bandeira de pais: PNG do flagcdn. Substituiu o emoji, que nao tem glifo em
   parte dos navegadores (Windows/Chrome) e aparecia como as letras do par
   regional. O codigo ISO fica em texto ao lado, entao o pais continua
   identificavel se a imagem externa nao carregar. */
.country-meta {
  align-items: center;
  display: inline-flex;
  gap: 0.35rem;
  min-width: 0;
}

.country-flag {
  border-radius: 2px;
  /* a borda sustenta bandeiras de fundo claro (JP, PL) sobre fundo branco */
  box-shadow: 0 0 0 1px rgba(var(--bs-body-color-rgb), 0.12);
  flex: 0 0 auto;
  /* as bandeiras do flagcdn nao tem proporcao unica (GB vem 2:1, CH 1:1):
     altura livre mostra cada uma inteira, sem cortar nem esticar. Os atributos
     width/height no HTML seguem reservando espaco enquanto a imagem carrega. */
  height: auto;
  width: 20px;
}

.country-code {
  color: var(--bs-secondary-color);
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.country-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-action-bar {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  justify-content: flex-end;
  white-space: nowrap;
}

.table-action-btn.btn {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  height: 2rem;
  justify-content: center;
  padding: 0;
  width: 2rem;
}

.table-action-btn .bi {
  font-size: 0.95rem;
  line-height: 1;
}

.admin-notify-dot {
  border-radius: 999px;
  font-size: 0.625rem;
  height: 16px;
  line-height: 16px;
  min-width: 16px;
  position: absolute;
  right: -2px;
  text-align: center;
  top: -2px;
}

.customizer-card {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.2rem;
  cursor: pointer;
  padding: 0.75rem;
  text-align: center;
}

.customizer-card.active {
  border-color: var(--bs-primary);
  box-shadow: inset 0 0 0 1px var(--bs-primary);
}

.customizer-card .preview-dot {
  border-radius: 999px;
  display: block;
  height: 52px;
  margin: 0 auto 0.45rem;
  overflow: hidden;
  position: relative;
  width: 52px;
}

.customizer-card.preview-default .preview-dot::before {
  background: linear-gradient(135deg, #f1f3f5 50%, #272a30 50%);
  content: "";
  inset: 0;
  position: absolute;
}

.customizer-card.preview-colored .preview-dot::before {
  background: linear-gradient(135deg, #f1f3f5 50%, #3b7ddd 50%);
  content: "";
  inset: 0;
  position: absolute;
}

.customizer-card.preview-dark .preview-dot {
  background: #272a30;
}

.customizer-card.preview-light .preview-dot {
  background: #e9ecef;
}

.customizer-option-title {
  font-size: 1.02rem;
  font-weight: 600;
}

.customizer-segment {
  border-radius: 0.2rem;
  display: inline-flex;
  gap: 0.15rem;
  padding: 0.15rem;
}

.customizer-segment button {
  background: transparent;
  border: 0;
  border-radius: 0.15rem;
  padding: 0.35rem 0.8rem;
}

.customizer-segment button.active {
  background: var(--bs-primary);
  color: #fff;
}

.card {
  border: 0;
  box-shadow: 0 0.1rem 0.2rem rgba(var(--bs-black-rgb), 0.05);
  margin-bottom: 24px;
}

.card-title {
  font-size: 0.925rem;
  font-weight: 600;
}

.table > :not(caption) > * > * {
  padding: 0.75rem;
}

.table > tbody > tr > td {
  vertical-align: middle;
}

body[data-theme="default"] .table,
body[data-theme="light"] .table {
  --bs-table-bg: #fff;
}

body[data-theme="dark"] .table {
  --bs-table-bg: var(--bs-card-bg, #272a30);
}

body[data-theme="default"],
body[data-theme="light"] {
  --admin-table-header-bg: #e8ebef;
  --admin-table-header-color: #2f3742;
  --admin-table-header-border: #c7ced8;
  --admin-table-header-stuck-bg: #4b5563;
  --admin-table-header-stuck-color: #ffffff;
  --admin-filter-fab-bg: #315f9e;
  --admin-filter-fab-color: #ffffff;
}

body[data-theme="dark"] {
  --admin-table-header-bg: #343b46;
  --admin-table-header-color: #f1f4f8;
  --admin-table-header-border: #526074;
  --admin-table-header-stuck-bg: #3b7ddd;
  --admin-table-header-stuck-color: #ffffff;
  --admin-filter-fab-bg: #3b7ddd;
  --admin-filter-fab-color: #ffffff;
}

.kpi-card {
  min-height: 80px;
  margin-bottom: 0;
}

.kpi-label {
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.admin-layout-boxed .admin-container {
  max-width: 100%;
  padding: 1.5rem 1.5rem 0.75rem;
  width: 100%;
}

body.admin-sidebar-right .admin-shell {
  flex-direction: row-reverse;
}

body.admin-sidebar-compact .admin-sidebar {
  max-width: var(--admin-sidebar-width-compact);
  min-width: var(--admin-sidebar-width-compact);
}

body.admin-sidebar-compact .sidebar-brand-badge-full,
body.admin-sidebar-compact .sidebar-user > div,
body.admin-sidebar-compact .sidebar-header,
body.admin-sidebar-compact .sidebar-link-label,
body.admin-sidebar-compact .sidebar-link-badge,
body.admin-sidebar-compact .sidebar-helper,
body.admin-sidebar-compact .sidebar-link .bi-chevron-down {
  display: none;
}

body.admin-sidebar-compact .sidebar-brand-text {
  align-items: center;
  display: inline-flex;
  gap: 0;
}
body.admin-sidebar-compact .sidebar-brand-wordmark {
  display: none;
}

body.admin-sidebar-compact .sidebar-brand-badge-compact {
  display: inline-block;
}
body.admin-sidebar-compact .sidebar-link {
  align-items: center;
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

body.admin-sidebar-compact .sidebar-link-main {
  display: none;
}

body.admin-sidebar-compact .admin-sidebar .sidebar-link .sidebar-link-icon {
  display: inline-flex;
  font-size: 1rem;
  line-height: 1;
  margin: 0;
  opacity: 1;
  visibility: visible;
  width: auto;
}

body.admin-sidebar-compact .sidebar-user,
body.admin-sidebar-compact .sidebar-brand {
  justify-content: center;
  text-align: center;
}

body[data-theme="dark"] {
  --bs-body-bg: #1f2126;
  --bs-card-bg: #272a30;
  --bs-secondary-bg: #3a3f47;
  --bs-tertiary-bg: #31353c;
  --bs-border-color: #454b55;
}
body[data-theme="dark"] .admin-header {
  background: #1f2126;
  box-shadow: 0 0 2rem 0 rgba(34, 46, 60, 0.1);
}

body[data-theme="default"] .admin-header,
body[data-theme="light"] .admin-header {
  background: #fff;
  box-shadow: 0 0 2rem 0 rgba(33, 37, 41, 0.08);
}

body[data-theme="dark"] .admin-icon-btn {
  color: #a7abb1;
}

body[data-theme="dark"] .admin-icon-btn:hover {
  background: #272a30;
  color: #e9eaec;
}

body[data-theme="default"] .admin-icon-btn,
body[data-theme="light"] .admin-icon-btn {
  color: #6c757d;
}

body[data-theme="default"] .admin-icon-btn:hover,
body[data-theme="light"] .admin-icon-btn:hover {
  background: #eef2f7;
  color: #3b7ddd;
}

body[data-theme="default"] .admin-sidebar,
body[data-theme="dark"] .admin-sidebar {
  background: #272a30;
  border-right: 0;
  color: #a7abb1;
}

body.admin-sidebar-right[data-theme="default"] .admin-sidebar,
body.admin-sidebar-right[data-theme="dark"] .admin-sidebar {
  border-left: 0;
}

body[data-theme="default"] .sidebar-brand,
body[data-theme="dark"] .sidebar-brand {
  color: #f8f9fa;
}

body[data-theme="default"] .sidebar-header,
body[data-theme="dark"] .sidebar-header {
  color: #8f9bad;
}

body[data-theme="default"] .sidebar-link,
body[data-theme="dark"] .sidebar-link {
  color: #adb5bd;
}

body[data-theme="default"] .sidebar-item.active,
body[data-theme="dark"] .sidebar-item.active {
  background: #32363d;
}

body[data-theme="default"] .sidebar-item.active .sidebar-link,
body[data-theme="dark"] .sidebar-item.active .sidebar-link {
  background: transparent;
  color: #e9ecef;
}

body[data-theme="default"] .sidebar-link:hover,
body[data-theme="dark"] .sidebar-link:hover {
  background: transparent;
  color: #e9ecef;
}

body[data-theme="light"] .admin-sidebar {
  background: #fff;
  border-right: 1px solid #dee2e6;
  color: #495057;
}

body.admin-sidebar-right[data-theme="light"] .admin-sidebar {
  border-left: 1px solid #dee2e6;
}

body[data-theme="light"] .sidebar-brand {
  color: #212529;
}

body[data-theme="light"] .sidebar-header {
  color: #6c757d;
}

body[data-theme="light"] .sidebar-link {
  color: #495057;
}

body[data-theme="light"] .sidebar-item.active {
  background: #f5f7fb;
}

body[data-theme="light"] .sidebar-item.active .sidebar-link,
body[data-theme="light"] .sidebar-link:hover {
  background: transparent;
  color: #2f64b1;
}

body[data-theme="default"] .sidebar-brand-badge,
body[data-theme="light"] .sidebar-brand-badge,
body[data-theme="dark"] .sidebar-brand-badge {
  background: #3b7ddd;
  color: #fff;
}
@media (max-width: 991.98px) {
  .admin-sidebar {
    bottom: 0;
    left: 0;
    max-width: var(--admin-sidebar-width-mobile);
    min-width: var(--admin-sidebar-width-mobile);
    position: fixed;
    top: 0;
    transform: translateX(-100%);
    width: var(--admin-sidebar-width-mobile);
  }

  body.admin-sidebar-right .admin-sidebar {
    left: auto;
    right: 0;
    transform: translateX(100%);
  }

  .admin-sidebar.is-open {
    transform: translateX(0);
  }

  .admin-sidebar-backdrop {
    background-color: rgba(0, 0, 0, 0.45);
    display: block;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity 0.24s ease;
    z-index: 1030;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open .admin-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .admin-container {
  max-width: 100%;
  padding: 1.5rem 1.5rem 0.75rem;
  width: 100%;
}

  .admin-content {
    max-width: 100%;
    width: 100%;
  }
}

@media (min-width: 992px) {
  .admin-sidebar,
  .admin-main {
    transition: all 0.22s ease;
  }

  .admin-sidebar {
    bottom: 0;
    left: 0;
    position: fixed;
    top: 0;
  }

  body.admin-sidebar-right .admin-sidebar {
    left: auto;
    right: 0;
  }

  .admin-main {
    margin-left: var(--admin-sidebar-width);
  }

  .admin-header {
    left: var(--admin-sidebar-width);
  }

  body.admin-sidebar-right .admin-main {
    margin-left: 0;
    margin-right: var(--admin-sidebar-width);
  }

  body.admin-sidebar-right .admin-header {
    left: 0;
    right: var(--admin-sidebar-width);
  }

  body.admin-sidebar-compact .admin-main {
    margin-left: var(--admin-sidebar-width-compact);
  }

  body.admin-sidebar-compact .admin-header {
    left: var(--admin-sidebar-width-compact);
  }

  body.admin-sidebar-right.admin-sidebar-compact .admin-main {
    margin-left: 0;
    margin-right: var(--admin-sidebar-width-compact);
  }

  body.admin-sidebar-right.admin-sidebar-compact .admin-header {
    left: 0;
    right: var(--admin-sidebar-width-compact);
  }

  .admin-sidebar.collapsed {
    margin-left: calc(-1 * var(--admin-sidebar-width));
  }

  body.admin-sidebar-right .admin-sidebar.collapsed {
    margin-left: 0;
    margin-right: calc(-1 * var(--admin-sidebar-width));
  }

  body.admin-sidebar-compact .admin-sidebar.collapsed {
    margin-left: calc(-1 * var(--admin-sidebar-width-compact));
  }

  body.admin-sidebar-right.admin-sidebar-compact .admin-sidebar.collapsed {
    margin-left: 0;
    margin-right: calc(-1 * var(--admin-sidebar-width-compact));
  }

  .admin-sidebar-backdrop {
    display: none !important;
  }
}




/* Sidebar icon + compact tooltip hardening */
.admin-sidebar .sidebar-link > .sidebar-link-icon {
  display: inline-flex;
  flex: 0 0 1rem;
  font-size: 0.95rem;
  justify-content: center;
  line-height: 1;
  width: 1rem;
}

@media (min-width: 992px) {
  body.admin-sidebar-compact .admin-sidebar .sidebar-link {
    align-items: center;
    display: flex;
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
    position: relative;
  }

  body.admin-sidebar-compact .admin-sidebar .sidebar-link > .sidebar-link-icon {
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1rem;
    margin: 0;
    opacity: 1;
    visibility: visible;
    width: auto;
  }

  body.admin-sidebar-compact .admin-sidebar .sidebar-link > :not(.sidebar-link-icon) {
    display: none;
  }

  body.admin-sidebar-compact .admin-sidebar .sidebar-link[data-tooltip]:hover::after,
  body.admin-sidebar-compact .admin-sidebar .sidebar-link[data-tooltip]:focus-visible::after {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.2rem;
    box-shadow: 0 0.1rem 0.2rem rgba(var(--bs-black-rgb), 0.12);
    color: var(--bs-body-color);
    content: attr(data-tooltip);
    font-size: 0.75rem;
    left: calc(100% + 10px);
    line-height: 1.2;
    padding: 0.35rem 0.5rem;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    z-index: 1085;
  }
}
/* Inputs globais do admin com borda perceptivel em qualquer modal ou formulario */
body[data-theme="default"] .admin-content .form-control,
body[data-theme="default"] .admin-content .form-select,
body[data-theme="default"] .admin-content .input-group-text,
body[data-theme="light"] .admin-content .form-control,
body[data-theme="light"] .admin-content .form-select,
body[data-theme="light"] .admin-content .input-group-text {
  background-color: #ffffff;
  border-color: #c6d0db;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

body[data-theme="default"] .admin-content .form-control::placeholder,
body[data-theme="light"] .admin-content .form-control::placeholder {
  color: #8b94a1;
}

body[data-theme="default"] .admin-content .form-control:focus,
body[data-theme="default"] .admin-content .form-select:focus,
body[data-theme="light"] .admin-content .form-control:focus,
body[data-theme="light"] .admin-content .form-select:focus {
  background-color: #ffffff;
  border-color: #78a8e6;
  box-shadow: 0 0 0 0.14rem rgba(59, 125, 221, 0.18);
}

body[data-theme="dark"] .admin-content .form-control,
body[data-theme="dark"] .admin-content .form-select,
body[data-theme="dark"] .admin-content .input-group-text {
  background-color: #2a2d33;
  border-color: #4d5662;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18);
  color: var(--bs-body-color);
}

body[data-theme="dark"] .admin-content .form-control::placeholder {
  color: #8f9bad;
}

body[data-theme="dark"] .admin-content .form-control:focus,
body[data-theme="dark"] .admin-content .form-select:focus {
  background-color: #353a42;
  border-color: #7fb2ff;
  box-shadow: 0 0 0 0.14rem rgba(59, 125, 221, 0.3);
  color: var(--bs-body-color);
}

.admin-page-title {
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  max-width: min(56vw, 440px);
}

body[data-theme="dark"] .admin-page-title {
  color: #e9eaec;
}

body[data-theme="default"] .admin-page-title,
body[data-theme="light"] .admin-page-title {
  color: #212529;
}

@media (max-width: 575.98px) {
  .admin-page-title {
    font-size: 0.88rem;
    max-width: 46vw;
  }
}


.admin-timezone-control {
  align-items: center;
  border-radius: 0.2rem;
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 600;
  gap: 0.35rem;
  line-height: 1;
  max-width: min(40vw, 260px);
  padding: 0.42rem 0.55rem;
  white-space: nowrap;
}

.admin-timezone-control > i {
  font-size: 0.82rem;
  opacity: 0.85;
}

.admin-timezone-select {
  appearance: none;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.6' d='m4 6 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.05rem center;
  background-repeat: no-repeat;
  background-size: 0.75rem;
  border: 0;
  box-shadow: none;
  color: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  max-width: min(30vw, 200px);
  min-width: 140px;
  padding: 0 1rem 0 0;
}

.report-funnels-list .report-funnels-table {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.35rem;
}

.report-funnels-list .report-funnels-table table {
  margin-bottom: 0;
}

.report-funnels-list .sticky-col {
  min-width: 220px;
}

.report-funnels-list .report-funnels-optional-cell {
  min-width: 280px;
}

.report-funnels-list .report-funnels-split-offer-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.25;
}

.report-funnels-list .report-funnels-split-offer-item + .report-funnels-split-offer-item {
  margin-top: 0.45rem;
}

.funnel-editor-context {
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.35rem;
  padding: 0.85rem 1rem;
}

.funnel-offer-groups-list {
  display: grid;
  gap: 0.75rem;
}

.funnel-offer-groups-empty {
  background: var(--bs-tertiary-bg);
}

.funnel-offer-group-row {
  background: var(--bs-body-bg);
}

.admin-timezone-select:focus {
  border: 0;
  box-shadow: none;
  outline: none;
}

body[data-theme="dark"] .admin-timezone-control {
  background: #2a2d33;
  color: #bdc0c5;
}

body[data-theme="dark"] .admin-timezone-select {
  background-color: #2a2d33;
  color: #e9eaec;
  color-scheme: dark;
}

body[data-theme="dark"] .admin-timezone-select option {
  background-color: #2a2d33;
  color: #e9eaec;
}

body[data-theme="dark"] .admin-timezone-select option:checked {
  background-color: #3a3f48;
  color: #ffffff;
}

body[data-theme="default"] .admin-timezone-control,
body[data-theme="light"] .admin-timezone-control {
  background: #eef2f7;
  color: #495057;
}

body[data-theme="default"] .admin-timezone-select,
body[data-theme="light"] .admin-timezone-select {
  color-scheme: light;
}

@media (max-width: 575.98px) {
  .admin-timezone-control {
    max-width: 45vw;
  }

  .admin-timezone-select {
    min-width: 112px;
  }
}





.admin-auth-body {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.admin-auth-shell {
  width: min(100%, 440px);
}

.admin-auth-card {
  margin-bottom: 0;
}

.admin-user-pill {
  align-items: center;
  background: var(--bs-secondary-bg);
  border-radius: 999px;
  color: var(--bs-body-color);
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 600;
  gap: 0.4rem;
  line-height: 1;
  padding: 0.48rem 0.7rem;
}

body[data-theme="dark"] .admin-user-pill {
  background: #2a2d33;
  color: #e9eaec;
}

body[data-theme="default"] .admin-user-pill,
body[data-theme="light"] .admin-user-pill {
  background: #eef2f7;
  color: #495057;
}

.dashboard-shell {
  min-height: calc(100vh - 10rem);
}

.dashboard-panel,
.dashboard-kpi-card {
  background: var(--bs-card-bg);
  border-radius: 0.35rem;
}

.dashboard-filters {
  background: transparent;
  border-radius: 0;
  margin: 0;
}

.dashboard-filters .form-label {
  margin-bottom: 0.35rem;
}

.dashboard-filters .input-group {
  min-width: min(100%, 320px);
}

.dashboard-panel .card-body,
.dashboard-kpi-card .card-body {
  padding: 1.1rem 1.15rem;
}

.dashboard-kpi-head {
  color: var(--bs-secondary-color);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-kpi-value {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.dashboard-trend-badge {
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.5rem;
}

.dashboard-trend-up { background: rgba(27, 189, 125, 0.14); color: #1bbd7d; }
.dashboard-trend-down { background: rgba(220, 53, 69, 0.14); color: #dc3545; }
.dashboard-trend-neutral { background: rgba(148, 163, 184, 0.16); color: var(--bs-secondary-color); }
.dashboard-kpi-revenue { border-top: 2px solid #1bbd7d; }
.dashboard-kpi-cost { border-top: 2px solid #dc3545; }
.dashboard-kpi-profit { border-top: 2px solid #3b7ddd; }
.dashboard-kpi-purchase { border-top: 2px solid #845ef7; }
.dashboard-kpi-roas { border-top: 2px solid #22b8cf; }
.dashboard-kpi-cpa { border-top: 2px solid #f59f00; }

.dashboard-performance-chart {
  min-height: 19rem;
}

.dashboard-chart-legend {
  color: var(--bs-secondary-color);
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.dashboard-highlights {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-highlight-card {
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color-translucent);
  border-radius: 0.35rem;
  min-height: 5.6rem;
  padding: 0.9rem 0.95rem;
}

.dashboard-highlight-label {
  color: var(--bs-secondary-color);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
}

.dashboard-highlight-value {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.3rem;
}

.dashboard-highlight-detail {
  color: var(--bs-secondary-color);
  font-size: 0.78rem;
}

.dashboard-highlight-success { border-top: 2px solid #1bbd7d; }
.dashboard-highlight-danger { border-top: 2px solid #dc3545; }
.dashboard-highlight-info { border-top: 2px solid #22b8cf; }
.dashboard-highlight-warning { border-top: 2px solid #f59f00; }

.dashboard-mini-list,
.dashboard-alert-list { display: flex; flex-direction: column; gap: 0.85rem; }
.dashboard-mini-item,
.dashboard-alert-item {
  align-items: center;
  border-top: 1px solid var(--bs-border-color-translucent);
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  padding-top: 0.85rem;
}
.dashboard-mini-list > :first-child,
.dashboard-alert-list > :first-child { border-top: 0; padding-top: 0; }

.dashboard-table-wrap { max-height: 26rem; }
.dashboard-table thead th {
  background: var(--admin-table-header-bg);
  border-bottom-color: var(--admin-table-header-border);
  color: var(--admin-table-header-color);
  position: sticky;
  top: 0;
  z-index: 1;
}
.dashboard-table tbody td { vertical-align: middle; }

body[data-theme="dark"] .dashboard-panel,
body[data-theme="dark"] .dashboard-kpi-card { box-shadow: none !important; }
body[data-theme="dark"] .dashboard-table thead th { background: var(--admin-table-header-bg); }

.resource-page-header {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 0;
}

.resource-page-header-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.resource-page-header-copy {
  min-width: 0;
}

.resource-page-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-primary);
  margin-bottom: 0.35rem;
}

.resource-page-title {
  margin: 0;
}

.resource-page-subtitle {
  color: var(--bs-secondary-color);
  max-width: 52rem;
}

.resource-page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.resource-page-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  background: rgba(var(--bs-primary-rgb), 0.08);
  color: var(--bs-body-color);
  font-size: 0.875rem;
}

.resource-page-meta-product {
  background: linear-gradient(135deg, #ffb703, #f72585);
  color: #fff;
  box-shadow: 0 0.35rem 0.9rem rgba(247, 37, 133, 0.22);
}

.resource-page-meta-status.is-status-draft {
  background: rgba(var(--bs-secondary-rgb), 0.12);
  color: var(--bs-secondary-text-emphasis);
}

.resource-page-meta-status.is-status-scheduled {
  background: rgba(var(--bs-info-rgb), 0.14);
  color: var(--bs-info-text-emphasis);
}

.resource-page-meta-status.is-status-running {
  background: rgba(var(--bs-success-rgb), 0.14);
  color: var(--bs-success-text-emphasis);
}

.resource-page-meta-status.is-status-paused {
  background: rgba(var(--bs-warning-rgb), 0.18);
  color: var(--bs-warning-text-emphasis);
}

.resource-page-meta-status.is-status-finished,
.resource-page-meta-status.is-status-unknown {
  background: rgba(var(--bs-dark-rgb), 0.1);
  color: var(--bs-dark-text-emphasis);
}

.resource-page-header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.resource-page-header-filters {
  border-top: 1px solid rgba(var(--bs-body-color-rgb), 0.08);
  padding-top: 1rem;
}

.resource-page-header.is-filters-only .resource-page-header-filters {
  border-top: 0;
  padding-top: 0;
}

.resource-page-table-card,
.report-log-table-card {
  padding: 0;
  overflow: visible;
  width: 100%;
  max-width: 100%;
}

.resource-page-table-card {
  background: var(--report-table-bg, #fff);
  border: 1px solid rgba(var(--bs-body-color-rgb), 0.08);
  border-radius: var(--bs-border-radius);
  box-shadow: 0 0.1rem 0.2rem rgba(var(--bs-black-rgb), 0.05);
}

.resource-page-table-rail,
.report-log-table-rail {
  display: none;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0.75rem;
  border-bottom: 1px solid rgba(var(--bs-body-color-rgb), 0.08);
  background: var(--bs-card-bg, var(--bs-body-bg));
  -webkit-overflow-scrolling: touch;
}

.resource-page-table-rail.is-active,
.report-log-table-rail.is-active {
  display: block;
}

.resource-page-table-rail-inner,
.report-log-table-rail-inner {
  height: 1px;
}

.resource-page-table-scroll,
.report-log-table-scroll {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
}

.resource-page-table-scroll {
  background: var(--report-table-bg, #fff);
}

.resource-page-table-scroll .resource-page-resizable-table > thead,
.resource-page-table-scroll .resource-page-resizable-table > thead.bg-body-tertiary,
.report-log-table-scroll .table > thead,
.report-log-table-scroll .table > thead.bg-body-tertiary {
  background-color: var(--admin-table-header-bg);
}

.resource-page-table-scroll .resource-page-resizable-table > thead > tr > th,
.report-log-table-scroll .table > thead > tr > th {
  position: relative;
  z-index: 6;
  background-color: var(--admin-table-header-bg) !important;
  border-bottom-color: var(--admin-table-header-border);
  color: var(--admin-table-header-color);
  font-weight: 700;
}

.resource-page-table-scroll .resource-page-resizable-table > thead > tr > th {
  position: relative;
}

.resource-page-sticky-header {
  background: var(--report-table-bg, #fff);
  display: none;
  left: 0;
  overflow: hidden;
  pointer-events: none;
  position: fixed;
  top: var(--resource-table-header-top, var(--admin-header-height));
  z-index: 1015;
}

.resource-page-sticky-header.is-active {
  display: block;
}

.resource-page-sticky-header .resource-page-resizable-table {
  margin-bottom: 0 !important;
}

.resource-page-sticky-header .resource-page-resizable-table.resource-table-nowrap {
  min-width: 0 !important;
}

.resource-page-sticky-header .resource-page-resizable-table.resource-table-nowrap th {
  max-width: none;
}

.resource-page-sticky-header .resource-page-resizable-table > thead > tr > th {
  background-color: var(--admin-table-header-stuck-bg) !important;
  color: var(--admin-table-header-stuck-color) !important;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-page-sticky-rail {
  background: var(--bs-card-bg, var(--bs-body-bg));
  border-bottom: 1px solid rgba(var(--bs-body-color-rgb), 0.08);
  display: none;
  height: 18px;
  left: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0.75rem;
  position: fixed;
  scrollbar-width: auto;
  top: calc(var(--resource-table-header-top, var(--admin-header-height)) + var(--resource-table-header-height, 0px));
  z-index: 1015;
  -webkit-overflow-scrolling: touch;
}

.resource-page-sticky-rail.is-active {
  display: block;
}

.resource-page-sticky-rail-inner {
  height: 1px;
}

.resource-page-sticky-rail::-webkit-scrollbar {
  height: 14px;
}

.resource-page-sticky-rail::-webkit-scrollbar-track {
  background-color: rgba(var(--bs-body-color-rgb), 0.12);
  border-radius: 999px;
}

.resource-page-sticky-rail::-webkit-scrollbar-thumb {
  background-color: rgba(var(--bs-body-color-rgb), 0.46);
  border: 3px solid var(--bs-card-bg, var(--bs-body-bg));
  border-radius: 999px;
}

.resource-page-sticky-rail::-webkit-scrollbar-thumb:hover {
  background-color: rgba(var(--bs-body-color-rgb), 0.62);
}

.resource-page-table-scroll.is-header-stuck .resource-page-resizable-table > thead > tr > th {
  background-color: var(--admin-table-header-stuck-bg) !important;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.16);
  color: var(--admin-table-header-stuck-color);
}

.resource-page-table-scroll.is-header-stuck .admin-resizable-col-resize::before {
  background-color: rgba(255, 255, 255, 0.52);
}

.resource-page-table-scroll .resource-page-resizable-table.resource-table-nowrap {
  table-layout: fixed;
  width: max-content;
  min-width: max-content;
}

.resource-page-table-scroll .resource-page-resizable-table.resource-table-nowrap th,
.resource-page-table-scroll .resource-page-resizable-table.resource-table-nowrap td {
  max-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resource-page-sticky-header.resource-page-table-scroll .resource-page-resizable-table.resource-table-nowrap > thead > tr > th {
  background-color: var(--admin-table-header-stuck-bg) !important;
  color: var(--admin-table-header-stuck-color) !important;
  font-weight: 700;
  max-width: none !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-page-sticky-rail.resource-page-sticky-rail {
  scrollbar-width: auto !important;
}

.resource-page-table-scroll .resource-page-resizable-table.resource-table-nowrap td.resource-cell-wrap,
.resource-page-table-scroll .resource-page-resizable-table.resource-table-nowrap th.resource-cell-wrap {
  max-width: none;
  white-space: normal;
  overflow: visible;
  text-overflow: initial;
}

.resource-page-table-scroll .resource-page-resizable-table.resource-table-nowrap th.resource-page-fill-cell,
.resource-page-table-scroll .resource-page-resizable-table.resource-table-nowrap td.resource-page-fill-cell {
  max-width: none;
  min-width: 0;
  width: auto;
  padding-left: 0;
  padding-right: 0;
}

.resource-page-col-header,
.report-log-col-header,
.admin-resizable-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
  width: 100%;
}

.resource-page-col-header-label,
.report-log-col-header-label,
.admin-resizable-col-header-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-page-col-resize,
.report-log-col-resize,
.admin-resizable-col-resize {
  position: relative;
  flex: 0 0 0.75rem;
  width: 0.75rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: col-resize;
  opacity: 0.45;
}

.resource-page-col-resize::before,
.report-log-col-resize::before,
.admin-resizable-col-resize::before {
  content: '';
  position: absolute;
  top: 0.1rem;
  bottom: 0.1rem;
  left: 50%;
  width: 1px;
  background-color: var(--bs-border-color);
  transform: translateX(-50%);
}

.resource-page-col-resize:hover,
.resource-page-col-resize:focus-visible,
.report-log-col-resize:hover,
.report-log-col-resize:focus-visible,
.admin-resizable-col-resize:hover,
.admin-resizable-col-resize:focus-visible {
  opacity: 1;
  outline: 0;
}

.resource-page-col-resize:hover::before,
.resource-page-col-resize:focus-visible::before,
.report-log-col-resize:hover::before,
.report-log-col-resize:focus-visible::before,
.admin-resizable-col-resize:hover::before,
.admin-resizable-col-resize:focus-visible::before {
  background-color: var(--bs-primary);
}

body.is-resizing-columns,
body.is-resizing-columns * {
  cursor: col-resize !important;
  user-select: none !important;
}

/* ===========================================================================
   Colunas fixas (pin) das resource lists
   O pin e por prefixo: fixar a coluna N congela as colunas ate ela. O
   deslocamento de cada coluna chega em --pin-left, escrito pelo JS, porque as
   larguras sao redimensionaveis e persistidas por usuario.
   =========================================================================== */
.admin-resizable-col-header--pinnable .admin-resizable-col-header-label {
  flex: 1 1 auto;
}

.admin-resizable-col-pin {
  position: relative;
  flex: 0 0 1rem;
  width: 1rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  line-height: 1;
  font-size: 0.78rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s linear, color 0.12s linear;
}

/* discreto por padrao: aparece ao percorrer o header e fica sempre visivel
   depois de fixado, para nao poluir com dez alfinetes o tempo todo */
.admin-resizable-col-header:hover .admin-resizable-col-pin,
.admin-resizable-col-pin:focus-visible {
  opacity: 0.65;
}

/* precisa casar a especificidade da regra de hover do cabecalho acima (0,3,0),
   senao o alfinete ja fixado escurece para 0.65 assim que o mouse entra no
   cabecalho e nunca chega a 1 */
.admin-resizable-col-header .admin-resizable-col-pin:hover,
.admin-resizable-col-header .admin-resizable-col-pin.is-pinned {
  opacity: 1;
}

.admin-resizable-col-pin.is-pinned {
  color: var(--bs-primary);
}

.admin-resizable-col-pin:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 1px;
  border-radius: 2px;
}

.admin-resizable-col-pin[aria-disabled="true"] {
  cursor: not-allowed;
}

.admin-resizable-col-header:hover .admin-resizable-col-pin[aria-disabled="true"] {
  opacity: 0.25;
}

@media (prefers-reduced-motion: reduce) {
  .admin-resizable-col-pin {
    transition: none;
  }
}

.resource-page-table-scroll .resource-page-resizable-table > thead > tr > th.is-pinned-col {
  position: sticky;
  left: var(--pin-left, 0px);
  z-index: 8;
}

.resource-page-table-scroll .resource-page-resizable-table > tbody > tr > td.is-pinned-col,
.resource-page-table-scroll .resource-page-resizable-table > tfoot > tr > td.is-pinned-col {
  position: sticky;
  left: var(--pin-left, 0px);
  z-index: 3;
  /* fundo opaco: sem ele as colunas moveis apareceriam por baixo ao rolar.
     box-shadow fica intocado para o hover do Bootstrap continuar valendo */
  background-color: var(--report-table-bg, #fff);
}

/* linha de congelamento: so existe quando ha conteudo escondido atras dela */
.resource-page-table-scroll .resource-page-resizable-table > thead > tr > th.is-pinned-edge::after,
.resource-page-table-scroll .resource-page-resizable-table > tbody > tr > td.is-pinned-edge::after,
.resource-page-table-scroll .resource-page-resizable-table > tfoot > tr > td.is-pinned-edge::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 2px;
  /* derivado da cor de texto do tema: --bs-border-color desaparece no dark */
  background-color: rgba(var(--bs-body-color-rgb), 0.3);
  opacity: 0;
  transition: opacity 0.12s linear;
  pointer-events: none;
}

.resource-page-table-scroll.is-pin-scrolled .resource-page-resizable-table > thead > tr > th.is-pinned-edge::after,
.resource-page-table-scroll.is-pin-scrolled .resource-page-resizable-table > tbody > tr > td.is-pinned-edge::after,
.resource-page-table-scroll.is-pin-scrolled .resource-page-resizable-table > tfoot > tr > td.is-pinned-edge::after {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .resource-page-table-scroll .resource-page-resizable-table > thead > tr > th.is-pinned-edge::after,
  .resource-page-table-scroll .resource-page-resizable-table > tbody > tr > td.is-pinned-edge::after,
  .resource-page-table-scroll .resource-page-resizable-table > tfoot > tr > td.is-pinned-edge::after {
    transition: none;
  }
}

/* ---------------------------------------------------------------------------
   Coluna de acoes ancorada a direita
   Nao e pinavel: acoes sao controle, nao dado. A ancora nao e right:0 porque
   existe uma coluna invisivel de preenchimento depois dela; --pin-right traz a
   largura dessa coluna (0 sempre que ha scroll horizontal).
   --------------------------------------------------------------------------- */
.resource-page-table-scroll .resource-page-resizable-table > thead > tr > th.is-sticky-actions {
  position: sticky;
  right: var(--pin-right, 0px);
  z-index: 8;
}

.resource-page-table-scroll .resource-page-resizable-table > tbody > tr > td.is-sticky-actions,
.resource-page-table-scroll .resource-page-resizable-table > tfoot > tr > td.is-sticky-actions {
  position: sticky;
  right: var(--pin-right, 0px);
  z-index: 3;
  background-color: var(--report-table-bg, #fff);
}

.resource-page-table-scroll .resource-page-resizable-table > thead > tr > th.is-sticky-actions::before,
.resource-page-table-scroll .resource-page-resizable-table > tbody > tr > td.is-sticky-actions::before,
.resource-page-table-scroll .resource-page-resizable-table > tfoot > tr > td.is-sticky-actions::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 2px;
  background-color: rgba(var(--bs-body-color-rgb), 0.3);
  opacity: 0;
  transition: opacity 0.12s linear;
  pointer-events: none;
}

/* simetrico ao da esquerda: a linha aparece enquanto sobrar coluna escondida */
.resource-page-table-scroll.is-pin-scrolled-end .resource-page-resizable-table > thead > tr > th.is-sticky-actions::before,
.resource-page-table-scroll.is-pin-scrolled-end .resource-page-resizable-table > tbody > tr > td.is-sticky-actions::before,
.resource-page-table-scroll.is-pin-scrolled-end .resource-page-resizable-table > tfoot > tr > td.is-sticky-actions::before {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .resource-page-table-scroll .resource-page-resizable-table > thead > tr > th.is-sticky-actions::before,
  .resource-page-table-scroll .resource-page-resizable-table > tbody > tr > td.is-sticky-actions::before,
  .resource-page-table-scroll .resource-page-resizable-table > tfoot > tr > td.is-sticky-actions::before {
    transition: none;
  }
}

/* No header clonado a tabela inteira e deslocada por transform, entao nao ha
   scroll container e position:sticky nao vale. As colunas fixas voltam ao
   lugar com o transform inverso (--pin-shift = scrollLeft do wrapper).
   Especificidade acima da regra sticky porque o clone carrega as duas classes. */
.resource-page-sticky-header.resource-page-table-scroll .resource-page-resizable-table > thead > tr > th.is-pinned-col {
  position: relative;
  left: auto;
  z-index: 8;
  transform: translateX(var(--pin-shift, 0px));
}

/* acoes ancoram pela direita: o deslocamento e medido do fim do scroll */
.resource-page-sticky-header.resource-page-table-scroll .resource-page-resizable-table > thead > tr > th.is-sticky-actions {
  position: relative;
  right: auto;
  z-index: 8;
  transform: translateX(var(--pin-shift-end, 0px));
}

/* ---------------------------------------------------------------------------
   Acoes em tela estreita: colapsam no botao de tres pontos
   --------------------------------------------------------------------------- */
/* precisa vencer .table-action-btn.btn (0,2,0), que define display:inline-flex */
.table-action-bar > .table-action-sheet-toggle.btn {
  display: none;
}

@media (max-width: 767.98px) {
  /* so esconde os botoes reais depois que o JS montou o substituto
     (data-action-sheet-ready); sem isso, um JS que nao roda deixaria a coluna
     de acoes vazia no celular. Mesmo gating do .has-floating-frames */
  .resource-page-table-scroll .table-action-bar[data-action-sheet-ready="true"] > *:not(.table-action-sheet-toggle) {
    display: none;
  }

  .resource-page-table-scroll .table-action-bar[data-action-sheet-ready="true"] > .table-action-sheet-toggle.btn {
    display: inline-flex;
  }

  /* em 56px o rotulo so caberia truncado ("A.."); cabecalho vazio le melhor
     que uma palavra cortada, e a coluna nao e redimensionavel colapsada */
  .resource-page-table-scroll .resource-page-resizable-table > thead > tr > th.is-sticky-actions .admin-resizable-col-header-label,
  .resource-page-table-scroll .resource-page-resizable-table > thead > tr > th.is-sticky-actions .admin-resizable-col-resize {
    display: none;
  }
}

.table-action-sheet {
  height: auto;
  max-height: 80vh;
}

.table-action-sheet .offcanvas-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-action-sheet .offcanvas-body {
  padding-top: 0;
}

.table-action-sheet .list-group-item {
  display: flex;
  align-items: center;
  /* alvo de toque confortavel: o padrao do list-group fica em ~40px */
  min-height: 48px;
  border-left: 0;
  border-right: 0;
}

.resource-page-empty {
  padding: 3rem 1.5rem;
  text-align: center;
}

.resource-page-empty-icon {
  width: 4rem;
  height: 4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(var(--bs-primary-rgb), 0.08);
  color: var(--bs-primary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.resource-page-empty-body {
  max-width: 34rem;
  margin: 0 auto;
  color: var(--bs-secondary-color);
}

.admin-modal-shell {
  border: 0;
}

.admin-modal-heading {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.admin-modal-subtitle {
  color: var(--bs-secondary-color);
  font-size: 0.925rem;
}

.admin-modal-scope {
  margin-bottom: 1rem;
}

.admin-modal-scope-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.admin-modal-scope-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(var(--bs-body-color-rgb), 0.08);
  border-radius: 0.9rem;
  background: rgba(var(--bs-primary-rgb), 0.04);
}

.admin-modal-scope-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

.admin-modal-scope-value {
  font-weight: 600;
  line-height: 1.35;
}

.admin-modal-section + .admin-modal-section {
  margin-top: 1rem;
}

.admin-modal-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin-bottom: 0.75rem;
}

.admin-modal-inline-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(var(--bs-body-color-rgb), 0.08);
  border-radius: 0.9rem;
}

.admin-modal-inline-status-copy {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.offer-group-summary {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.offer-group-summary-item {
  font-size: 0.875rem;
  line-height: 1.3;
}

.offer-group-editor-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.offer-group-editor-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(var(--bs-body-color-rgb), 0.08);
  border-radius: 0.9rem;
  background: rgba(var(--bs-primary-rgb), 0.03);
}

.offer-group-editor-item-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.offer-group-editor-position {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

.offer-group-editor-meta {
  color: var(--bs-secondary-color);
  font-size: 0.875rem;
}

.offer-group-editor-empty {
  padding: 1rem 1.1rem;
  border: 1px dashed rgba(var(--bs-body-color-rgb), 0.12);
  border-radius: 0.9rem;
  background: rgba(var(--bs-body-color-rgb), 0.02);
}

@media (max-width: 991.98px) {
  .resource-page-header {
    padding: 0;
  }

  .resource-page-header-actions {
    width: 100%;
  }

  .resource-page-header-actions > * {
    flex: 1 1 auto;
  }
}

.admin-filter-fab {
  align-items: center;
  background: var(--admin-filter-fab-bg);
  border: 0;
  border-radius: 0.45rem 0 0 0.45rem;
  box-shadow: 0 0.35rem 1rem rgba(var(--bs-black-rgb), 0.18);
  color: var(--admin-filter-fab-color);
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  font-size: 0.7rem;
  font-weight: 700;
  gap: 0.25rem;
  letter-spacing: 0;
  line-height: 1;
  opacity: 0;
  padding: 0.65rem 0.45rem;
  pointer-events: none;
  position: fixed;
  right: 0;
  top: 50%;
  transform: translate(100%, -50%);
  transition: opacity 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
  z-index: 1018;
}

.admin-filter-fab.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, -50%);
}

.admin-filter-fab:hover,
.admin-filter-fab:focus-visible {
  background: var(--bs-primary);
  color: #fff;
}

.admin-filter-fab:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 0.18rem rgba(59, 125, 221, 0.25);
}

.admin-filter-fab .bi {
  font-size: 1rem;
  line-height: 1;
}

.admin-filter-offcanvas {
  --bs-offcanvas-width: min(420px, 92vw);
}

.admin-filter-offcanvas .offcanvas-title {
  font-size: 1rem;
  font-weight: 700;
}

.admin-filter-offcanvas .admin-filter-sidebar-form {
  margin: 0;
}

.admin-filter-offcanvas .admin-filter-sidebar-form.row {
  margin-left: 0;
  margin-right: 0;
  row-gap: 1rem;
}

.admin-filter-offcanvas .admin-filter-sidebar-form.row > [class*="col-"] {
  flex: 0 0 100%;
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
  width: 100%;
}

.admin-filter-offcanvas .admin-filter-sidebar-form .btn[type="submit"] {
  width: 100%;
}

.admin-filter-offcanvas .form-label {
  color: var(--bs-secondary-color);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

@media (max-width: 575.98px) {
  .admin-filter-fab {
    top: auto;
    bottom: 1rem;
    transform: translateX(100%);
  }

  .admin-filter-fab.is-visible {
    transform: translateX(0);
  }
}
body[data-theme="dark"] .dashboard-highlight-card {
  background: #2a2d33;
  border-color: rgba(255, 255, 255, 0.06);
}

@media (max-width: 1199.98px) {
  .dashboard-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .dashboard-kpi-value { font-size: 1.45rem; }
  .dashboard-performance-chart { min-height: 16rem; }
}

@media (max-width: 575.98px) {
  .dashboard-highlights {
    grid-template-columns: 1fr;
  }
}


.trk-loading {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, visibility .18s ease;
}

.trk-loading.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
