/* /systems/aura/style/global_style.css */

/* =========================
   Design Tokens (Light) - Atualizado
   ========================= */
:root {
  /* Paleta ASSEP */
  --accent:        #F26A21;  /* laranja da marca */
  --accent-strong: #D8541A;  /* laranja escuro (hover/gradiente) */
  --accent-soft:   #FDEEE2;  /* laranja bem claro (fundos sutis) */

  --nav-1: #1b1e3a;          /* navy (sidebar / painéis escuros) */
  --nav-2: #12142a;

  --ok:     #16A34A;  /* OK/positivo */
  --warn:   #F59E0B;  /* aviso */
  --error:  #DC2626;  /* erro */
  --ink:    #1F2937;  /* texto principal (nunca preto absoluto) */
  --muted:  #6b7280;

  /* Superfícies */
  --bg:     #F8F9FB;
  --card:   #ffffff;
  --line:   #e5e7eb;

  /* Efeitos */
  --radius-md: 12px;
  --radius-lg: 16px;
  /* Sombras achatadas: cartões "grudados" no fundo (borda fina + quase sem sombra) */
  --shadow-sm:     0 1px 2px rgba(17,20,45,.04);
  --shadow-md:     0 1px 3px rgba(17,20,45,.06);
  --shadow-lg:     0 2px 8px rgba(17,20,45,.08);
  --shadow-subtle: 0 1px 2px rgba(17,20,45,.04);
  --shadow-medium: 0 1px 3px rgba(17,20,45,.06);

  /* Tipografia */
  --font-sys: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", Arial, sans-serif;

  /* Transições */
  --t-fast: 120ms ease;
  --t-base: 200ms ease;
}

/* =========================
   Base
   ========================= */
* { 
  box-sizing: border-box; 
}

html, body { 
  height: 100%; 
}

html { 
  scroll-behavior: smooth; 
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--font-sys);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { 
  color: var(--ink); 
  text-decoration: none; 
  transition: opacity var(--t-fast);
}

a:hover { 
  opacity: .7; 
}

h1, h2, h3, h4, h5, h6 { 
  margin: 0 0 .5rem 0; 
  color: var(--ink); 
  font-weight: 600;
  line-height: 1.3;
}

h1 { font-size: 28px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }

/* =========================
   Layout/helpers
   ========================= */
.center-screen {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

/* Efeito de brilho sutil no card */
.card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at center,
    rgba(124, 229, 240, 0.03) 0%,
    transparent 70%
  );
  pointer-events: none;
}

/* =========================
   Form elements
   ========================= */
.label {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 8px 0;
  font-weight: 500;
  transition: color var(--t-fast);
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 12px;
  padding: 14px 16px;
  outline: none;
  transition: all var(--t-base);
  font-size: 15px;
  font-family: inherit;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent);
  transform: translateY(-1px);
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}

.textarea {
  resize: vertical;
  min-height: 100px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all var(--t-base);
  box-shadow: 0 8px 24px rgba(242, 106, 33, 0.30);
  position: relative;
  overflow: hidden;
  font-family: inherit;
}

.button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(242, 106, 33, 0.38);
}

.button:hover::before {
  left: 100%;
}

.button:active {
  transform: translateY(0);
}

.button:disabled { 
  opacity: .6; 
  cursor: not-allowed; 
  transform: none !important;
}

.button.secondary {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--ink);
  box-shadow: none;
}

.button.secondary:hover {
  background: var(--bg);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.field {
  margin: 1.5rem 0;
}

/* =========================
   Selinhos de status (pills)
   ========================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.badge--ok     { background: rgba(22,163,74,0.12);  color: #15803d; }
.badge--warn   { background: rgba(245,158,11,0.16); color: #b45309; }
.badge--error  { background: rgba(220,38,38,0.12);  color: #b91c1c; }
.badge--accent { background: var(--accent-soft);    color: var(--accent-strong); }
.badge--muted  { background: #f1f3f6;               color: #6b7280; }

/* =========================
   Tabela limpa (opt-in via .table)
   ========================= */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}
.table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fafbfc; }

/* =========================
   Brand / Logo
   ========================= */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.brand img {
  width: 44px;
  height: 44px;
  display: block;
  transition: transform 0.6s var(--t-base);
  filter: drop-shadow(0 4px 12px rgba(242, 106, 33, 0.18));
}

.brand:hover img {
  transform: scale(1.05);
}

.brand .brand-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}

/* =========================
   Toasts (top-right)
   ========================= */
.toast-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  min-width: 280px;
  max-width: 360px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent);
  color: var(--ink);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 14px 16px;
  pointer-events: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 12px;
  animation: toast-in .3s ease-out both;
  backdrop-filter: blur(10px);
}

.toast.ok    { border-left-color: var(--ok); }
.toast.warn  { border-left-color: var(--warn); }
.toast.error { border-left-color: var(--error); }

.toast .title { 
  margin: 0 0 4px 0; 
  font-weight: 700; 
  font-size: 14px; 
}

.toast .msg   { 
  margin: 0; 
  font-size: 13px; 
  color: var(--muted); 
  line-height: 1.4;
}

.toast .close {
  margin-left: 6px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
  transition: color var(--t-fast);
  border-radius: 4px;
}

.toast .close:hover {
  color: var(--ink);
  background: rgba(0,0,0,0.05);
}

@keyframes toast-in {
  from { 
    opacity: 0; 
    transform: translateY(-8px) translateX(8px) scale(0.95); 
  }
  to   { 
    opacity: 1; 
    transform: translateY(0) translateX(0) scale(1); 
  }
}

@keyframes toast-out {
  to { 
    opacity: 0; 
    transform: translateY(-8px) translateX(8px) scale(0.95); 
  }
}

.toast.hide { 
  animation: toast-out .2s ease-in forwards; 
}

/* =========================
   Utilidades
   ========================= */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }

.w-full { width: 100%; }
.h-full { height: 100%; }

/* =========================
   Animações globais
   ========================= */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.fade-in { animation: fadeIn 0.5s var(--t-base) both; }
.slide-up { animation: slideUp 0.5s var(--t-base) both; }
.scale-in { animation: scaleIn 0.4s var(--t-base) both; }

/* =========================
   Responsividade
   ========================= */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }
  
  .card {
    padding: 20px;
    border-radius: var(--radius-md);
  }
  
  .toast-stack {
    top: 12px;
    right: 12px;
    left: 12px;
  }
  
  .toast {
    min-width: auto;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .center-screen {
    padding: 16px;
  }
  
  .card {
    padding: 16px;
  }
  
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  h3 { font-size: 18px; }
}