/* stylelint-disable */
html,
body {
  width: 100%;
  height: 100%;
}
input::-ms-clear,
input::-ms-reveal {
  display: none;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  font-family: sans-serif;
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  -ms-overflow-style: scrollbar;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
@-ms-viewport {
  width: device-width;
}
body {
  margin: 0;
}
[tabindex='-1']:focus {
  outline: none;
}
hr {
  box-sizing: content-box;
  height: 0;
  overflow: visible;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
  margin-bottom: 0.5em;
  font-weight: 500;
}
p {
  margin-top: 0;
  margin-bottom: 1em;
}
abbr[title],
abbr[data-original-title] {
  -webkit-text-decoration: underline dotted;
  text-decoration: underline dotted;
  border-bottom: 0;
  cursor: help;
}
address {
  margin-bottom: 1em;
  font-style: normal;
  line-height: inherit;
}
input[type='text'],
input[type='password'],
input[type='number'],
textarea {
  -webkit-appearance: none;
}
ol,
ul,
dl {
  margin-top: 0;
  margin-bottom: 1em;
}
ol ol,
ul ul,
ol ul,
ul ol {
  margin-bottom: 0;
}
dt {
  font-weight: 500;
}
dd {
  margin-bottom: 0.5em;
  margin-left: 0;
}
blockquote {
  margin: 0 0 1em;
}
dfn {
  font-style: italic;
}
b,
strong {
  font-weight: bolder;
}
small {
  font-size: 80%;
}
sub,
sup {
  position: relative;
  font-size: 75%;
  line-height: 0;
  vertical-align: baseline;
}
sub {
  bottom: -0.25em;
}
sup {
  top: -0.5em;
}
pre,
code,
kbd,
samp {
  font-size: 1em;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
}
pre {
  margin-top: 0;
  margin-bottom: 1em;
  overflow: auto;
}
figure {
  margin: 0 0 1em;
}
img {
  vertical-align: middle;
  border-style: none;
}
a,
area,
button,
[role='button'],
input:not([type='range']),
label,
select,
summary,
textarea {
  touch-action: manipulation;
}
table {
  border-collapse: collapse;
}
caption {
  padding-top: 0.75em;
  padding-bottom: 0.3em;
  text-align: left;
  caption-side: bottom;
}
input,
button,
select,
optgroup,
textarea {
  margin: 0;
  color: inherit;
  font-size: inherit;
  font-family: inherit;
  line-height: inherit;
}
button,
input {
  overflow: visible;
}
button,
select {
  text-transform: none;
}
button,
html [type='button'],
[type='reset'],
[type='submit'] {
  -webkit-appearance: button;
}
button::-moz-focus-inner,
[type='button']::-moz-focus-inner,
[type='reset']::-moz-focus-inner,
[type='submit']::-moz-focus-inner {
  padding: 0;
  border-style: none;
}
input[type='radio'],
input[type='checkbox'] {
  box-sizing: border-box;
  padding: 0;
}
input[type='date'],
input[type='time'],
input[type='datetime-local'],
input[type='month'] {
  -webkit-appearance: listbox;
}
textarea {
  overflow: auto;
  resize: vertical;
}
fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
legend {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-bottom: 0.5em;
  padding: 0;
  color: inherit;
  font-size: 1.5em;
  line-height: inherit;
  white-space: normal;
}
progress {
  vertical-align: baseline;
}
[type='number']::-webkit-inner-spin-button,
[type='number']::-webkit-outer-spin-button {
  height: auto;
}
[type='search'] {
  outline-offset: -2px;
  -webkit-appearance: none;
}
[type='search']::-webkit-search-cancel-button,
[type='search']::-webkit-search-decoration {
  -webkit-appearance: none;
}
::-webkit-file-upload-button {
  font: inherit;
  -webkit-appearance: button;
}
output {
  display: inline-block;
}
summary {
  display: list-item;
}
template {
  display: none;
}
[hidden] {
  display: none !important;
}
mark {
  padding: 0.2em;
  background-color: #feffe6;
}
html, body, #root { min-height: 100%; margin: 0; }
body { background: var(--app-bg); color: var(--text-primary); font-family: var(--font-family); }
.app-layout { min-height: 100vh; background: var(--app-bg); }
.app-sider { background: var(--sidebar-bg) !important; border-right: 1px solid var(--border-color); height: 100vh; overflow: auto; position: sticky; top: 0; }
.app-sider .ant-layout-sider-children { background: var(--sidebar-bg); }
.brand-row { align-items: center; background: var(--sidebar-bg); cursor: pointer; display: flex; gap: var(--space-3); padding: var(--space-5); }
.brand-icon { align-items: center; background: var(--sidebar-icon-bg); border-radius: var(--radius-xl); color: var(--sidebar-icon-color); display: flex; font-size: 20px; height: 44px; justify-content: center; width: 44px; }
.brand-title, .brand-subtitle { display: block; }
.brand-title { color: var(--sidebar-title-text) !important; font-weight: 700; }
.brand-subtitle { color: var(--sidebar-subtitle-text) !important; font-size: 12px; opacity: .82; }
.sidebar-search { margin: 0 var(--space-4) var(--space-4); width: calc(100% - 32px); }
.sidebar-search .ant-input-affix-wrapper, .sidebar-search.ant-input-affix-wrapper { background: var(--sidebar-search-bg); border-color: var(--border-color); border-radius: var(--radius-xl); }
.sidebar-menu { background: var(--sidebar-bg) !important; border-inline-end: 0 !important; padding: 0 var(--space-2) var(--space-4); }
.sidebar-menu .ant-menu-submenu-title, .sidebar-menu .ant-menu-item { border-radius: var(--radius-xl); color: var(--sidebar-text) !important; margin-inline: var(--space-2); width: calc(100% - 16px); }
.sidebar-menu .ant-menu-submenu-title:hover, .sidebar-menu .ant-menu-item:hover { background: var(--sidebar-hover-bg) !important; color: var(--sidebar-hover-text) !important; }
.sidebar-menu .ant-menu-item-selected { background: var(--sidebar-active-bg) !important; color: var(--sidebar-active-text) !important; font-weight: 700; }
.sidebar-menu .ant-menu-sub { background: var(--sidebar-bg) !important; }
.sidebar-menu .ant-menu-title-content a { color: inherit !important; }
.top-header { align-items: center; background: var(--header-bg); border-bottom: 1px solid var(--border-color); display: flex; height: var(--header-height); justify-content: space-between; padding: 0 var(--content-padding); }
.header-title { margin: 0 !important; }
.app-content { background: var(--app-bg); padding: var(--content-padding); }
.page-stack { display: flex; flex-direction: column; gap: var(--space-4); }
.page-title-row, .toolbar-row { align-items: flex-start; display: flex; gap: var(--space-3); justify-content: space-between; }
.toolbar-row { align-items: center; flex-wrap: wrap; }
.form-grid { display: grid; gap: 0 var(--space-4); grid-template-columns: repeat(var(--form-columns), minmax(0, 1fr)); }
.card-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(var(--card-min-width), 1fr)); }
.kv-row { border-bottom: 1px dashed var(--border-color); display: flex; gap: var(--space-4); justify-content: space-between; padding: 7px 0; }
.kv-row span { color: var(--text-secondary); }
.kv-row b { font-weight: 500; overflow: hidden; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.json-view, .detail-json { background: var(--code-bg); border-radius: var(--radius-lg); color: var(--code-text); max-height: 70vh; overflow: auto; padding: var(--space-4); white-space: pre-wrap; }

/* Production-grade split-screen login. */
.login-page {
  background: #07111f;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 1fr);
  height: 100vh;
  height: 100dvh;
  isolation: isolate;
  overflow: hidden;
  position: relative;
}
.login-visual-panel {
  align-items: center;
  background: linear-gradient(145deg, #081d35 0%, #0b4f6c 48%, #176b87 100%);
  color: #fff;
  display: flex;
  isolation: isolate;
  min-width: 0;
  overflow: hidden;
  padding: clamp(42px, 7vw, 104px);
  position: relative;
}
.login-visual-panel::before {
  background-image:
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 42px 42px;
  content: '';
  inset: 0;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.92), transparent);
  pointer-events: none;
  position: absolute;
  z-index: -1;
}
.login-visual-panel::after {
  background: radial-gradient(circle at 50% 46%, transparent 0%, rgba(3, 14, 28, .12) 72%, rgba(3, 14, 28, .28) 100%);
  content: '';
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: -1;
}
.login-orb {
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  filter: blur(1px);
  pointer-events: none;
  position: absolute;
}
.login-orb-one {
  background: rgba(50, 214, 255, .18);
  height: clamp(250px, 28vw, 380px);
  right: -90px;
  top: -100px;
  width: clamp(250px, 28vw, 380px);
}
.login-orb-two {
  background: rgba(85, 94, 255, .22);
  bottom: -150px;
  height: clamp(320px, 34vw, 460px);
  left: -170px;
  width: clamp(320px, 34vw, 460px);
}
.login-visual-content {
  max-width: 720px;
  position: relative;
  width: 100%;
  z-index: 1;
}
.login-app-name {
  color: #fff !important;
  font-size: clamp(42px, 5.2vw, 76px) !important;
  font-weight: 750 !important;
  letter-spacing: -.045em;
  line-height: 1.02 !important;
  margin: 0 !important;
  max-width: 13ch;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.login-form-panel {
  align-items: center;
  background: radial-gradient(circle at 80% 10%, rgba(45, 120, 255, .12), transparent 32%), #f6f8fc;
  display: flex;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  padding: clamp(24px, 5vw, 72px);
  position: relative;
}
.login-form-shell {
  max-width: 480px;
  width: 100%;
}
.login-mobile-app-name {
  display: none;
}
.login-card {
  backdrop-filter: blur(20px);
  background: rgba(255,255,255,.95) !important;
  border: 1px solid rgba(110, 128, 158, .16) !important;
  border-radius: 24px !important;
  box-shadow: 0 28px 75px rgba(24, 43, 77, .16);
  overflow: hidden;
  width: 100%;
}
.login-card .ant-card-body {
  padding: clamp(26px, 3vw, 38px);
}
.login-form-header {
  margin-bottom: 24px;
}
.login-form-header .ant-typography:last-child {
  margin-bottom: 0;
}
.login-card .ant-form-item {
  margin-bottom: 20px;
}
.login-card .ant-input-affix-wrapper {
  border-radius: 12px;
  min-height: 48px;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.login-card .ant-input-affix-wrapper:focus-within {
  box-shadow: 0 0 0 3px rgba(22, 119, 255, .12);
}
.login-card .ant-btn-primary {
  border-radius: 12px;
  font-weight: 650;
  min-height: 48px;
}
.login-logo {
  display: block;
  margin-bottom: 20px;
  max-height: 52px;
  max-width: 180px;
  object-fit: contain;
}
.login-form-kicker {
  color: var(--text-secondary);
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

/* Configuration tables remain separate page-owned components, exposed through one tabbed route. */
.configuration-tabs-page { min-height: 100%; }
.configuration-tabs-shell { border-radius: 16px !important; margin-bottom: 16px; }
.configuration-tabs-shell .ant-tabs-nav { margin-bottom: 0; }
.configuration-tabs-content > div { padding: 0 !important; }

/* Relation selectors use a compact icon-only create action. */
.relation-field-row { align-items: flex-end; display: flex; gap: 10px; width: 100%; }
.relation-field-control { flex: 1; min-width: 0; }
.relation-add-button { flex: 0 0 auto; margin-bottom: 24px; }

@media (max-width: 900px) {
  .app-sider { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .page-title-row { flex-direction: column; }
  .app-content { padding: var(--mobile-content-padding); }

  .login-page {
    display: block;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
  }
  .login-visual-panel {
    inset: 0;
    min-height: 0;
    padding: 0;
    position: absolute;
  }
  .login-visual-content {
    display: none;
  }
  .login-orb-one {
    height: 280px;
    right: -110px;
    top: -100px;
    width: 280px;
  }
  .login-orb-two {
    bottom: -140px;
    height: 360px;
    left: -160px;
    width: 360px;
  }
  .login-form-panel {
    background: transparent;
    height: 100%;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
    padding:
      max(18px, env(safe-area-inset-top))
      max(16px, env(safe-area-inset-right))
      max(18px, env(safe-area-inset-bottom))
      max(16px, env(safe-area-inset-left));
    position: relative;
    z-index: 2;
  }
  .login-form-shell {
    max-width: 440px;
  }
  .login-mobile-app-name {
    color: #fff !important;
    display: block;
    font-size: clamp(28px, 8vw, 42px) !important;
    font-weight: 750 !important;
    letter-spacing: -.035em;
    line-height: 1.05 !important;
    margin: 0 0 18px !important;
    overflow-wrap: anywhere;
    text-align: center;
    text-shadow: 0 8px 30px rgba(0,0,0,.28);
    text-wrap: balance;
  }
  .login-card {
    background: rgba(255,255,255,.94) !important;
    box-shadow: 0 24px 64px rgba(0, 14, 35, .34);
  }
  .login-card .ant-card-body {
    padding: clamp(22px, 6vw, 32px);
  }
}

@media (max-height: 700px) {
  .login-card .ant-card-body { padding-bottom: 22px; padding-top: 22px; }
  .login-form-header { margin-bottom: 16px; }
  .login-card .ant-form-item { margin-bottom: 14px; }
  .login-card .ant-input-affix-wrapper, .login-card .ant-btn-primary { min-height: 44px; }
  .login-logo { margin-bottom: 14px; max-height: 42px; }
  .login-form-kicker { margin-bottom: 4px; }
}

@media (max-width: 900px) and (max-height: 620px) {
  .login-mobile-app-name { font-size: 26px !important; margin-bottom: 10px !important; }
  .login-card .ant-card-body { padding: 18px 22px; }
  .login-form-header { margin-bottom: 12px; }
  .login-form-header h2.ant-typography { font-size: 24px; margin-bottom: 4px; }
  .login-form-header .ant-typography { font-size: 13px; }
  .login-card .ant-form-item { margin-bottom: 10px; }
  .login-card .ant-input-affix-wrapper, .login-card .ant-btn-primary { min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .login-card .ant-input-affix-wrapper { transition: none; }
}
