* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f7fb;
  color: #1f2430;
}
header, .presets, main, footer { padding: 12px 16px; }
header { background: #1d3557; color: #fff; }
header h1 { margin: 0 0 4px; font-size: 20px; }
header p { margin: 0; opacity: 0.9; }
.tabs {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
  background: #e9eef8;
  border-bottom: 1px solid #ccd5e6;
}
.tab-btn {
  border: 1px solid #aab7d1;
  background: #fff;
  padding: 8px 10px;
  cursor: pointer;
}
.tab-btn.active {
  background: #1d4ed8;
  color: #fff;
  border-color: #1d4ed8;
}
.panel {
  background: #fff;
  border: 1px solid #d8deea;
  border-radius: 4px;
  padding: 12px;
}
.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1.1fr 1fr;
}
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.space-between { justify-content: space-between; }
.lang-switch { min-width: 130px; }
.lang-switch label { color: #fff; margin-bottom: 4px; }
.lang-switch select { min-width: 90px; }
.hint { color: #45556e; margin: 6px 0 0; }
label { font-size: 12px; color: #38455a; display: block; margin-bottom: 4px; }
input, select, textarea, button {
  font: inherit;
  padding: 6px 8px;
}
input, select, textarea {
  width: 100%;
  border: 1px solid #bcc7dd;
  border-radius: 4px;
  background: #fff;
}
textarea { min-height: 70px; resize: vertical; }
.field { margin-bottom: 8px; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  border: 1px solid #d2dae8;
  padding: 6px 8px;
  text-align: left;
}
th { background: #edf2fb; }
tr.selected { background: #e7f1ff; }
.badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 11px;
  color: #fff;
}
.b-existing { background: #4b5563; }
.b-create { background: #2563eb; }
.b-modified { background: #b45309; }
.b-deactivate { background: #b91c1c; }
.actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.msg { font-size: 12px; margin-top: 6px; }
.msg.error { color: #b91c1c; }
.msg.ok { color: #166534; }
.presets { background: #eef4ff; border-bottom: 1px solid #d7e2fb; }
.tools, .flowlog { background: #f7faff; border-bottom: 1px solid #d7e2fb; }
.grid-tools {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
}
.flow-log-list {
  max-height: 180px;
  overflow: auto;
  border: 1px solid #d2dae8;
  background: #fff;
  padding: 8px;
  font-family: Consolas, monospace;
  font-size: 12px;
}
.test-results {
  border: 1px solid #d2dae8;
  background: #fff;
  padding: 8px;
  min-height: 94px;
  font-size: 13px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-window {
  width: min(760px, 92vw);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border: 1px solid #b8c6df;
  border-radius: 6px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.22);
}
.modal-header {
  padding: 10px 12px;
  border-bottom: 1px solid #d4dded;
  background: #edf2fb;
}
.modal-body {
  padding: 12px;
}
footer { background: #f0f3fa; border-top: 1px solid #ccd5e6; font-size: 13px; }
