.dbsync-shell {
  display: grid;
  gap: 12px;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  color: #1f2328;
}

.dbsync-hero {
  background: linear-gradient(180deg, #f7f8fa, #eef1f5);
  color: #1f2328;
  border-radius: 8px;
  border: 1px solid #d0d7de;
  padding: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

.dbsync-hero h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
}

.dbsync-hero p {
  margin: 0;
  color: #57606a;
}

.dbsync-card {
  background: #ffffff;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

.dbsync-card h3 {
  margin: 0 0 12px;
  color: #24292f;
  font-size: 16px;
  font-weight: 600;
}

.dbsync-note {
  margin: 0;
  color: #57606a;
  line-height: 1.45;
}

.dbsync-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.dbsync-field {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.dbsync-field span {
  font-size: 13px;
  color: #3d444d;
  font-weight: 600;
}

.dbsync-field input,
.dbsync-field textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid #b6bec8;
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
  color: #1f2328;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dbsync-user-select {
  width: 100%;
  min-height: 170px;
  border: 1px solid #b6bec8;
  border-radius: 6px;
  padding: 6px;
  background: #fff;
  color: #1f2328;
}

.dbsync-user-select option {
  padding: 6px 8px;
  border-radius: 4px;
}

.dbsync-field input:focus,
.dbsync-field textarea:focus,
.dbsync-user-select:focus {
  outline: none;
  border-color: #0969da;
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.18);
}

.dbsync-field textarea {
  min-height: 140px;
  resize: vertical;
}

.dbsync-actions {
  display: flex;
  gap: 10px;
}

.dbsync-actions.wrap {
  flex-wrap: wrap;
}

.dbsync-actions button {
  border: 1px solid transparent;
  border-radius: 6px;
  min-height: 38px;
  min-width: 210px;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  transition: filter 0.15s ease, transform 0.05s ease;
}

.dbsync-actions button:hover {
  filter: brightness(0.97);
}

.dbsync-actions button:active {
  transform: translateY(1px);
}

.dbsync-actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dbsync-actions .primary {
  background: #0078d4;
  border-color: #0078d4;
  color: #ffffff;
}

.dbsync-actions .warn {
  background: #ffb900;
  border-color: #ffb900;
  color: #1f2328;
}

.dbsync-actions .danger {
  background: #d13438;
  border-color: #d13438;
  color: #ffffff;
}

.dbsync-actions .ghost {
  background: #f3f4f6;
  border-color: #c7ccd1;
  color: #1f2328;
}

.dbsync-check {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 4px 0 12px;
  color: #1f2328;
  font-size: 14px;
}

.dbsync-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #0078d4;
}

.dbsync-status {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  background: #f6f8fa;
  border: 1px solid #d0d7de;
  color: #1f2328;
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.45;
}

.dbsync-progress {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #f6f8fa;
}

.dbsync-progress-top {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #57606a;
  margin-bottom: 6px;
}

.dbsync-progress-track {
  width: 100%;
  height: 12px;
  background: #e6ebf1;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #d0d7de;
}

.dbsync-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #0078d4, #106ebe);
  transition: width 0.2s ease;
}

.dbsync-table-wrap {
  margin-top: 10px;
  overflow: auto;
  border: 1px solid #d0d7de;
  border-radius: 6px;
}

.dbsync-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: #fff;
}

.dbsync-table th,
.dbsync-table td {
  border: 1px solid #e5e7eb;
  padding: 8px 10px;
  font-size: 13px;
  text-align: left;
  vertical-align: top;
}

.dbsync-table th {
  background: #f3f4f6;
  color: #1f2328;
  font-weight: 600;
}

.dbsync-table tbody tr:nth-child(even) {
  background: #fafbfc;
}

.dbsync-table tbody tr {
  cursor: context-menu;
}

.dbsync-table tbody tr:hover {
  background: #eef6ff;
}

.dbsync-ctx-menu {
  position: fixed;
  z-index: 10020;
  min-width: 170px;
  background: #fff;
  border: 1px solid #c7ccd1;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  padding: 6px;
}

.dbsync-ctx-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: #fff;
  color: #1f2328;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
}

.dbsync-ctx-menu button:hover {
  background: #eaf2ff;
}

.dbsync-modal {
  position: fixed;
  inset: 0;
  z-index: 10030;
  background: rgba(9, 14, 22, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.dbsync-modal-card {
  width: min(920px, 96vw);
  max-height: 86vh;
  overflow: auto;
  background: #fff;
  border: 1px solid #d0d7de;
  border-radius: 10px;
  padding: 12px;
}

.dbsync-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.dbsync-view-pre {
  margin: 0;
  border: 1px solid #d0d7de;
  background: #f6f8fa;
  border-radius: 8px;
  padding: 10px;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
