/* css/components.css */
/* --- 1. KPI/Stats Cards --- */
.card-stat {
  background: rgba(26, 15, 48, 0.45) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.card-stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--card-glow, var(--primary)), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-stat:hover {
  transform: translateY(-4px);
  border-color: var(--card-glow, var(--primary));
  box-shadow: var(--card-shadow, var(--glow-purple));
}

.card-stat:hover::before {
  opacity: 1;
}

.card-stat-info {
  display: flex;
  flex-direction: column;
}

.card-stat-title {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.card-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
}

.card-stat-chart-container {
  width: 60px;
  height: 60px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.donut-svg {
  transform: rotate(-90deg);
  width: 60px;
  height: 60px;
}

.donut-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 4px;
}

.donut-progress {
  fill: none;
  stroke: var(--card-glow, var(--primary));
  stroke-width: 4px;
  stroke-linecap: round;
  stroke-dasharray: 176;
  stroke-dashoffset: 176;
  transition: stroke-dashoffset 0.8s ease-out;
}

/* --- 2. Tables --- */
.table-container {
  background: rgba(20, 11, 41, 0.45) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  min-height: 380px; /* Garante espaço suficiente para os menus de 3 pontinhos mesmo com poucas linhas */
  position: relative;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.table-responsive::-webkit-scrollbar {
  height: 6px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.3);
  border-radius: 3px;
}

.table-header-bar {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.table-filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.table-search {
  position: relative;
  min-width: 250px;
}

.table-search i {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.table-search input {
  width: 100%;
  padding: 0.625rem 1rem 0.625rem 2.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  background: rgba(11, 5, 24, 0.5);
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  transition: all 0.2s ease;
}

.table-search input:focus {
  border-color: var(--border-focus);
  box-shadow: var(--glow-cyan);
}

.table-select {
  padding: 0.625rem 1.75rem 0.625rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  background: rgba(11, 5, 24, 0.5);
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  transition: all 0.2s ease;
}

.table-select:focus {
  border-color: var(--border-focus);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  padding: 1rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

.custom-table td {
  padding: 1rem 1.5rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
}

.custom-table tr {
  transition: background-color 0.2s ease;
}

.custom-table tbody tr:hover {
  background-color: rgba(168, 85, 247, 0.04);
}

.custom-table tbody tr:last-child td {
  border-bottom: none;
}

/* --- 3. Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  color: var(--text-primary);
  box-shadow: var(--glow-purple);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: 0 0 20px rgba(157, 78, 221, 0.5);
}

.btn-pink {
  background: linear-gradient(135deg, var(--accent-pink), #e04a9e);
  color: var(--text-primary);
  box-shadow: var(--glow-pink);
}

.btn-pink:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: 0 0 20px rgba(255, 106, 193, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(168, 85, 247, 0.4);
}

.btn-danger-outline {
  background: transparent;
  color: var(--status-expired);
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--status-expired);
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 0.5rem;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: rgba(157, 78, 221, 0.25);
  color: var(--text-primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.btn-icon-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--status-expired);
  border-color: var(--status-expired);
}

/* --- 4. Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

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

.badge-active {
  background: rgba(16, 185, 129, 0.1);
  color: var(--status-active);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-active::before { background: var(--status-active); }

.badge-warning {
  background: rgba(245, 158, 171, 0.1);
  color: var(--status-warning);
  border: 1px solid rgba(245, 158, 171, 0.2);
}

.badge-warning::before { background: var(--status-warning); }

.badge-expired {
  background: rgba(239, 68, 68, 0.1);
  color: var(--status-expired);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-expired::before { background: var(--status-expired); }

/* --- 5. Forms & Modals --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 5, 24, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-container {
  background: rgba(20, 11, 41, 0.85) !important;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(168, 85, 247, 0.25);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), var(--glow-purple);
  width: 100%;
  max-width: 600px;
  border-radius: 1rem;
  overflow: hidden;
  transform: translateY(-20px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(to right, var(--text-primary), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-close {
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.25rem;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--accent-pink);
}

.modal-body {
  padding: 1.5rem;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
}

/* Form Styles */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  background: rgba(11, 5, 24, 0.5);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: var(--glow-cyan);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 576px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Toggles & Checkboxes */
.toggle-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
}

.toggle-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toggle-label-info {
  display: flex;
  flex-direction: column;
}

.toggle-label-title {
  font-size: 0.875rem;
  font-weight: 600;
}

.toggle-label-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-secondary);
  transition: .3s;
  border-radius: 50%;
}

.switch input:checked + .slider {
  background-color: rgba(0, 229, 255, 0.2);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

.switch input:checked + .slider:before {
  transform: translateX(20px);
  background-color: var(--accent-cyan);
}

/* File Upload input */
.file-upload-wrapper {
  position: relative;
  width: 100%;
}

.file-upload-input {
  display: none;
}

.file-upload-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 2px dashed var(--border-color);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.01);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.file-upload-label:hover {
  border-color: var(--accent-pink);
  color: var(--text-primary);
  background: rgba(255, 106, 193, 0.02);
}

.file-upload-preview {
  margin-top: 0.5rem;
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.375rem;
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
}

.file-upload-preview img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 4px;
}

/* --- Modal Tabs (btn-tab) --- */
.btn-tab {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.4rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.8125rem;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
}
.btn-tab:hover {
  border-color: var(--accent-purple);
  color: var(--text-primary);
}
.btn-tab-active {
  background: rgba(157, 78, 221, 0.15);
  border-color: var(--accent-purple);
  color: var(--accent-purple);
  font-weight: 600;
}

/* --- Global Search Overlay --- */
.global-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}
.global-search-overlay.active {
  opacity: 1;
  visibility: visible;
}
.global-search-box {
  background: var(--bg-panel);
  border: 1px solid var(--accent-cyan);
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.2), 0 20px 60px rgba(0,0,0,0.6);
  border-radius: 1rem;
  width: 90%;
  max-width: 560px;
  overflow: hidden;
}
.global-search-input-wrapper {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  gap: 0.75rem;
}
.global-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 1.125rem;
  font-family: var(--font-sans);
}
.global-search-results {
  max-height: 360px;
  overflow-y: auto;
  padding: 0.5rem;
}
.global-search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
.global-search-result-item:hover {
  background: rgba(157, 78, 221, 0.15);
}
.global-search-hint {
  padding: 0.75rem 1.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
}

/* --- Dark / Light Mode Toggle --- */
.theme-toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.8125rem;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}
.theme-toggle-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Light Mode */
body.light-mode {
  --bg-dark: #f0f2f8;
  --bg-panel: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-hover: rgba(237, 233, 254, 0.9);
  --border-color: rgba(139, 92, 246, 0.2);
  --border-focus: rgba(109, 40, 217, 0.8);
  --primary: #7c3aed;
  --accent-pink: #db2777;
  --accent-cyan: #0891b2;
  --accent-lime: #65a30d;
  --accent-purple: #7c3aed;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --glow-pink: 0 0 12px rgba(219, 39, 119, 0.2);
  --glow-cyan: 0 0 12px rgba(8, 145, 178, 0.2);
  --glow-purple: 0 0 12px rgba(124, 58, 237, 0.2);
  --glow-lime: 0 0 12px rgba(101, 163, 13, 0.2);
}
body.light-mode .sidebar,
body.light-mode .main-header {
  background: #ffffff;
  border-color: rgba(139, 92, 246, 0.15);
}
body.light-mode .menu-link:hover,
body.light-mode .menu-link.active {
  background: rgba(124, 58, 237, 0.08);
}
body.light-mode .custom-table thead tr {
  background: rgba(124, 58, 237, 0.05);
}
body.light-mode .modal-container {
  background: #ffffff;
}
body.light-mode .form-input,
body.light-mode .table-select {
  background: rgba(0,0,0,0.03);
  color: #111827;
}

/* --- Tag Chips --- */
.tag-chip {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.25rem 0.65rem;
  border-radius: 99px;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  transition: all 0.15s ease;
}
.tag-chip:hover {
  border-color: var(--accent-purple);
  color: var(--accent-purple);
}
.tag-chip-active {
  background: rgba(157,78,221,0.18);
  border-color: var(--accent-purple);
  color: var(--accent-purple);
  font-weight: 600;
}

/* Tag badge shown in table */
.tag-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  font-size: 0.68rem;
  font-weight: 600;
  margin-right: 0.2rem;
  border: 1px solid transparent;
}
.tag-vip        { background:rgba(251,191,36,0.15); color:#fbbf24; border-color:rgba(251,191,36,0.3); }
.tag-problemático { background:rgba(239,68,68,0.12); color:#ef4444; border-color:rgba(239,68,68,0.25); }
.tag-indicação   { background:rgba(16,185,129,0.12); color:#10b981; border-color:rgba(16,185,129,0.25); }
.tag-novo       { background:rgba(0,229,255,0.1); color:var(--accent-cyan); border-color:rgba(0,229,255,0.2); }
.tag-premium    { background:rgba(199,125,255,0.12); color:var(--accent-purple); border-color:rgba(199,125,255,0.25); }
.tag-atenção    { background:rgba(245,158,11,0.12); color:var(--status-warning); border-color:rgba(245,158,11,0.25); }

/* --- Client Avatar --- */
.client-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.1);
}

/* Badge Trial */
.badge-trial {
  background: rgba(139,92,246,0.18);
  color: #a78bfa;
  border: 1px solid rgba(139,92,246,0.35);
}

/* ═══════════════════════════════════════════
   CLIENT DETAIL DRAWER
═══════════════════════════════════════════ */
.client-detail-drawer {
  position: fixed;
  top: 0;
  right: -540px;
  width: 520px;
  max-width: 96vw;
  height: 100vh;
  background: rgba(20, 11, 41, 0.8) !important;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-left: 1px solid rgba(168, 85, 247, 0.25);
  z-index: 1100;
  transition: right 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.client-detail-drawer.open {
  right: 0;
  box-shadow: -8px 0 40px rgba(0,0,0,0.4);
}
.client-detail-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);
  z-index: 1099;
  pointer-events: none;
  transition: background 0.3s ease;
}
.client-detail-backdrop.open {
  background: rgba(0,0,0,0.5);
  pointer-events: all;
}
.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0,0,0,0.15);
  flex-shrink: 0;
}
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}
.drawer-section { margin-bottom: 1.25rem; }
.drawer-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
}
.drawer-info-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.65rem 0.85rem;
}
.drawer-info-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.drawer-info-value {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════
   CALENDAR
═══════════════════════════════════════════ */
.cal-day {
  aspect-ratio: 1;
  border-radius: 0.4rem;
  padding: 0.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
  min-height: 44px;
}
.cal-day:hover { background: rgba(255,255,255,0.04); border-color: var(--border-color); }
.cal-day-num { font-size: 0.8rem; color: var(--text-secondary); font-weight: 500; line-height: 1.4; }
.cal-today { background: rgba(157,78,221,0.12); border-color: rgba(157,78,221,0.4) !important; }
.cal-today .cal-day-num { color: var(--accent-purple); font-weight: 700; }
.cal-has-events .cal-day-num { color: var(--text-primary); font-weight: 600; }

/* Prioridade de Leads Kanban */
.priority-high {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
}
.priority-medium {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #f59e0b !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
}
.priority-low {
  background: rgba(59, 130, 246, 0.15) !important;
  color: #3b82f6 !important;
  border: 1px solid rgba(59, 130, 246, 0.3) !important;
}

/* Animações de Pulso para Badges da Sidebar */
@keyframes pulse-red {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    box-shadow: 0 0 0 5px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

@keyframes pulse-purple {
  0% {
    box-shadow: 0 0 0 0 rgba(157, 78, 221, 0.7);
  }
  70% {
    box-shadow: 0 0 0 5px rgba(157, 78, 221, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(157, 78, 221, 0);
  }
}

/* Dashboard Drag and Drop Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  transition: all 0.25s ease;
}

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

.widget-span-2 {
  grid-column: span 2;
}

@media (max-width: 1024px) {
  .widget-span-2 {
    grid-column: span 1;
  }
}

/* Customize Mode Dashboard */
.customize-mode .dashboard-widget {
  border: 2px dashed rgba(0, 229, 255, 0.35) !important;
  position: relative;
  cursor: grab;
  user-select: none;
  background: rgba(0, 229, 255, 0.02);
  transition: border-color 0.2s, background 0.2s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  border-radius: 1rem;
}

.customize-mode .dashboard-widget:hover {
  border-color: var(--accent-cyan) !important;
  background: rgba(0, 229, 255, 0.04);
}

.customize-mode .dashboard-widget::after {
  content: '⠿ Arraste para mover';
  position: absolute;
  top: -11px;
  left: 15px;
  background: var(--accent-cyan);
  color: #0d0e15;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 229, 255, 0.3);
}

.customize-mode .dashboard-widget.dragging {
  opacity: 0.4;
  border: 2px dashed var(--accent-pink) !important;
  background: rgba(255, 106, 193, 0.08) !important;
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 5px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

@keyframes pulse-recover {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* --- Toggle Switch / Sliders --- */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-secondary);
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
}
.switch input:checked + .slider {
  background-color: rgba(0, 229, 255, 0.15);
  border-color: var(--accent-cyan);
}
.switch input:checked + .slider:before {
  transform: translateX(20px);
  background-color: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
}

.text-glow-cyan {
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}

/* Clickable Client Name Link (Clean Hover Effect) */
.btn-action-client-detail {
  cursor: pointer;
  color: var(--text-primary);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.15s ease, text-shadow 0.15s ease;
}

.btn-action-client-detail:hover {
  color: #d8b4fe !important;
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

