/* ==========================================================================
   1. VARIÁVEIS E BASE
   ========================================================================== */
:root {
  --navy-dark: #0f172a;
  --navy-sidebar: #0b1120;
  --verde-simpliza: #16a74a;
  --verde-btn: #00a86b;
  --verde-btn-hover: #008f5a;
  --azul-simpliza: #51c1e1;
  --bg-light: #f4f6f9;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --white: #ffffff;
  --bs-success-emphasis-rgb: 10, 54, 34;
}

* {
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-light);
  color: var(--text-main);
  min-height: 100vh;
}

/* ==========================================================================
   2. ESTRUTURA E TOPBAR
   ========================================================================== */
#wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.main-content {
  flex: 1;
  width: 100%;
  min-width: 0;
  background-color: var(--bg-light);
  position: relative !important;
  z-index: 1 !important;
}

.topbar {
  height: 68px;
  position: relative !important;
  z-index: 1050 !important;
  overflow: visible !important;
}

.topbar .search-box {
  position: relative !important;
  z-index: 1060 !important;
  overflow: visible !important;
}

.search-box input {
  width: 220px;
  font-size: 13px;
}

.avatar-circle {
  width: 36px;
  height: 36px;
  background-color: #d1fae5;
  color: var(--verde-simpliza);
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

/* ==========================================================================
   3. SIDEBAR & LEVEL-BOX
   ========================================================================== */
.brand-logo {
  min-height: 90px;
  padding: 1.25rem 1rem;
  width: 100%;
}

.brand-logo-img {
  height: 48px;
  max-height: 52px;
  width: auto;
  max-width: 90%;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  transition: transform 0.2s ease;
}

.level-box {
  background-color: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  display: flex !important;
  flex-direction: column !important;
  contain: content !important;
}

.level-section {
  width: 100%;
  display: block;
  position: relative;
}

.level-divider {
  height: 1px;
  background-color: rgba(255, 255, 255, 0.1);
  margin: 12px 0;
  width: 100%;
}

.level-title {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.level-name { font-size: 15px; }
.level-percent { font-size: 13px; }

.level-subtext {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.level-box .progress {
  width: 100% !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  display: flex !important;
  height: 6px !important;
  margin: 4px 0 !important;
}

.level-box .progress-bar {
  height: 100% !important;
  border-radius: 10px !important;
  transition: none !important;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-item-link i { font-size: 18px; }

.nav-item-link:hover {
  color: var(--white);
  background-color: rgba(255, 255, 255, 0.05);
}

.nav-item-link.active {
  color: var(--verde-simpliza);
  background-color: rgba(22, 167, 74, 0.08);
  font-weight: 600;
}

.sidebar-container::-webkit-scrollbar { width: 4px; }
.sidebar-container::-webkit-scrollbar-track { background: transparent; }
.sidebar-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
.sidebar-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   4. BOTÕES
   ========================================================================== */
.btn-submit {
  background-color: var(--verde-btn);
  color: var(--white);
  font-weight: 600;
  border: none;
  border-radius: 8px;
  height: 38px;
  padding: 0 16px;
  transition: all 0.2s ease-in-out;
}

.btn-submit:hover {
  background-color: var(--verde-btn-hover);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(0, 168, 107, 0.25);
}

.btn-action {
  background-color: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease-in-out;
}

.btn-action:hover {
  background-color: #f8fafc;
  border-color: var(--border-color);
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-withdraw {
  background-color: var(--white);
  color: var(--navy-dark);
  font-weight: 600;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  transition: opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto !important;
}

.btn-withdraw:hover {
  opacity: 0.9;
  color: var(--navy-dark);
}

.btn-download-img {
  background-color: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  font-weight: 600;
  font-size: 13px;
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color 0.2s ease;
}

.btn-download-img:hover {
  background-color: #dcfce7;
  color: #15803d;
}

/* ==========================================================================
   5. CARDS & MÉTRICAS
   ========================================================================== */
.metric-card {
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.02);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.metric-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.icon-blue { background-color: #eff6ff; color: var(--azul-simpliza); }
.icon-green { background-color: #ecfdf5; color: var(--verde-simpliza); }

.metric-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
}

.metric-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
}

.metric-value small {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.bg-blue { background-color: var(--azul-simpliza); }
.bg-green { background-color: var(--verde-simpliza); }

/* ==========================================================================
   6. BADGES E TAGS
   ========================================================================== */
.badge-indication {
  background-color: #eff6ff;
  color: #2563eb;
  font-size: 9px;
  letter-spacing: 0.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}

.badge-resale {
  background-color: #ecfdf5;
  color: #059669;
  font-size: 9px;
  letter-spacing: 0.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}

.status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  display: inline-block;
}

.status-approved { background-color: #d1fae5; color: #047857; }
.status-pending  { background-color: #fef3c7; color: #b45309; }
.status-canceled { background-color: #f1f5f9; color: #64748b; }

.lic-badge {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
}

.lic-badge-blue { background-color: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.lic-badge-gray { background-color: #f8fafc; color: #475569; border: 1px solid var(--border-color); }
.lic-badge-green { background-color: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }

.info-badge-blue,
.info-badge-green {
  background-color: var(--white);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.info-badge-blue { color: #3b82f6; border: 1px solid #e0f2fe; }
.info-badge-green { color: #16a74a; border: 1px solid #dcfce7; }

.tag-group {
  background-color: #ffe4e6;
  color: #e11d48;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  display: inline-block;
}

.tag-status-success { color: #047857; font-size: 11px; font-weight: 600; }
.tag-status-muted   { color: var(--text-muted); font-size: 11px; font-weight: 600; }
.tag-status-warning { color: #b45309; font-size: 11px; font-weight: 600; }

/* ==========================================================================
   7. NAVEGAÇÃO E FILTROS
   ========================================================================== */
.partner-tab-container {
  background-color: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  display: inline-flex;
  gap: 4px;
}

.partner-tab-btn {
  border: none;
  background: transparent;
  padding: 8px 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 8px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.partner-tab-btn.active {
  background-color: var(--white);
  color: var(--verde-simpliza);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.tab-content-panel {
  transition: opacity 0.25s ease-in-out;
}

.filter-pill {
  border: none;
  background-color: #f1f5f9;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 20px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.filter-pill:hover {
  background-color: var(--border-color);
  color: var(--text-main);
}

.filter-pill.active-dark {
  background-color: var(--navy-dark);
  color: var(--white);
  font-weight: 600;
}

.filter-pill.active-green {
  background-color: #d1fae5;
  color: #047857;
  font-weight: 600;
}

/* ==========================================================================
   8. PLANOS, PRODUTOS E PAINÉIS
   ========================================================================== */
.plan-tier-card {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 28px;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.plan-tier-card.featured {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}

.badge-tier-level {
  background-color: #f1f5f9;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
  text-transform: uppercase;
}

.badge-best-value {
  position: absolute;
  top: 0;
  right: 0;
  background-color: #10b981;
  color: var(--white);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 6px 14px;
  border-bottom-left-radius: 10px;
  text-transform: uppercase;
}

.plan-price-val {
  font-size: 32px;
  font-weight: 800;
  color: var(--navy-dark);
}

.plan-features-list,
.level-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.plan-features-list { gap: 12px; }
.level-feature-list { gap: 8px; }

.plan-features-list li {
  font-size: 13px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 10px;
}

.plan-features-list li i.bi-check-lg {
  color: #10b981;
  font-size: 18px;
  font-weight: bold;
}

.plan-features-list li i.bi-lightning-fill {
  color: #10b981;
  font-size: 16px;
}

.locked-tier-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 12px;
  margin-top: 4px;
}

.product-card {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-color: #cbd5e1;
}

.product-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 20px;
}

.prod-icon-blue { background-color: #eff6ff; color: #3b82f6; }
.prod-icon-purple { background-color: #f3e8ff; color: #a855f7; }
.prod-icon-yellow { background-color: #fef3c7; color: #f59e0b; }

.current-status-banner,
.partnership-card,
.reseller-why-card {
  background-color: var(--navy-sidebar);
  color: var(--white);
  border-radius: 12px;
}

.balance-card {
  background-color: var(--verde-simpliza);
  color: var(--white);
  border-radius: 12px;
}

.info-explain-card-blue {
  background-color: #f0f7ff;
  border: 1px solid #e0f2fe;
  border-radius: 12px;
}

.info-explain-card-green {
  background-color: #f0fdf4;
  border: 1px solid #dcfce7;
  border-radius: 12px;
}

/* ==========================================================================
   9. NÍVEIS & JORNADA
   ========================================================================== */
.level-card {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  height: 100%;
  position: relative;
}

.level-card.completed { border-color: #bbf7d0; }
.level-card.current {
  border: 2px solid #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.level-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.level-card.completed .level-card-icon { background-color: #d1fae5; color: #059669; }
.level-card.current .level-card-icon   { background-color: #eff6ff; color: #2563eb; }
.level-card.locked .level-card-icon    { background-color: #f1f5f9; color: #94a3b8; }

.level-badge-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-status-completed { background-color: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.badge-status-current   { background-color: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.badge-status-locked    { background-color: #f8fafc; color: var(--text-muted); border: 1px solid var(--border-color); }

.level-card-title { font-size: 16px; font-weight: 700; color: var(--navy-dark); }
.level-card-percent { font-size: 28px; font-weight: 800; color: var(--navy-dark); line-height: 1; }

.level-feature-list li {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.level-card.completed .level-feature-list li i { color: #16a34a; }
.level-card.current .level-feature-list li i   { color: #2563eb; }
.level-card.locked .level-feature-list li i    { color: #cbd5e1; }

.reseller-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.reseller-feature-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #16a74a;
  font-size: 15px;
  flex-shrink: 0;
}

.cost-card-item {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  background-color: #f8fafc;
}

.cost-card-item.active-tier {
  background-color: var(--white);
  border: 1px solid #cbd5e1;
}

/* ==========================================================================
   10. MÍDIA E CAPACITAÇÃO
   ========================================================================== */
.video-card,
.pdf-doc-card,
.material-post-card,
.script-whatsapp-card {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.video-card,
.material-post-card {
  padding: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pdf-doc-card,
.script-whatsapp-card {
  padding: 24px;
}

.video-card:hover,
.material-post-card:hover,
.pdf-doc-card:hover,
.script-whatsapp-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-color: #cbd5e1;
}

.video-thumbnail {
  width: 100%;
  height: 180px;
  background-color: var(--border-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 36px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.video-card:hover .video-thumbnail {
  background-color: #cbd5e1;
  color: var(--text-muted);
}

.post-placeholder {
  width: 100%;
  height: 220px;
  background-color: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
}

.script-preview-box {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  font-family: monospace;
  font-size: 12px;
  color: #475569;
  line-height: 1.6;
  margin-top: 16px;
  margin-bottom: 20px;
}

/* ==========================================================================
   11. ÍCONES E TIMELINE
   ========================================================================== */
.icon-box-blue,
.icon-box-green,
.pdf-icon-box,
.script-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.icon-box-blue { background-color: #dbeafe; color: #2563eb; }
.icon-box-green, .script-icon-box { background-color: #d1fae5; color: #16a74a; }
.pdf-icon-box { background-color: #ffe4e6; color: #f43f5e; margin-bottom: 16px; }

.status-icon-box-blue,
.status-icon-box-green {
  width: 52px;
  height: 52px;
  color: var(--white);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.status-icon-box-blue { background-color: #2563eb; }
.status-icon-box-green { background-color: #16a74a; }

.section-header-icon {
  width: 28px;
  height: 28px;
  background-color: #eff6ff;
  color: #2563eb;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.section-header-icon-green {
  background-color: #f0fdf4;
  color: #16a74a;
}

.fin-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.fin-icon-green  { background-color: #d1fae5; color: #047857; }
.fin-icon-blue   { background-color: #dbeafe; color: #1d4ed8; }
.fin-icon-yellow { background-color: #fef3c7; color: #b45309; }

.timeline-icon {
  width: 26px;
  height: 26px;
  background-color: #10b981 !important;
}

.timeline-line {
  position: absolute;
  top: 26px;
  left: 12px;
  width: 2px;
  height: calc(100% - 26px);
  background-color: #e5e7eb;
  z-index: 0;
}

.timeline-item:last-child .timeline-line {
  display: none;
}

/* ==========================================================================
   12. FORMULÁRIOS, DROPDOWNS & INPUTS
   ========================================================================== */
#dropdownBuscaTopbar {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 9999 !important;
  background-color: #ffffff !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 28px -5px rgba(15, 23, 42, 0.2), 0 8px 10px -6px rgba(15, 23, 42, 0.1) !important;
}

#dropdownBuscaTopbar .dropdown-item {
  cursor: pointer;
  transition: background-color 0.15s ease;
  border-radius: 8px;
}

#dropdownBuscaTopbar .dropdown-item:hover {
  background-color: #f1f5f9 !important;
}

.custom-dropdown-wrapper .input-group-rounded {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background-color: #ffffff;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.custom-dropdown-wrapper .input-group-rounded:hover {
  border-color: #cbd5e1;
}

.custom-dropdown-wrapper:focus-within .input-group-rounded,
.custom-dropdown-wrapper .input-group-rounded.show,
.custom-dropdown-wrapper .show > .input-group-rounded {
  border-color: #86b7fe !important;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15) !important;
}

.custom-dropdown-wrapper .input-group-text,
.custom-dropdown-wrapper .btn-custom-dropdown,
.custom-dropdown-wrapper .btn-custom-dropdown:focus,
.custom-dropdown-wrapper .btn-custom-dropdown:active,
.custom-dropdown-wrapper .btn-custom-dropdown:hover {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background-color: transparent !important;
}

.custom-dropdown-wrapper .input-group-text {
  color: #64748b;
  padding-right: 0.5rem;
}

.custom-dropdown-wrapper .btn-custom-dropdown {
  font-family: 'Inter', sans-serif;
  color: #1e293b;
  font-weight: 500;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.text-placeholder {
  color: #94a3b8 !important;
  font-weight: 400;
}

.text-selected {
  color: #1e293b !important;
  font-weight: 500;
}

.transition-arrow {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-dropdown-wrapper .show .transition-arrow {
  transform: rotate(180deg);
}

.dropdown-menu-animated {
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s;
  margin-top: 6px !important;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.dropdown-menu-animated.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-menu-animated .dropdown-item {
  color: #334155;
  font-weight: 500;
  transition: all 0.15s ease-in-out;
  margin-bottom: 2px;
}

.dropdown-menu-animated .dropdown-item:hover {
  background-color: #f1f5f9;
  color: #0d6efd;
  transform: translateX(3px);
}

.dropdown-menu-animated .dropdown-item.active-item {
  background-color: #eff6ff;
  color: #0d6efd;
  font-weight: 600;
}

.dropdown-custom-menu {
  z-index: 1050 !important;
}

.opcao-grupo,
.opcao-custom-item {
  transition: background-color 0.15s ease, color 0.15s ease;
}

.opcao-grupo:hover,
.opcao-custom-item:hover {
  background-color: #e8f5e9 !important;
  color: #198754 !important;
}

#novoGrupoCliente,
#indicacaoGrupo {
  border-radius: 0.5rem 0 0 0.5rem !important;
  border-color: #dee2e6;
  background-color: #ffffff;
  color: #333;
  padding: 0.55rem 0.85rem;
  font-size: 0.875rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#novoGrupoCliente:focus,
#indicacaoGrupo:focus {
  border-color: #198754 !important;
  box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.15) !important;
}

#novoGrupoCliente option,
#indicacaoGrupo option {
  padding: 10px 14px;
  background-color: #ffffff;
  color: #2b2f32;
  font-size: 0.875rem;
  line-height: 1.5;
}

#novoGrupoCliente option:checked,
#indicacaoGrupo option:checked {
  background-color: #d1e7dd !important;
  color: #0f5132 !important;
  font-weight: 600;
}

#novoGrupoCliente option:hover,
#indicacaoGrupo option:hover {
  background-color: #f8f9fa !important;
}

#novoGrupoCliente option:disabled,
#indicacaoGrupo option:disabled {
  color: #8c98a4;
  font-style: italic;
}

.card-input-option {
  background-color: #ffffff;
  border: 1px solid #dee2e6 !important;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  user-select: none;
  min-height: 98px;
  justify-content: flex-start;
}

.card-input-option .check-indicator {
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s ease-in-out;
}

.card-input-option:hover {
  border-color: #b0c4de !important;
  background-color: #f8fafc;
}

.input-perfil-check:checked + .card-input-option {
  border-color: #0d6efd !important;
  background-color: #f0f7ff !important;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15) !important;
}

.input-perfil-check:checked + .card-input-option .title-option,
.input-perfil-check:checked + .card-input-option .icon-option {
  color: #0d6efd !important;
}

.input-perfil-check:checked + .card-input-option .desc-option {
  color: #334155 !important;
  line-height: 1.35;
}

.input-perfil-check:checked + .card-input-option .check-indicator {
  opacity: 1;
  transform: scale(1);
}

.position-relative:focus-within {
  z-index: 1060 !important;
}

/* ==========================================================================
   13. MODAIS, SKELETON & UTILITÁRIOS
   ========================================================================== */
.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  transform: translateY(-20px);
}

.modal.show .modal-dialog {
  transform: translateY(0);
}

.offcanvas.offcanvas-end {
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.modal-backdrop.fade, 
.offcanvas-backdrop.fade {
  transition: opacity 0.3s linear !important;
}

#modalNovoGrupo {
  background-color: rgba(0, 0, 0, 0.2);
}

.skeleton-box {
  background: linear-gradient(90deg, #e2e8f0 25%, #f8fafc 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}

.skeleton-box-dark {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.09) 50%, rgba(255, 255, 255, 0.04) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

#skeleton-screen {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.skeleton-sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 280px;
  min-width: 280px;
  background-color: var(--navy-sidebar);
  height: 100vh;
  position: sticky;
  top: 0;
  padding: 1.25rem 1rem;
}

.skeleton-main {
  flex: 1;
  width: 100%;
  min-width: 0;
  background-color: var(--bg-light);
}

.skeleton-topbar {
  height: 68px;
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem;
}

.skeleton-content-area {
  padding: 1.5rem;
}

.color-picker-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 2px solid transparent;
}

.color-picker-dot:hover {
  transform: scale(1.1);
}

.color-picker-dot.active {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #64748b;
  transform: scale(1.05);
}

.text-danger-hover:hover { color: #ef4444 !important; }
.bronze { color: #cd7f32 !important; }
.prata  { color: #c0c0c0 !important; }
.ouro   { color: #d4af37 !important; }
.border-dashed { border-style: dashed !important; }
.cursor-pointer { cursor: pointer; }
.fs-7 { font-size: 12px; }
.fs-8 { font-size: 0.75rem; }

.bg-primary-subtle {
  background-color: #eff6ff !important;
  color: #2563eb !important;
}

.bg-success-subtle {
  background-color: #d1fae5 !important;
  color: #047857 !important;
}

.text-success-emphasis {
  color: var(--bs-success-text-emphasis, rgb(var(--bs-success-emphasis-rgb))) !important;
}

.bg-success-emphasis-subtle {
  background-color: rgba(var(--bs-success-emphasis-rgb), 0.1) !important;
}

.border-success-emphasis-subtle {
  border-color: rgba(var(--bs-success-emphasis-rgb), 0.25) !important;
}

/* ==========================================================================
   14. RESPONSIVIDADE (MEDIA QUERIES)
   ========================================================================== */
@media (min-width: 992px) {
  .sidebar-container {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    width: 280px;
    min-width: 280px;
    background-color: var(--navy-sidebar);
    height: 100vh;
    max-height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .sidebar-overlay {
    display: none !important;
  }
}

@media (max-width: 991.98px) {
  #wrapper {
    flex-direction: column;
  }

  .sidebar-container {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: auto;
    max-width: 85vw;
    height: 100vh;
    max-height: 100vh;
    background-color: var(--navy-sidebar);
    z-index: 1050;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s ease;
  }

  .sidebar-container.show {
    transform: translateX(0);
    visibility: visible;
  }

  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
  }

  .skeleton-sidebar {
    display: none;
  }
}

/* =======================================================
   ESTILIZAÇÃO MODERNA DOS INPUTS DE DATA (CALENDÁRIO)
   ======================================================= */
.custom-date-input {
  appearance: none;
  -webkit-appearance: none;
  background-color: #ffffff;
  color: #334155;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.custom-date-input:focus {
  border-color: #198754 !important;
  box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.15) !important;
}

/* Ícone de calendário verde e estilizado */
.custom-date-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.7;
  filter: invert(36%) sepia(85%) saturate(464%) hue-rotate(95deg) brightness(92%) contrast(92%);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.custom-date-input::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Wrapper para garantir profundidade */
.input-date-custom-wrapper {
  position: relative;
}

/* =======================================================
   DROPDOWNS E ITENS SELECIONÁVEIS
   ======================================================= */
.cursor-pointer {
  cursor: pointer;
}

.fs-9 {
  font-size: 0.68rem !important;
}

.dropdown-custom-menu {
  z-index: 1050 !important;
}

.position-relative:focus-within {
  z-index: 1060 !important;
}

.opcao-custom-item {
  transition: background-color 0.15s ease, color 0.15s ease;
}

.opcao-custom-item:hover {
  background-color: #e8f5e9 !important;
  color: #198754 !important;
  font-weight: 600;
}

/* Container Flutuante do Calendário */
.custom-calendar-popover {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1070;
  width: 290px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 14px;
  margin-top: 4px;
  font-family: inherit;
  user-select: none;
}

/* Cabeçalho do Calendário */
.cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.cal-month-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: #1e293b;
  text-transform: capitalize;
}

.cal-nav-btn {
  background: transparent;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cal-nav-btn:hover {
  background-color: #f1f5f9;
  color: #198754;
}

/* Grid de Dias */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  text-align: center;
}

.cal-day-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  padding: 4px 0;
}

.cal-day {
  font-size: 0.8rem;
  font-weight: 500;
  color: #334155;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cal-day:hover:not(.empty):not(.selected) {
  background-color: #e8f5e9;
  color: #198754;
}

.cal-day.today {
  border: 1px solid #198754;
  font-weight: 700;
}

.cal-day.selected {
  background-color: #198754 !important;
  color: #ffffff !important;
  font-weight: 700;
}

.cal-day.other-month {
  color: #cbd5e1;
}

/* Rodapé com botões de ação */
.cal-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

.cal-action-btn {
  background: none;
  border: none;
  font-size: 0.75rem;
  font-weight: 600;
  color: #198754;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 0.35rem;
}

.cal-action-btn:hover {
  background-color: #e8f5e9;
}