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

body {
  font-family: system-ui, sans-serif;
  background: #f4f6f9;
  color: #1a1a2e;
  min-height: 100vh;
}

.navbar {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: #1a1a2e;
  color: #fff;
  padding: 0.7rem 1.5rem;
}
.navbar .brand { font-weight: 700; font-size: 1.1rem; margin-right: auto; }
.navbar a { color: #cdd9e5; text-decoration: none; font-size: 0.9rem; }
.navbar a:hover { color: #fff; }
#btn-logout {
  background: transparent; border: 1px solid #556; color: #cdd9e5;
  border-radius: 4px; padding: 0.3rem 0.8rem; cursor: pointer; font-size: 0.85rem;
}

main { max-width: 960px; margin: 2rem auto; padding: 0 1rem; }
h1 { font-size: 1.6rem; margin-bottom: 1.2rem; }

.card {
  background: #fff;
  border-radius: 8px;
  padding: 1.4rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.card h2 { font-size: 1.1rem; margin-bottom: 0.8rem; color: #2d3748; }

.progress-bar {
  height: 10px;
  background: #e2e8f0;
  border-radius: 5px;
  overflow: hidden;
  margin: 0.8rem 0;
}
#progress-fill {
  height: 100%;
  background: #3b82f6;
  transition: width 0.5s ease;
  width: 0%;
}

.btn-row { display: flex; gap: 0.8rem; margin-top: 0.8rem; }
button {
  padding: 0.4rem 1.1rem;
  border: none;
  border-radius: 5px;
  background: #3b82f6;
  color: #fff;
  cursor: pointer;
  font-size: 0.9rem;
}
button:hover { background: #2563eb; }
button.danger { background: #ef4444; }
button.danger:hover { background: #dc2626; }

.error { color: #dc2626; font-size: 0.88rem; margin-top: 0.4rem; min-height: 1.2em; }

pre#log-box {
  background: #0f172a;
  color: #94a3b8;
  font-size: 0.8rem;
  padding: 1rem;
  border-radius: 6px;
  max-height: 320px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Tables */
.filter-row { display: flex; gap: 0.8rem; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }
.filter-row label { font-size: 0.88rem; color: #4a5568; }
.filter-row input, .filter-row select {
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
  font-size: 0.88rem;
}

table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th { background: #f1f5f9; text-align: left; padding: 0.5rem 0.7rem; border-bottom: 2px solid #e2e8f0; }
td { padding: 0.45rem 0.7rem; border-bottom: 1px solid #e2e8f0; }
tr:hover td { background: #f8fafc; }

.pager { display: flex; gap: 0.6rem; align-items: center; margin-top: 0.8rem; font-size: 0.88rem; }

/* Lookup pages */
.lookup-row { display: flex; gap: 0.6rem; margin-bottom: 1rem; }
.lookup-row input { flex: 1; border: 1px solid #cbd5e0; border-radius: 4px; padding: 0.4rem 0.7rem; }
.result-list { list-style: none; }
.result-list li {
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.88rem;
}
.tag {
  display: inline-block;
  background: #dbeafe;
  color: #1d4ed8;
  border-radius: 3px;
  padding: 0.1rem 0.4rem;
  font-size: 0.78rem;
  margin-left: 0.4rem;
}
