:root {
  --azul: #0B1F33;
  --solar: #FFB000;
  --laranja: #FF7A1A;
  --verde: #16A34A;
  --mist: #F6F8FB;
  --grafite: #334155;
  --borda: #E2E8F0;
  --vermelho: #DC2626;
  --roxo: #7C3AED;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--mist); color: var(--azul); font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.admin-layout { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }
.sidebar { background: #071827; color: white; padding: 24px 18px; position: sticky; top: 0; height: 100vh; }
.sidebar-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; }
.sidebar-logo img { width: 44px; }
.sidebar-logo strong { font-size: 1.3rem; }
.side-nav { display: grid; gap: 8px; }
.side-nav a { padding: 13px 14px; border-radius: 14px; color: rgba(255,255,255,.82); font-weight: 800; display: flex; gap: 10px; align-items: center; }
.side-nav a:hover, .side-nav a.active { background: rgba(255,255,255,.10); color: white; }
.admin-main { padding: 28px; }
.topbar { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 26px; }
.topbar h1 { margin: 0; font-size: 2rem; letter-spacing: -.04em; }
.user-badge { background: white; border: 1px solid var(--borda); border-radius: 999px; padding: 10px 14px; font-weight: 800; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 22px; }
.metric { background: white; border: 1px solid var(--borda); border-radius: 22px; padding: 20px; box-shadow: 0 10px 30px rgba(15,31,51,.05); }
.metric span { color: #64748b; font-weight: 900; font-size: .86rem; }
.metric strong { display: block; margin-top: 8px; font-size: 2rem; letter-spacing: -.05em; }
.panel { background: white; border: 1px solid var(--borda); border-radius: 24px; padding: 20px; box-shadow: 0 10px 30px rgba(15,31,51,.05); margin-bottom: 20px; }
.panel h2 { margin: 0 0 16px; letter-spacing: -.03em; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 980px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--borda); vertical-align: top; }
th { color: #64748b; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
tr:hover td { background: #F8FAFC; }
.badge { display: inline-flex; align-items: center; padding: 6px 9px; border-radius: 999px; font-weight: 900; font-size: .78rem; white-space: nowrap; }
.badge.novo { background: #DBEAFE; color: #1D4ED8; }
.badge.qualificado, .badge.fechado, .badge.ativo { background: #DCFCE7; color: #15803D; }
.badge.enviado { background: #FFEDD5; color: #C2410C; }
.badge.negociacao { background: #EDE9FE; color: var(--roxo); }
.badge.perdido, .badge.inativo { background: #F1F5F9; color: #475569; }
.badge.invalido { background: #FEE2E2; color: var(--vermelho); }
.score { font-weight: 950; }
.score.hot { color: var(--verde); }
.score.good { color: #2563EB; }
.score.medium { color: #D97706; }
.score.cold { color: #64748b; }
.btn { border: 0; border-radius: 999px; padding: 10px 14px; font-weight: 900; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-primary { background: linear-gradient(135deg, var(--solar), var(--laranja)); color: white; }
.btn-dark { background: var(--azul); color: white; }
.btn-light { background: #F8FAFC; color: var(--azul); border: 1px solid var(--borda); }
.btn-danger { background: #FEE2E2; color: #B91C1C; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.filters { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
input, select, textarea { width: 100%; border: 1px solid var(--borda); border-radius: 14px; padding: 11px 12px; min-height: 42px; font: inherit; }
label { font-weight: 900; font-size: .88rem; display: block; margin: 0 0 6px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.notice { padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; font-weight: 800; }
.notice.ok { background: #DCFCE7; color: #15803D; }
.notice.error { background: #FEE2E2; color: #B91C1C; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.detail { background: #F8FAFC; border: 1px solid var(--borda); border-radius: 16px; padding: 14px; }
.detail small { color: #64748b; font-weight: 900; display: block; }
.detail strong { display: block; margin-top: 4px; }
.login-page { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #0B1F33 0%, #103B5C 50%, #0F766E 100%); padding: 20px; }
.login-card { width: min(430px, 100%); background: white; border-radius: 28px; padding: 28px; box-shadow: 0 30px 90px rgba(0,0,0,.25); }
.login-card img { width: 260px; display: block; margin: 0 auto 20px; }
.login-card h1 { text-align: center; margin: 0 0 18px; letter-spacing: -.04em; }
@media (max-width: 980px) {
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .cards, .filters, .form-grid, .detail-grid { grid-template-columns: 1fr; }
}
