.admin-layout {
  grid-template-columns: minmax(260px, 300px) minmax(260px, 300px) minmax(320px, 1fr) minmax(320px, 1fr);
}

.child-merge-tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  min-width: 0;
}

.master-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 18px;
  padding: 18px;
}

.master-grid section {
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: #fff;
}

.master-grid .field-section,
.master-grid .wide {
  grid-column: 1 / -1;
}

.master-grid h3 {
  min-width: 0;
  margin: 0 0 12px;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.field-details {
  min-height: auto !important;
  padding: 12px 16px !important;
}

.field-details summary {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.field-details[open] summary {
  margin-bottom: 12px;
  color: var(--green);
}

.compact-filter {
  width: min(320px, 100%);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-tags {
  max-height: 96px;
  overflow: auto;
}

.tag {
  max-width: 100%;
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--ink);
  background: #eef3f0;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.backup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.backup-reminder {
  margin: 0;
  min-width: 0;
  border: 1px solid #d9e7df;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f4fbf7;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.backup-reminder.due {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.permission-note {
  margin: -2px 0 0;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.permission-guide {
  display: grid;
  gap: 10px;
}

.permission-guide article {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.permission-guide strong {
  min-width: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.permission-guide span {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.quality-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.quality-meta {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.quality-row {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  font-size: 13px;
}

.quality-row.high {
  border-left-color: var(--red);
  background: #fff7f6;
}

.quality-row.medium {
  border-left-color: var(--amber);
  background: #fffaf0;
}

.quality-row strong {
  min-width: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.quality-row span {
  min-width: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.maintenance-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.maintenance-metric {
  min-height: 72px;
  min-width: 0;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  display: grid;
  align-content: space-between;
  gap: 8px;
}

.maintenance-metric.medium {
  border-left-color: var(--amber);
  background: #fffaf0;
}

.maintenance-metric.high {
  border-left-color: var(--red);
  background: #fff7f6;
}

.maintenance-metric span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.maintenance-metric strong {
  min-width: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.master-table-wrap {
  max-height: 330px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  -webkit-overflow-scrolling: touch;
}

.master-table-wrap table {
  min-width: max(100%, 640px);
}

.master-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8faf9;
}
