body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f7fb;
  color: #16213e;
}

.topbar {
  background: linear-gradient(90deg, #0b3d91, #d72638);
  color: white;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar a {
  color: white;
  text-decoration: none;
  margin-right: 16px;
  font-weight: 700;
}

.container {
  max-width: 1180px;
  margin: 30px auto;
  padding: 0 18px;
}

.card, .auth-card {
  background: white;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
  margin-bottom: 24px;
}

.auth-card {
  max-width: 420px;
  margin: 70px auto;
}

label {
  display: block;
  margin-top: 14px;
  font-weight: 700;
}

input, textarea, select {
  width: 100%;
  padding: 11px;
  margin-top: 6px;
  border: 1px solid #ccd3e0;
  border-radius: 8px;
  box-sizing: border-box;
}

button, .btn-primary, .btn-secondary {
  display: inline-block;
  border: 0;
  border-radius: 8px;
  padding: 11px 16px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
}

.btn-primary {
  background: #0b3d91;
  color: white;
  margin-top: 18px;
}

.btn-secondary {
  background: #d72638;
  color: white;
}

.logout-form {
  display: inline;
}

.logout-form button {
  background: transparent;
  color: white;
  padding: 0;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.radio-group {
  display: flex;
  gap: 22px;
  margin-bottom: 20px;
}

.hidden {
  display: none !important;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px;
  border-bottom: 1px solid #e4e8f0;
  text-align: left;
}

.status.completed,
.status.ok {
  color: #0f8b4c;
  font-weight: 700;
}

.status.failed,
.status.not_ok {
  color: #d72638;
  font-weight: 700;
}

.status.running,
.status.warning {
  color: #c47f00;
  font-weight: 700;
}

.alert {
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.alert-error {
  background: #ffe5e8;
  color: #a31322;
}

.alert-success {
  background: #e3f8ec;
  color: #0f6b3c;
}

.progress-bar {
  height: 16px;
  background: #e4e8f0;
  border-radius: 20px;
  overflow: hidden;
  margin: 24px 0;
}

#progress-fill {
  height: 100%;
  width: 10%;
  background: linear-gradient(90deg, #0b3d91, #d72638);
  transition: width 0.3s ease;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.summary-card {
  background: white;
  padding: 18px;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}

.summary-card strong,
.summary-card span {
  display: block;
}

.result-item {
  border-top: 1px solid #e4e8f0;
  padding: 16px 0;
}

.result-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.priority {
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
}

.priority.high {
  color: #d72638;
}

.priority.medium {
  color: #c47f00;
}

.priority.low {
  color: #0b3d91;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr 1fr 160px auto;
  gap: 12px;
  align-items: end;
}

.footer {
  text-align: center;
  color: #6f7890;
  padding: 30px;
}

@media (max-width: 768px) {
  .topbar, .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .summary-grid,
  .inline-form {
    grid-template-columns: 1fr;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}

.muted {
  color: #6f7890;
}

.summary-grid {
  grid-template-columns: repeat(4, 1fr);
}

.report-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  background: #eef2f8;
  color: #16213e;
}

.filter-btn.active {
  background: #0b3d91;
  color: white;
}

.table-wrap {
  overflow-x: auto;
}

.report-table {
  min-width: 1400px;
  font-size: 14px;
}

.report-table th {
  background: #f0f4fb;
  color: #16213e;
  position: sticky;
  top: 0;
  z-index: 1;
}

.report-table td {
  vertical-align: top;
  line-height: 1.45;
}

.status-cell {
  width: 70px;
  text-align: center;
  font-size: 20px;
}

.suggested-fix {
  white-space: pre-line;
  background: #f7f9fc;
  border-left: 4px solid #0b3d91;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.copy-btn {
  background: #d72638;
  color: white;
  font-size: 12px;
  padding: 7px 10px;
}

.confidence {
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
}

.confidence.high {
  color: #0f8b4c;
}

.confidence.medium {
  color: #c47f00;
}

.confidence.low {
  color: #d72638;
}

@media (max-width: 768px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }
}
.btn-secondary {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  background: #174ea6;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.content-brief-card h2 {
  color: #b00020;
  margin-bottom: 16px;
}

.brief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.brief-field {
  background: #f8faff;
  border-left: 4px solid #174ea6;
  padding: 14px;
  border-radius: 8px;
}

.brief-field strong {
  color: #b00020;
  display: block;
  margin-bottom: 6px;
  text-transform: capitalize;
}

.brief-field p {
  margin: 0;
}

.brief-list {
  padding-left: 22px;
}

.brief-list li {
  margin-bottom: 14px;
  line-height: 1.6;
}

.brief-list strong {
  color: #174ea6;
  text-transform: capitalize;
}

@media (max-width: 768px) {
  .brief-grid {
    grid-template-columns: 1fr;
  }
}