* { box-sizing: border-box; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f4f5f7;
  margin: 0;
  color: #222;
}

/* ---- Auth ---- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-card {
  background: #fff;
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  width: 360px;
}
.auth-card h1 { text-align: center; font-size: 22px; margin-bottom: 16px; }
.tabs { display: flex; margin-bottom: 16px; }
.tab-btn {
  flex: 1; padding: 8px; border: none; background: #eee; cursor: pointer;
  border-radius: 6px; margin: 0 4px; font-weight: 600;
}
.tab-btn.active { background: #2563eb; color: #fff; }
.auth-form { display: flex; flex-direction: column; gap: 6px; }
.auth-form label { font-size: 13px; color: #555; margin-top: 6px; }
.auth-form input {
  padding: 8px 10px; border: 1px solid #ccc; border-radius: 6px; font-size: 14px;
}
.auth-form button {
  margin-top: 14px; padding: 10px; border: none; border-radius: 6px;
  background: #2563eb; color: #fff; font-weight: 600; cursor: pointer;
}
.auth-error { color: #dc2626; font-size: 13px; min-height: 18px; }

/* ---- App ---- */
.app-header {
  display: flex; justify-content: space-between; align-items: center;
  background: #fff; padding: 12px 24px; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.app-header h1 { font-size: 18px; margin: 0; }
.header-right { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #555; }

.app-body {
  max-width: 960px; margin: 20px auto; padding: 0 16px;
  display: flex; flex-direction: column; gap: 16px;
}
.panel {
  background: #fff; border-radius: 10px; padding: 16px 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.panel h2 { font-size: 15px; margin: 0 0 10px; color: #1e3a8a; }
.panel h3 { font-size: 13px; margin: 12px 0 6px; color: #555; }

.grid-3 {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 16px;
}
.grid-3 label { display: flex; flex-direction: column; font-size: 12px; color: #555; gap: 4px; }
.grid-3 input, .grid-3 select { padding: 6px 8px; border: 1px solid #ccc; border-radius: 6px; }
label.block { display: block; margin-top: 12px; font-size: 13px; color: #555; }
input[type="range"] { width: 100%; }
textarea {
  width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 6px;
  font-family: inherit; resize: vertical; margin-top: 4px;
}
input[type="file"] { margin: 6px 0; }
input[type="color"] { width: 48px; height: 30px; padding: 0; border: none; }

.file-list { list-style: none; padding: 0; margin: 8px 0; font-size: 13px; }
.file-list li { padding: 2px 0; color: #333; }
.file-name { font-size: 13px; color: #333; margin-top: 4px; }

.btn-primary {
  background: #16a34a; color: #fff; border: none; padding: 10px 22px;
  border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 14px;
}
.btn-primary:disabled { background: #9ca3af; cursor: not-allowed; }
.btn-secondary {
  background: #e5e7eb; color: #333; border: none; padding: 6px 14px;
  border-radius: 6px; cursor: pointer; font-size: 13px;
}

.jobs-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.jobs-table th, .jobs-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #eee; }
.jobs-table td.status-completed { color: #16a34a; font-weight: 600; }
.jobs-table td.status-failed { color: #dc2626; font-weight: 600; }
.jobs-table td.status-running { color: #2563eb; font-weight: 600; }
.jobs-table td.status-cancelled { color: #92400e; font-weight: 600; }
.jobs-table td.status-queued { color: #6b7280; }

#job-log-box {
  background: #111827; color: #d1d5db; padding: 10px; border-radius: 6px;
  font-size: 12px; max-height: 260px; overflow: auto; white-space: pre-wrap;
}
