.db-summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.model-status-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.model-status-actions .ghost {
  padding: 6px 9px;
  font-size: 11px;
}

.model-scene-context {
  margin: -3px 0 16px;
  padding: 12px 14px;
  border: 1px solid #e3e0ff;
  border-radius: 10px;
  background: linear-gradient(120deg, #faf9ff, #f4f6ff);
  color: #68738a;
  font-size: 11px;
  line-height: 1.6;
}

.model-scene-context b {
  display: block;
  margin-bottom: 2px;
  color: #3e465a;
  font-size: 12px;
}

.model-scene-context .model-scene-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 7px;
  color: #8892a5;
  font-family: var(--mono);
  font-size: 10px;
}

.model-scene-context .model-scene-warning {
  display: block;
  margin-top: 7px;
  color: var(--bad);
}

.suggestions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.suggestions button {
  min-width: 0;
  min-height: 76px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  border-radius: 10px;
  padding: 11px 12px;
  text-align: left;
  transition: border-color .16s, background .16s, box-shadow .16s;
}

.suggestions button b {
  color: #5148ca;
  font-size: 12px;
}

.suggestions button span {
  color: #7d8799;
  font-size: 10px;
  line-height: 1.5;
}

.suggestions button:hover,
.suggestions button.selected {
  border-color: #9188f5;
  background: #f0eeff;
  box-shadow: 0 4px 12px #6258e812;
}

.db-summary article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px 17px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.db-summary span { color: #69748a; font-size: 12px; font-weight: 600; }
.db-summary b { grid-row: 1 / 3; grid-column: 2; font: 700 25px var(--mono); color: #373f55; }
.db-summary small { color: #a0a8b7; font-size: 10px; }

.app-auth-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 14px 17px;
  background: linear-gradient(110deg, #fff, #f8f7ff);
}
.app-auth-copy, .app-auth-actions { display: flex; align-items: center; gap: 11px; }
.app-auth-copy { min-width: 0; }
.app-auth-copy > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.app-auth-copy b { color: #343d52; font-size: 13px; }
.app-auth-copy small { color: #7d8799; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-auth-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  background: #ebe8ff;
  color: var(--accent);
  font: 800 10px var(--mono);
}
.app-auth-actions { flex: 0 0 auto; }
.app-auth-actions .status-dot { white-space: nowrap; }
.app-auth-actions button { min-width: 86px; }

.database-layout {
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr);
  gap: 16px;
}

.database-nav {
  padding: 17px;
  max-height: calc(100vh - 190px);
  overflow: auto;
}

.database-nav h4 {
  margin: 20px 4px 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #9aa3b4;
}

.db-featured, .db-tables { display: flex; flex-direction: column; gap: 4px; }
.db-featured button, .db-table-button {
  border: 0;
  background: transparent;
  text-align: left;
  border-radius: 8px;
  padding: 9px 10px;
  color: #536077;
}
.db-featured button:hover, .db-table-button:hover,
.db-featured button.active, .db-table-button.active { background: #f0efff; color: #554bd1; }
.db-featured button { display: grid; grid-template-columns: 30px 1fr; column-gap: 8px; }
.db-featured button i {
  grid-row: 1 / 3;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #ece9ff;
  color: #6258e8;
  display: grid;
  place-items: center;
  font-style: normal;
  font-weight: 800;
}
.db-featured button b { font-size: 12px; }
.db-featured button small { font-size: 10px; color: #939caf; }
.db-group { margin-top: 9px; }
.db-group-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; color: #606b7e; font-size: 11px; font-weight: 700; }
.db-group-head span { font: 10px var(--mono); color: #20a273; }
.db-group-head span.offline { color: var(--bad); }
.db-table-button { width: 100%; display: flex; justify-content: space-between; font: 11px var(--mono); }
.db-table-button small { font: 10px sans-serif; color: #a3aaba; }

.database-data { min-width: 0; padding: 17px; display: flex; flex-direction: column; min-height: 620px; }
.db-data-title { margin-bottom: 12px; gap: 14px; }
.db-title-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.db-title-actions .status-dot { margin-left: 4px; white-space: nowrap; }
.danger {
  border: 1px solid #f2c9c9;
  background: #fff8f8;
  color: var(--bad);
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 700;
}
.danger:hover { border-color: #e98b8b; background: #fff0f0; }
.danger:disabled, .secondary:disabled, .ghost:disabled { cursor: wait; opacity: .55; }
.db-toolbar { display: grid; grid-template-columns: minmax(180px, 1fr) 90px auto auto; gap: 8px; margin-bottom: 12px; }
.db-toolbar input, .db-toolbar select { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.db-table-wrap { border: 1px solid var(--line); border-radius: 10px; overflow: auto; min-height: 445px; max-height: calc(100vh - 330px); background: #fff; }
.data-table { border-collapse: separate; border-spacing: 0; min-width: 100%; font: 11px/1.45 var(--mono); }
.data-table th { position: sticky; top: 0; z-index: 2; background: #f6f7fa; color: #657086; text-align: left; padding: 9px 11px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 8px 11px; border-bottom: 1px solid #eef1f5; max-width: 330px; min-width: 90px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #3f495d; }
.data-table tr:hover td { background: #fafaff; }
.data-table .null { color: #b0b7c4; font-style: italic; }
.data-table .json { color: #675ed1; }
.db-empty { height: 440px; display: grid; place-content: center; text-align: center; color: #9ca5b5; }
.db-empty b { color: #657086; }
.db-empty span { font-size: 12px; }
.db-pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; color: #7d8799; font-size: 11px; }
.db-pagination div { display: flex; gap: 7px; }

.db-action-dialog {
  width: min(560px, calc(100vw - 32px));
  border: 0;
  border-radius: 16px;
  padding: 24px;
  color: var(--ink);
  box-shadow: 0 24px 80px #11172b40;
}
.db-action-dialog::backdrop { background: #11172b88; backdrop-filter: blur(2px); }
.db-action-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.db-action-dialog-head h2 { margin: 8px 0 14px; font-size: 22px; }
.db-action-dialog-head .ghost { width: 34px; height: 34px; padding: 0; font-size: 20px; }
.db-action-dialog > p { font-size: 13px; line-height: 1.7; color: #657086; }
.db-action-warning {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 18px 0;
  padding: 14px 15px;
  border: 1px solid #f2d1d1;
  border-radius: 10px;
  background: #fff8f8;
  color: #a64c4c;
  font-size: 12px;
}
.db-action-warning span { color: #987171; }
.db-action-dialog-buttons { display: flex; justify-content: flex-end; gap: 9px; }

.db-mock-dialog > p { margin-bottom: 16px; }
.db-mock-options { display: grid; gap: 10px; margin: 0 0 20px; }
.db-mock-option {
  width: 100%;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  background: #fff;
  color: #3f485c;
  text-align: left;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.db-mock-option:hover { border-color: #aaa3f3; background: #faf9ff; }
.db-mock-option.selected { border-color: #8f87ef; background: #f6f4ff; box-shadow: 0 0 0 3px #6258e812; }
.db-mock-option i {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #ece9ff;
  color: var(--accent);
  font-style: normal;
  font-weight: 800;
}
.db-mock-option:nth-child(2) i { background: #e8f7f1; color: #16865f; }
.db-mock-option span { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.db-mock-option b { font-size: 13px; }
.db-mock-option b em { margin-left: 5px; color: #7f76df; font-size: 10px; font-style: normal; }
.db-mock-option small { color: #7d8799; font-size: 11px; line-height: 1.5; }
.db-mock-option > strong { color: transparent; font-size: 16px; }
.db-mock-option.selected > strong { color: var(--accent); }
.db-mock-option:disabled { cursor: wait; opacity: .58; }
.db-mock-progress { margin: 0 0 20px; padding: 14px; border: 1px solid #e1e4eb; border-radius: 12px; background: #fafbfc; }
.db-mock-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.db-mock-progress-head > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.db-mock-progress-head b { font-size: 13px; }
.db-mock-progress-head small { color: #7d8799; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-mock-progress-head > strong { color: var(--accent); font: 700 12px var(--mono); }
.db-mock-progress-bar { height: 6px; margin: 10px 0 12px; overflow: hidden; border-radius: 99px; background: #e9ecf1; }
.db-mock-progress-bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--accent),#8e85ed); transition: width .25s ease; }
.db-mock-progress-steps { display: grid; gap: 7px; }
.db-mock-progress-step { display: grid; grid-template-columns: 20px minmax(0,1fr) auto; gap: 8px; align-items: center; color: #7d8799; }
.db-mock-progress-step i { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: #eceff3; color: #8e97a7; font: normal 10px var(--mono); }
.db-mock-progress-step span { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.db-mock-progress-step b { color: #606a7c; font-size: 11px; }
.db-mock-progress-step small { font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-mock-progress-step > strong { font: 10px var(--mono); }
.db-mock-progress-step.running i { color: #fff; background: var(--accent); }
.db-mock-progress-step.completed i { color: #fff; background: var(--good); }
.db-mock-progress-step.completed b { color: #3e735f; }
.db-mock-progress-error { margin-top: 10px; padding: 9px 10px; border: 1px solid #f1c7c7; border-radius: 8px; background: #fff4f4; color: #b43f3f; font-size: 10px; line-height: 1.5; }

.app-login-dialog {
  width: min(660px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 40px));
  border: 0;
  border-radius: 16px;
  padding: 24px;
  color: var(--ink);
  box-shadow: 0 24px 80px #11172b40;
}
.app-login-dialog::backdrop { background: #11172b88; backdrop-filter: blur(2px); }
.app-login-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.app-login-dialog-head h2 { margin: 8px 0 4px; font-size: 22px; }
.app-login-dialog-head p { margin: 0 0 17px; color: #788398; font-size: 12px; line-height: 1.6; }
.app-login-dialog-head .ghost { width: 34px; height: 34px; padding: 0; flex: 0 0 auto; font-size: 20px; }
#app-login-search { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.app-login-list { display: flex; flex-direction: column; gap: 7px; min-height: 130px; max-height: 430px; margin: 12px 0 16px; overflow: auto; }
.app-login-user {
  width: 100%;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 12px;
  background: #fff;
  color: #3f485c;
  text-align: left;
}
.app-login-user:hover, .app-login-user.selected { border-color: #9a92f3; background: #f7f6ff; }
.app-login-user i { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: #ece9ff; color: var(--accent); font-style: normal; font-weight: 800; }
.app-login-user > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.app-login-user b { font-size: 13px; }
.app-login-user small { color: #8b94a6; font: 10px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-login-user em { color: #6158d5; font: 700 12px var(--mono); font-style: normal; }
.app-login-empty { min-height: 130px; display: grid; place-items: center; color: #929bad; font-size: 12px; text-align: center; }
.app-login-result { display: flex; align-items: center; gap: 8px; margin: -4px 0 14px; padding: 10px 12px; border: 1px solid #dcd8ff; border-radius: 9px; background: #f7f6ff; color: #6258d6; font-size: 11px; line-height: 1.5; }
.app-login-result[hidden] { display: none; }
.app-login-result.loading::before { content: ""; width: 13px; height: 13px; flex: 0 0 auto; border: 2px solid #cbc6ff; border-top-color: var(--accent); border-radius: 50%; animation: app-login-spin .75s linear infinite; }
.app-login-result.success { border-color: #bdebd9; background: #f1fbf7; color: #16865f; }
.app-login-result.success::before { content: "✓"; font-weight: 900; }
.app-login-result.error { border-color: #f1caca; background: #fff6f6; color: #b43f3f; }
.app-login-result.error::before { content: "!"; font-weight: 900; }
#app-login-confirm[aria-busy="true"] { display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: wait; }
#app-login-confirm[aria-busy="true"]::before { content: ""; width: 12px; height: 12px; border: 2px solid #ffffff66; border-top-color: #fff; border-radius: 50%; animation: app-login-spin .75s linear infinite; }
@keyframes app-login-spin { to { transform: rotate(360deg); } }
.app-login-dialog-buttons { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.app-login-dialog-buttons > span { color: #858fa2; font-size: 11px; }
.app-login-dialog-buttons > div { display: flex; gap: 8px; }

.wizard-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.wizard-actions .pill { white-space: nowrap; }

.user-create-layout .response {
  min-height: 430px;
  max-height: 510px;
}

.user-next-action { margin-top: 12px; }

.user-picker-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 10px;
}

.user-picker-toolbar input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  min-width: 0;
}

.user-picker-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 355px;
  overflow: auto;
  padding-right: 3px;
}

.user-picker-item {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  color: #465167;
  text-align: left;
}

.user-picker-item:not(:disabled):hover {
  border-color: #a59ef6;
  background: #f8f7ff;
}

.user-picker-item .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ece9ff;
  color: var(--accent);
  font-weight: 800;
}

.user-picker-item > span:nth-child(2) {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.user-picker-item b { font-size: 13px; }
.user-picker-item small {
  color: var(--muted);
  font: 10px var(--mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-picker-item em {
  border-radius: 99px;
  padding: 4px 8px;
  background: #e6f8f1;
  color: var(--good);
  font-size: 10px;
  font-style: normal;
  white-space: nowrap;
}

.user-picker-item em.blocked { background: #f1f3f7; color: #7e889a; }
.user-picker-item.disabled { opacity: .68; cursor: not-allowed; }
.user-picker-loading, .user-picker-empty {
  min-height: 200px;
  display: grid;
  place-items: center;
  color: #9aa4b6;
  border: 1px dashed var(--line);
  border-radius: 10px;
}

.user-picker-hint {
  margin-top: 13px;
  font-size: 11px;
  text-align: center;
}

.user-picker-hint button {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0 3px;
  font-weight: 700;
}

.api-feature-header {
  min-height: 188px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 30px 34px;
  border: 1px solid #e6e2ff;
  border-radius: 16px;
  background: linear-gradient(120deg, #fff, #f5f3ff);
  overflow: hidden;
  position: relative;
}

.api-feature-header::after {
  content: "API";
  position: absolute;
  right: 32px;
  bottom: -42px;
  color: #6258e80a;
  font: 900 128px/1 var(--mono);
  pointer-events: none;
}

.api-feature-header > div, .api-feature-header button { position: relative; z-index: 1; }
.api-feature-header h2 { margin: 9px 0 5px; font-size: 26px; }
.api-feature-header p { max-width: 650px; }
.api-feature-header .primary { flex: 0 0 auto; }

.api-feature-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 2px 11px;
  color: #8a94a7;
  font-size: 11px;
}

.api-feature-meta b { color: #4f586a; font: 700 13px var(--mono); }

.api-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  gap: 14px;
}

.api-feature-card {
  min-height: 276px;
  display: flex;
  flex-direction: column;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 3px 12px #29334a08;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}

.api-feature-card:hover {
  transform: translateY(-2px);
  border-color: #cfcaf8;
  box-shadow: 0 12px 28px #4c437916;
}

.api-feature-card-top {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 17px;
}

.api-feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: #ece9ff;
  color: #5d54d7;
  font: 800 13px var(--mono);
}

.tone-indigo .api-feature-icon { background: #e8eaff; color: #535dcc; }
.tone-green .api-feature-icon { background: #e6f8f1; color: #168a63; }
.tone-orange .api-feature-icon { background: #fff2df; color: #bd7417; }
.tone-blue .api-feature-icon { background: #e7f3ff; color: #2775bd; }

.api-feature-domain {
  color: #8c95a7;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .03em;
}

.api-feature-remove {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #a5adba;
  font-size: 18px;
}

.api-feature-remove:hover { background: #f2f3f7; color: #697488; }
.api-feature-card h3 { font-size: 17px; margin-bottom: 7px; }
.api-feature-card > p { min-height: 66px; color: #7b8598; font-size: 12px; }
.api-feature-card > code, .api-catalog-item code {
  align-self: flex-start;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 6px;
  background: #f4f5f8;
  color: #667086;
  font: 10px var(--mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.api-feature-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid #eef0f4;
}

.api-feature-card-foot span { color: #98a1b1; font-size: 9px; }
.api-feature-card-foot button { white-space: nowrap; padding: 7px 10px; font-size: 11px; }

.api-feature-empty {
  grid-column: 1 / -1;
  min-height: 320px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  border: 1px dashed #d7dbe4;
  border-radius: 13px;
  background: #fafbfc;
  text-align: center;
}

.api-feature-empty > span { color: #7d73ed; font-size: 32px; }
.api-feature-empty p { margin-bottom: 12px; }

.feature-detail-bar {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 13px;
}

.feature-detail-bar > div { display: flex; flex-direction: column; }
.feature-detail-bar b { font-size: 12px; }
.feature-detail-bar span { color: #929bad; font-size: 10px; }

.api-feature-dialog {
  width: min(820px, calc(100vw - 40px));
  max-height: min(760px, calc(100vh - 50px));
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: #f8f9fb;
  color: var(--ink);
  box-shadow: 0 30px 90px #10152955;
  overflow: hidden;
}

.api-feature-dialog::backdrop { background: #11172b88; backdrop-filter: blur(2px); }
.api-feature-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 26px 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.api-feature-dialog-head h2 { margin: 7px 0 3px; font-size: 23px; }
.api-feature-dialog-head .ghost { width: 34px; height: 34px; padding: 0; font-size: 20px; }
.api-feature-dialog-search {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 17px 26px 12px;
}

.api-feature-dialog-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
}

.api-feature-dialog-search span { color: #8e97a8; font-size: 11px; }
.api-feature-catalog {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-height: 500px;
  overflow: auto;
  padding: 4px 26px 26px;
}

.api-catalog-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 12px;
  align-content: start;
  min-height: 225px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.api-catalog-item > div { min-width: 0; }
.api-catalog-item h3 { margin: 3px 0 5px; }
.api-catalog-item p { min-height: 57px; font-size: 11px; }
.api-catalog-item code { display: block; margin-top: 10px; }
.api-catalog-item > button { grid-column: 1 / -1; align-self: end; margin-top: 14px; }
.api-catalog-item.upcoming { background: #fbfbfc; }
.api-catalog-item.upcoming > * { opacity: .68; }
.api-catalog-item.upcoming > button { cursor: not-allowed; }
.api-catalog-empty { grid-column: 1 / -1; min-height: 240px; display: grid; place-items: center; color: #939cad; }

.log-window-status {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #818b9e;
  font-size: 11px;
}
.log-window-status button { padding: 5px 10px; font-size: 11px; }
#view-logs > .log-console { height: calc(100vh - 248px); }
.log-empty { min-height: 180px; display: grid; place-items: center; color: #69758b; }

.log-history-dialog {
  width: min(1400px, 94vw);
  max-width: none;
  padding: 0;
  border: 1px solid #2c3447;
  border-radius: 15px;
  background: #111622;
  box-shadow: 0 28px 90px #080b1455;
  overflow: hidden;
}
.log-history-dialog::backdrop { background: #11172b99; backdrop-filter: blur(2px); }
.log-history-dialog-head {
  min-height: 96px;
  padding: 19px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.log-history-dialog-head h2 { margin: 5px 0 1px; font-size: 21px; }
.log-history-dialog-head .ghost { width: 34px; height: 34px; padding: 0; font-size: 20px; }
.log-history-dialog > .log-head { background: #181e2b; }
.log-history-dialog .log-head,.log-history-dialog .log-row { grid-template-columns: 190px 120px 70px 1fr; }
.log-history-console { height: min(70vh, 760px); min-height: 360px; border-radius: 0; }

#view-logs > .toolbar { gap: 12px; flex-wrap: wrap; }
.log-filter-groups { display: flex; min-width: 0; align-items: center; gap: 10px; flex-wrap: wrap; }
.log-level-filter button[data-level="error"].active { color: var(--bad); }
.log-level-filter button[data-level="warn"].active { color: #a66a00; }
.log-level-filter button[data-level="info"].active { color: var(--good); }

.service-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.service-info b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.service-card { min-width: 0; transition: border-color .2s, background .2s, box-shadow .2s; }
.service-card.feedback-pending { border-color: #d7d2ff; background: #faf9ff; box-shadow: 0 5px 18px #6258e812; }
.service-card.feedback-success { border-color: #bcebd9; background: #f7fdf9; box-shadow: 0 5px 18px #19a97410; }
.service-card.feedback-failure { border-color: #f0caca; background: #fffafa; box-shadow: 0 5px 18px #e5575710; }
.service-info { min-width: 0; }
.service-info small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.service-state { flex: 0 0 auto; }
.service-state.pending { background: #f0edff; color: var(--accent); }
.service-state.success { background: #e6f8f1; color: var(--good); }
.service-state.failure { background: #fdeaea; color: var(--bad); }
.service-state.occupied { background: #fff3db; color: #a66a00; }
.service-state.unknown { background: #fff3db; color: #9a6515; }
.service-card.connection-lost { border-color: #ecd7aa; background: #fffdf7; }
.debug-connection-lost .env-card i { background: #e09a22; box-shadow: 0 0 0 4px #e09a2218; }
.service-actions { display: flex; flex: 0 0 auto; gap: 7px; }
.service-state.pending::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: service-spin .7s linear infinite;
}
@keyframes service-spin { to { transform: rotate(360deg); } }
.service-action {
  flex: 0 0 auto;
  min-width: 62px;
  border: 1px solid #d9d5ff;
  border-radius: 8px;
  background: #fff;
  color: var(--accent);
  padding: 8px 11px;
  font-weight: 700;
}
.service-action.stop { border-color: #f0d4d4; color: #c65353; }
.service-open {
  flex: 0 0 auto;
  border: 1px solid #d9d5ff;
  border-radius: 8px;
  background: #f5f3ff;
  color: var(--accent);
  padding: 8px 11px;
  font-weight: 700;
}
.service-action:disabled,.service-open:disabled { cursor: wait; opacity: .58; }
.section-actions button.feedback-success { border-color: #aee4ce; background: #f3fcf8; color: var(--good); }
.section-actions button.feedback-failure { border-color: #efc4c4; background: #fff7f7; color: var(--bad); }

@media (max-width: 1500px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1150px) {
  .db-summary { grid-template-columns: repeat(3, 1fr); }
  .database-layout { grid-template-columns: 235px minmax(0, 1fr); }
  .api-feature-grid { grid-template-columns: repeat(2, minmax(250px, 1fr)); }
  .service-grid { grid-template-columns: 1fr; }
}

@media (max-width: 850px) {
  .db-summary { grid-template-columns: repeat(2, 1fr); }
  .database-layout { grid-template-columns: 1fr; }
  .database-nav { max-height: 460px; }
  .db-toolbar { grid-template-columns: 1fr 90px; }
  .api-feature-header { align-items: flex-start; flex-direction: column; padding: 25px; }
  .api-feature-grid, .api-feature-catalog { grid-template-columns: 1fr; }
  .suggestions { grid-template-columns: 1fr; }
  .app-auth-panel, .app-login-dialog-buttons { align-items: stretch; flex-direction: column; }
  .app-auth-actions { justify-content: flex-end; flex-wrap: wrap; }
}
