/* API brand: Arial, teal #008B8B accent, yellow #FFD700 highlight. Per project memory. */

* { box-sizing: border-box; }

body {
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  padding: 0;
  color: #222;
  background: #fafafa;
  line-height: 1.5;
}

header {
  background: #008B8B;
  color: #fff;
  padding: 24px 32px;
}

header h1 {
  margin: 0 0 6px 0;
  font-size: 22px;
  font-weight: 600;
}

header .sub {
  margin: 0;
  font-size: 14px;
  opacity: 0.9;
}

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 32px;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid #ddd;
}

.tab {
  background: none;
  color: #555;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 10px 16px;
  font-weight: 500;
  cursor: pointer;
}

.tab.active {
  color: #008B8B;
  border-bottom-color: #008B8B;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.field {
  display: block;
  margin-bottom: 12px;
}

.field > span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #333;
}

.field em {
  font-style: normal;
  color: #b00020;
  font-weight: 400;
}

input[type="text"],
input[type="date"],
input[type="file"] {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid #c0c0c0;
  border-radius: 4px;
  background: #fff;
}

section {
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 6px;
  padding: 20px 24px;
  margin-bottom: 16px;
}

section h2 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
}

.hint {
  font-size: 13px;
  color: #555;
  margin: 0 0 12px 0;
}

select,
textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid #c0c0c0;
  border-radius: 4px;
}

button {
  background: #008B8B;
  color: #fff;
  border: 0;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
}

button:hover { background: #006d6d; }
button:disabled { background: #aaa; cursor: not-allowed; }

#status {
  margin-top: 12px;
  font-size: 14px;
  color: #555;
  min-height: 1.4em;
}

#status.error { color: #b00020; }
#status.success { color: #006d00; }

#artefacts {
  list-style: none;
  padding: 0;
  margin: 0;
}

#artefacts li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

#artefacts a {
  color: #008B8B;
  text-decoration: none;
  font-weight: 600;
}

#artefacts a:hover { text-decoration: underline; }

/* ─── Preview table ──────────────────────────────────────────────────────── */

#preview-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

#preview-filter {
  flex: 1;
  font-family: inherit;
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid #c0c0c0;
  border-radius: 4px;
}

#preview-summary {
  font-size: 13px;
  color: #555;
  white-space: nowrap;
}

.table-wrap {
  max-height: 480px;
  overflow-y: auto;
  border: 1px solid #e1e1e1;
  border-radius: 4px;
}

#preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

#preview-table thead {
  position: sticky;
  top: 0;
  background: #f5f5f5;
  z-index: 1;
}

#preview-table th {
  text-align: left;
  padding: 8px 12px;
  font-weight: 600;
  border-bottom: 1px solid #ddd;
  color: #333;
}

#preview-table td {
  padding: 6px 12px;
  border-bottom: 1px solid #f0f0f0;
}

#preview-table tbody tr:hover {
  background: #fafafa;
}

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  background: #e8e8e8;
  color: #444;
  white-space: nowrap;
}

#preview-table tr.status-ok .status-badge   { background: #e0f0e0; color: #1f6b1f; }
#preview-table tr.status-warn .status-badge { background: #fff4d6; color: #7a5a00; }
#preview-table tr.status-error .status-badge { background: #fdd; color: #a40000; }
#preview-table tr.status-info .status-badge { background: #FFD700; color: #5a4a00; }

footer {
  text-align: center;
  padding: 24px;
  color: #888;
  font-size: 12px;
}

footer a { color: #888; }
