/* style.css */
/* ========================================================
   DESIGN SYSTEM — PLUXEE SAAS REFINED (Linear/Stripe grade)
   Camada 1: tokens · Camada 2: base · Camada 3: componentes
   Nenhum ID alterado — apenas refinamento visual global.
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Brand */
  --pluxee-orange: #FF7900;
  --pluxee-orange-hover: #E06A00;
  --pluxee-orange-soft: rgba(255, 121, 0, 0.10);
  --pluxee-blue: #002F6C;
  --pluxee-blue-light: #EBF3FC;

  /* Surfaces */
  --surface-light: rgba(255, 255, 255, 0.78);
  --surface-dark: rgba(15, 23, 42, 0.72);
  --bg-app-light: #F7F9FC;
  --bg-app-dark: #0B1220;

  /* Text */
  --text-light: #1E293B;
  --text-dark: #F8FAFC;

  /* Sombras em camadas (estilo Stripe: rasa + média + profunda) */
  --shadow-xs: 0 1px 2px rgba(2, 18, 43, 0.04);
  --shadow-card: 0 1px 2px rgba(2, 18, 43, 0.04), 0 8px 24px -12px rgba(0, 47, 108, 0.10);
  --shadow-card-hover: 0 2px 4px rgba(2, 18, 43, 0.05), 0 18px 40px -14px rgba(0, 47, 108, 0.18);
  --shadow-pop: 0 24px 60px -18px rgba(2, 18, 43, 0.25);

  --shadow-card-dark: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 28px -14px rgba(0, 0, 0, 0.55);
  --shadow-card-hover-dark: 0 2px 4px rgba(0, 0, 0, 0.4), 0 22px 48px -16px rgba(0, 0, 0, 0.65);

  /* Motion */
  --ease-organic: cubic-bezier(0.22, 1, 0.36, 1);

  /* Fonts */
  --font-primary: 'Plus Jakarta Sans', sans-serif;
  --font-display: 'Outfit', sans-serif;
}

/* ============ BASE ============ */
* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-primary);
  background-color: var(--bg-app-light);
  color: var(--text-light);
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.dark {
  background-color: var(--bg-app-dark);
  color: var(--text-dark);
}

/* Fundo com profundidade sutil (radial brand, imperceptível mas dá vida) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(255, 121, 0, 0.05), transparent 60%),
    radial-gradient(800px 420px at -10% 110%, rgba(0, 47, 108, 0.05), transparent 60%);
}
body.dark::before {
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(255, 121, 0, 0.06), transparent 60%),
    radial-gradient(800px 420px at -10% 110%, rgba(59, 130, 246, 0.05), transparent 60%);
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); letter-spacing: -0.01em; }

::selection { background: var(--pluxee-orange-soft); color: var(--pluxee-orange-hover); }
body.dark ::selection { background: rgba(255, 121, 0, 0.25); color: #FFD9B3; }

/* Foco acessível e elegante (teclado) */
:focus-visible {
  outline: 2px solid var(--pluxee-orange);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ============ GLASSMORPHISM REFINADO ============ */
.glass {
  background-color: var(--surface-light);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-card);
}

body.dark .glass {
  background-color: var(--surface-dark);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow-card-dark);
}

/* ============ CARDS (qualquer cartão arredondado do app) ============ */
.tab-view .rounded-2xl,
.tab-view .rounded-xl {
  transition: box-shadow 0.3s var(--ease-organic), transform 0.3s var(--ease-organic), border-color 0.3s ease;
}

/* Elevação suave só nos cartões com sombra (KPIs, painéis) */
.tab-view .shadow-sm { box-shadow: var(--shadow-card) !important; }
.tab-view .shadow-sm:hover {
  box-shadow: var(--shadow-card-hover) !important;
  transform: translateY(-2px);
  border-color: rgba(0, 47, 108, 0.12);
}
body.dark .tab-view .shadow-sm { box-shadow: var(--shadow-card-dark) !important; }
body.dark .tab-view .shadow-sm:hover {
  box-shadow: var(--shadow-card-hover-dark) !important;
  border-color: rgba(255, 121, 0, 0.18);
}

.premium-shadow { box-shadow: 0 20px 40px -15px rgba(0, 47, 108, 0.10); }
body.dark .premium-shadow { box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5); }

.interactive-hover { transition: all 0.3s var(--ease-organic); }
.interactive-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}
body.dark .interactive-hover:hover { box-shadow: var(--shadow-card-hover-dark); }

/* ============ NAVEGAÇÃO LATERAL (estilo Linear) ============ */
.nav-item { position: relative; }
.nav-item:hover { transform: translateX(2px); }
.nav-item, .nav-item * { transition: all 0.18s var(--ease-organic); }

/* Barra de acento no item ativo (o app troca a classe p/ bg-pluxee-blue) */
.nav-item.bg-pluxee-blue::before,
.nav-item[class*="bg-pluxee-blue"]::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--pluxee-orange), var(--pluxee-orange-hover));
}

/* ============ BOTÕES — tato e resposta ============ */
button {
  transition: transform 0.15s var(--ease-organic), box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
button:active { transform: scale(0.97); }
button:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-animate { transition: all 0.2s ease; }
.btn-animate:active { transform: scale(0.96); }

/* ============ INPUTS / SELECTS ============ */
input, select, textarea {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--pluxee-orange) !important;
  box-shadow: 0 0 0 3px var(--pluxee-orange-soft);
  outline: none;
}

/* ============ TABELAS — leitura rápida ============ */
table { border-collapse: separate; border-spacing: 0; }
thead th { position: sticky; top: 0; backdrop-filter: blur(6px); z-index: 1; }
tbody tr { transition: background-color 0.15s ease, transform 0.15s ease; }
tbody tr:hover { box-shadow: inset 3px 0 0 var(--pluxee-orange); }

/* Numerais tabulares p/ colunas de valores */
td, th { font-variant-numeric: tabular-nums; }

/* ============ ANIMAÇÕES ============ */
@keyframes slideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-slide-in { animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

/* Entrada orgânica de cada aba */
.tab-view:not(.hidden) { animation: slideIn 0.35s var(--ease-organic); }

@keyframes pulse-soft {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.02); }
}
.pulse-glow { animation: pulse-soft 3s infinite ease-in-out; }

@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(0, 47, 108, 0.15);
  border-radius: 99px;
}
body.dark ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); }
::-webkit-scrollbar-thumb:hover { background: var(--pluxee-orange); }

/* ============ KANBAN ============ */
.kanban-scroll { overflow-x: auto; scrollbar-width: thin; }
.kanban-column { min-height: calc(100vh - 220px); }
.kanban-column .rounded-xl:hover { transform: translateY(-2px); }

/* ============ BADGES ============ */
.status-pill {
  font-size: 0.725rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
}

/* ============ RADAR COMERCIAL — legibilidade superior ============ */
.radar-doc { display: flex; flex-direction: column; gap: 10px; }

.radar-section {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--pluxee-orange);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.radar-section::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--pluxee-orange-soft), transparent);
}

.radar-topic {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(0, 47, 108, 0.035);
  border: 1px solid rgba(0, 47, 108, 0.06);
  line-height: 1.55;
}
body.dark .radar-topic {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.06);
}
.radar-topic strong {
  color: var(--pluxee-blue);
  font-weight: 800;
  display: inline-block;
  margin-right: 4px;
}
body.dark .radar-topic strong { color: #93C5FD; }

.radar-modal-card { animation: modalIn 0.28s var(--ease-organic); }

/* ============ ACESSIBILIDADE ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
