* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f4f4f4;
  color: #111;
}

.page {
  width: 100%;
  max-width: 100%;
  padding: 20px;
}

h1 {
  margin: 0 0 24px;
  font-size: 36px;
  line-height: 1.2;
}

h2 {
  margin: 0 0 16px;
  font-size: 24px;
  line-height: 1.3;
}

.card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 18px;
}

.top-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
}

textarea,
select,
input {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  font-family: Arial, sans-serif;
}

textarea {
  min-height: 180px;
  resize: vertical;
  font-family: Consolas, monospace;
  line-height: 1.5;
}

select {
  height: 54px;
  background: #fff;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  background: #111;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button.secondary {
  background: #555;
}

button.light {
  background: #fff;
  color: #111;
  border: 1px solid #ccc;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.status {
  margin-top: 12px;
  color: #444;
  font-size: 14px;
}

.status.error {
  color: #b00020;
  font-weight: 700;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #111;
}

table {
  width: max-content;
  min-width: 1800px;
  border-collapse: collapse;
  font-size: 13px;
}
#metadataTableBody {
    background: white;
}
th,
td {
  /*border-bottom: 1px solid #eee;*/
  padding: 10px;
  text-align: left;
  vertical-align: top;
  max-width: 360px;
  word-break: break-word;
}

th {
  /*background: #111;*/
  color: #fff;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

td.nowrap,
.nowrap {
  white-space: nowrap;
}

a {
  color: #0645ad;
  text-decoration: underline;
}

.schema-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.schema-header-row h2 {
  margin: 0;
}

.schema-view-options {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  white-space: nowrap;
}

.schema-view-options label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 600;
}

.schema-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.schema-vertical {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.schema-card {
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  padding: 14px;
  min-width: 0;
}

.schema-card-header {
  font-weight: 700;
  margin-bottom: 8px;
}

.schema-card-url {
  font-size: 13px;
  margin-bottom: 10px;
  line-height: 1.5;
  word-break: break-word;
}

.schema-card-actions {
  margin-bottom: 10px;
}

.schema-card textarea {
  width: 100%;
  min-height: 300px;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #f7f7f7;
  font-size: 12px;
  font-family: Consolas, monospace;
  line-height: 1.45;
  resize: vertical;
}

.schema-error {
  color: #b00020;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

.schema-output {
  min-height: 420px;
  background: #fff;
  font-family: Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
}

.section-label {
  display: block;
  font-weight: 700;
  margin-bottom: 10px;
}

@media (max-width: 1200px) {
  .schema-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page {
    padding: 12px;
  }

  h1 {
    font-size: 28px;
  }

  .schema-header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .schema-view-options {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .schema-grid {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }
}