:root {
  --bg: #0f172a;
  --panel: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --border: #e2e8f0;
  --danger: #dc2626;
  --ok: #16a34a;
  --warn: #d97706;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f1f5f9;
  color: var(--text);
}

.topbar {
  background: var(--bg);
  color: white;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand { color: white; font-weight: 600; text-decoration: none; font-size: 1.1rem; }

.nav-actions { display: flex; gap: 10px; }

.container { max-width: 960px; margin: 0 auto; padding: 32px 20px; }

h1 { font-size: 1.6rem; margin-bottom: 20px; }

.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; color: white; border: 1px solid rgba(255,255,255,0.4); }
.btn-danger { background: var(--danger); color: white; }
.btn-block { width: 100%; margin-top: 12px; }

.card, .login-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  max-width: 520px;
}

.login-box { margin: 60px auto; text-align: left; }

label { display: block; font-size: 0.85rem; font-weight: 600; margin: 12px 0 4px; }

input[type=text], input[type=password] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
}

fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin-top: 12px; }
legend { font-weight: 600; color: var(--primary); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

.checkbox-line { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.checkbox-line input { width: auto; }

.hint { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.muted { color: var(--muted); font-size: 0.85rem; }
.error { color: var(--danger); }

.table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: 8px; overflow: hidden; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 0.9rem; }
.table th { background: #f8fafc; font-size: 0.8rem; color: var(--muted); text-transform: uppercase; }

.badge { padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; color: white; }
.badge-pendente { background: var(--muted); }
.badge-executando { background: var(--warn); }
.badge-concluído { background: var(--ok); }
.badge-erro { background: var(--danger); }
.badge-cancelado { background: #6b7280; }

.info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; background: var(--panel); padding: 16px; border-radius: 8px; margin-bottom: 20px; }
@media (max-width: 720px) { .info-grid { grid-template-columns: 1fr 1fr; } }

.log-box {
  background: #0f172a;
  color: #d1fae5;
  padding: 16px;
  border-radius: 8px;
  height: 400px;
  overflow-y: auto;
  font-family: "SF Mono", Consolas, monospace;
  font-size: 0.8rem;
  white-space: pre-wrap;
}
