* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #222;
  background: #fff;
}
.top {
  text-align: center;
  padding: 16px 12px 8px;
}
.greet { margin-right: 8px; }
button {
  font: inherit;
  cursor: pointer;
}
.logout, .toggle {
  background: #111;
  color: #fff;
  border: 0;
  padding: 6px 14px;
}
.toggle {
  background: #888;
  float: right;
}
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 20px 40px;
}
h1 {
  font-size: 28px;
  margin: 12px 0 20px;
}
h2 {
  font-size: 18px;
  margin: 24px 0 10px;
}
label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 600;
}
input[type="text"], input[type="password"], input[type="number"], input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #bbb;
  font: inherit;
}
.sync {
  margin-top: 18px;
  width: 100%;
  background: #2b6cff;
  color: #fff;
  border: 0;
  padding: 16px;
  font-size: 22px;
  font-weight: 700;
}
.sync:disabled { opacity: 0.6; cursor: default; }
.hidden { display: none !important; }
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.card {
  border: 0;
  border-radius: 8px;
  min-height: 96px;
  padding: 16px 12px 14px;
  text-align: center;
  background: #eceff1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}
.card span {
  display: block;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  color: #6c757d;
}
.card b {
  display: block;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}
.card.active {
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.12);
}
.inserted {
  background: #c8f0d4;
}
.inserted b,
.inserted span {
  color: #2e9b4a;
}
.deleted b,
.deleted span {
  color: #e67e22;
}
.fail b,
.fail span {
  color: #e55353;
}
.gate {
  margin: 18px 0;
  padding: 12px;
  border: 1px dashed #aaa;
}
.error {
  color: #b00020;
  margin-top: 12px;
  font-weight: 600;
}
.sync-ok {
  margin-top: 16px;
  margin-bottom: 4px;
  padding: 8px 0;
  background: transparent;
  color: #1e7e34;
  font-weight: 600;
}
.sync-ok .check {
  display: inline-block;
  margin-right: 6px;
}
.sync-list-hint {
  margin-top: 4px;
  font-weight: 500;
  color: #3d7e4e;
}
.result-wrap { margin-top: 8px; overflow-x: auto; }
.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.result-table th,
.result-table td {
  border: 1px solid #ddd;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}
.result-table th {
  background: #f6f6f6;
  font-weight: 600;
}
.result-table a { color: #2b6cff; }
.result-table td.reason { color: #e55353; font-weight: 600; }
.hidden-inputs .fields { display: none; }
