/* ==========================================================================
   ServiGest — design system global (CSS puro, sem @apply)
   Restaurado do index.html original (era <style type="text/tailwindcss">) para
   arquivo próprio em public/styles: o Vite nunca processa este arquivo no
   build, então não há risco de erro de parsing (postcss), e o Tailwind via
   CDN vendored (/vendor/tailwindcdn.js) continua gerando os utilitários.
   Cores literais espelham o tailwind.config inline do index.html:
   primary #0ea5e9 (dark #0284c7, light #38bdf8) • accent #10B981
   ========================================================================== */

/* ---------- Base ---------- */
body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.body-themed-background { background-color: #F3F4F6; }
.dark .body-themed-background { background-color: #111827; }
.body-themed-text { color: #1F2937; }
.dark .body-themed-text { color: #F3F4F6; }
.bg-card { background-color: #FFFFFF; }
.dark .bg-card { background-color: #1F2937; }
.text-muted-foreground { color: #4B5563; }
.dark .text-muted-foreground { color: #D1D5DB; }
.bg-muted { background-color: #f3f4f6; }
.dark .bg-muted { background-color: #1f2937; }
.border-border { border-color: #E5E7EB; }
.dark .border-border { border-color: #374151; }
.list-item-hoverable { transition: all 0.3s ease-out; }

/* ---------- Cards interativos ---------- */
.interactive-card {
  background-color: #FFFFFF;
  border-radius: 1rem;
  border: 1px solid #E5E7EB;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04), 0 4px 12px -2px rgb(14 165 233 / 0.08);
}
.dark .interactive-card { background-color: #1F2937; border-color: #374151; }
.interactive-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 2px 4px rgb(15 23 42 / 0.05), 0 12px 28px -6px rgb(14 165 233 / 0.18);
}
.interactive-card-subtle {
  background-color: #f9fafb;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  border: 1px solid #E5E7EB;
  transition: all 0.3s ease-in-out;
}
.dark .interactive-card-subtle { background-color: rgb(55 65 81 / 0.5); border-color: #374151; }
.interactive-card-subtle:hover {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  transform: translateY(-1px);
}

/* ===== Sistema de sombra/iluminação global (polish profissional) ===== */
.glow-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(255,255,255,0.75));
  border: 1px solid rgba(226,232,240,0.9);
  box-shadow:
    0 1px 2px rgb(15 23 42 / 0.04),
    0 8px 24px -8px rgb(14 165 233 / 0.10),
    inset 0 1px 0 rgba(255,255,255,0.7);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.dark .glow-card {
  background: linear-gradient(135deg, rgba(31,41,55,0.85), rgba(31,41,55,0.65));
  border-color: rgba(55,65,81,0.7);
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.35),
    0 8px 28px -8px rgb(14 165 233 / 0.16),
    inset 0 1px 0 rgba(255,255,255,0.06);
}
.glow-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(14,165,233,0.45), transparent);
  pointer-events: none;
}
.glow-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 2px 4px rgb(15 23 42 / 0.05),
    0 16px 40px -10px rgb(14 165 233 / 0.22),
    inset 0 1px 0 rgba(255,255,255,0.8);
}
.dark .glow-card:hover {
  box-shadow:
    0 2px 4px rgb(0 0 0 / 0.4),
    0 18px 44px -10px rgb(14 165 233 / 0.30),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

/* ---------- Botões ---------- */
.btn-glow-primary {
  background-image: linear-gradient(to right, #0ea5e9, #0284c7);
  color: #fff;
  font-weight: 600;
  border-radius: 0.75rem;
  padding: 0.5rem 1rem;
  box-shadow: 0 4px 14px -4px rgb(14 165 233 / 0.5), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-glow-primary:hover {
  box-shadow: 0 6px 20px -4px rgb(14 165 233 / 0.65), inset 0 1px 0 rgba(255,255,255,0.25);
  transform: translateY(-1px) scale(1.02);
}
.btn-glow-primary:active { transform: scale(0.98); }

.focus-ring-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgb(14 165 233 / 0.35);
}

.btn-primary-enhanced {
  background-color: #0ea5e9; color: #fff; font-weight: 600;
  padding: 0.5rem 1rem; border-radius: 0.375rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  transition: all 0.15s ease-out;
}
.btn-primary-enhanced:hover { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1); background-color: #0284c7; transform: scale(1.05); }
.btn-primary-enhanced:active { box-shadow: 0 1px 2px rgb(0 0 0 / 0.05); transform: scale(0.95); }
.btn-accent-enhanced {
  background-color: #10B981; color: #fff; font-weight: 600;
  padding: 0.5rem 1rem; border-radius: 0.375rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  transition: all 0.15s ease-out;
}
.btn-accent-enhanced:hover { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1); background-color: #059669; transform: scale(1.05); }
.btn-accent-enhanced:active { box-shadow: 0 1px 2px rgb(0 0 0 / 0.05); transform: scale(0.95); }
.btn-secondary-enhanced {
  background-color: #e5e7eb; color: #1F2937; font-weight: 500;
  padding: 0.5rem 1rem; border-radius: 0.375rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  transition: all 0.15s ease-out;
}
.dark .btn-secondary-enhanced { background-color: #374151; color: #F3F4F6; }
.btn-secondary-enhanced:hover { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1); background-color: #d1d5db; transform: scale(1.05); }
.dark .btn-secondary-enhanced:hover { background-color: #4b5563; }
.btn-secondary-enhanced:active { box-shadow: 0 1px 2px rgb(0 0 0 / 0.05); transform: scale(0.95); }
.btn-danger-enhanced {
  background-color: #ef4444; color: #fff; font-weight: 600;
  padding: 0.5rem 1rem; border-radius: 0.375rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  transition: all 0.15s ease-out;
}
.btn-danger-enhanced:hover { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1); background-color: #dc2626; transform: scale(1.05); }
.btn-danger-enhanced:active { box-shadow: 0 1px 2px rgb(0 0 0 / 0.05); transform: scale(0.95); }

/* ---------- Animações custom (complementam o config do Tailwind no index.html) ---------- */
@keyframes sg-expand {
  0% { height: 0; opacity: 0; }
  100% { height: auto; opacity: 1; }
}
@keyframes sg-collapse {
  0% { height: auto; opacity: 1; }
  100% { height: 0; opacity: 0; }
}
@keyframes sg-section-shine {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}
@keyframes sg-bounce-subtle {
  0% { transform: translateY(0); }
  30% { transform: translateY(-10px); }
  50% { transform: translateY(0); }
  70% { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}
.animate-expand { animation: sg-expand 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.animate-collapse { animation: sg-collapse 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.animate-section-shine { animation: sg-section-shine 2s ease-in-out infinite; }
.animate-bounce-subtle { animation: sg-bounce-subtle 0.6s ease-out; }

/* Brilho varrendo a seção (usado em SettingsPage .settings-section) */
.section-shine-effect { position: relative; }
.section-shine-effect::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(14,165,233,0.06), transparent);
  animation: sg-section-shine 4s ease-in-out infinite;
  pointer-events: none;
}

/* ---------- Glassmorphism ---------- */
.glassmorphism-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}
.glassmorphism-card-dark {
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.8), rgba(31, 41, 55, 0.6));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(75, 85, 99, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.animation-delay-1000 { animation-delay: 1s; }
.animation-delay-2000 { animation-delay: 2s; }

.btn-glassmorphism { position: relative; overflow: hidden; }
.btn-glassmorphism::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s;
}
.btn-glassmorphism:hover::before { left: 100%; }

/* ---------- Rolagem horizontal sem barra visível (chips mobile, carrosséis) ----------
   Mantém o arrasto/toque; esconde a barra feia em todos os navegadores. */
.no-scrollbar {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge antigo */
}
.no-scrollbar::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Edge */
}

/* ---------- Scrollbar fina ---------- */
.scrollbar-thin {
  scrollbar-width: thin;
  scrollbar-color: rgba(156, 163, 175, 0.4) transparent;
}
.scrollbar-thin::-webkit-scrollbar { width: 4px; height: 4px; }
.scrollbar-thin::-webkit-scrollbar-track { background: transparent; }
.scrollbar-thin::-webkit-scrollbar-thumb {
  background: rgba(156, 163, 175, 0.3);
  border-radius: 6px;
  transition: all 0.3s ease;
}
.scrollbar-thin::-webkit-scrollbar-thumb:hover { background: rgba(156, 163, 175, 0.6); }
.dark .scrollbar-thin { scrollbar-color: rgba(75, 85, 99, 0.4) transparent; }
.dark .scrollbar-thin::-webkit-scrollbar-thumb { background: rgba(75, 85, 99, 0.3); }
.dark .scrollbar-thin::-webkit-scrollbar-thumb:hover { background: rgba(75, 85, 99, 0.6); }

/* ---------- True Black (escopo opt-in: html.true-black-scope.dark) ---------- */
html.true-black-scope.dark .body-themed-background { background-color: #000000 !important; }
html.true-black-scope.dark .body-themed-text { color: #E5E7EB !important; }
html.true-black-scope.dark .interactive-card { background-color: #181414 !important; border-color: #171717 !important; }
html.true-black-scope.dark .interactive-card-subtle { background-color: rgb(0 0 0 / 0.3) !important; border-color: #1F2937 !important; }
html.true-black-scope.dark .bg-muted { background-color: #111827 !important; }
