@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/brand/fonts/lato-400.woff2") format("woff2");
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/brand/fonts/lato-700.woff2") format("woff2");
}

:root {
  --navy: #003567;
  --navy-light: #004c90;
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #1f2937;
  --text-muted: #6b7280;
  --border: #e2e6ec;
  --ok: #1a7f37;
  --warn: #b45309;
  --err: #b91c1c;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Lato", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: var(--navy-light); }

.topbar {
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
}
.topbar .brand { display: flex; align-items: center; gap: 12px; }
.topbar .brand img { height: 28px; display: block; }
.topbar .brand .app-name { font-size: 14px; opacity: 0.85; border-left: 1px solid rgba(255,255,255,.3); padding-left: 12px; }
.topbar .who { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.topbar-link { color: #fff; text-decoration: none; font-weight: 700; opacity: .9; border: 1px solid rgba(255,255,255,.4); padding: 5px 12px; border-radius: 6px; }
.topbar-link:hover { background: rgba(255,255,255,.12); }
.topbar form { margin: 0; }
.topbar button.link {
  background: none; border: none; color: #fff; opacity: .85; cursor: pointer;
  font: inherit; text-decoration: underline; padding: 0;
}

.container { max-width: 880px; margin: 0 auto; padding: 28px 20px 60px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.card h2 { margin-top: 0; font-size: 17px; }
.card p.hint { color: var(--text-muted); font-size: 13px; margin-top: -6px; }

label { display: block; font-size: 13px; font-weight: 700; margin: 14px 0 6px; }
input[type="password"], input[type="text"], select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
}
input:focus, select:focus { outline: 2px solid var(--navy-light); outline-offset: 1px; }

.instance-list { border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; max-height: 220px; overflow-y: auto; }
.instance-list label { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 8px 0; }
.instance-list input[type="checkbox"] { width: auto; }

.btn {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  border: none;
  padding: 11px 20px;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  margin-top: 18px;
}
.btn:hover { background: var(--navy-light); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--navy); border: 1px solid var(--navy); }
.btn.small { padding: 6px 12px; font-size: 13px; margin-top: 0; }

.error-box {
  background: #fef2f2; border: 1px solid #fecaca; color: var(--err);
  padding: 10px 14px; border-radius: 8px; font-size: 14px; margin: 12px 0;
}
.ok-box {
  background: #f0fdf4; border: 1px solid #bbf7d0; color: var(--ok);
  padding: 10px 14px; border-radius: 8px; font-size: 14px; margin: 12px 0;
}

table.jobs { width: 100%; border-collapse: collapse; font-size: 14px; }
table.jobs th, table.jobs td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.jobs th { color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.executando, .badge.na_fila { background: #fef3c7; color: var(--warn); }
.badge.concluida { background: #dcfce7; color: var(--ok); }
.badge.erro, .badge.interrompida { background: #fee2e2; color: var(--err); }

.progress-track { background: #eef1f5; border-radius: 999px; height: 8px; width: 160px; overflow: hidden; }
.progress-fill { background: var(--navy-light); height: 100%; }

.muted { color: var(--text-muted); font-size: 12px; }

/* ---- login ---- */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy);
  padding: 20px;
}
.login-card {
  background: #fff; border-radius: var(--radius); padding: 36px 32px;
  width: 100%; max-width: 380px; box-shadow: 0 10px 40px rgba(0,0,0,.25);
}
.login-card .logo-wrap { text-align: center; margin-bottom: 22px; }
.login-card .logo-wrap .logo-bg { background: var(--navy); display: inline-block; padding: 14px 18px; border-radius: 8px; }
.login-card .logo-wrap img { height: 30px; display: block; }
.login-card h1 { font-size: 16px; text-align: center; margin: 0 0 4px; color: var(--text-muted); font-weight: 400; }
