:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --border: #dde1e6;
  --text: #1f2937;
  --muted: #6b7280;
  --brand: #2c3e50;
  --accent: #3498db;
  --danger: #e74c3c;
  --danger-bg: #fdecea;
  --ok-bg: #e8f5e9;
}

* { box-sizing: border-box; }

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

.navbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 24px;
  background: var(--brand);
  color: white;
  flex-wrap: wrap;
}

.navbar-brand { font-weight: 700; }

.navbar-links { display: flex; gap: 16px; flex: 1; }

.navbar-links a, .navbar-user a {
  color: white;
  text-decoration: none;
  opacity: 0.9;
}

.navbar-links a:hover, .navbar-user a:hover { opacity: 1; text-decoration: underline; }

.navbar-user { font-size: 0.9em; opacity: 0.9; }

.container {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 16px;
}

h1 { font-size: 1.4em; margin-bottom: 16px; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: end;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.filters label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85em;
  color: var(--muted);
}

input, select, button {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

button {
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
}

button:hover { opacity: 0.9; }

button.btn-danger { background: var(--danger); }

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.data-table th, .data-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92em;
}

.data-table th {
  background: #fafbfc;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.75em;
  letter-spacing: 0.04em;
}

.data-table tr:last-child td { border-bottom: none; }

.data-table .actions { display: flex; gap: 8px; }

tr.log-error td { background: var(--danger-bg); }
tr.log-warning td { background: #fff8e1; }
tr.log-info td { background: var(--ok-bg); }

.login-box {
  max-width: 360px;
  margin: 80px auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
}

.login-box form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-box label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stacked-form {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: end;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.stacked-form label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85em; color: var(--muted); }
.stacked-form label.checkbox { flex-direction: row; align-items: center; gap: 6px; }

.inline-form { display: inline-flex; gap: 8px; margin: 0; }

.item-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.item-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.item-list li:last-child { border-bottom: none; }

.alert {
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 0.9em;
}

.alert-error { background: var(--danger-bg); color: #b91c1c; }
.alert-success { background: var(--ok-bg); color: #1b5e20; }
