* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f7f7f9;
  color: #1e1e1e;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: #1f2937;
  color: #fff;
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: #374151;
  font-size: 12px;
}

.badge.soft {
  background: #e5e7eb;
  color: #374151;
}

.container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  padding: 24px;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
}

.form-section h3 {
  margin: 0 0 6px 0;
  font-size: 14px;
  color: #334155;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (min-width: 980px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .form-actions {
    grid-column: 1 / -1;
  }
}

h2 {
  margin-top: 0;
}

form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

input,
textarea,
button {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  background: #fff;
}

button {
  background: #2563eb;
  color: #fff;
  border: none;
  cursor: pointer;
}

button.secondary {
  background: #6b7280;
}

button.danger {
  background: #dc2626;
}

.inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hint {
  font-size: 12px;
  color: #6b7280;
}

.task {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  background: #f9fafb;
}

.task h3 {
  margin: 0 0 6px 0;
}

.task-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.filters,
.logs-controls {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 12px;
  align-items: end;
}

.file-input {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e5e7eb;
  font-size: 12px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 12px 0;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.metric {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px;
}

.metric h3 {
  margin: 0 0 6px 0;
  font-size: 13px;
  color: #6b7280;
}

.metric div {
  font-size: 18px;
  font-weight: bold;
}

.button-link {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  text-decoration: none;
  color: #1f2937;
  background: #fff;
}

.login-page {
  min-height: 100vh;
  background: radial-gradient(circle at top, #e0f2fe, #f7f7f9 40%, #f8fafc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-wrap {
  width: min(440px, 90vw);
}

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  border: 1px solid #e5e7eb;
}

.login-header {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.login-header h1 {
  margin: 0 0 4px 0;
  font-size: 20px;
}

.login-header p {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
}

.logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #2563eb;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: bold;
  font-size: 18px;
  letter-spacing: 0.5px;
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-footer {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.app-page {
  background: #f1f5f9;
}

.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #0f172a;
  color: #e2e8f0;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar .logo {
  background: #2563eb;
}

.sidebar .muted {
  color: #94a3b8;
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  text-align: left;
  background: transparent;
  color: #e2e8f0;
  border: 1px solid transparent;
  padding: 10px 12px;
  border-radius: 10px;
}

.nav-item.active,
.nav-item:hover {
  background: #1e293b;
  border-color: #334155;
}

.content {
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
  margin-bottom: 16px;
}

.title {
  font-weight: bold;
}

.page {
  display: none;
}

.page.active {
  display: grid;
  gap: 16px;
}

pre {
  white-space: pre-wrap;
  background: #0f172a;
  color: #f8fafc;
  padding: 12px;
  border-radius: 8px;
  max-height: 240px;
  overflow: auto;
}
