:root {
  --sidebar: #0f172a;
  --bg: #ffffff;
  --text: #020617;
  --muted: #64748b;

  --primary: #6366f1;
  --primary-hover: #4f46e5;

  --card: rgba(255, 255, 255);
  --border: rgba(2, 6, 23, 0.118);

  --radius: 5px;

  --shadow-sm: 0 2px 6px rgba(2, 6, 23, 0.04);
  --shadow-md: 0 10px 25px rgba(2, 6, 23, 0.08);
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg) !important;
  color: var(--text) !important;
}

/* =========================
   HEADER & SIDEBAR (sem Bootstrap)
========================= */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: #0b1220;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  z-index: 50;
}

.app-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.app-badge {
  color: #fff;
  font-weight: 700;
  letter-spacing: .2px;
}

.app-header__right {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
}

.app-user__name {
  font-weight: 600;
}

.app-user__role {
  font-size: 12px;
  color: rgba(255, 255, 255, .7);
}

.app-sidebar {
  position: fixed;
  top: 64px;
  left: 0;
  bottom: 0;
  width: 240px;
  background: linear-gradient(180deg, #0f172a, #020617) !important;
  color: #fff;
  z-index: 40;
  overflow: auto;
  padding: 14px 12px;
}

.sidebar-collapsed .app-sidebar {
  width: 70px;
}

.sidebar-collapsed .app-sidebar .app-sidebar__section-title {
  display: none;
}

.sidebar-collapsed .app-sidebar .app-sidebar__link {
  text-align: center;
  font-size: 0;
}

.sidebar-collapsed .app-sidebar .app-sidebar__link i {
  font-size: 20px;
}

.app-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.app-sidebar__logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.app-sidebar__title {
  font-weight: 800;
}

.app-sidebar__nav,
.app-sidebar__section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.app-sidebar__section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.app-sidebar__section-title {
  font-size: 12px;
  color: rgba(255, 255, 255, .7);
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.app-sidebar__link {
  color: rgba(255, 255, 255, .88);
  text-decoration: none;
  padding: 10px 10px;
  border-radius: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all .2s ease;
}

.app-sidebar__link:hover {
  background: rgba(99, 102, 241, 0.15) !important;
  border-color: rgba(255, 255, 255, .12);
}

.app-sidebar__link.active {
  background: rgba(99, 102, 241, 0.25) !important;
}

.content {
  margin-top: 64px;
  margin-left: 240px;
  padding: 22px;
  transition: margin-left 0.2s ease;
}

.sidebar-collapsed .content {
  margin-left: 70px;
}

.content--no-chrome {
  margin-top: 0;
  margin-left: 0;
  padding: 22px;
}

/* =========================
   BOTÕES - VERSÃO MELHORADA (MAIS VIBRANTES)
========================= */
.btn {
  font-weight: 600 !important;
  padding: 10px 18px !important;
  font-size: 14px !important;
  border: none !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border-radius: 10px !important;
  position: relative !important;
  overflow: hidden !important;
  letter-spacing: 0.3px !important;
}

/* Efeito ripple ao clicar */
.btn::after {
  content: '' !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 0 !important;
  height: 0 !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.3) !important;
  transform: translate(-50%, -50%) !important;
  transition: width 0.4s, height 0.4s !important;
}

.btn:active::after {
  width: 200px !important;
  height: 200px !important;
}

.btn:hover {
  transform: translateY(-2px) !important;
  filter: brightness(1.05) saturate(1.1) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
}

.btn:active {
  transform: translateY(1px) !important;
  filter: brightness(0.95) !important;
}

.btn:focus,
.btn:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.35) !important;
}

/* ===== BOTÃO PRIMARY ===== */
.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%) !important;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4) !important;
}

/* ===== BOTÃO SUCCESS ===== */
.btn-success {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3) !important;
}

.btn-success:hover {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.4) !important;
}

/* ===== BOTÃO DANGER ===== */
.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4) !important;
}

/* ===== BOTÃO WARNING ===== */
.btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.4) !important;
}

/* ===== BOTÃO INFO ===== */
.btn-info {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3) !important;
}

.btn-info:hover {
  background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%) !important;
  box-shadow: 0 6px 16px rgba(8, 145, 178, 0.4) !important;
}

/* ===== BOTÃO SECONDARY ===== */
.btn-secondary {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3) !important;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #475569 0%, #334155 100%) !important;
  box-shadow: 0 6px 16px rgba(71, 85, 105, 0.4) !important;
}

/* ===== BOTÃO DARK ===== */
.btn-dark {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.3) !important;
}

.btn-dark:hover {
  background: linear-gradient(135deg, #0f172a 0%, #020617 100%) !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.4) !important;
}

/* ===== BOTÃO LIGHT ===== */
.btn-light {
  background: #f8fafc !important;
  color: #1e293b !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
}

.btn-light:hover {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08) !important;
}

/* ===== BOTÃO OUTLINE PRIMARY ===== */
.btn-outline-primary {
  background: transparent !important;
  border: 2px solid #6366f1 !important;
  color: #4f46e5 !important;
  box-shadow: none !important;
}

.btn-outline-primary:hover {
  background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
  color: #fff !important;
  border-color: transparent !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3) !important;
}

/* ===== BOTÃO OUTLINE SECONDARY ===== */
.btn-outline-secondary {
  background: transparent !important;
  border: 2px solid #cbd5e1 !important;
  color: #475569 !important;
  box-shadow: none !important;
}

.btn-outline-secondary:hover {
  background: #64748b !important;
  border-color: #64748b !important;
  color: #fff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 14px rgba(100, 116, 139, 0.25) !important;
}

/* ===== BOTÃO OUTLINE DANGER ===== */
.btn-outline-danger {
  background: transparent !important;
  border: 2px solid #ef4444 !important;
  color: #dc2626 !important;
  box-shadow: none !important;
}

.btn-outline-danger:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #fff !important;
  border-color: transparent !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.3) !important;
}

/* ===== BOTÃO OUTLINE SUCCESS ===== */
.btn-outline-success {
  background: transparent !important;
  border: 2px solid #22c55e !important;
  color: #16a34a !important;
  box-shadow: none !important;
}

.btn-outline-success:hover {
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  color: #fff !important;
  border-color: transparent !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.3) !important;
}

/* ===== BOTÃO OUTLINE INFO ===== */
.btn-outline-info {
  background: transparent !important;
  border: 2px solid #06b6d4 !important;
  color: #06b6d4 !important;
  box-shadow: none !important;
}

.btn-outline-info:hover {
  background: linear-gradient(135deg, #06b6d4, #0891b2) !important;
  color: #fff !important;
  border-color: transparent !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(6, 182, 212, 0.3) !important;
}


/* ===== BOTÃO GHOST ===== */
.btn-ghost {
  background: transparent !important;
  border: 1px solid transparent !important;
  color: #475569 !important;
  box-shadow: none !important;
}

.btn-ghost:hover {
  background: rgba(99, 102, 241, 0.1) !important;
  color: #4f46e5 !important;
  border-color: rgba(99, 102, 241, 0.2) !important;
  transform: translateY(-2px) !important;
}

/* ===== TAMANHOS ===== */
.btn-sm {
  padding: 6px 12px !important;
  font-size: 12px !important;
  gap: 6px !important;
}

.btn-lg {
  padding: 12px 24px !important;
  font-size: 16px !important;
  gap: 10px !important;
  border-radius: 12px !important;
}

/* ===== ÍCONES NOS BOTÕES ===== */
.btn i {
  font-size: 15px;
  transition: transform 0.2s ease;
}

.btn:hover i {
  transform: scale(1.1);
}

.btn-sm i {
  font-size: 13px;
}

.btn-lg i {
  font-size: 18px;
}

/* ===== BOTÕES COM ÍCONE APENAS ===== */
.btn-icon {
  padding: 10px !important;
  border-radius: 10px !important;
}

.btn-icon i {
  margin: 0 !important;
}

.btn-icon.btn-sm {
  padding: 6px !important;
}

.btn-icon.btn-lg {
  padding: 14px !important;
}

/* ===== BOTÕES DESABILITADOS ===== */
.btn:disabled,
.btn.disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  transform: none !important;
  filter: grayscale(0.2) !important;
  box-shadow: none !important;
}

.btn:disabled:hover,
.btn.disabled:hover {
  transform: none !important;
  filter: grayscale(0.2) !important;
}

/* ===== BOTÕES COM LOADING ===== */
.btn-loading {
  position: relative !important;
  pointer-events: none !important;
  opacity: 0.7 !important;
}

.btn-loading::before {
  content: '' !important;
  position: absolute !important;
  width: 16px !important;
  height: 16px !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 50% !important;
  border-top-color: #fff !important;
  animation: spin 0.6s linear infinite !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== GRUPO DE BOTÕES ===== */
.btn-group {
  gap: 8px !important;
}

.btn-group .btn {
  border-radius: 10px !important;
}

.btn-group .btn:not(:first-child) {
  margin-left: 0 !important;
}

/* ===== BOTÕES COM SPLIT (dropdown) ===== */
.btn-group>.dropdown-toggle-split {
  padding-left: 12px !important;
  padding-right: 12px !important;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
  .btn {
    padding: 8px 14px !important;
    font-size: 13px !important;
  }

  .btn-lg {
    padding: 10px 18px !important;
    font-size: 14px !important;
  }
}

/* =========================
   TABELAS - MODERNAS
========================= */
.table {
  width: 100% !important;
  border-collapse: collapse !important;
  background: transparent !important;
}

.table th,
.table td {
  padding: 12px 10px !important;
  border-bottom: 1px solid var(--border) !important;
  vertical-align: middle !important;
  background: transparent !important;
}

.table th {
  font-size: 11px !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  color: var(--muted) !important;
  font-weight: 700 !important;
}

.table tr:hover td {
  background: rgba(99, 102, 241, 0.04) !important;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(2, 6, 23, 0.02) !important;
}

.table-bordered {
  border: 1px solid var(--border) !important;
}

.table-bordered th,
.table-bordered td {
  border: 1px solid var(--border) !important;
}

/* =========================
   CARDS
========================= */
.card {
  background: var(--card) !important;
  backdrop-filter: blur(10px) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-sm) !important;
  transition: all .2s ease !important;
}

.card:hover {
  box-shadow: var(--shadow-md) !important;
  transform: translateY(-2px) !important;
}

.card-body {
  padding: 18px !important;
}

.card-header,
.card-footer {
  background: transparent !important;
  border-color: var(--border) !important;
  padding: 12px 18px !important;
}

.card-title {
  font-weight: 700 !important;
}

/* =========================
   ALERTAS
========================= */
.alert {
  border-radius: var(--radius) !important;
  padding: 12px 14px !important;
  border: 1px solid var(--border) !important;
  margin-bottom: 14px !important;
  background: var(--card) !important;
  backdrop-filter: blur(4px) !important;
}

.alert-danger {
  background: #fee2e2 !important;
  color: #991b1b !important;
  border-color: rgba(153, 27, 27, .25) !important;
}

.alert-success {
  background: #dcfce7 !important;
  color: #166534 !important;
  border-color: rgba(22, 101, 52, .25) !important;
}

.alert-warning {
  background: #fef3c7 !important;
  color: #92400e !important;
  border-color: rgba(146, 64, 14, .25) !important;
}

.alert-info {
  background: #e0f2fe !important;
  color: #0c4a6e !important;
  border-color: rgba(12, 74, 110, .25) !important;
}

/* =========================
   FORMULÁRIOS (inputs, selects, textarea)
========================= */
input,
select,
textarea,
.form-control {
  width: 100% !important;
  padding: 10px 12px !important;
  border-radius: 8px !important;
  border: 1px solid var(--border) !important;
  background: #fff !important;
  color: var(--text) !important;
  font-size: 14px !important;
  transition: all 0.15s ease !important;
  outline: none !important;
  box-shadow: 0 1px 2px rgba(2, 6, 23, 0.04) !important;
}

input:hover,
select:hover,
textarea:hover,
.form-control:hover {
  border-color: rgba(99, 102, 241, 0.25) !important;
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

input::placeholder,
textarea::placeholder {
  color: #94a3b8 !important;
}

.form-label {
  font-weight: 600 !important;
  font-size: 13px !important;
  margin-bottom: 6px !important;
  color: #334155 !important;
  display: block !important;
}

input:disabled,
select:disabled,
textarea:disabled,
.form-control:disabled {
  background: #f1f5f9 !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
}

.is-invalid,
input.error,
select.error,
.form-control.is-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

select {
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg fill='%2364748b' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7l5 5 5-5H5z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 16px !important;
  padding-right: 34px !important;
}

/* Input group */
.input-group-text {
  border: 1px solid var(--border) !important;
  background: #f8fafc !important;
  color: #475569 !important;
  border-radius: 8px !important;
}

.input-group .form-control {
  border-radius: 8px !important;
}

/* =========================
   SELECT2 (sobrescrita)
========================= */
.select2-container {
  width: 100% !important;
}

.select2-container .select2-selection--single {
  height: 40px !important;
  padding: 6px 10px !important;
  border: 1px solid var(--border) !important;
  background: #fff !important;
  display: flex !important;
  align-items: center !important;
  border-radius: 8px !important;
  transition: all 0.15s ease !important;
}

.select2-container .select2-selection--single:hover {
  border-color: rgba(99, 102, 241, 0.25) !important;
}

.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

.select2-selection__rendered {
  color: var(--text) !important;
  font-size: 14px !important;
  padding-left: 2px !important;
}

.select2-selection__placeholder {
  color: #94a3b8 !important;
}

.select2-selection__arrow {
  height: 100% !important;
  right: 8px !important;
}

.select2-dropdown {
  border: 1px solid var(--border) !important;
  box-shadow: 0 10px 25px rgba(2, 6, 23, 0.08) !important;
  border-radius: 8px !important;
}

.select2-results__option {
  padding: 10px 12px !important;
  font-size: 14px !important;
}

.select2-results__option--highlighted {
  background: rgba(99, 102, 241, 0.08) !important;
  color: #1e293b !important;
}

.select2-results__option[aria-selected="true"] {
  background: rgba(99, 102, 241, 0.15) !important;
  color: #1e293b !important;
}

.select2-container .select2-selection--multiple {
  min-height: 40px !important;
  border: 1px solid var(--border) !important;
  background: #fff !important;
  border-radius: 8px !important;
  padding: 4px !important;
}

.select2-selection__choice {
  background: rgba(99, 102, 241, 0.12) !important;
  border: none !important;
  padding: 3px 8px !important;
  font-size: 12px !important;
  border-radius: 20px !important;
}

/* =========================
   PAGINAÇÃO (Bootstrap)
========================= */
.pagination {
  gap: 4px !important;
}

.page-link {
  background: #fff !important;
  color: #374151 !important;
  padding: 6px 12px !important;
  font-size: 13px !important;
  border-radius: 8px !important;
  border: 1px solid var(--border) !important;
  transition: all 0.15s ease !important;
}

.page-link:hover {
  background: #f9fafb !important;
  border-color: #cbd5e1 !important;
  transform: translateY(-1px);
}

.page-item.active .page-link {
  background: #111827 !important;
  color: #fff !important;
  border-color: #111827 !important;
}

.page-item.disabled .page-link {
  background: #f3f4f6 !important;
  color: #9ca3af !important;
  opacity: 0.6;
}

/* =========================
   MODAL (Bootstrap)
========================= */
.modal-content {
  background: var(--card) !important;
  backdrop-filter: blur(10px) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-md) !important;
}

.modal-header,
.modal-footer {
  border-color: var(--border) !important;
  padding: 16px 20px !important;
}

.modal-title {
  font-weight: 700 !important;
}

.modal-body {
  padding: 20px !important;
}

.btn-close {
  filter: invert(0.2);
  opacity: 0.6;
}

.btn-close:hover {
  opacity: 1;
}

/* =========================
   DROPDOWNS (Bootstrap)
========================= */
.dropdown-menu {
  background: #fff !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow-md) !important;
  padding: 6px 0 !important;
}

.dropdown-item {
  padding: 8px 16px !important;
  font-size: 14px !important;
  transition: all 0.1s ease !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: rgba(99, 102, 241, 0.08) !important;
  color: var(--primary) !important;
}

.dropdown-divider {
  border-top-color: var(--border) !important;
}

/* =========================
   NAVS & TABS
========================= */
.nav-tabs {
  border-bottom: 1px solid var(--border) !important;
}

.nav-link {
  color: var(--muted) !important;
  font-weight: 600 !important;
  padding: 10px 16px !important;
  border-radius: 8px 8px 0 0 !important;
  transition: all 0.15s ease !important;
}

.nav-link:hover {
  color: var(--text) !important;
  border-color: transparent !important;
}

.nav-link.active {
  color: var(--primary) !important;
  background: transparent !important;
  border-bottom: 2px solid var(--primary) !important;
  border-color: transparent transparent var(--primary) transparent !important;
}

.nav-pills .nav-link {
  border-radius: 20px !important;
}

.nav-pills .nav-link.active {
  background: var(--primary) !important;
  color: #fff !important;
}

/* =========================
   BADGES - VERSÃO MELHORADA (MAIS VIBRANTES E MAIORES)
========================= */
.badge {
  padding: 6px 14px !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  border-radius: 30px !important;
  letter-spacing: 0.02em !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

/* Efeito hover nas badges */
.badge:hover {
  transform: translateY(-1px) !important;
  filter: brightness(0.95) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

/* Badge com ícone */
.badge i {
  font-size: 12px;
  margin-right: 2px;
}

/* ===== BADGE PRIMARY ===== */
.badge-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.badge-primary:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca) !important;
  box-shadow: 0 3px 8px rgba(99, 102, 241, 0.35) !important;
}

/* ===== BADGE SUCCESS ===== */
.badge-success {
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.badge-success:hover {
  background: linear-gradient(135deg, #16a34a, #15803d) !important;
  box-shadow: 0 3px 8px rgba(34, 197, 94, 0.35) !important;
}

/* ===== BADGE DANGER ===== */
.badge-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.badge-danger:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
  box-shadow: 0 3px 8px rgba(239, 68, 68, 0.35) !important;
}

/* ===== BADGE WARNING ===== */
.badge-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.badge-warning:hover {
  background: linear-gradient(135deg, #d97706, #b45309) !important;
  box-shadow: 0 3px 8px rgba(245, 158, 11, 0.35) !important;
}

/* ===== BADGE INFO ===== */
.badge-info {
  background: linear-gradient(135deg, #06b6d4, #0891b2) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(6, 182, 212, 0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.badge-info:hover {
  background: linear-gradient(135deg, #0891b2, #0e7490) !important;
  box-shadow: 0 3px 8px rgba(6, 182, 212, 0.35) !important;
}

/* ===== BADGE SECONDARY ===== */
.badge-secondary {
  background: linear-gradient(135deg, #64748b, #475569) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(100, 116, 139, 0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.badge-secondary:hover {
  background: linear-gradient(135deg, #475569, #334155) !important;
  box-shadow: 0 3px 8px rgba(100, 116, 139, 0.35) !important;
}

/* ===== BADGE DARK ===== */
.badge-dark {
  background: linear-gradient(135deg, #1e293b, #0f172a) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.badge-dark:hover {
  background: linear-gradient(135deg, #0f172a, #020617) !important;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.35) !important;
}

/* ===== BADGE LIGHT ===== */
.badge-light {
  background: #f8fafc !important;
  color: #1e293b !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  border: 1px solid #e2e8f0 !important;
}

.badge-light:hover {
  background: #f1f5f9 !important;
  transform: translateY(-1px) !important;
}

/* ===== BADGE OUTLINE (variantes outline) ===== */
.badge-outline-primary {
  background: transparent !important;
  color: #4f46e5 !important;
  border: 1.5px solid #6366f1 !important;
  box-shadow: none !important;
}

.badge-outline-primary:hover {
  background: rgba(99, 102, 241, 0.1) !important;
  transform: translateY(-1px) !important;
}

.badge-outline-success {
  background: transparent !important;
  color: #16a34a !important;
  border: 1.5px solid #22c55e !important;
  box-shadow: none !important;
}

.badge-outline-success:hover {
  background: rgba(34, 197, 94, 0.1) !important;
  transform: translateY(-1px) !important;
}

.badge-outline-danger {
  background: transparent !important;
  color: #dc2626 !important;
  border: 1.5px solid #ef4444 !important;
  box-shadow: none !important;
}

.badge-outline-danger:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  transform: translateY(-1px) !important;
}

.badge-outline-warning {
  background: transparent !important;
  color: #d97706 !important;
  border: 1.5px solid #f59e0b !important;
  box-shadow: none !important;
}

.badge-outline-warning:hover {
  background: rgba(245, 158, 11, 0.1) !important;
  transform: translateY(-1px) !important;
}

.badge-outline-info {
  background: transparent !important;
  color: #0891b2 !important;
  border: 1.5px solid #06b6d4 !important;
  box-shadow: none !important;
}

.badge-outline-info:hover {
  background: rgba(6, 182, 212, 0.1) !important;
  transform: translateY(-1px) !important;
}

/* ===== TAMANHOS DAS BADGES ===== */
.badge-sm {
  padding: 4px 10px !important;
  font-size: 10px !important;
}

.badge-lg {
  padding: 8px 18px !important;
  font-size: 13px !important;
}

.badge-lg i {
  font-size: 14px !important;
}

/* ===== BADGES COM PULSO (animações) ===== */
.badge-pulse {
  animation: badgePulse 1.5s infinite !important;
}

@keyframes badgePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
  }
}

.badge-pulse.badge-success {
  animation: badgePulseSuccess 1.5s infinite !important;
}

@keyframes badgePulseSuccess {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.badge-pulse.badge-danger {
  animation: badgePulseDanger 1.5s infinite !important;
}

@keyframes badgePulseDanger {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* ===== BADGES REDONDAS (apenas ícone) ===== */
.badge-circle {
  padding: 6px !important;
  border-radius: 50% !important;
  width: 24px !important;
  height: 24px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.badge-circle i {
  margin: 0 !important;
  font-size: 12px !important;
}

.badge-circle.badge-lg {
  width: 32px !important;
  height: 32px !important;
}

.badge-circle.badge-lg i {
  font-size: 16px !important;
}

/* ===== BADGES EM POSIÇÃO ABSOLUTA (para notificações) ===== */
.badge-notification {
  position: absolute !important;
  top: -8px !important;
  right: -8px !important;
  padding: 4px 8px !important;
  font-size: 10px !important;
  animation: badgePulse 1.5s infinite !important;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
  .badge {
    padding: 5px 12px !important;
    font-size: 11px !important;
  }

  .badge-lg {
    padding: 7px 16px !important;
    font-size: 12px !important;
  }
}

/* =========================
   PROGRESS BAR
========================= */
.progress {
  background: rgba(2, 6, 23, 0.06) !important;
  border-radius: 20px !important;
  height: 8px !important;
}

.progress-bar {
  background: linear-gradient(90deg, var(--primary), var(--primary-hover)) !important;
  border-radius: 20px !important;
}

/* =========================
   TOOLTIPS
========================= */
.tooltip-inner {
  background: #0f172a !important;
  color: #fff !important;
  border-radius: 8px !important;
  padding: 6px 10px !important;
  font-size: 12px !important;
}

.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before,
.bs-tooltip-top .tooltip-arrow::before {
  border-top-color: #0f172a !important;
}

/* =========================
   POPOVERS
========================= */
.popover {
  background: #fff !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow-md) !important;
}

.popover-header {
  background: transparent !important;
  border-bottom: 1px solid var(--border) !important;
  font-weight: 700 !important;
}

.popover-body {
  color: var(--text) !important;
}

/* =========================
   ACCORDION
========================= */
.accordion-item {
  background: transparent !important;
  border: 1px solid var(--border) !important;
  margin-bottom: 8px !important;
  border-radius: 12px !important;
  overflow: hidden;
}

.accordion-button {
  background: transparent !important;
  color: var(--text) !important;
  font-weight: 600 !important;
  padding: 14px 18px !important;
}

.accordion-button:not(.collapsed) {
  color: var(--primary) !important;
  background: rgba(99, 102, 241, 0.04) !important;
}

.accordion-button:focus {
  box-shadow: none !important;
  border-color: var(--primary) !important;
}

.accordion-body {
  padding: 16px 18px !important;
  border-top: 1px solid var(--border) !important;
}

/* =========================
   LIST GROUP
========================= */
.list-group-item {
  background: transparent !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.list-group-item.active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

.list-group-item-action:hover {
  background: rgba(99, 102, 241, 0.04) !important;
}

/* =========================
   UTILITÁRIOS
========================= */
.text-muted {
  color: var(--muted) !important;
}

.bg-white {
  background-color: #fff !important;
}

.shadow-sm {
  box-shadow: var(--shadow-sm) !important;
}

.shadow-md {
  box-shadow: var(--shadow-md) !important;
}

.rounded {
  border-radius: var(--radius) !important;
}

.rounded-lg {
  border-radius: 16px !important;
}

/* =========================
   KPI / GRID
========================= */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.kpi {
  padding: 18px;
}

.kpi__label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.kpi__value {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.tag {
  display: inline-block;
  padding: 5px 10px;
  font-weight: 800;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
}

.tag-success {
  background: #dcfce7;
  color: #166534;
  border-color: rgba(22, 101, 52, .25);
}

.tag-secondary {
  background: #e2e8f0;
  color: #334155;
  border-color: rgba(51, 65, 85, .18);
}

/* =========================
   ANIMAÇÕES
========================= */
.highlight-focus {
  animation: highlightFade 3s ease;
}

@keyframes highlightFade {
  0% {
    background-color: #fff3cd;
  }

  100% {
    background-color: transparent;
  }
}

.highlight-card {
  animation: highlightPulse 0.7s ease-in-out;
  position: relative;
  z-index: 1;
}

@keyframes highlightPulse {
  0% {
    border-color: #dcdcdc;
    box-shadow: 0 0 0 rgba(13, 110, 253, 0);
  }

  40% {
    border-color: var(--primary) !important;
    box-shadow: 0 0 6px rgba(13, 110, 253, 0.12);
  }

  100% {
    border-color: #dcdcdc;
    box-shadow: 0 0 0 rgba(13, 110, 253, 0);
  }
}

/* =========================
   RESPONSIVIDADE
========================= */
@media (max-width: 1100px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .content {
    margin-left: 0 !important;
  }

  .app-sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

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

.form-check-input {
  --bs-form-check-bg: #fff !important;

  flex-shrink: 0 !important;
  width: 18px !important;
  height: 18px !important;
  margin-top: 0.2em !important;
  vertical-align: top !important;

  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;

  background-color: #fff !important;
  background-image: none !important;

  border: 2px solid #6366f1 !important;
  border-radius: 6px !important;

  cursor: pointer !important;
  position: relative !important;

  transition: all 0.2s ease !important;
  padding: 0 !important;
}

/* hover */
.form-check-input:hover {
  border-color: #4f46e5 !important;
  background-color: #eef2ff !important;
}

/* checked */
.form-check-input:checked {
  background-color: #6366f1 !important;
  border-color: #6366f1 !important;
}

/* check icon */
.form-check-input:checked::after {
  content: "" !important;

  position: absolute !important;
  top: 50% !important;
  left: 50% !important;

  width: 5px !important;
  height: 9px !important;

  border: solid #fff !important;
  border-width: 0 2px 2px 0 !important;

  transform: translate(-50%, -60%) rotate(45deg) !important;
}

/* focus */
.form-check-input:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25) !important;
}

/* ============================================
   SCROLLBAR CUSTOMIZADO - SAAS STYLE
   Clean, fino e com a cor primária #6366f1
   ============================================ */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #020617;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #6366f1;
  border-radius: 10px;
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: #4f52e0;
  cursor: pointer;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #6366f1 #020617;
}

html {
  overflow-y: auto;
  scroll-behavior: smooth;
}