/* static/theme.css */
:root {
  /* Cores base */
  --bg: #f5f7ff;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e9ecf5;

  /* Paleta Lander */
  --brand-1: #4aa8ff;
  --brand-2: #6f86ff;
  --brand-3: #a8e0ff;

  /* Primárias */
  --primary: #4f7cff;
  --primary-600: #3d68f6;
  --primary-700: #2e55e8;
  --primary-soft: #e9efff;

  /* Feedback */
  --success: #22c55e;
  --danger: #ef4444;

  /* Layout */
  --radius: 14px;
  --shadow: 0 10px 24px rgba(20,24,40,.08);
  --shadow-soft: 0 6px 16px rgba(20,24,40,.06);
}

/* Reset básico */
* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; padding: 0; }

body {
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 800px at -10% -10%, #eef3ff 0%, transparent 60%),
    radial-gradient(1400px 900px at 110% -10%, #eef2ff 0%, transparent 65%),
    var(--bg);
  
  /* GRID MÁGICO DO SEU SISTEMA ANTIGO */
  display: grid;
  grid-template-columns: 72px 1fr;
  min-height: 100vh;
  transition: grid-template-columns .25s ease;
}

/* Títulos */
h1, h2, h3, h4 { margin: 0 0 .5rem 0; letter-spacing: .2px; }
h1 { font-weight: 800; font-size: 1.75rem; }

/* Expande sidebar no hover */
body:has(.sidebar:hover) {
  grid-template-columns: 240px 1fr;
}

/* ================= SIDEBAR ================= */
.sidebar {
  background: linear-gradient(180deg, var(--brand-1) 0%, var(--brand-2) 65%, var(--brand-3) 100%);
  border-right: 1px solid rgba(255,255,255,.18);
  padding: 24px 12px;
  overflow: hidden;
  color: #eef6ff;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 100;
}

/* Marca / Logo */
.brand {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-bottom: 32px; min-height: 40px;
  white-space: nowrap;
}
.brand i { font-size: 32px; color: white; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); }
.brand span {
  font-weight: 800; font-size: 1.25rem;
  color: white; opacity: 0; transition: opacity .2s ease;
}
body:has(.sidebar:hover) .brand span { opacity: 1; }
body:has(.sidebar:hover) .brand { justify-content: flex-start; padding-left: 10px; }

/* Navegação */
.nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }

.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 12px; text-decoration: none;
  color: #f0f7ff; font-weight: 600;
  transition: all .2s ease;
}

.nav a:hover {
  background: rgba(255,255,255,.15);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
}

.nav a.active {
  background: linear-gradient(90deg, rgba(255,255,255,.25), rgba(255,255,255,.1));
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.3);
}

.nav a .icon {
  width: 24px; height: 24px; flex: 0 0 24px;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.nav a .label { opacity: 0; white-space: nowrap; transition: opacity .2s ease; }
body:has(.sidebar:hover) .nav a .label { opacity: 1; }

/* Logout no final */
.nav-footer { margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.2); }

/* ================= MAIN CONTENT ================= */
.main {
  padding: 32px 40px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 24px;
}

/* Componentes Visuais (Cards, Tables, etc) */
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 0; /* Padding controlado pelos filhos ou classes auxiliares */
  overflow: hidden;
}
.card--p { padding: 24px; }

/* Tabelas */
.table { width: 100%; border-collapse: collapse; }
.table th { background: #f6f8ff; color: #5060a8; font-weight: 700; text-transform: uppercase; font-size: 0.75rem; padding: 14px 20px; text-align: left; border-bottom: 1px solid var(--line); }
.table td { padding: 16px 20px; border-bottom: 1px solid var(--line); color: var(--text); font-size: 0.9rem; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover { background-color: #f9fafb; cursor: pointer; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 10px; font-weight: 700; font-size: 0.9rem;
  border: none; cursor: pointer; text-decoration: none;
  transition: transform .1s, filter .2s;
}
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-primary { background: linear-gradient(90deg, var(--primary), var(--primary-600)); color: white; box-shadow: 0 4px 12px rgba(63,104,246,0.25); }
.btn-ghost { background: #eef2ff; color: var(--primary-700); }
.btn-danger { background: #fee2e2; color: #ef4444; }

/* Inputs e Badges */
.badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 800; }
.input, .select {
  width: 100%; padding: 10px 14px; border: 1px solid #dbe2ff;
  border-radius: 10px; background: #f6f8ff; color: var(--text);
  font-size: 0.9rem; outline: none; transition: all 0.2s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,124,255,0.15); background: white; }

/* --- ESTILOS DO LOGIN (Igual Print 2) --- */
body.auth-body {
    background: #f0f4f8; /* Fundo cinza bem claro */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
}

.auth-wrapper {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Logo acima do card */
.auth-logo {
    margin-bottom: 30px;
    text-align: center;
}
.auth-logo img {
    max-height: 50px; /* Ajuste conforme seu logo */
}
/* Fallback caso a imagem não carregue */
.auth-logo span {
    font-size: 2rem;
    font-weight: 800;
    color: #4aa8ff; /* Azul da marca */
    letter-spacing: -1px;
}

/* O Cartão */
.login-card {
    background: white;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border: 1px solid #eef2f6;
}

/* Cabeçalho Azul do Card */
.card-header-blue {
    background: linear-gradient(90deg, #4f7cff, #6f86ff); /* Azul degradê */
    color: white;
    padding: 20px;
    text-align: left;
    font-weight: 800;
    font-size: 1.1rem;
}

.card-body {
    padding: 30px;
}

/* Inputs com ícones */
.input-with-icon {
    position: relative;
    margin-bottom: 20px;
}

.input-with-icon label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.input-with-icon i {
    position: absolute;
    left: 14px;
    top: 38px; /* Ajuste fino baseado na altura do label */
    color: #94a3b8;
    font-size: 1.1rem;
}

.input-with-icon input {
    width: 100%;
    padding: 12px 12px 12px 44px; /* Espaço para o ícone */
    background: #f1f5f9;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #1e293b;
    outline: none;
    transition: all 0.2s;
}

.input-with-icon input:focus {
    background: white;
    border-color: #4f7cff;
    box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.1);
}

/* Botão Entrar */
.btn-login {
    width: 100%;
    background: #4f7cff;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 10px;
}
.btn-login:hover {
    background: #3d68f6;
}