html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 12px;
  color: #1a1a1a;
  background: #d6dbe3;
}

body.is-col-resizing,
body.is-col-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

body.is-row-resizing,
body.is-row-resizing * {
  cursor: row-resize !important;
  user-select: none !important;
}

body.is-dialog-dragging,
body.is-dialog-dragging * {
  cursor: move !important;
  user-select: none !important;
}

.sql-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.toolbar-stack {
  position: relative;
  z-index: 40;
  flex: 0 0 auto;
  border-bottom: 1px solid #9aa3ad;
}

.toolbar {
  height: 26px;
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 0 4px;
  background: linear-gradient(#f4f4f4, #d8d8d8);
  overflow: hidden;
}

.tb-btn {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tb-btn-label {
  width: auto;
  padding: 0 6px;
  gap: 4px;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 12px;
  white-space: nowrap;
}

.tb-logout {
  margin-left: auto;
  flex-shrink: 0;
}

.tb-btn:hover:not(:disabled) {
  border: 1px solid #99c1e0;
  background: #e8f3fc;
}

.tb-btn.is-on {
  border: 1px solid #7aa7c7;
  background: #d6eaf8;
}

.tb-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.tb-btn.flash-run {
  border-color: #00e5ff !important;
}

.tb-btn.flash-ok {
  border-color: #7cfc00 !important;
}

.tb-btn.flash-err {
  border-color: #e81123 !important;
}

.tb-sep {
  width: 1px;
  height: 18px;
  background: #a8a8a8;
  margin: 0 4px;
}

.tb-label {
  margin: 0 6px 0 8px;
  color: #333;
}

.tb-combo {
  height: 20px;
  min-width: 180px;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 12px;
}

.tb-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
}

.tb-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.body-row {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
  position: relative;
}

.oe-pane {
  flex: 0 0 260px;
  width: 260px;
  min-width: 160px;
  max-width: min(70vw, 720px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid #8a8a8a;
  box-sizing: border-box;
}

.oe-pane[data-hidden="true"] {
  display: none;
}

.oe-caption {
  height: 22px;
  background: linear-gradient(#fff4c2, #f0d36a);
  display: flex;
  align-items: center;
  padding: 0 4px 0 8px;
  border-bottom: 1px solid #c4a035;
  font-weight: 600;
}

.oe-caption-text {
  flex: 1;
}

.oe-caption-btns {
  display: flex;
}

.oe-cap-btn {
  width: 18px;
  height: 18px;
  border: 1px solid transparent;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.oe-cap-btn:hover {
  border-color: #99c1e0;
}

.oe-cap-btn.pinned .tb-icon {
  transform: rotate(-90deg);
  transform-origin: center;
}

.rs-connect-bar {
  height: auto;
  min-height: 26px;
  flex-wrap: wrap;
  gap: 4px;
  padding: 2px 4px;
}

.rs-connect-bar .tb-btn-label {
  font-size: 11px;
}

.oe-filter-row {
  padding: 4px;
  background: #f3f3f3;
  border-bottom: 1px solid #d0d0d0;
}

.oe-filter-wrap {
  position: relative;
}

.oe-filter {
  width: 100%;
  box-sizing: border-box;
  height: 20px;
  padding-right: 18px;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 12px;
}

.oe-filter-clear {
  position: absolute;
  right: 1px;
  top: 1px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  background: transparent;
  color: #666;
  font-size: 14px;
  line-height: 16px;
  cursor: pointer;
}

.oe-filter-clear:hover {
  color: #222;
}

.oe-pages {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid #8a8a8a;
}

.oe-page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.oe-page[hidden] {
  display: none !important;
}

.oe-tree {
  flex: 1;
  overflow: auto;
  user-select: none;
  padding: 2px 0;
}

.oe-tool-tabs {
  flex: 0 0 22px;
  height: 22px;
  display: flex;
  align-items: flex-start;
  background: #cfd4dc;
  padding: 0 4px;
}

.oe-tool-tab {
  height: 18px;
  padding: 0 10px;
  border: 1px solid #8a8a8a;
  border-top: none;
  border-radius: 0 0 3px 3px;
  background: #e4e4e4;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 11px;
  line-height: 18px;
  margin-right: 2px;
  cursor: default;
  white-space: nowrap;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  transform: none;
}

.oe-tool-tab.active {
  background: #fff;
  height: 20px;
  line-height: 20px;
  position: relative;
  top: -1px;
  border-top: 1px solid #fff;
  z-index: 1;
}

.tree-row {
  display: flex;
  align-items: center;
  height: 18px;
  padding-right: 6px;
  white-space: nowrap;
  cursor: default;
}

.tree-row.selected {
  background: #cce8ff;
}

.tree-indent {
  width: 16px;
  flex: 0 0 16px;
  height: 18px;
  position: relative;
}

.tree-indent::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  border-left: 1px dotted #c4c4c4;
}

.tree-twist {
  width: 16px;
  height: 16px;
  padding: 0;
  margin: 0 2px 0 0;
  border: none;
  background: transparent;
  flex: 0 0 16px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  z-index: 2;
}

.tree-twist svg {
  display: block;
}

.tree-twist.empty {
  visibility: hidden;
}

.tree-spacer {
  width: 9px;
  flex: 0 0 9px;
  margin-right: 4px;
  height: 9px;
  position: relative;
}

.tree-spacer::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  width: 8px;
  border-top: 1px dotted #c4c4c4;
}

.tree-ico {
  width: 16px;
  height: 16px;
  margin-right: 4px;
  flex: 0 0 16px;
}

.tree-ico svg {
  width: 16px;
  height: 16px;
  display: block;
}

.tree-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.v-splitter {
  width: 6px;
  flex: 0 0 6px;
  cursor: col-resize;
  background: #d6dbe3;
  border-left: 1px solid #b0b6be;
  border-right: 1px solid #b0b6be;
  z-index: 3;
}

.oe-edge-tab {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  background: linear-gradient(#fff4c2, #f0d36a);
  border: 1px solid #c4a035;
  padding: 8px 3px;
  cursor: pointer;
  font-weight: 600;
  align-self: flex-start;
  margin-top: 4px;
}

.main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #d6dbe3;
}

.tab-strip {
  position: relative;
  z-index: 6;
  height: 24px;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  background: #cfd4dc;
  border-bottom: 1px solid #8a8a8a;
  flex: 0 0 24px;
}

.tab-strip:not([hidden]) {
  display: flex !important;
}

.editor-results:not([hidden]) {
  display: flex !important;
}

.doc-tab {
  height: 23px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  background: #c8ccd3;
  color: #4a4a4a;
  border: 1px solid #9a9a9a;
  border-bottom: none;
  margin-right: 1px;
  max-width: 180px;
  min-width: 80px;
  cursor: default;
  box-sizing: border-box;
}

.doc-tab.active {
  background: #fff8d0;
  color: #1a1a1a;
  height: 24px;
  position: relative;
  top: 1px;
  font-weight: 600;
  box-shadow: inset 0 3px 0 #c9a227;
  z-index: 1;
}

.doc-tab-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-tab-btn {
  width: 16px;
  height: 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  line-height: 14px;
  color: #4a4a4a;
  padding: 0;
  margin-left: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.doc-tab-btn:hover {
  background: #e8f3fc;
  border: 1px solid #99c1e0;
  box-sizing: border-box;
}

.tab-pin svg {
  width: 12px;
  height: 12px;
  display: block;
}

.tab-pin.is-pinned svg {
  transform: rotate(90deg);
}

.empty-pane {
  flex: 1;
  background: #d6dbe3;
}

.db-detail {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.db-detail[hidden] {
  display: none;
}

.db-detail-caption {
  flex: 0 0 auto;
  padding: 6px 12px;
  font-weight: 600;
  background: #f3f3f3;
  border-bottom: 1px solid #c8c8c8;
}

.db-detail-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 18px 28px;
}

.db-detail-setup {
  max-width: 720px;
  line-height: 1.45;
}

.db-detail-setup h2 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.db-detail-question {
  margin: 0 0 10px;
  font-size: 13px;
}

.db-detail-note {
  margin: 0 0 12px;
  color: #333;
}

.db-detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.db-detail-actions button {
  min-width: 72px;
  height: 24px;
  padding: 0 12px;
  border: 1px solid #8a8a8a;
  background: #f3f3f3;
  font: inherit;
  cursor: pointer;
}

.db-detail-actions button.btn-primary {
  background: #e5f1fb;
  border-color: #0078d4;
}

.db-detail-actions button:disabled {
  color: #888;
  cursor: default;
}

.user-list,
.user-props {
  border-collapse: collapse;
  font-size: 13px;
}

.user-list th,
.user-list td,
.user-props th,
.user-props td {
  border: 1px solid #d0d0d0;
  padding: 4px 8px;
  text-align: left;
  vertical-align: top;
}

.user-list th,
.user-props th {
  background: #f3f3f3;
  font-weight: 600;
}

.user-props th {
  width: 160px;
  white-space: nowrap;
}

.user-list-row {
  cursor: pointer;
}

.user-list-row:hover td {
  background: #e5f1fb;
}

.db-history-sql {
  margin: 8px 0 0;
  padding: 10px 12px;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre;
}

.db-overview {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1080px;
  color: #1c2430;
}

.db-overview-hero {
  padding: 16px 18px;
  border: 1px solid #d5dee8;
  border-radius: 12px;
  background:
    radial-gradient(900px 140px at 0% 0%, rgba(15, 108, 189, 0.16), transparent 55%),
    linear-gradient(180deg, #f7fafc 0%, #eef3f8 100%);
}

.db-overview-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5c6b7a;
}

.db-overview-hero h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.db-overview-version {
  margin: 6px 0 0;
  color: #3d4d5e;
  font-size: 12px;
}

.db-overview-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 10px;
}

.db-stat {
  position: relative;
  padding: 12px 12px 11px 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  overflow: hidden;
}

.db-stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--db-accent, #0f6cbd);
}

.db-stat-label {
  margin: 0;
  font-size: 11px;
  color: #5c6b7a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.db-stat-value {
  margin: 6px 0 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.db-stat-note {
  margin: 4px 0 0;
  color: #5c6b7a;
  font-size: 11px;
  line-height: 1.35;
}

.db-stat.is-warn {
  background: #fff8f3;
}

.db-stat.is-warn .db-stat-note {
  color: #8a3b12;
}

.db-stat-connections { --db-accent: #0f6cbd; }
.db-stat-procedures { --db-accent: #5b3a8c; }
.db-stat-views { --db-accent: #0e7c66; }
.db-stat-tables { --db-accent: #b86e00; }
.db-stat-data { --db-accent: #1b4f72; }
.db-stat-log { --db-accent: #0e7c66; }
.db-stat-log.is-warn { --db-accent: #c2410c; }

.db-overview-limit {
  padding: 14px 16px 16px;
  border: 1px solid #c9d7ea;
  border-radius: 12px;
  background: linear-gradient(180deg, #f3f8fd 0%, #fff 42%);
}

.db-overview-limit.is-tight {
  border-color: #f0c9a0;
  background: linear-gradient(180deg, #fff6ee 0%, #fff 42%);
}

.db-overview-limit-figs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 12px;
}

.db-limit-fig {
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.db-limit-fig span {
  display: block;
  font-size: 11px;
  color: #5c6b7a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.db-limit-fig strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.db-overview-meter {
  height: 8px;
  border-radius: 999px;
  background: #e4ebf3;
  overflow: hidden;
}

.db-overview-meter-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f6cbd, #14967a);
}

.db-overview-limit.is-tight .db-overview-meter-fill {
  background: linear-gradient(90deg, #d97706, #c2410c);
}

.db-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.db-overview-panel {
  min-width: 0;
  padding: 12px 14px 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.db-overview-panel-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.db-overview-panel-hint {
  margin: 2px 0 8px;
  color: #5c6b7a;
  font-size: 11px;
}

.db-overview-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.db-overview-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  border-top: 1px solid #eef2f6;
  font-size: 12px;
}

.db-overview-list-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.db-overview-list-meta {
  flex: 0 0 auto;
  color: #5c6b7a;
  font-variant-numeric: tabular-nums;
}

.db-overview-op {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e8f2fb;
  color: #0f6cbd;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.db-overview-empty {
  margin: 0 0 8px;
  color: #5c6b7a;
}

.db-overview-bar {
  display: block;
  flex: 1 1 72px;
  height: 6px;
  border-radius: 999px;
  background: #e8eef5;
}

.db-overview-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0f6cbd;
}

@media (max-width: 760px) {
  .db-overview-grid,
  .db-overview-limit-figs {
    grid-template-columns: 1fr;
  }
}

.editor-results {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.sql-pane {
  flex: 1 1 auto;
  min-height: 80px;
  display: flex;
}

.sql-editor-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  background: #fff;
  overflow: hidden;
}

.sql-gutter {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 50px;
  z-index: 4;
  overflow: hidden;
  cursor: url("/cursors/gutter-ne.png") 19 1, ne-resize;
  user-select: none;
  -webkit-user-select: none;
  background: #fff;
  border-right: 1px solid #e6e6e6;
  box-sizing: border-box;
}

.sql-gutter-inner {
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  color: cornflowerblue;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  text-align: right;
  padding-right: 8px;
  box-sizing: border-box;
  width: 100%;
  white-space: pre;
  line-height: 16px;
}

.sql-highlight {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  color: #1a1a1a;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 16px;
  padding: 6px 6px 6px 50px;
  box-sizing: border-box;
  white-space: pre;
  word-wrap: normal;
  overflow-wrap: normal;
  scrollbar-width: none;
}

.sql-highlight::-webkit-scrollbar {
  display: none;
}

.sql-bad-field {
  background: #c00000;
  color: #fff;
}

.sql-ghost {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  color: #7a7a7a;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  white-space: pre;
  z-index: 2;
}

.sql-autofill-hint {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  z-index: 3;
  background: #fff8d6;
  border: 1px solid #c4a035;
  color: #1a1a1a;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 11px;
  line-height: 16px;
  padding: 2px 6px;
  white-space: pre;
  max-height: 240px;
  overflow: auto;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.15);
}

#sql-editor, #messages-text {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
  resize: none;
  outline: none;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 16px;
  padding: 6px;
  box-sizing: border-box;
  background: #fff;
}

#sql-editor {
  position: relative;
  z-index: 1;
  color: transparent;
  caret-color: #1a1a1a;
  background-color: transparent;
  white-space: pre;
  overflow-wrap: normal;
  word-wrap: normal;
  word-break: normal;
  overflow-x: scroll;
  overflow-y: auto;
  padding-left: 50px;
}

#sql-editor::placeholder {
  color: #8a8a8a;
}

#sql-editor::selection {
  background: rgba(0, 120, 215, 0.28);
  color: transparent;
}

.h-splitter {
  height: 6px;
  cursor: row-resize;
  background: #d6dbe3;
  border-top: 1px solid #b0b6be;
  border-bottom: 1px solid #b0b6be;
  flex: 0 0 6px;
  z-index: 3;
}

.results-pane {
  flex: 0 0 220px;
  height: 220px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
  border-top: 1px solid #8a8a8a;
}

.results-tabs {
  height: 24px;
  flex: 0 0 24px;
  display: flex;
  align-items: flex-end;
  background: #cfd4dc;
  border-bottom: 1px solid #8a8a8a;
  padding-left: 4px;
}

.results-tab {
  height: 22px;
  padding: 0 12px;
  border: 1px solid #9a9a9a;
  border-bottom: none;
  background: #e4e4e4;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 12px;
  margin-right: 1px;
  cursor: default;
}

.results-tab.active {
  background: #fff;
  height: 23px;
  position: relative;
  top: 1px;
}

.results-page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.results-grid-wrap {
  flex: 1;
  overflow: auto;
}

.query-window-status {
  height: 22px;
  flex: 0 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  background: #ece9d8;
  border-top: 1px solid #9a9a9a;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 12px;
  color: #1a1a1a;
}

.query-status-left.error {
  color: #c42b1c;
}

.query-status-rows {
  margin-left: 12px;
  text-align: right;
  white-space: nowrap;
}

.results-grid {
  border-collapse: collapse;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 12px;
  white-space: nowrap;
}

.results-grid th {
  position: sticky;
  top: 0;
  background: linear-gradient(#f6f6f6, #dcdcdc);
  border: 1px solid #b0b0b0;
  font-weight: 600;
  padding: 2px 8px;
  text-align: left;
}

.results-grid td {
  border: 1px solid #d0d0d0;
  padding: 1px 8px;
}

.results-grid td.row-head, .results-grid th.row-head {
  width: 28px;
  text-align: center;
  background: linear-gradient(#f6f6f6, #e8e8e8);
  color: #666;
}

.results-grid td.selected {
  background: #cce8ff;
  outline: 1px dotted #0078d7;
}

.results-grid tr.row-selected td {
  background: #cce8ff;
}

.results-grid th.col-selected,
.results-grid td.col-selected {
  background: #cce8ff;
}

.results-grid th.row-head {
  cursor: pointer;
}

.results-grid th.col-head {
  cursor: pointer;
}

.null-marker {
  color: #808080;
  font-style: italic;
}

.cell-star {
  margin-left: 6px;
  color: #c19c00;
  cursor: pointer;
}

.messages-bar {
  height: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px;
  background: linear-gradient(#f4f4f4, #dcdcdc);
  flex: 0 0 24px;
}

.status-bar {
  height: 22px;
  flex: 0 0 22px;
  background: #ece9d8;
  border-top: 1px solid #9a9a9a;
  padding: 0 8px;
  display: flex;
  align-items: center;
}

.wait-overlay, .modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(80, 80, 80, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.wait-overlay {
  z-index: 2147483647;
}

.wait-overlay[hidden], .modal-overlay[hidden], .ctx-menu[hidden], [hidden] {
  display: none !important;
}

.wait-box, .modal {
  background: #ece9d8;
  border: 1px solid #555;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.25);
}

.wait-box {
  padding: 16px 28px;
  min-width: 220px;
}

.modal {
  min-width: 360px;
  max-width: 520px;
}

.modal.modal-wide {
  min-width: 640px;
  max-width: 860px;
}

.design-wrap {
  max-height: 360px;
  overflow: auto;
}

.design-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.design-grid th, .design-grid td {
  border: 1px solid #b0b0b0;
  padding: 3px 8px;
  text-align: left;
}

.design-grid th {
  background: linear-gradient(#f6f6f6, #dcdcdc);
}

.modal-caption {
  background: linear-gradient(#9db9eb, #6d8fd1);
  color: #fff;
  padding: 4px 8px;
  font-weight: 600;
}

.modal-body {
  padding: 12px 16px;
}

.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 12px 12px;
}

.modal-buttons button, .modal-body button.browse {
  min-width: 72px;
  height: 22px;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 12px;
}

.modal-body label {
  display: block;
  margin-bottom: 4px;
}

.modal-body input, .modal-body select, .modal-body textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 12px;
}

.modal-body input[type="checkbox"] {
  width: auto;
}

.form-row {
  margin-bottom: 10px;
}

.field-label, .form-row label {
  display: block;
  margin-bottom: 4px;
}

.auth-static {
  padding: 3px 0;
}

.server-combo {
  display: flex;
  position: relative;
}

.server-combo input {
  flex: 1;
  min-width: 0;
}

.combo-drop {
  width: 22px;
  min-width: 22px !important;
  height: 22px;
  padding: 0;
  margin-left: -1px;
}

.combo-list {
  position: absolute;
  left: 0;
  right: 22px;
  top: 22px;
  background: #fff;
  border: 1px solid #8a8a8a;
  max-height: 160px;
  overflow: auto;
  z-index: 90;
}

.combo-item {
  padding: 3px 8px;
  cursor: default;
}

.combo-item:hover {
  background: #316ac5;
  color: #fff;
}

.check-row {
  display: flex !important;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.cell-detail {
  min-height: 160px;
  font-family: Consolas, "Courier New", monospace;
}

.ctx-menu {
  position: fixed;
  z-index: 80;
  background: #f0f0f0;
  border: 1px solid #8a8a8a;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
  min-width: 220px;
  padding: 2px 0;
}

.ctx-item {
  padding: 3px 18px;
  cursor: default;
}

.ctx-item:hover:not(.disabled) {
  background: #316ac5;
  color: #fff;
}

.ctx-item.disabled {
  color: #999;
}

.modal.modal-save-prompt {
  min-width: 420px;
  max-width: 480px;
  background: #f3f3f3;
  border: 1px solid #9a9a9a;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.modal-save-prompt .modal-caption {
  background: #f3f3f3;
  color: #1a1a1a;
  font-weight: 400;
  padding: 8px 12px;
}

.modal-save-prompt .modal-body {
  background: #f3f3f3;
  padding: 8px 18px 12px;
}

.save-prompt-q {
  margin-bottom: 8px;
  color: #1a1a1a;
  font-size: 13px;
}

.save-prompt-list {
  height: 120px;
  overflow: auto;
  background: #fff;
  border: 1px solid #7a7a7a;
  padding: 4px 8px;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 13px;
}

.modal-save-prompt .modal-buttons {
  background: #f3f3f3;
  padding: 12px 18px 16px;
  gap: 10px;
}

.modal-save-prompt .modal-buttons button {
  min-width: 88px;
  height: 28px;
  background: #fff;
  border: 1px solid #adadad;
  border-radius: 4px;
}

.modal-save-prompt .modal-buttons button.btn-primary {
  border: 2px solid #0067c0;
}

.modal.modal-ssms {
  min-width: 560px;
  max-width: 620px;
  background: #f3f3f3;
  border: 1px solid #9a9a9a;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.auth-gate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  background: transparent;
}

.auth-gate.is-open {
  display: block;
}

.auth-gate .modal {
  pointer-events: auto;
  position: fixed;
  top: 46px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
}

.pm-decoy {
  position: absolute;
  left: -10000px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.auth-error {
  margin: 12px 0 0;
  color: #8a1f11;
  font-size: 13px;
}

.auth-error.is-status {
  color: #1a1a1a;
}

.modal-ssms .modal-caption {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f3f3f3;
  color: #1a1a1a;
  font-weight: 400;
  padding: 6px 8px 6px 12px;
  border-bottom: 1px solid #d0d0d0;
}

#auth-title {
  cursor: move;
  user-select: none;
  touch-action: none;
}

.modal-title-text {
  flex: 1 1 auto;
  min-width: 0;
}

#auth-close {
  flex: 0 0 auto;
  width: 28px;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: #1a1a1a;
  font: 16px/1 "Segoe UI", Tahoma, sans-serif;
  cursor: pointer;
}

#auth-close:hover,
#auth-close:focus-visible {
  background: #e81123;
  color: #fff;
}

.modal-ssms .modal-body {
  background: #f3f3f3;
  padding: 8px 28px 12px;
}

.ssms-hero {
  text-align: center;
  font-size: 28px;
  font-weight: 400;
  color: #1a1a1a;
  padding: 8px 0 14px;
  margin-bottom: 14px;
  border-bottom: 3px solid #e07a2f;
  background: linear-gradient(#f3f3f3, #f3f3f3 70%, #fce8d5);
}

.ssms-grid {
  display: grid;
  grid-template-columns: 130px 1fr;
  column-gap: 12px;
  row-gap: 10px;
  align-items: center;
}

.ssms-lbl {
  text-align: right;
  margin: 0 !important;
  color: #444;
  font-size: 13px;
}

.ssms-indent {
  color: #777;
  padding-right: 4px;
}

.modal-ssms .server-combo input,
.modal-ssms select,
.modal-ssms #conn-user,
.modal-ssms #conn-password {
  height: 24px;
  border: 1px solid #8a8a8a;
  background: #fff;
  padding: 0 6px;
}

.modal-ssms .combo-drop {
  height: 24px;
  border: 1px solid #8a8a8a;
  background: #fff;
  margin-left: -1px;
}

.modal-ssms .combo-list {
  top: 24px;
  right: 24px;
}

.ssms-remember {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  color: #444;
  font-size: 13px;
}

.modal-ssms .modal-buttons {
  background: #f3f3f3;
  padding: 16px 28px 18px;
  gap: 10px;
}

.modal-ssms .modal-buttons button {
  min-width: 88px;
  height: 28px;
  background: #fff;
  border: 1px solid #adadad;
  border-radius: 4px;
}

.modal-ssms .modal-buttons button.btn-primary {
  border: 2px solid #0067c0;
}

#demo-unsupported-dialog {
  display: none;
}

.demo-unsupported-jquery-dialog {
  z-index: 80;
  font-family: "Segoe UI", Tahoma, sans-serif;
}

.demo-unsupported-jquery-dialog .ui-dialog-title {
  font-size: 15px;
  font-weight: 700;
}

.demo-unsupported-jquery-dialog .ui-dialog-content {
  font-size: 13px;
  line-height: 1.5;
  color: #1a1a1a;
}

.demo-unsupported-jquery-dialog .ui-dialog-content p {
  margin: 0 0 14px;
}

.demo-unsupported-body {
  max-width: 640px;
  font-size: 13px;
  line-height: 1.5;
}

.demo-unsupported-body p {
  margin: 0 0 14px;
}

.access-wizard-dialog .ui-dialog-content {
  max-height: min(70vh, 520px);
}

.access-wizard .wiz-step-title {
  font-weight: 700;
  margin: 0 0 10px;
}

.access-wizard .wiz-field,
.access-wizard .wiz-radio {
  display: block;
  margin: 8px 0;
}

.access-wizard .wiz-input {
  display: block;
  width: 100%;
  max-width: 360px;
  margin: 4px 0 12px;
  box-sizing: border-box;
}

.access-wizard .wiz-table-list {
  max-height: 280px;
  overflow: auto;
  border: 1px solid #c5c5c5;
  padding: 6px 8px;
  background: #fff;
}

.access-wizard .wiz-table-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 6px 0;
}

.access-wizard .wiz-error {
  color: #a1260d;
  font-weight: 600;
}

.access-wizard .wiz-log {
  background: #f4f4f4;
  border: 1px solid #ddd;
  padding: 8px;
  max-height: 160px;
  overflow: auto;
  white-space: pre-wrap;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}
