/* SharkAdmin 本地预览用 · 从 backend-ui 抽取（避免 ../../../ 在 http.server 下 404） */
:root {
  --blue: #1890ff;
  --blue-soft: #eef4ff;
  --ink: #303846;
  --title: #1f2733;
  --muted: #8a93a3;
  --line: #edf0f5;
  --strong: #dfe5ee;
  --head: #f8fafc;
  --ui-button-height: 34px;
  --ui-footer-button-height: 36px;
  --ui-button-radius: 8px;
  --ui-button-compact-min-height: 32px;
  --ui-button-compact-radius: 6px;
  --ui-input-height: 36px;
  --ui-input-radius: 8px;
  --ui-form-label-width: 128px;
  --ui-form-field-gap: 12px;
  --ui-form-row-gap: 14px;
  --ui-overlay-bar-bg: #fafafa;
}

.d-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--ui-button-height);
  padding: 0 14px;
  border: 1px solid var(--strong);
  border-radius: var(--ui-button-radius);
  background: #fff;
  color: #384250;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
}
.d-btn:hover:not(:disabled) { color: var(--blue); border-color: #91caff; }
.d-btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.d-btn.primary:hover:not(:disabled) { background: #40a9ff; border-color: #40a9ff; color: #fff; }
.d-btn.footer-btn { height: var(--ui-footer-button-height); min-width: 78px; font-weight: 600; }
.d-btn.footer-btn:not(.primary) { border: 0; background: #fff; color: #384250; }
.d-btn.footer-btn:not(.primary):hover:not(:disabled) { color: var(--blue); background: #fff; }
.d-btn.compact {
  height: auto;
  min-height: var(--ui-button-compact-min-height);
  padding: 5px 15px;
  border-radius: var(--ui-button-compact-radius);
  line-height: 20px;
}
.d-btn.plain { border-color: transparent; background: transparent; }
.d-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.d-input {
  height: var(--ui-input-height);
  width: 100%;
  min-width: 0;
  border: 1px solid var(--strong);
  border-radius: var(--ui-input-radius);
  background: #fff;
  padding: 0 10px;
  font-size: 13px;
  color: #364150;
  outline: 0;
  box-sizing: border-box;
  font-family: inherit;
}
textarea.d-input { height: auto; min-height: 88px; padding: 8px 10px; resize: vertical; }
.d-input::placeholder { color: #b2b8c2; }
.d-input:focus { border-color: var(--blue); box-shadow: 0 0 0 2px #1890ff1a; }

.d-field {
  display: flex;
  align-items: flex-start;
  gap: var(--ui-form-field-gap);
  min-width: 0;
  font-size: 13px;
}
.d-field > span:first-child {
  box-sizing: border-box;
  flex: 0 0 var(--ui-form-label-width);
  width: var(--ui-form-label-width);
  text-align: right;
  line-height: 20px;
  padding-top: 8px;
  color: #667282;
  font-weight: 500;
}
.d-field em { font-style: normal; color: #d03050; }
.d-control { flex: 1; min-width: 0; display: block; }

.d-table {
  border-collapse: collapse;
  min-width: 660px;
  width: 100%;
  font-size: 13px;
}
.d-table th, .d-table td {
  padding: 11px 14px;
  height: 46px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
.d-table th {
  height: 48px;
  background: var(--head);
  font-weight: 700;
  color: #1f2733;
}
.d-table th:last-child, .d-table td:last-child { border-right: 0; }
.d-table tbody tr:last-child td { border-bottom: 0; }
.d-table tbody tr:hover { background: #f8fbff; }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #1118276b;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}
.live-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(640px, 100%);
  max-height: 90vh;
  background: #fff;
  border: 1px solid #dce3ee;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 18px 56px #11182738;
}
.live-dialog.is-wide { width: min(920px, 100%); }
.live-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  height: 56px;
  padding: 0 24px;
  background: var(--ui-overlay-bar-bg);
  font-size: 17px;
  font-weight: 700;
  color: #1f2733;
}
.live-dialog > header button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #667282;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.live-dialog > header button:hover {
  background: #e9edf3;
  color: #2d3746;
}
.live-dialog > .live-body {
  padding: 24px;
  overflow: auto;
  min-height: 0;
  flex: 1;
}
.live-dialog > footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 24px;
  background: var(--ui-overlay-bar-bg);
  flex: none;
}
