/* ============================================================
   Pool Design Admin — Design System
   Fonte: DM Sans (Google Fonts)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ── Variáveis ───────────────────────────────────────────────── */

:root {
  /* Backgrounds */
  --bg:           #FAFAF9;
  --bg2:          #F1EFE8;
  --bg3:          #FFFFFF;

  /* Bordas */
  --border:       rgba(0,0,0,0.10);
  --border2:      rgba(0,0,0,0.18);

  /* Texto */
  --text:         #1A1A18;
  --text2:        #5F5E5A;
  --text3:        #9B9A96;

  /* Cores semânticas */
  --blue:         #185FA5;
  --blue-light:   #E6F1FB;
  --blue-mid:     #B5D4F4;
  --teal:         #0F6E56;
  --teal-light:   #E1F5EE;
  --amber:        #BA7517;
  --amber-light:  #FAEEDA;
  --red:          #A32D2D;
  --red-light:    #FCEBEB;
  --green:        #3B6D11;
  --green-light:  #EAF3DE;
  --gray-light:   #F1EFE8;

  /* Border radius */
  --r-md: 8px;
  --r-lg: 12px;
}

/* ── Reset e base ────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Shell / Layout ──────────────────────────────────────────── */

.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.app-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
}

/* ── Topbar ──────────────────────────────────────────────────── */

.topbar {
  display: flex;
  align-items: center;
  background: #829579;
  border-bottom: 0.5px solid var(--border);
  flex-shrink: 0;
  height: 48px;
}

.topbar-logo {
  padding: 0 20px;
  border-right: 0.5px solid rgba(255,255,255,0.25);
  height: 48px;
  display: flex;
  align-items: center;
}

.topbar-logo img {
  height: 28px;
  width: auto;
  display: block;
}

.tab-btn {
  padding: 0 18px;
  height: 48px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text2);
  border-bottom: 2px solid transparent;
  transition: color 0.15s;
  font-family: 'DM Sans', sans-serif;
}

.tab-btn:hover { color: var(--text); background: var(--bg2); }
.tab-btn.active { color: var(--blue); border-bottom: 2px solid var(--blue); }

.topbar-notif {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #E24B4A;
  vertical-align: middle;
  margin-left: 4px;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  padding-right: 16px;
  gap: 8px;
}

.topbar-user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.topbar-user-name {
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.2;
}

.topbar-user-perfil {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.2;
}

.topbar .btn {
  color: #ffffff;
  border-color: rgba(255,255,255,0.4);
}

.topbar .btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.6);
}

/* ── Sidebar ─────────────────────────────────────────────────── */

.sidebar {
  width: 210px;
  background: var(--bg3);
  border-right: 0.5px solid var(--border);
  padding: 16px 0;
  flex-shrink: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  padding: 0 16px 14px;
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 8px;
}

.sidebar-logo-name { font-size: 14px; font-weight: 500; color: var(--text); }
.sidebar-logo-sub  { font-size: 11px; color: var(--text3); margin-top: 2px; }

.nav-section {
  padding: 10px 16px 4px;
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 500;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text2);
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: all 0.12s;
  text-decoration: none;
}

.nav-item:hover  { background: var(--bg2); color: var(--text); }
.nav-item.active { color: var(--blue); border-left: 2px solid var(--blue); background: var(--blue-light); }

.sidebar-footer {
  margin-top: auto;
  padding: 12px 16px;
  border-top: 0.5px solid var(--border);
}

/* ── Page header ─────────────────────────────────────────────── */

.page-header   { margin-bottom: 20px; }
.breadcrumb    { font-size: 12px; color: var(--text3); margin-bottom: 4px; }
.page-title    { font-size: 20px; font-weight: 500; color: var(--text); }
.page-sub      { font-size: 13px; color: var(--text2); margin-top: 4px; }

.page-actions  { display: flex; align-items: center; gap: 8px; }
.page-top      { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }

/* ── Botões ──────────────────────────────────────────────────── */

.btn {
  padding: 7px 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  cursor: pointer;
  border: 0.5px solid var(--border2);
  background: transparent;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  transition: all 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.btn:hover         { background: var(--bg2); }
.btn:disabled      { opacity: 0.45; cursor: not-allowed; }

.btn-primary       { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-primary:hover { background: #0C447C; border-color: #0C447C; }

.btn-danger        { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover  { background: #8B2020; border-color: #8B2020; }

.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 10px 20px; font-size: 14px; }

.btn-icon {
  padding: 6px;
  border-radius: var(--r-md);
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text2);
  transition: background 0.12s;
}
.btn-icon:hover { background: var(--bg2); color: var(--text); }

/* ── Badges ──────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}

.b-green   { background: var(--green-light); color: var(--green); }
.b-amber   { background: var(--amber-light); color: #854F0B; }
.b-red     { background: var(--red-light);   color: var(--red); }
.b-blue    { background: var(--blue-light);  color: var(--blue); }
.b-neutral { background: var(--gray-light);  color: var(--text2); }
.b-up      { background: var(--green-light); color: var(--green); }
.b-down    { background: var(--red-light);   color: var(--red); }

/* ── Level pills (níveis de profissional) ────────────────────── */

.lp   { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 500; }
.lp-b { background: #FAECE7; color: #993C1D; }
.lp-p { background: var(--gray-light); color: var(--text2); }
.lp-o { background: var(--amber-light); color: #854F0B; }
.lp-d { background: var(--blue-light);  color: var(--blue); }

/* ── Cards ───────────────────────────────────────────────────── */

.card {
  background: var(--bg3);
  border: 0.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin-bottom: 16px;
}

.card-title { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 14px; }
.card-0     { padding: 0; overflow: hidden; }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

/* ── Metric cards ────────────────────────────────────────────── */

.metric       { background: var(--bg2); border-radius: var(--r-md); padding: 14px 16px; }
.metric-label { font-size: 12px; color: var(--text2); margin-bottom: 5px; line-height: 1.4; }
.metric-value { font-size: 22px; font-weight: 500; color: var(--text); margin-bottom: 3px; }
.metric-sub   { font-size: 11px; color: var(--text3); margin-top: 3px; }

/* ── Tabelas ─────────────────────────────────────────────────── */

table               { width: 100%; border-collapse: collapse; font-size: 13px; }
th                  { text-align: left; padding: 9px 12px; font-weight: 500; color: var(--text2);
                      border-bottom: 0.5px solid var(--border); font-size: 12px; background: var(--bg2); }
td                  { padding: 10px 12px; color: var(--text); border-bottom: 0.5px solid var(--border); }
tr:last-child td    { border-bottom: none; }
tr:hover td         { background: var(--bg); }

.table-actions      { display: flex; gap: 6px; }

.th-ordenavel        { cursor: pointer; user-select: none; }
.th-ordenavel:hover  { background: var(--bg); }
.th-ordenavel-label  { display: inline-flex; align-items: center; gap: 4px; }
.th-ordenavel-icon   { font-size: 9px; color: var(--text3); }
.th-ordenavel-icon--ativo { color: var(--blue); }

.col-ano-atual      { background: var(--blue-light); }
th.col-ano-atual    { color: var(--blue); font-weight: 600; }
td.col-ano-atual .valor-ano { font-weight: 600; }
.cell-ano           { display: flex; align-items: center; gap: 6px; }
.var-none           { color: var(--text3); font-size: 11px; }
.th-periodo         { font-size: 10px; font-weight: 400; color: var(--text3); margin-top: 2px; }

/* ── Formulários ─────────────────────────────────────────────── */

.form-group    { margin-bottom: 16px; }
.form-label    { display: block; font-size: 12px; font-weight: 500; color: var(--text2); margin-bottom: 5px; }
.form-required { color: var(--red); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--r-md);
  border: 0.5px solid var(--border2);
  background: var(--bg3);
  color: var(--text);
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.12s;
}

.form-control:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(24,95,165,0.12);
}

.form-control::placeholder { color: var(--text3); }

.form-control:disabled {
  background: var(--bg2);
  color: var(--text3);
  cursor: not-allowed;
}

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

.form-hint    { font-size: 11px; color: var(--text3); margin-top: 4px; }
.form-error   { display: block; font-size: 12px; color: var(--red); margin-top: 4px; }

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
}

.form-check input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; }

/* ── Grids de layout ─────────────────────────────────────────── */

.grid5 { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; margin-bottom: 20px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-bottom: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-bottom: 20px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin-bottom: 20px; }

/* ── Bar charts ──────────────────────────────────────────────── */

.bar-row   { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; font-size: 12px; }
.bar-lbl   { width: 100px; color: var(--text2); text-align: right; flex-shrink: 0; font-size: 11px; }
.bar-track { flex: 1; background: var(--bg2); border-radius: 3px; height: 18px; overflow: hidden; }
.bar-fill  { height: 100%; border-radius: 3px; display: flex; align-items: center;
             padding: 0 7px; font-size: 11px; font-weight: 500; color: #fff; white-space: nowrap; }

/* ── Modais ──────────────────────────────────────────────────── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  /* override Bootstrap: position:fixed top:0 left:0 w:100% h:100% */
  display: block;
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  height: auto;
  overflow: visible;
  background: var(--bg3);
  border-radius: var(--r-lg);
  border: 0.5px solid var(--border);
  padding: 24px;
  min-width: 400px;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.modal--wide { max-width: 720px; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title  { font-size: 16px; font-weight: 500; color: var(--text); }

/* Modais de relatório (drilldown / perfil): cabeçalho mais compacto */
.modal--wide .modal-header { margin-bottom: 12px; }
.modal--wide .modal-title  { font-size: 14px; line-height: 1.2; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

.td-drilldown {
  cursor: pointer;
  color: var(--blue);
}
.td-drilldown:hover {
  color: var(--text);
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}

/* ── Alerts / mensagens ──────────────────────────────────────── */

.alert {
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  margin-bottom: 14px;
  border: 0.5px solid transparent;
}

.alert-success { background: var(--green-light); color: var(--green); border-color: #c3e6ae; }
.alert-error   { background: var(--red-light);   color: var(--red);   border-color: #f5c6c6; }
.alert-warning { background: var(--amber-light);  color: var(--amber); border-color: #f0d99a; }
.alert-info    { background: var(--blue-light);   color: var(--blue);  border-color: var(--blue-mid); }

/* ── Loading / empty states ──────────────────────────────────── */

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text3);
  font-size: 13px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  color: var(--text3);
  text-align: center;
}

.empty-state-title { font-size: 14px; font-weight: 500; color: var(--text2); margin-bottom: 4px; }
.empty-state-sub   { font-size: 13px; }

/* ── Paginação ───────────────────────────────────────────────── */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  border-top: 0.5px solid var(--border);
}

.pagination-info { font-size: 13px; color: var(--text2); }

/* ── Filtros / search bar ────────────────────────────────────── */

.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--border);
  background: var(--bg3);
}

.search-input {
  padding: 6px 10px 6px 30px;
  border-radius: var(--r-md);
  border: 0.5px solid var(--border2);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  width: 220px;
}

.search-input:focus {
  outline: none;
  border-color: var(--blue);
}

/* ── Utilitários ─────────────────────────────────────────────── */

.text-muted    { color: var(--text3); }
.text-secondary { color: var(--text2); }
.fw-medium     { font-weight: 500; }
.fs-sm         { font-size: 12px; }
.d-flex        { display: flex; }
.align-center  { align-items: center; }
.gap-8         { gap: 8px; }
.gap-4         { gap: 4px; }
.mt-8          { margin-top: 8px; }
.mb-16         { margin-bottom: 16px; }
.mb-4          { margin-bottom: 4px; }

/* ── Hamburger (mobile) ──────────────────────────────────────── */

.hamburger-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0 4px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text2);
  border-radius: var(--r-md);
  flex-shrink: 0;
  transition: background 0.12s;
}

.hamburger-btn:hover { background: var(--bg2); color: var(--text); }

/* ── Mobile overlay ──────────────────────────────────────────── */

#sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 99;
}

#sidebar-overlay.active { display: block; }

/* ── Sidebar logout item ─────────────────────────────────────── */

.sidebar-logout {
  border-left: none !important;
  background: none !important;
  color: var(--text3) !important;
  font-size: 12px !important;
}

.sidebar-logout:hover {
  background: var(--bg2) !important;
  color: var(--text2) !important;
}

/* ── Topbar tabs container ───────────────────────────────────── */

.topbar-tabs { display: flex; }

/* ── Tela de login ───────────────────────────────────────────── */

.login-shell {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.login-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo {
  height: auto;
  display: block;
  margin: 0 auto;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text2);
  margin-top: 4px;
}

.login-title { 
  font-size: 20px; 
  font-weight: 700; 
  color: var(--text-1); 
  margin-bottom: 6px; 
  text-align: center; 
}

.input-senha-wrap {
  position: relative;
}

.input-senha-wrap .form-control {
  padding-right: 40px;
}

.btn-toggle-senha {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text3);
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.12s;
}

.btn-toggle-senha:hover { color: var(--text2); }

.btn-login {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
  padding: 9px 14px;
  font-size: 14px;
}

.login-footer {
  text-align: center;
  margin-top: 20px;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: var(--text3);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: color 0.12s;
}

.link-btn:hover { color: var(--blue); text-decoration: underline; }

/* Spinner inline no botão */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Páginas de erro (acesso negado / sem permissões) ────────── */

.error-page-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 48px); /* desconta topbar */
  padding: 24px;
}

.error-page-card {
  background: var(--bg3);
  border: 0.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 48px 40px;
  text-align: center;
  max-width: 400px;
  width: 100%;
}

.error-page-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin-bottom: 20px;
}

.error-page-icon--red   { background: var(--red-light);   color: var(--red);   }
.error-page-icon--amber { background: var(--amber-light);  color: var(--amber); }

.error-page-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.error-page-desc {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 28px;
}

/* ── Galeria de fotos (perfil público do lojista) ───────────── */

.foto-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }

.foto-item {
  position: relative; width: 120px; height: 100px;
  border-radius: var(--r-md); overflow: hidden;
  border: 0.5px solid var(--border2);
  background: var(--bg2); cursor: grab;
}

.foto-item.dragging  { opacity: 0.4; }
.foto-item.drag-over { border: 2px dashed var(--blue); }
.foto-item img       { width: 100%; height: 100%; object-fit: cover; display: block; }

.foto-remove {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,0.6); color: #fff; border: none;
  border-radius: 50%; width: 22px; height: 22px;
  font-size: 12px; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
}

.foto-remove:hover { background: var(--red); }

.foto-add {
  width: 120px; height: 100px; border-radius: var(--r-md);
  border: 1.5px dashed var(--border2); background: var(--bg);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; cursor: pointer; color: var(--text3);
  font-size: 12px; gap: 4px; transition: all 0.12s;
}

.foto-add:hover    { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }
.foto-add:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* ── Responsive — mobile (<768px) ───────────────────────────── */

@media (max-width: 767px) {
  .hamburger-btn { display: flex; }

  .topbar-tabs { display: none; }

  .topbar-logo {
    border-right: none;
    flex: 1;
  }

  .sidebar {
    position: fixed;
    top: 48px;
    left: 0;
    bottom: 0;
    z-index: 100;
    transform: translateX(-210px);
    transition: transform 0.25s ease;
    box-shadow: none;
  }

  .sidebar.sidebar-open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.14);
  }

  .main-content { padding: 16px; }

  .grid5 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .grid4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid2 { grid-template-columns: 1fr; }
}

/* ── Relatórios ──────────────────────────────────────────────── */

.relatorios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.relatorio-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.relatorio-card:hover {
  border-color: var(--blue);
  box-shadow: 0 2px 8px rgba(24, 95, 165, 0.10);
  text-decoration: none;
}

.relatorio-card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-light);
  color: var(--blue);
  border-radius: 8px;
}

.relatorio-card-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
}

.relatorio-card-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.4;
}

.multi-check-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  background: var(--bg);
  min-width: 320px;
}

.multi-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  user-select: none;
  transition: background 0.1s;
}

.multi-check-item:hover { background: var(--bg2); }

.multi-check-item--checked {
  background: var(--blue-light);
  color: var(--blue);
}

.multi-check-item input[type="checkbox"] {
  accent-color: var(--blue);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.multi-check-item span:nth-child(2) {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.totais-card {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 32px;
  margin-bottom: 16px;
}

.totais-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  text-align: center;
}

.totais-label {
  font-size: 12px;
  color: var(--text2);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.totais-valor {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.totais-sep {
  width: 1px;
  height: 40px;
  background: var(--border);
  margin: 0 24px;
  flex-shrink: 0;
}

.text-right { text-align: right; }

.col-pontos { text-align: right; width: 100px; }
.col-data   { width: 150px; white-space: nowrap; }
.col-acao   { width: 60px; text-align: center; }
.col-tipo   { width: 130px; }

.btn-icon--danger {
  color: var(--red);
  background: transparent;
  border: none;
  padding: 4px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.btn-icon--danger:hover { background: var(--red-light); }

.detail-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text);
}

.detail-label {
  font-weight: 600;
  min-width: 110px;
  color: var(--text2);
}

/* ── Extrato por Profissional / Extrato por Lojista ─────────────────────── */

.extrato-resumo {
  margin-bottom: 16px;
}

.extrato-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.extrato-sep {
  color: var(--text3);
  font-weight: 400;
}

.extrato-tipo,
.extrato-registro {
  font-weight: 400;
  color: var(--text2);
}

.extrato-metricas {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.extrato-metrica {
  min-width: 120px;
}

.extrato-metrica-label {
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 4px;
}

.extrato-metrica-valor {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.extrato-proxima-faixa {
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.extrato-proxima-faltam {
  font-size: 12px;
  font-weight: 400;
  color: var(--text2);
}

.card-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 12px;
}

/* ── /extrato ────────────────────────────────────────────────────────────── */

/* ── Modal de Perfil do Profissional ────────────────────────────────────── */

.perfil-prof-header {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.perfil-prof-foto {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 0.5px solid var(--border);
  flex-shrink: 0;
  background: var(--bg2);
}

.perfil-prof-foto--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  color: var(--text2);
}

.perfil-prof-nome { font-size: 16px; font-weight: 600; color: var(--text); }
.perfil-prof-sub  { font-size: 13px; color: var(--text2); margin-top: 2px; }

.perfil-prof-campos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px 24px;
  margin-bottom: 20px;
}

.perfil-prof-campo {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.perfil-prof-campo-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
}

.perfil-prof-campo-valor {
  font-size: 14px;
  color: var(--text);
  overflow-wrap: anywhere;
}

/* ── /perfil-prof ────────────────────────────────────────────────────────── */

.aviso-destrutivo {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--red);
  font-weight: 500;
}

/* ── SelectBusca (combobox com busca) ─────────────────────── */

.sb-wrap        { position: relative; }
.sb-wrap .form-control { padding-right: 28px; }

.sb-wrap::after {
  content: "";
  position: absolute;
  right: 12px; top: 50%;
  width: 7px; height: 7px;
  border-right: 1.5px solid var(--text3);
  border-bottom: 1.5px solid var(--text3);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.sb-list {
  position: absolute; z-index: 200; left: 0; right: 0; top: calc(100% + 2px);
  background: var(--bg3); border: 0.5px solid var(--border2);
  border-radius: var(--r-md); box-shadow: 0 4px 16px rgba(0,0,0,.10);
  max-height: 220px; overflow-y: auto;
  padding: 4px 0; margin: 0; list-style: none;
}

.sb-item        { padding: 8px 12px; font-size: 13px; color: var(--text); cursor: pointer; }
.sb-item:hover  { background: var(--bg2); }
.sb-item--ativo { background: var(--blue-light); color: var(--blue); font-weight: 500; }
.sb-item--vazio { color: var(--text3); cursor: default; }

/* ── Barra de filtros dos relatórios — largura padrão ──────── */

.filtro-relatorio-bar .form-group {
  width: 200px;
  flex: 0 0 200px;
  margin-bottom: 0;
}

.filtro-relatorio-bar .form-group:has(input[type="date"]),
.filtro-relatorio-bar .form-group:has(input[type="month"]) {
  width: 120px;
  flex: 0 0 120px;
}

.filtro-relatorio-bar .form-group:has(select) {
  width: 140px;
  flex: 0 0 140px;
}

/* Checkbox no filtro: acompanha o texto e alinha com a base dos inputs */
.filtro-relatorio-bar .form-group--check {
  width: auto;
  flex: 0 0 auto;
  padding-bottom: 8px;
}

/* ── Exportar Excel ──────────────────────────────────────── */
.export-actions { display: flex; justify-content: center; padding: 16px 0 8px; }

.btn-exportar-excel {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  background: var(--bg3);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-exportar-excel:hover        { background: var(--bg2); }
.btn-exportar-excel--disabled    { opacity: 0.5; cursor: not-allowed; }

.exportar-spinner {
  width: 12px; height: 12px;
  border: 2px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: exportar-spin 0.7s linear infinite;
}
@keyframes exportar-spin { to { transform: rotate(360deg); } }
