:root {
  --bg: #0f172a;
  --surface: #ffffff;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --ok: #16a34a;
  --warn: #d97706;
  --err: #dc2626;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f1f5f9;
  color: var(--ink);
  line-height: 1.5;
}

.logo {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; letter-spacing: .5px;
}

/* ---------- Login ---------- */
.tela-login {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e1b4b, #0f172a);
  padding: 24px;
}

.card-login {
  background: var(--surface);
  width: 100%; max-width: 380px;
  padding: 36px 32px;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}

.marca { text-align: center; margin-bottom: 24px; }
.marca .logo { margin: 0 auto 14px; width: 52px; height: 52px; font-size: 18px; }
.marca h1 { font-size: 19px; }
.marca .sub { color: var(--muted); font-size: 13px; }

/* ---------- Topo ---------- */
.topo {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.topo-marca { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.topo-user { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 14px; }

.btn-sair {
  background: transparent; border: 1px solid var(--line);
  color: var(--muted); padding: 6px 14px; border-radius: 8px;
  cursor: pointer; font-size: 13px;
}
.btn-sair:hover { background: #f8fafc; }

/* ---------- Conteudo ---------- */
.conteudo {
  max-width: 720px; margin: 28px auto; padding: 0 24px;
  display: flex; flex-direction: column; gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
}
.card h2 { font-size: 16px; margin-bottom: 6px; }
.dica { color: var(--muted); font-size: 13px; margin-bottom: 16px; }

/* ---------- Formularios ---------- */
label {
  display: block; font-size: 13px; font-weight: 600;
  margin: 14px 0 6px;
}
input[type=text], input[type=password], input[type=file], select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79,70,229,.15);
}

button[type=submit] {
  margin-top: 18px;
  width: 100%;
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 11px;
  border-radius: 9px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
}
button[type=submit]:hover { background: var(--brand-dark); }

/* ---------- Alertas ---------- */
.alerta {
  padding: 10px 12px; border-radius: 9px;
  font-size: 13px; margin-bottom: 8px;
}
.alerta.erro { background: #fef2f2; color: var(--err); border: 1px solid #fecaca; }

/* ---------- Lista de jobs ---------- */
.lista-jobs { display: flex; flex-direction: column; gap: 10px; }
.vazio { color: var(--muted); font-size: 13px; }

.job {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.job-info { min-width: 0; }
.job-nome {
  font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.job-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

.badge {
  font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .4px;
  white-space: nowrap;
}
.badge.pending    { background: #f1f5f9; color: var(--muted); }
.badge.processing { background: #fef3c7; color: var(--warn); }
.badge.done       { background: #dcfce7; color: var(--ok); }
.badge.error      { background: #fef2f2; color: var(--err); }

.btn-baixar {
  background: var(--brand); color: #fff;
  text-decoration: none;
  padding: 7px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
}
.btn-baixar:hover { background: var(--brand-dark); }
