:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans", "Yu Gothic", "Microsoft YaHei", sans-serif;
  background: #f8f5f1;
  color: #241914;
  --coffee: #2b1b14;
  --coffee-deep: #180f0b;
  --gold: #a96f2f;
  --gold-soft: #f4e7d4;
  --gold-line: #d8b98d;
  --ink: #241914;
  --muted: #766b65;
  --line: #e5ddd6;
  --surface: #ffffff;
  --surface-soft: #faf7f4;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
  background: #f8f5f1;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 15% -15%, rgba(177, 117, 53, 0.12), transparent 30rem),
    #ffffff;
}

button {
  font: inherit;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: max(28px, env(safe-area-inset-top)) 22px max(28px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 16% 8%, rgba(200, 146, 62, 0.22), transparent 30rem),
    radial-gradient(circle at 92% 86%, rgba(43, 27, 20, 0.1), transparent 34rem),
    linear-gradient(135deg, #f8f4ee 0%, #fffdf9 48%, #f1e8df 100%);
}

.login-card {
  display: grid;
  width: min(100%, 860px);
  min-height: 540px;
  grid-template-columns: minmax(290px, 0.9fr) minmax(390px, 1.1fr);
  overflow: hidden;
  border: 1px solid rgba(120, 77, 38, 0.22);
  border-radius: 32px;
  padding: 0;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 32px 90px rgba(46, 28, 19, 0.18);
}

.login-brand-panel {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 54px 36px;
  background:
    radial-gradient(circle at 48% 28%, rgba(255, 252, 242, 0.72), transparent 14rem),
    linear-gradient(150deg, #edf0e7 0%, #d7dfd0 48%, #c5d0c1 100%);
  color: var(--coffee);
}

.login-brand-panel::after {
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(73, 91, 67, 0.18);
  border-radius: 24px;
  content: "";
  pointer-events: none;
}

.login-form-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 42px 54px 48px;
}

.login-logo {
  display: block;
  position: relative;
  z-index: 1;
  width: 188px;
  height: 188px;
  margin: 0 auto 14px;
  object-fit: contain;
}

.login-wordmark {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--coffee);
  font-size: clamp(2rem, 4vw, 2.65rem);
  font-weight: 820;
  letter-spacing: 0.18em;
  line-height: 1;
  text-indent: 0.18em;
}

.login-brand-meta {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  color: rgba(43, 27, 20, 0.64);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.login-language-picker {
  align-self: flex-end;
  margin: 0 0 38px;
}

.login-kicker {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 780;
  letter-spacing: 0.14em;
}

.login-card h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4.3vw, 2.6rem);
  line-height: 1.12;
}

.login-note {
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.login-card label {
  display: grid;
  gap: 9px;
  margin-top: 17px;
  color: #51443e;
  font-size: 0.95rem;
  font-weight: 720;
}

.login-card input {
  width: 100%;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 17px;
  background: var(--surface-soft);
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.login-card input:focus {
  border-color: var(--gold);
  outline: 0;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(169, 111, 47, 0.13);
}

.login-error {
  min-height: 1.35rem;
  margin: 12px 0 4px;
  color: #b04c38;
  font-size: 0.85rem;
}

.login-submit {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--coffee-deep);
  border-radius: 16px;
  background: linear-gradient(135deg, #3a251c 0%, #21140f 100%);
  color: #fffaf3;
  font-weight: 790;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(43, 27, 20, 0.2);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.login-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(43, 27, 20, 0.25);
}

.login-submit:focus-visible {
  outline: 3px solid rgba(200, 146, 62, 0.42);
  outline-offset: 3px;
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.6;
}

@media (max-width: 760px) {
  .login-screen {
    align-items: start;
    padding-top: max(18px, env(safe-area-inset-top));
  }

  .login-card {
    width: min(100%, 480px);
    min-height: 0;
    grid-template-columns: 1fr;
    border-radius: 26px;
  }

  .login-brand-panel {
    min-height: 220px;
    padding: 34px 24px 30px;
  }

  .login-brand-panel::after {
    inset: 16px;
    border-radius: 19px;
  }

  .login-logo {
    width: 132px;
    height: 132px;
    margin-bottom: 10px;
  }

  .login-wordmark {
    font-size: 1.8rem;
  }

  .login-brand-meta {
    margin-top: 11px;
  }

  .login-form-panel {
    padding: 28px 28px 34px;
  }

  .login-language-picker {
    margin-bottom: 24px;
  }
}

@media (max-width: 400px) {
  .login-screen {
    padding-right: 12px;
    padding-left: 12px;
  }

  .login-form-panel {
    padding-right: 22px;
    padding-left: 22px;
  }

  .login-card h1 {
    font-size: 2rem;
  }
}

.shell {
  width: min(100%, 1040px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.brand-logo {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  object-fit: contain;
}

html.workspace-focus-aiet .brand-logo,
html.workspace-focus-aiet .login-logo,
html.workspace-focus-aiet .workspace-tab:not([data-group="AIET"]) {
  display: none;
}

html.workspace-focus-aiet .workspace-tabs {
  grid-template-columns: minmax(0, 1fr);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1px;
  color: var(--ink);
  font-size: clamp(1.35rem, 5.2vw, 2rem);
  letter-spacing: -0.04em;
}

.language-picker {
  position: relative;
  width: fit-content;
}

.language-trigger {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 1px 4px 3px;
  background: transparent;
  color: #806128;
  font-size: 0.76rem;
  font-weight: 760;
  cursor: pointer;
}

.language-trigger:hover,
.language-trigger:focus-visible,
.language-trigger[aria-expanded="true"] {
  border-bottom-color: var(--gold);
  color: #604717;
}

.language-trigger:focus-visible {
  outline: 2px solid rgba(179, 147, 81, 0.25);
  outline-offset: 2px;
}

.language-globe {
  font-size: 1rem;
  line-height: 1;
}

.language-current {
  min-width: 0;
  text-align: center;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.language-caret {
  font-size: 0.68rem;
  transition: transform 160ms ease;
}

.language-trigger[aria-expanded="true"] .language-caret {
  transform: rotate(180deg);
}

.language-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 7px);
  left: 0;
  display: grid;
  min-width: 154px;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 38px rgba(60, 48, 23, 0.16);
}

.login-language-picker .language-menu {
  left: 50%;
  transform: translateX(-50%);
}

.language-option {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 0 11px;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.language-option:hover,
.language-option:focus-visible {
  color: var(--ink);
}

.language-option:focus-visible {
  outline: 2px solid rgba(179, 147, 81, 0.28);
  outline-offset: 1px;
}

.language-option.is-active {
  background: var(--gold-soft);
  color: #6d5423;
  box-shadow: inset 3px 0 0 var(--gold);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.clock {
  display: grid;
  min-width: 146px;
  justify-items: end;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

#clock-date {
  font-size: 0.68rem;
}

#clock-time {
  color: var(--ink);
  font-size: 1.12rem;
  letter-spacing: 0.03em;
}

#clock-sync {
  color: var(--gold);
  font-size: 0.64rem;
}

#clock-sync.is-warning {
  color: #b76132;
}

.refresh {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--gold-line);
  border-radius: 13px;
  padding: 0 13px;
  background: var(--gold-soft);
  color: #6d5423;
  font-weight: 700;
  cursor: pointer;
}

.refresh:disabled {
  cursor: wait;
  opacity: 0.56;
}

.refresh:active {
  transform: translateY(1px);
}

.workspace-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0 10px;
}

.workspace-tab {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 20px;
  background: var(--surface);
  color: #716d65;
  text-align: left;
  cursor: pointer;
}

.workspace-tab .tab-name {
  font-size: clamp(1.08rem, 1.25vw, 1.34rem);
  letter-spacing: 0.01em;
}

.workspace-tab .tab-port {
  padding: 6px 11px;
  font-size: 0.9rem;
}

.workspace-tab.is-active {
  border-color: var(--gold-line);
  background: linear-gradient(135deg, var(--gold-soft), #fff);
  box-shadow: 0 12px 32px rgba(114, 87, 35, 0.12);
  color: #3d311d;
}

.workspace-tab.is-active .tab-port {
  color: var(--gold);
}

.tabs {
  display: grid;
  gap: 9px;
  margin: 0 0 14px;
  padding: 0;
}

.tabs[data-active-group="AIAS"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tabs[data-active-group="CSYS"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tabs[data-active-group="AIET"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tabs[hidden],
.tab[hidden] {
  display: none;
}

.tab {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
  min-width: 0;
  min-height: 84px;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 22px;
  background: linear-gradient(145deg, #fff, #fbfaf7);
  color: #716d65;
  text-align: left;
  box-shadow: 0 8px 24px rgba(44, 36, 20, 0.055);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.tab:hover {
  transform: translateY(-1px);
  border-color: rgba(167, 126, 45, 0.42);
  box-shadow: 0 12px 30px rgba(44, 36, 20, 0.085);
}

.tab.is-active {
  border-color: var(--gold-line);
  background: linear-gradient(135deg, var(--gold-soft), #fffaf0);
  box-shadow: inset 0 0 0 1px rgba(167, 126, 45, 0.08), 0 12px 32px rgba(114, 87, 35, 0.13);
  color: #3d311d;
}

.tab-name {
  overflow: hidden;
  font-size: clamp(1.05rem, 1.2vw, 1.24rem);
  font-weight: 760;
  line-height: 1.28;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-port {
  margin-top: 0;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(113, 109, 101, 0.07);
  color: #99948b;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88rem;
  font-weight: 700;
}

.tab.is-active .tab-port {
  background: rgba(167, 126, 45, 0.11);
  color: var(--gold);
}

.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
  box-shadow: 0 22px 70px rgba(44, 36, 20, 0.08);
}

.panel-head {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 15px 16px;
}

.panel-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.panel h2 {
  margin-bottom: 0;
  font-size: 1.22rem;
}

#panel-status {
  margin: 5px 0 0 19px;
  color: var(--muted);
  font-size: 0.78rem;
}

#updated-at {
  flex: 0 0 auto;
  color: #8d887e;
  font-size: 0.74rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #aaa59b;
  box-shadow: 0 0 0 4px rgba(170, 165, 155, 0.12);
}

.status-dot.is-ok {
  background: #37a872;
  box-shadow: 0 0 0 4px rgba(55, 168, 114, 0.12);
}

.status-dot.is-error {
  background: #d89738;
  box-shadow: 0 0 0 4px rgba(216, 151, 56, 0.13);
}

.status-dot.is-offline {
  background: #c6493f;
  box-shadow: 0 0 0 4px rgba(198, 73, 63, 0.13);
}

.status-dot.is-loading {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(179, 147, 81, 0.13);
  animation: pulse 1.2s ease-in-out infinite;
}

.viewer-wrap {
  min-height: 56vh;
  max-height: calc(100vh - 280px);
  overflow: auto;
  background: var(--surface-soft);
}

#viewer {
  min-width: 100%;
  min-height: 56vh;
  margin: 0;
  padding: 18px 16px 24px;
  color: #2e2c28;
  font: 0.78rem/1.58 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 2;
}

.panel-frame {
  display: block;
  width: 100%;
  min-height: 68vh;
  border: 0;
  background: #07111f;
}

#viewer:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

footer {
  padding: 15px 3px 0;
  color: #8a867d;
  font-size: 0.72rem;
  line-height: 1.5;
}

footer p {
  margin-bottom: 2px;
}

body.aias-order-editor-open,
body.aias-grid-editor-open {
  overflow: hidden;
}

.aias-order-editor-page {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: auto;
  background: var(--surface-soft);
  color: var(--ink);
}

.aias-order-editor-page[hidden] {
  display: none;
}

.aias-order-editor-shell {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
}

.aias-order-editor-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.aias-order-editor-header p {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.aias-order-editor-header h2 {
  margin: 0;
  font-size: clamp(1.45rem, 5vw, 2rem);
}

.aias-order-editor-back {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 750;
  cursor: pointer;
}

.aias-order-editor-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 16px 45px rgba(54, 48, 36, 0.09);
}

.aias-order-editor-card h3 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.aias-order-editor-facts {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
}

.aias-order-market-fact {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 3px 12px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #b8d7c8;
  border-radius: 12px;
  background: #effaf4;
}

.aias-order-market-fact span {
  color: var(--muted);
  font-size: 0.78rem;
}

.aias-order-market-fact strong {
  justify-self: end;
  color: #087443;
  font-size: 1.1rem;
}

.aias-order-market-fact time {
  grid-column: 1 / 2;
  color: var(--muted);
  font-size: 0.72rem;
}

.aias-market-refresh {
  grid-column: 2;
  justify-self: end;
  border: 1px solid #087443;
  border-radius: 8px;
  padding: 5px 9px;
  background: #fff;
  color: #087443;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 750;
  cursor: pointer;
}

.aias-market-refresh:disabled {
  opacity: 0.55;
  cursor: wait;
}

.aias-order-kind-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 18px;
}

.aias-order-kind-choice {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 750;
  cursor: pointer;
}

.aias-order-kind-choice.is-active {
  border-color: #2f7bdc;
  background: #e9f2ff;
  color: #125caf;
}

.aias-order-editor-fields {
  display: grid;
  gap: 14px;
}

.aias-order-editor-fields label {
  color: var(--ink);
  font-weight: 720;
}

.aias-order-editor-fields input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.aias-order-editor-plan-field.is-hidden {
  display: none;
}

.aias-order-editor-help {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.aias-order-editor-error {
  min-height: 1.2em;
  margin: 9px 0;
  color: #b52d36;
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-line;
}

.aias-order-editor-error.pending {
  color: #9a6700;
}

.aias-order-editor-submit,
.aias-grid-editor-submit {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: #236fce;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.aias-order-editor-submit:disabled,
.aias-grid-editor-submit:disabled {
  cursor: wait;
  opacity: 0.55;
}

.aias-grid-editor-shell {
  width: min(100%, 920px);
}

.aias-grid-editor-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.aias-grid-editor-section h4 {
  margin: 0 0 12px;
  font-size: 0.94rem;
}

.aias-grid-family-summary {
  margin-bottom: 14px;
  border-left: 4px solid #2f7bdc;
  line-height: 1.65;
}

.aias-grid-member-editors {
  display: grid;
  gap: 16px;
}

.aias-grid-member-editor {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.aias-grid-member-editor.aias-grid-member-error {
  border-color: #c73545;
  box-shadow: 0 0 0 2px rgba(199, 53, 69, 0.12);
}

.aias-grid-member-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.aias-grid-member-heading h5 {
  margin: 0;
  font-size: 0.9rem;
}

.aias-grid-member-heading span {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e7eef8;
  color: #36516f;
  font-size: 0.7rem;
  font-weight: 750;
}

.aias-grid-member-relationship {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.55;
}

.aias-grid-editor-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.aias-grid-editor-fields label {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 720;
}

.aias-grid-editor-fields .aias-grid-derived-hidden {
  display: none;
}

.aias-grid-editor-fields input,
.aias-grid-editor-fields select {
  display: block;
  width: 100%;
  min-height: 43px;
  margin-top: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.aias-grid-editor-fields input[readonly] {
  background: var(--surface-soft);
  color: var(--muted);
}

.aias-grid-editor-fields select:disabled {
  background: var(--surface-soft);
  color: var(--muted);
  opacity: 1;
}

.aias-grid-leverage-range {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 650;
}

.aias-grid-editor-fields .aias-grid-field-error {
  border-color: #c73545;
  box-shadow: 0 0 0 2px rgba(199, 53, 69, 0.16);
}

@keyframes pulse {
  50% {
    opacity: 0.42;
  }
}

@media (max-width: 620px) {
  .tabs[data-active-group="AIAS"] {
    grid-template-columns: 1fr;
  }

  .tabs[data-active-group="AIET"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tab {
    min-height: 68px;
    gap: 8px;
    padding: 11px 12px;
  }

  .tab-name {
    font-size: 0.94rem;
  }

  .workspace-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-tab {
    min-height: 60px;
    padding: 10px 13px;
  }

  .workspace-tab .tab-name {
    font-size: 1rem;
  }

  .workspace-tab .tab-port {
    padding: 4px 7px;
    font-size: 0.76rem;
  }

  .aias-grid-editor-fields {
    grid-template-columns: 1fr;
  }
  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    display: grid;
    justify-items: end;
  }

  .clock {
    min-width: 0;
  }

  .refresh {
    min-height: 39px;
    padding: 0 11px;
    font-size: 0.78rem;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
  }
}

@media (min-width: 720px) {
  .shell {
    padding-right: 24px;
    padding-left: 24px;
  }

  .tabs {
    margin-right: 0;
    margin-left: 0;
    padding-right: 0;
    padding-left: 0;
  }

  #viewer {
    padding: 24px;
    font-size: 0.84rem;
  }
}
.aias-portal-dialog-layer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.48);
}

.aias-portal-dialog {
  width: min(520px, 100%);
  padding: 24px;
  border: 1px solid #d6dde8;
  border-radius: 18px;
  background: #fff;
  color: #17202a;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.aias-portal-dialog h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.aias-portal-dialog p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.65;
}

.aias-portal-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.aias-portal-dialog-actions button {
  min-width: 92px;
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 8px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.aias-portal-dialog-cancel {
  background: #fff;
  color: #334155;
}

.aias-portal-dialog-accept {
  border-color: #0969da !important;
  background: #0969da;
  color: #fff;
}
