/* ============================================================
   PRIMETOUR — Components CSS
   Reusable UI Components
   ============================================================ */

/* ─── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-ui);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  line-height: 1;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 1rem;
}

.btn-icon {
  padding: 10px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
}

.btn-icon.btn-sm {
  padding: 8px;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
}

/* Primary - Gold (DS v2 §5.1 — texto navy obrigatório, WCAG AAA 10,5:1) */
.btn-primary {
  background: linear-gradient(135deg, var(--brand-gold-dark), var(--brand-gold));
  color: var(--on-gold);
  border-color: transparent;
  font-weight: 600;
}

.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 16px var(--gold-border);
  transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); }

/* Secondary */
.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-default);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--border-accent);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Danger (DS v2 §4.4 — sempre filled, comunica perigo claramente) */
.btn-danger {
  background: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
}

.btn-danger:hover {
  filter: brightness(1.08);
}

/* Success */
.btn-success {
  background: var(--color-success-bg);
  color: var(--color-success);
  border-color: rgba(34,197,94,0.25);
}

.btn-success:hover {
  background: var(--color-success);
  color: white;
}

/* Loading state */
.btn.loading {
  color: transparent;
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  /* v4.81.15 — spin-centered preserva o translate(-50%,-50%) de centragem
     (keyframe em auth.css). O `spin` global virou rotação pura; este ::after é
     absoluto/centralizado, então precisa do keyframe com translate. */
  animation: spin-centered 0.7s linear infinite;
}

.btn-primary.loading::after {
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: #0A1628;
}

/* ─── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.card-body {
  padding: var(--space-6);
}

.card-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-subtle);
  background: rgba(0,0,0,0.1);
}

/* Stat Card */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-gold-dark), var(--brand-gold));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.stat-card:hover { border-color: var(--border-accent); }
.stat-card:hover::before { opacity: 1; }

.stat-card-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.stat-card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stat-card-trend {
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.trend-up   { color: var(--color-success); }
.trend-down { color: var(--color-danger); }
.trend-flat { color: var(--text-muted); }

.stat-card-icon {
  position: absolute;
  right: var(--space-5);
  top: var(--space-5);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

/* ─── BADGES ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-admin   { background: rgba(167,139,250,0.15); color: var(--role-admin); border: 1px solid rgba(167,139,250,0.25); }
.badge-manager { background: rgba(56,189,248,0.15);  color: var(--role-manager); border: 1px solid rgba(56,189,248,0.25); }
.badge-member  { background: rgba(52,211,153,0.15);  color: var(--role-member); border: 1px solid rgba(52,211,153,0.25); }

.badge-success { background: var(--color-success-bg); color: var(--color-success); border: 1px solid rgba(34,197,94,0.25); }
.badge-warning { background: var(--color-warning-bg); color: var(--color-warning); border: 1px solid rgba(245,158,11,0.25); }
.badge-danger  { background: var(--color-danger-bg);  color: var(--color-danger);  border: 1px solid rgba(239,68,68,0.25); }
.badge-info    { background: var(--color-info-bg);    color: var(--color-info);    border: 1px solid rgba(56,189,248,0.25); }
.badge-neutral { background: rgba(255,255,255,0.06);  color: var(--text-secondary); border: 1px solid var(--border-subtle); }

/* ─── AVATAR ──────────────────────────────────────────────── */
.avatar {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
  font-size: 0.8125rem;
  position: relative;       /* 4.34+ pra que <img> com position:absolute funcione */
  overflow: hidden;          /* 4.34+ pra que crop circular respeite o border-radius */
}

/* 4.34+ Foto do user (Microsoft Graph) cobre o background color quando carrega.
 * Se onerror dispara, o img é hidden e o conteúdo de texto (iniciais) volta a aparecer. */
.avatar > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.avatar-sm  { width: 28px; height: 28px; font-size: 0.6875rem; }
.avatar-md  { width: 36px; height: 36px; font-size: 0.8125rem; }
.avatar-lg  { width: 44px; height: 44px; font-size: 1rem; }
.avatar-xl  { width: 56px; height: 56px; font-size: 1.125rem; }
.avatar-xxl { width: 72px; height: 72px; font-size: 1.5rem; }

.avatar-group {
  display: flex;
}

.avatar-group .avatar {
  border: 2px solid var(--bg-card);
  margin-left: -8px;
}

.avatar-group .avatar:first-child { margin-left: 0; }

/* ─── DATA TABLE ──────────────────────────────────────────── */
.data-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead {
  background: var(--bg-surface);
}

.data-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color var(--transition-fast);
}

.data-table thead th:hover { color: var(--text-primary); }
.data-table thead th .sort-icon { margin-left: 4px; opacity: 0.5; }
.data-table thead th.sorted { color: var(--brand-gold); }
.data-table thead th.sorted .sort-icon { opacity: 1; }

.data-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-fast);
}

.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg-hover); }

.data-table tbody td {
  padding: 14px 16px;
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table .col-actions {
  width: 100px;
  text-align: right;
}

.data-table .actions-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-1);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.data-table tbody tr:hover .actions-group { opacity: 1; }

/* ─── SEARCH & FILTER BAR ─────────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}

.toolbar-search {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 380px;
}

.toolbar-search-input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  transition: all var(--transition-fast);
}

.toolbar-search-input:focus {
  border-color: var(--brand-gold);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 3px rgba(212,168,67,0.08);
}

.toolbar-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.9rem;
}

.toolbar-filter {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.filter-select {
  padding: 8px 32px 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-family: var(--font-ui);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238899B8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: all var(--transition-fast);
}

.filter-select:focus {
  border-color: var(--brand-gold);
  color: var(--text-primary);
}

/* Inputs and textareas don't need the dropdown arrow */
input.filter-select,
textarea.filter-select {
  background-image: none;
  padding-right: 12px;
  cursor: text;
  color: var(--text-primary);
}

/* Portal editor field style — same look as filter-select but no arrow */
.portal-field {
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: var(--font-ui);
  outline: none;
  width: 100%;
  transition: border-color 0.15s;
}
.portal-field:focus { border-color: var(--brand-gold); }
textarea.portal-field { resize: vertical; }

/* Portal area picker */
.portal-area-cat {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; padding: 10px 8px; border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md); background: transparent; cursor: pointer;
  transition: all 0.15s; min-height: 68px; width: 100%;
  font-size: 0.8125rem; color: var(--text-secondary);
}
.portal-area-cat:hover { border-color: var(--brand-gold); color: var(--text-primary); }
.portal-area-cat.selected { border-color: var(--brand-gold); background: rgba(212,168,67,0.10); color: var(--brand-gold); }
.portal-area-cat .cat-chevron { font-size: 0.625rem; color: var(--text-muted); }

.portal-area-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
  background: transparent; cursor: pointer; transition: all 0.15s; width: 100%;
  font-size: 0.8125rem; color: var(--text-secondary);
}
.portal-area-item:hover { border-color: var(--brand-gold); color: var(--text-primary); background: var(--bg-surface); }
.portal-area-item.selected { border-color: var(--brand-gold); background: rgba(212,168,67,0.10); color: var(--brand-gold); font-weight: 600; }

/* ─── MODAL ───────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: scaleIn 0.2s ease;
  box-shadow: var(--shadow-xl);
}

.modal-sm { max-width: 420px; }
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 960px; }

.modal-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  width: 38px;
  height: 38px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border-color: rgba(239,68,68,0.25);
}

.modal-body {
  padding: var(--space-6);
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* ─── TOAST NOTIFICATIONS ─────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-xl);
  min-width: 280px;
  max-width: 400px;
  pointer-events: all;
  animation: slideInRight 0.3s ease;
  transition: all 0.3s ease;
}

.toast.removing {
  opacity: 0;
  transform: translateX(20px);
}

.toast-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.toast-message {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: color var(--transition-fast);
}

.toast-close:hover { color: var(--text-primary); }

.toast-success .toast-icon { background: var(--color-success-bg); color: var(--color-success); }
.toast-error   .toast-icon { background: var(--color-danger-bg);  color: var(--color-danger); }
.toast-warning .toast-icon { background: var(--color-warning-bg); color: var(--color-warning); }
.toast-info    .toast-icon { background: var(--color-info-bg);    color: var(--color-info); }

/* ─── PROGRESS BAR ────────────────────────────────────────── */
.progress {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--brand-gold-dark), var(--brand-gold));
  transition: width var(--transition-slow);
}

.progress-bar.success { background: var(--color-success); }
.progress-bar.warning { background: var(--color-warning); }
.progress-bar.danger  { background: var(--color-danger); }

/* ─── DROPDOWN MENU ───────────────────────────────────────── */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: fixed;
  top: auto;
  right: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  z-index: 1000;
  animation: scaleIn 0.15s ease;
  transform-origin: top right;
  overflow: hidden;
}

.dropdown-menu.left {
  right: auto;
  left: 0;
  transform-origin: top left;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 14px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-ui);
}

.dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.dropdown-item.danger {
  color: var(--color-danger);
}

.dropdown-item.danger:hover {
  background: var(--color-danger-bg);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 0;
}

/* ─── TOGGLE SWITCH ───────────────────────────────────────── */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider {
  background: rgba(212,168,67,0.2);
  border-color: var(--brand-gold);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
  background: var(--brand-gold);
}

/* ─── FORM SELECT ─────────────────────────────────────────── */
.form-select {
  width: 100%;
  padding: 12px 36px 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-family: var(--font-ui);
  outline: none;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238899B8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: all var(--transition-fast);
}

.form-select:focus {
  border-color: var(--brand-gold);
  box-shadow: 0 0 0 3px rgba(212,168,67,0.12);
}

/* ─── TEXTAREA ────────────────────────────────────────────── */
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-family: var(--font-ui);
  outline: none;
  resize: vertical;
  min-height: 100px;
  transition: all var(--transition-fast);
  line-height: 1.6;
}

.form-textarea:focus {
  border-color: var(--brand-gold);
  box-shadow: 0 0 0 3px rgba(212,168,67,0.12);
}

/* ─── DATE/TIME INPUTS — picker visível em todas as paletas (v4.57.14) ─────
   v4.57.7: cobria só [data-theme="light"] (que só vale no portal). O app
   principal usa [data-palette="..."] — palettes claras (platinum, sand)
   ficavam com color-scheme:dark default → picker branco em fundo branco =
   invisível. Renê: "picker calendário em lembretes está em branco qdo a
   paleta é clara... precisa ter essa diferenciação pensando nas multiplas
   paletas de cores do sistema".

   Estratégia: default dark (cobre 7 das 9 palettes do app + portal padrão);
   override explícito pra TODAS as paletas claras + theme="light" do portal. */
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="month"] {
  cursor: pointer;
  color-scheme: dark;
}

/* Light palettes do app principal (base.css define): platinum + sand */
:root[data-palette="platinum"] input[type="date"],
:root[data-palette="platinum"] input[type="datetime-local"],
:root[data-palette="platinum"] input[type="time"],
:root[data-palette="platinum"] input[type="month"],
:root[data-palette="sand"] input[type="date"],
:root[data-palette="sand"] input[type="datetime-local"],
:root[data-palette="sand"] input[type="time"],
:root[data-palette="sand"] input[type="month"],
/* Portal solicitar.html — toggle via data-theme */
[data-theme="light"] input[type="date"],
[data-theme="light"] input[type="datetime-local"],
[data-theme="light"] input[type="time"],
[data-theme="light"] input[type="month"] {
  color-scheme: light;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s;
}
input[type="date"]:hover::-webkit-calendar-picker-indicator,
input[type="datetime-local"]:hover::-webkit-calendar-picker-indicator,
input[type="time"]:hover::-webkit-calendar-picker-indicator,
input[type="month"]:hover::-webkit-calendar-picker-indicator {
  opacity: 1;
}

/* ─── PAGINATION ──────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  justify-content: center;
  margin-top: var(--space-5);
}

.pagination-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
  transition: all var(--transition-fast);
  font-family: var(--font-ui);
}

.pagination-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.pagination-btn.active {
  background: rgba(212,168,67,0.15);
  color: var(--brand-gold);
  border-color: rgba(212,168,67,0.3);
  font-weight: 600;
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ─── TABS ────────────────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  gap: 0;
  margin-bottom: var(--space-6);
}

.tab-btn {
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-ui);
  white-space: nowrap;
  margin-bottom: -1px;
}

.tab-btn:hover { color: var(--text-secondary); }

.tab-btn.active {
  color: var(--brand-gold);
  border-bottom-color: var(--brand-gold);
}

/* ─── CONFIRMATION DIALOG ─────────────────────────────────── */
.confirm-dialog {
  text-align: center;
  padding: var(--space-4);
}

.confirm-icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
}

/* ─── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .modal-overlay .modal-container {
    width: 95vw !important;
    max-width: 95vw !important;
    max-height: 90vh;
    margin: 5vh auto;
  }

  .modal-footer {
    flex-direction: column;
    gap: var(--space-2);
  }

  .modal-footer .btn { width: 100%; }

  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar .filter-select,
  .filter-bar .filter-input {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .btn { padding: 8px 14px; font-size: 0.8125rem; }
  .badge { font-size: 0.625rem; padding: 2px 6px; }
  .tab-btn { padding: 8px 12px; font-size: 0.8125rem; }
}

.confirm-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.confirm-message {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── Role badges ─────────────────────────────────────────── */
.badge-role-admin   { background: rgba(167,139,250,0.12); color: var(--role-admin);   border: 1px solid rgba(167,139,250,0.25); }
.badge-role-manager { background: rgba(56,189,248,0.12);  color: var(--role-manager); border: 1px solid rgba(56,189,248,0.25);  }
.badge-role-member  { background: rgba(34,197,94,0.12);   color: var(--role-member);  border: 1px solid rgba(34,197,94,0.25);   }

/* ─── Section headers com accent ─────────────────────────── */
.section-accent {
  position: relative;
  padding-left: 14px;
}
.section-accent::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 3px;
  border-radius: 3px;
  background: var(--brand-gold);
}
.section-accent.accent-success::before { background: var(--color-success); }
.section-accent.accent-info::before    { background: var(--color-info); }
.section-accent.accent-warning::before { background: var(--color-warning); }
.section-accent.accent-danger::before  { background: var(--color-danger); }

/* ─── Cards com borda colorida lateral ───────────────────── */
.card-accent-left {
  border-left: 3px solid var(--brand-gold);
}
.card-accent-left.accent-success { border-left-color: var(--color-success); }
.card-accent-left.accent-info    { border-left-color: var(--color-info); }
.card-accent-left.accent-warning { border-left-color: var(--color-warning); }
.card-accent-left.accent-danger  { border-left-color: var(--color-danger); }

/* ─── Elevated surface (mais destaque que card) ──────────── */
.surface-elevated {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
}

/* ─── Glass-style surface ────────────────────────────────── */
.surface-glass {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
}

/* Spinner inline genérico (B2 — feedback de adicionar membro) */
@keyframes spin-inline {
  to { transform: rotate(360deg); }
}
.spinner-inline {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-default);
  border-top-color: var(--brand-gold);
  border-radius: 50%;
  animation: spin-inline 0.7s linear infinite;
  vertical-align: middle;
}
