* { box-sizing: border-box; }
body {
  font-family: -apple-system, Segoe UI, Roboto, sans-serif;
  background: #f5f6f8;
  color: #1f2430;
  margin: 0;
  padding: 0 24px 48px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #ddd;
  margin-bottom: 20px;
}
header h1 { font-size: 18px; margin: 0; }
header a { color: #444; text-decoration: none; font-size: 14px; }

.login-box {
  max-width: 340px;
  margin: 80px auto;
  padding: 32px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.login-box h1 { font-size: 18px; margin-top: 0; }
.login-box input {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
}
.login-box button {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 6px;
  background: #2f6fed;
  color: white;
  font-weight: 600;
  cursor: pointer;
}
.error { color: #c0392b; font-size: 14px; margin-bottom: 12px; }
.info { color: #1e8449; font-size: 14px; margin-bottom: 12px; }
.warning-box {
  background: #fdf3e0;
  border: 1px solid #e6b45c;
  color: #7a5a10;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
}

.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  background: white;
  padding: 14px;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.filters select, .filters button {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
}
.filters button {
  background: #2f6fed;
  color: white;
  border: none;
  cursor: pointer;
}

.summary { margin-bottom: 12px; color: #555; font-size: 14px; }

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}
th { background: #fafbfc; color: #666; font-weight: 600; }
tr:hover { background: #f8f9ff; }
a.case-link { color: #2f6fed; text-decoration: none; font-weight: 500; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
.badge.needs_review { background: #fdecea; color: #c0392b; }
.badge.auto_approved { background: #e8f6ec; color: #1e8449; }
.badge.custom { background: #eef1fd; color: #2f6fed; }

.pagination { margin-top: 16px; display: flex; gap: 8px; }
.pagination a {
  padding: 6px 12px;
  background: white;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  border: 1px solid #ddd;
}
.pagination .current { background: #2f6fed; color: white; border-color: #2f6fed; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.card {
  background: white;
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  margin-bottom: 20px;
}
.card h2 { font-size: 14px; text-transform: uppercase; color: #888; margin-top: 0; }
.card pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 14px;
  margin: 0;
}
.meta-row { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 16px; font-size: 14px; color: #555; }
.meta-row strong { color: #1f2430; }

.review-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.review-form select, .review-form button {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
}
.review-form button {
  background: #2f6fed;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
.back-link { display: inline-block; margin-bottom: 16px; color: #2f6fed; text-decoration: none; }
