* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f3f4f6;
  color: #111827;
}

.wrap {
  max-width: 1750px;
  margin: 24px auto 40px;
  padding: 0 16px;
}

h1 {
  font-size: 28px;
  margin: 0 0 18px;
}

h2 {
  font-size: 18px;
  margin: 0 0 12px;
}

.card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  padding: 18px;
  margin-bottom: 18px;
}

.grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 18px;
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
}

.field {
  flex: 1;
  min-width: 130px;
}

.field.wide {
  min-width: 260px;
}

.small {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}

.muted {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
}

input[type="text"],
input[type="number"],
input[type="file"],
select,
textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
}

textarea {
  min-height: 70px;
  resize: vertical;
}

.btn {
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  background: #111827;
  color: #fff;
}

.btn.secondary {
  background: #e5e7eb;
  color: #111827;
}

.btn.danger {
  background: #dc2626;
  color: #fff;
}

.btn.toggle {
  background: #374151;
  color: #fff;
}

.btn.toggle.active {
  background: #111827;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.15);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border: 1px solid #e5e7eb;
  padding: 8px 10px;
  font-size: 13px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  background: #f9fafb;
  font-weight: 700;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 10px;
}

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

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

.metric .value {
  font-size: 20px;
  font-weight: 700;
  margin-top: 4px;
}

.ok {
  color: #065f46;
  background: #d1fae5;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.warn {
  color: #92400e;
  background: #fef3c7;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.checkbox-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.checkbox-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fafafa;
  font-size: 13px;
}

.file-config-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  background: #fcfcfd;
}

.file-config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.file-title {
  font-weight: 700;
  font-size: 14px;
}

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

.section-gap {
  margin-top: 14px;
}

.toggle-row {
  margin-bottom: 0;
}

.preview-button-field {
  max-width: 180px;
}

.preview-button-field .btn {
  width: 100%;
}

@media (max-width: 1000px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}
