/* Workspace shell and interaction surfaces. */
:root {
  --bg: #f5f7fa;
  --panel: #fff;
  --ink: #202c3e;
  --muted: #788395;
  --line: #e7ebf1;
  --dark: #172336;
  --accent: #138b7d;
  --accent-soft: #eaf6f2;
  --ok: #148371;
  --warn: #ad7736;
  --bad: #c45858;
  --blue: #5679b2;
  --terminal: #192536;
  --terminal-ink: #e6edf6;
  --terminal-muted: #92a2b7;
  --ui-font:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
}
[hidden] {
  display: none !important;
}
body {
  font-family: var(--ui-font);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}
button,
input,
textarea,
select {
  font-family: inherit;
}
button {
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid #5fbca9;
  outline-offset: 3px;
}
svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}
kbd {
  font: 10px var(--ui-font);
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 2px 4px;
  opacity: 0.55;
}
h1,
h2,
h3,
.topline h1,
.section-head h2,
.overview-callout h2,
.modal h2,
.gate-box h2 {
  font-family: var(--ui-font);
  letter-spacing: -0.5px;
  font-weight: 650;
}
.app {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  height: 100dvh;
}
.main {
  height: 100dvh;
  max-width: none;
  width: 100%;
  padding: 30px 36px 40px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}
.workspace-sidebar {
  display: flex;
  height: 100dvh;
  padding: 27px 17px 14px;
  background: #172336;
  color: #e5ebf4;
  border: 0;
  overflow: hidden;
}
.workspace-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px;
  color: inherit;
  text-decoration: none;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.7px;
}
.brand-symbol {
  display: grid;
  place-items: center;
  background: #46c3a8;
  color: #102b30;
  border-radius: 10px;
  width: 36px;
  height: 39px;
}
.brand-symbol svg {
  width: 25px;
  height: 25px;
}
.workspace-brand small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: #8e9cb2;
  letter-spacing: 1px;
  margin-top: 3px;
}
.brand-badge {
  font-size: 8px;
  font-weight: 600;
  color: #93a4bd;
  border: 1px solid #384559;
  border-radius: 4px;
  padding: 3px 5px;
  margin-left: auto;
  letter-spacing: 0.5px;
}
.workspace-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #334055;
  background: #202d40;
  color: #a7b5c9;
  border-radius: 7px;
  min-height: 38px;
  padding: 8px 10px;
  margin: 26px 0 14px;
  text-align: left;
  font-size: 11px;
}
.workspace-search svg {
  width: 15px;
  height: 15px;
}
.workspace-search kbd {
  margin-left: auto;
  font-size: 8px;
  white-space: nowrap;
}
.workspace-nav {
  overflow: auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: #354358 transparent;
  padding-bottom: 15px;
  flex: 1;
}
.nav-caption {
  font-size: 10px;
  color: #79899f;
  letter-spacing: 1px;
  padding: 20px 12px 9px;
}
.workspace-nav-link,
.workspace-nav [data-group] {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 11px;
  text-align: left;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #a9b6c9;
  padding: 10px 12px;
  margin: 2px 0;
  font-size: 12px;
  line-height: 1.5;
  transition:
    background 0.16s,
    color 0.16s;
}
.workspace-nav-link > svg {
  width: 17px;
  height: 17px;
  opacity: 0.85;
}
.workspace-nav-link:hover,
.workspace-nav [data-group]:hover {
  color: #fff;
  background: #243249;
}
.workspace-nav-link.active {
  background: #28463f;
  color: #a5ebd5;
}
.workspace-nav-link.active > svg {
  color: #75d6b9;
}
.workspace-nav-link.parent-active {
  color: #e8f3f0;
}
.nav-count {
  display: grid;
  place-items: center;
  min-width: 20px;
  padding: 1px 5px;
  background: #304157;
  color: #b4c7db;
  border-radius: 4px;
  margin-left: auto;
  font-size: 10px;
}
.nav-disclosure > svg:last-child {
  width: 13px;
  height: 13px;
  margin-left: auto;
  transition: transform 0.22s;
}
.nav-disclosure[aria-expanded="true"] > svg:last-child {
  transform: rotate(90deg);
}
.nav-submenu {
  display: grid;
  grid-template-rows: 1fr;
  opacity: 1;
  transition:
    grid-template-rows 0.24s ease,
    opacity 0.2s;
}
.nav-submenu.collapsed {
  grid-template-rows: 0fr;
  opacity: 0;
}
.nav-submenu > div {
  overflow: hidden;
  min-height: 0;
  margin-left: 20px;
  border-left: 1px solid #334054;
  padding-left: 10px;
}
.nav-submenu button {
  font-size: 11px !important;
  min-height: 31px;
  padding: 7px 10px !important;
  gap: 10px !important;
}
.nav-submenu .workspace-nav-link > svg {
  width: 13px;
  height: 13px;
}
.submenu-dot {
  height: 4px;
  width: 4px;
  border-radius: 50%;
  background: #63748e;
  margin: 0 4px;
}
.workspace-nav [data-group].active {
  color: #94e2cb;
  background: #253d3b;
}
.workspace-nav [data-group].active .submenu-dot {
  background: #7cd7ba;
}
.workspace-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #2d3a4e;
  padding: 16px 8px 0;
  font-size: 11px;
  margin-top: auto;
  color: #c5d0df;
}
.workspace-footer > div > span {
  display: block;
  color: #7e90a8;
  font-size: 10px;
  margin-top: 3px;
}
.connection-dot {
  height: 7px;
  width: 7px;
  background: #6bbda6;
  border-radius: 50%;
}
.workspace-footer button {
  margin-left: auto;
  background: none;
  border: 0;
  color: #a5b3c6;
  padding: 5px;
}
.workspace-footer svg {
  width: 16px;
  height: 16px;
}
.topline {
  padding-bottom: 23px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.title-wrap {
  gap: 12px;
}
.topline .eyebrow {
  font-size: 10px;
  color: #8190a2;
  letter-spacing: 0.6px;
  font-family: var(--ui-font);
  font-weight: 400;
}
.topline h1 {
  font-size: 25px;
  margin: 9px 0 0;
  line-height: 1.3;
}
.page-description {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
}
.menu-toggle {
  display: none;
}
.header-search {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 35px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 11px;
}
.header-search svg {
  width: 15px;
  height: 15px;
}
.header-search kbd {
  font-size: 8px;
  opacity: 0.65;
}
.role {
  color: #668078;
  border: 1px solid #dce7e1;
  background: #edf5f1;
  border-radius: 5px;
  font-size: 9px;
  letter-spacing: 0.3px;
  padding: 8px 10px;
}
.button,
.small-button {
  border-radius: 6px;
  font-weight: 500;
  font-size: 12px;
  min-height: 35px;
  padding: 8px 13px;
}
.small-button {
  min-height: 29px;
  font-size: 11px;
  padding: 6px 10px;
}
.button.secondary,
.small-button.secondary {
  background: #fff;
  border-color: #dde3eb;
  color: #526073;
}
.button.secondary:hover,
.small-button.secondary:hover {
  background: #f6f9fa;
  border-color: #bccfc8;
  color: var(--ok);
}
.button.accent,
.small-button.accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.button:hover:not(:disabled),
.small-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 3px 7px #1b3a3020;
}
.section {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 21px;
  box-shadow: 0 2px 3px #21334803;
  margin-bottom: 17px;
}
.section-head {
  margin-bottom: 16px;
  align-items: center;
}
.section-head h2 {
  font-size: 16px;
}
.section-head p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 5px;
}
.eyebrow {
  font: 500 10px var(--ui-font);
  letter-spacing: 0.7px;
  color: #8791a0;
}
.view.active {
  animation: workspace-enter 0.22s ease both;
}
@keyframes workspace-enter {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.overview-layout {
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.8fr);
  gap: 18px;
}
.overview-layout > .section {
  margin: 0;
}
.overview-callout {
  position: relative;
  overflow: hidden;
  background: #e9f1ef;
  border: 1px solid #dce8e3;
  border-radius: 10px;
  padding: 30px 27px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.overview-callout::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  border: 28px solid #d5e6df;
  border-radius: 35px;
  right: -58px;
  top: -50px;
  transform: rotate(-24deg);
  pointer-events: none;
  opacity: 0.65;
}
.overview-callout .eyebrow {
  color: #5e8c80 !important;
  letter-spacing: 1.7px;
  font-size: 9px;
}
.overview-callout h2 {
  font-size: 25px;
  line-height: 1.5;
  margin: 12px 0 6px;
  position: relative;
  z-index: 1;
}
.overview-callout p {
  font-size: 12px;
  color: #789087;
  position: relative;
  z-index: 1;
}
.quick-actions {
  gap: 8px;
  margin-top: 23px;
  position: relative;
  z-index: 1;
}
.quick-actions .button {
  font-size: 11px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 13px;
  border: 0;
  border-radius: 0;
  overflow: visible;
  margin: 20px 0;
}
.metric {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 18px 19px;
  box-shadow: none;
  position: relative;
  overflow: hidden;
}
.metric:after {
  content: "";
  position: absolute;
  height: 4px;
  width: 25px;
  background: #d6e9e2;
  right: 18px;
  top: 24px;
  border-radius: 5px;
}
.metric.warn:after {
  background: #ebd5ce;
}
.metric .eyebrow {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0;
}
.metric .num {
  font: 600 31px/1.25 var(--ui-font);
  letter-spacing: -1px;
  margin-top: 12px;
  color: var(--ink);
}
.overview-grid {
  gap: 18px;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.85fr);
  margin-top: 0;
}
.overview-item {
  padding: 12px 0;
}
.overview-item strong {
  font-size: 12px;
  font-weight: 600;
}
.overview-item .sub {
  font-size: 10px;
  margin-top: 5px;
}
.overview-bars {
  padding-top: 8px;
  gap: 20px;
}
.overview-bar-label {
  font-size: 11px;
}
.overview-bar-label strong {
  font-weight: 500;
}
.overview-bar-track {
  height: 6px;
  background: #f0f3f6;
}
.overview-bar-track i {
  background: #66ac98;
}
.overview-operation-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.overview-operations {
  margin-top: 24px;
}
.overview-operation-grid button {
  min-height: 85px;
  padding: 16px;
  border-radius: 8px;
  border-color: var(--line);
}
.overview-operation-grid strong {
  font-size: 12px;
  color: #314756;
}
.overview-operation-grid span {
  font-size: 10px;
  line-height: 1.5;
  margin-top: 9px;
}
.overview-list .empty {
  padding: 25px 10px;
}
.search,
.field input,
.field select,
.field textarea {
  border-radius: 6px;
  min-height: 39px;
  border-color: #dfe5ec;
  font-size: 12px;
}
.field label {
  font-family: var(--ui-font);
  font-size: 11px;
  letter-spacing: 0;
  font-weight: 500;
  color: #59677c;
}
.field textarea {
  width: 100%;
  resize: vertical;
  min-height: 110px;
  padding: 11px;
}
.field select {
  width: 100%;
  text-overflow: ellipsis;
}
.field input {
  width: 100%;
  min-width: 0;
}
.field .sub {
  font-size: 10px;
  line-height: 1.6;
}
.field {
  gap: 7px;
}
.toolbar {
  margin-bottom: 16px;
}
.tabs {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  border-radius: 0;
  gap: 8px;
}
.tabs button {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 7px 13px;
  background: transparent;
  font-size: 12px;
}
.tabs button.active {
  background: #e8f4ef;
  border-color: #d6e9e2;
}
.table-wrap {
  border-radius: 9px;
  border-color: var(--line);
}
#view-accounts .table-wrap th {
  padding: 13px;
  background: #f8fafc;
  font-size: 10px;
  color: #8691a1;
}
#view-accounts .table-wrap td {
  padding: 15px 13px;
  border-bottom-color: #f0f3f7;
}
.account-name {
  font-family: var(--ui-font);
  font-size: 12px;
  font-weight: 600;
}
.account-avatar {
  border-radius: 10px;
  width: 35px;
  height: 35px;
  flex-basis: 35px;
  background: #e6eeed;
  color: #69867d;
}
.account-meta .sub,
.account-main .sub {
  font-size: 10px;
}
.account-status .pill {
  font-size: 9px;
}
.pill {
  font: 500 10px var(--ui-font);
  border-radius: 5px;
  padding: 4px 6px;
  background: #fbfcfd;
}
.pill.ok {
  background: #f0f8f4;
  border-color: #d9eae1;
  color: #488674;
}
.pill.warn {
  background: #fcf7ed;
  border-color: #efe3cb;
  color: #ae8642;
}
.pill.bad {
  background: #fcf1f0;
  border-color: #f0d9d7;
  color: #b46a64;
}
.pill.blue {
  background: #f0f4fa;
  border-color: #dce6f3;
  color: #6d8db6;
}
.tag-management,
.proxy-bind-panel,
.address-book-strip {
  font-size: 11px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  margin-bottom: 10px;
}
.address-book-strip {
  color: #7e8a9b;
}
.account-workbench {
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 5px 20px #23344908;
}
.account-workspace.open {
  grid-template-columns: minmax(0, 1fr) minmax(330px, 380px);
}
.workbench-shortcuts button {
  border-radius: 5px;
  font-size: 10px;
}
.workbench-catalog summary {
  font-size: 11px;
}
.account-workbench .tool-form {
  padding: 0;
  border: 0;
  box-shadow: none;
  position: static;
  max-height: none;
}
.account-workspace.open .account-workbench {
  animation: workspace-enter 0.22s ease;
}
.compact-display #view-accounts .table-wrap td {
  padding-top: 8px;
  padding-bottom: 8px;
}
.matrix-item {
  border-radius: 7px;
  padding: 14px;
}
.matrix-empty {
  border-radius: 8px;
  font-size: 12px;
  background: #fafbfd;
  line-height: 1.8;
}
.empty {
  font-size: 12px;
  line-height: 1.7;
}
.tool-browser-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.tool-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  width: 370px;
  max-width: 100%;
  color: #98a3b1;
}
.tool-search-box input {
  border: 0;
  outline: 0;
  background: transparent;
  min-height: 39px;
  width: 100%;
  font-size: 12px;
  box-shadow: none !important;
}
.tool-search-box:focus-within {
  border-color: #79b8a6;
}
.tool-search-box svg {
  width: 16px;
  height: 16px;
}
.tool-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 22px;
}
.tool-category-tabs button {
  background: #fff;
  border: 1px solid var(--line);
  color: #778497;
  font-size: 11px;
  border-radius: 6px;
  padding: 8px 12px;
  white-space: nowrap;
  transition: background 0.16s;
}
.tool-category-tabs button.active {
  background: #263a45;
  color: #fff;
  border-color: #263a45;
}
.tools-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 365px);
  gap: 22px;
  align-items: start;
}
#tool-catalog {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
  display: block;
}
.workspace-tool-group {
  margin-bottom: 24px;
}
.workspace-group-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.group-icon {
  display: grid;
  place-items: center;
  background: #e9eeef;
  color: #718c8c;
  width: 34px;
  height: 34px;
  border-radius: 8px;
}
.group-icon svg {
  width: 17px;
  height: 17px;
}
.workspace-group-heading h3 {
  font-size: 13px;
  letter-spacing: 0;
  margin: 0;
  font-weight: 650;
}
.workspace-group-heading p {
  font-size: 10px;
  color: #93a0ae;
  margin: 4px 0 0;
}
.group-count {
  margin-left: auto;
  color: #9aa5b4;
  font-size: 10px;
}
.workspace-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.workspace-tool-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  transition:
    box-shadow 0.18s,
    border-color 0.18s,
    transform 0.18s;
  min-width: 0;
  overflow: hidden;
}
.workspace-tool-card:hover {
  border-color: #c1d7cf;
  box-shadow: 0 4px 12px #294b3f08;
  transform: translateY(-2px);
}
.workspace-tool-card.selected {
  border-color: #6aaf9c;
  box-shadow: 0 0 0 1px #6aaf9c;
  background: #f9fdfb;
}
.tool-card-main {
  width: 100%;
  height: 100%;
  text-align: left;
  border: 0;
  border-radius: inherit;
  background: transparent;
  padding: 17px 15px 14px;
  color: var(--ink);
}
.tool-card-main strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  padding-right: 25px;
}
.tool-card-main > span {
  display: block;
  font-size: 10px;
  color: #8995a6;
  line-height: 1.7;
  margin-top: 7px;
  min-height: 34px;
}
.tool-card-main small {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  color: #8b9ba6;
  font-size: 9px;
}
.mode-dot {
  width: 5px;
  height: 5px;
  border-radius: 2px;
  background: #8db7ac;
}
.favorite-tool {
  position: absolute;
  right: 9px;
  top: 12px;
  width: 26px;
  height: 26px;
  padding: 5px;
  border: 0;
  background: transparent;
  color: #c0c9d3;
  border-radius: 5px;
  display: grid;
  place-items: center;
}
.favorite-tool:hover {
  background: #f3f6f8;
  color: #b39654;
}
.favorite-tool svg {
  width: 15px;
  height: 15px;
}
.favorite-tool.saved {
  color: #c4a159;
}
.favorite-tool.saved svg {
  fill: #faf0d7;
}
.tool-form {
  position: sticky;
  top: 0;
  padding: 22px;
  border-radius: 10px;
  border-color: #dde5e8;
  max-height: calc(100dvh - 60px);
  overflow: auto;
  scrollbar-width: thin;
}
.tool-form > .section-head {
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.tool-form .section-head h2 {
  font-size: 16px;
}
.tool-form .section-head p {
  font-size: 11px;
  line-height: 1.7;
}
.tool-options {
  gap: 16px;
  margin-top: 0;
}
.form-section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #4a5c6d;
  font-weight: 600;
  gap: 8px;
}
.form-section-label > span {
  font-size: 9px;
  font-weight: 400;
  color: #8e9aa8;
}
.execution-source {
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 13px;
}
.execution-selection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  font-size: 11px;
  color: #7f8d9a;
}
.execution-selection .small-button {
  font-size: 10px;
  padding: 5px 8px;
}
.selection-invalid {
  color: var(--bad);
}
.source-toggle {
  display: flex;
  gap: 6px;
  margin-top: 11px;
}
.source-toggle label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 5px;
  padding: 8px;
  font-size: 11px;
  cursor: pointer;
}
.source-toggle label:has(input:checked) {
  background: #eaf6f0;
  border-color: #bcdbcd;
  color: #45826c;
}
.source-toggle input {
  margin: 0;
  width: 12px;
  height: 12px;
}
.drop-zone {
  border-radius: 7px;
  border-color: #b9cfc6;
  background: #f8fbf9;
  padding: 23px 15px;
}
.drop-zone strong {
  font-size: 13px;
  font-weight: 600;
}
.drop-zone > span {
  font-size: 10px;
  display: block;
  margin-top: 6px;
}
.file-name {
  font: 10px var(--ui-font);
  margin-top: 9px;
}
.tool-note {
  background: #f5f8fa;
  border-color: #bdd0d8;
  color: #81919d;
  font-size: 10px;
  line-height: 1.8;
  border-radius: 0 4px 4px 0;
  padding: 10px 12px;
}
.schedule-panel {
  border: 1px solid var(--line);
  background: #f9fbfc;
  border-radius: 7px;
  padding: 12px;
}
.schedule-heading strong {
  font-size: 11px;
}
.schedule-switch {
  font-size: 10px;
}
.schedule-fields .sub {
  font-size: 10px;
}
.address-picker {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  max-height: 220px;
  overflow: auto;
  background: #fff;
}
.address-picker .eyebrow {
  font-size: 8px;
  margin-bottom: 8px;
}
.address-option,
.workflow-option {
  padding: 8px;
  gap: 8px;
}
.address-option strong,
.workflow-option strong {
  font-size: 11px;
}
.address-option small,
.workflow-option small {
  font-size: 10px;
}
.workflow-picker {
  background: #f8fafb;
  border-radius: 7px;
  padding: 12px;
  border: 1px solid var(--line);
}
.check-line {
  font-size: 11px;
  line-height: 1.7;
}
.form-inline-error {
  font-size: 11px;
  color: #ad5650;
  background: #fff2f0;
  border: 1px solid #f0d3ce;
  border-radius: 6px;
  padding: 11px;
  line-height: 1.7;
}
.workspace-empty {
  border: 1px dashed #d8e2e7;
  background: #fafcfd;
  text-align: center;
  padding: 52px 20px;
  border-radius: 10px;
  color: var(--muted);
}
.workspace-empty > svg {
  display: block;
  margin: 0 auto 16px;
  width: 30px;
  height: 30px;
  color: #a1b2be;
}
.workspace-empty strong {
  display: block;
  color: #667c88;
  font-size: 14px;
}
.workspace-empty p {
  font-size: 11px;
  line-height: 1.8;
}
.workspace-empty .button {
  margin-top: 10px;
}
.terminal {
  border-radius: 9px;
  border-color: #2c3e54;
  box-shadow: none;
}
.terminal-foot {
  background: #1d2b3e;
}
.terminal-head select {
  background: #233449;
  border-color: #3a4f68;
  border-radius: 5px;
  font-size: 11px;
}
.tool-job {
  border-radius: 7px;
  padding: 14px;
}
.tool-job b {
  font-size: 12px;
}
.tool-job .sub {
  font-size: 10px;
}
.modal,
.gate-box {
  border-radius: 12px;
  box-shadow: 0 20px 80px #162b3a1c;
  border-color: var(--line);
}
.gate {
  background: #f2f6f9;
}
.gate-box {
  padding: 32px;
}
.gate-box .eyebrow {
  color: #2f9a83;
}
.gate-box h2 {
  font-size: 22px;
}
.gate-box p {
  font-size: 12px;
  line-height: 1.8;
}
.gate-box input {
  width: 100%;
}
.modal-layer {
  background: #12213360;
  backdrop-filter: blur(4px);
}
.modal-layer.open .modal {
  animation: workspace-enter 0.18s ease;
}
.toast {
  border-radius: 7px;
  font-size: 12px;
  padding: 13px 18px;
  box-shadow: 0 6px 30px #20304420;
}
.menu-drawer {
  z-index: 40;
  background: #111c3066;
  backdrop-filter: blur(3px);
}
.menu-panel {
  background: #172336;
  color: #e5ebf4;
  width: min(300px, 88vw);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  border: 0;
}
.menu-panel-head {
  padding: 0;
  margin-bottom: 12px;
}
.menu-close {
  width: 30px;
  height: 30px;
  color: #9faec0;
  display: grid;
  place-items: center;
  padding: 4px;
}
.menu-close:hover {
  background: #2b3c53;
  color: #fff;
}
.menu-panel .workspace-brand {
  font-size: 20px;
}
.menu-panel .workspace-nav {
  flex: 1;
}
.command-layer {
  position: fixed;
  inset: 0;
  background: #1324376b;
  backdrop-filter: blur(5px);
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 14vh 20px 20px;
}
.command-dialog {
  width: min(560px, 100%);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 100px #0b192b38;
  overflow: hidden;
  animation: workspace-enter 0.18s ease;
}
.command-input {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  color: #8fa1b1;
}
.command-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  font-size: 14px;
  box-shadow: none !important;
}
.command-input button {
  border: 1px solid var(--line);
  background: #fafbfc;
  border-radius: 4px;
  padding: 4px 7px;
  color: #8d99a8;
  font-size: 10px;
}
.command-results {
  max-height: 50dvh;
  overflow: auto;
  padding: 8px;
}
.command-results button {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 12px;
  background: #fff;
  border: 0;
  border-radius: 6px;
  text-align: left;
  padding: 12px;
  color: #778b99;
}
.command-results button.active,
.command-results button:hover {
  background: #eef6f3;
  color: #4e907d;
}
.command-results button > span:first-of-type {
  flex: 1;
}
.command-results strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #3a5361;
}
.command-results small {
  display: block;
  font-size: 10px;
  color: #91a1ac;
  margin-top: 4px;
}
.command-type {
  font-size: 10px;
  color: #9ca9b4;
}
.command-dialog footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 12px 18px;
  font-size: 10px;
  color: #99a6b0;
  gap: 8px;
}
.preference-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 25px;
  border-top: 1px solid var(--line);
}
.preference-row strong {
  font-size: 12px;
  font-weight: 500;
}
.preference-row p {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  margin: 6px 0 0;
}
.preference-switch {
  position: relative;
  flex-shrink: 0;
}
.preference-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}
.preference-switch span {
  display: block;
  width: 35px;
  height: 20px;
  border-radius: 20px;
  background: #dce5eb;
  transition: background 0.16s;
}
.preference-switch span:after {
  content: "";
  display: block;
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px #152c4120;
  transition: transform 0.16s;
}
.preference-switch input:checked + span {
  background: #369e84;
}
.preference-switch input:checked + span:after {
  transform: translateX(15px);
}
.preference-switch input:focus-visible + span {
  outline: 3px solid #81c8b7;
  outline-offset: 3px;
}
.no-motion *,
.no-motion *:before,
.no-motion *:after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
@media (min-width: 1600px) {
  .main {
    padding-left: 48px;
    padding-right: 48px;
  }
  .workspace-tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .tools-layout {
    grid-template-columns: minmax(0, 1fr) 390px;
  }
}
@media (max-width: 1250px) {
  .main {
    padding: 24px;
  }
  .app {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .workspace-sidebar {
    padding-left: 12px;
    padding-right: 12px;
  }
  .overview-callout h2 {
    font-size: 22px;
  }
  .header-search kbd,
  .top-actions .role {
    display: none;
  }
  .tools-layout {
    grid-template-columns: minmax(0, 1fr) 315px;
    gap: 16px;
  }
  .workspace-tool-grid {
    grid-template-columns: 1fr;
  }
  .account-workspace.open {
    grid-template-columns: 1fr;
  }
  .account-workbench {
    position: static;
    max-height: none;
  }
  .metric {
    padding: 15px 12px;
  }
  .metric:after {
    right: 12px;
    width: 16px;
  }
  .overview-operation-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1100px) {
  .tools-layout {
    grid-template-columns: 1fr;
  }
  .workspace-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tool-form {
    position: static;
    max-height: none;
  }
  .overview-layout {
    grid-template-columns: 1fr;
  }
  .overview-callout {
    min-height: 180px;
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .metrics {
    gap: 9px;
  }
  .metric .num {
    font-size: 26px;
  }
}
@media (max-width: 900px) {
  .app {
    display: block;
  }
  .workspace-sidebar {
    display: none;
  }
  .main {
    padding: 22px 24px;
  }
  .menu-toggle {
    display: inline-grid;
    border-radius: 7px;
    background: #fff;
  }
  .topline {
    padding-bottom: 20px;
    margin-bottom: 20px;
  }
  .menu-panel .nav-caption {
    padding-top: 18px;
  }
  .workspace-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .overview-layout {
    grid-template-columns: minmax(0, 1.25fr) minmax(230px, 1fr);
  }
  .overview-callout {
    padding: 22px;
  }
  .overview-callout h2 {
    font-size: 20px;
  }
  .overview-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(230px, 1fr);
  }
  .overview-operation-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .main {
    padding: 17px 15px 30px;
  }
  .topline {
    gap: 10px;
    align-items: flex-start;
    padding-bottom: 16px;
    margin-bottom: 18px;
  }
  .title-wrap {
    gap: 10px;
  }
  .topline h1 {
    font-size: 21px;
    margin-top: 6px;
  }
  .topline .eyebrow {
    font-size: 8px;
  }
  .page-description {
    font-size: 10px;
    line-height: 1.6;
    margin-top: 4px;
  }
  .menu-toggle {
    width: 33px;
    height: 33px;
    flex-basis: 33px;
  }
  .top-actions {
    padding-top: 2px;
    gap: 5px;
    flex-shrink: 0;
  }
  .header-search {
    padding: 7px;
    min-height: 32px;
  }
  .header-search span {
    display: none;
  }
  #refresh {
    font-size: 10px;
    min-height: 32px;
    padding: 7px 9px;
  }
  .overview-layout,
  .overview-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }
  .overview-callout {
    padding: 23px 20px;
    min-height: 185px;
  }
  .overview-callout h2 {
    font-size: 22px;
  }
  .overview-callout p {
    font-size: 11px;
  }
  .overview-layout > .section {
    padding: 17px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 14px 0;
  }
  .metric {
    padding: 14px;
    border: 1px solid var(--line);
  }
  .metric:last-child {
    grid-column: 1/-1;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .metric:last-child .num {
    margin: 0;
    font-size: 23px;
  }
  .metric:last-child:after {
    display: none;
  }
  .metric .num {
    font-size: 28px;
    margin-top: 7px;
  }
  .metric .eyebrow {
    font-size: 10px;
  }
  .section {
    padding: 17px;
    border-radius: 9px;
  }
  .section-head {
    display: flex;
    gap: 10px;
  }
  .section-head h2 {
    font-size: 15px;
  }
  .section-head .button {
    margin: 0;
    flex-shrink: 0;
  }
  .overview-operation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .overview-operation-grid button {
    padding: 14px;
    min-height: 78px;
  }
  .overview-operation-grid button:last-child {
    grid-column: 1/-1;
  }
  .tool-browser-head {
    gap: 10px;
  }
  .tool-search-box {
    width: 100%;
  }
  #tool-result-count {
    white-space: nowrap;
    font-size: 10px;
  }
  .tool-category-tabs {
    flex-wrap: nowrap;
    overflow: auto;
    padding-bottom: 7px;
    margin-bottom: 16px;
  }
  .tool-category-tabs button {
    font-size: 10px;
    padding: 7px 10px;
  }
  .workspace-tool-grid {
    gap: 8px;
  }
  .tool-card-main {
    padding: 13px 12px 12px;
  }
  .tool-card-main strong {
    font-size: 11px;
    padding-right: 20px;
  }
  .tool-card-main > span {
    font-size: 10px;
  }
  .favorite-tool {
    right: 5px;
    top: 9px;
    width: 23px;
    height: 23px;
    padding: 4px;
  }
  .workspace-group-heading p {
    font-size: 9px;
  }
  .workspace-group-heading h3 {
    font-size: 12px;
  }
  .tool-form {
    padding: 18px;
    scroll-margin-top: 12px;
  }
  .tools-layout {
    gap: 12px;
  }
  .field input,
  .field select,
  .field textarea {
    font-size: 16px;
  }
  .toolbar {
    gap: 10px;
  }
  .toolbar-group {
    width: 100%;
  }
  .toolbar-group .button {
    font-size: 11px;
  }
  .search {
    min-width: 0;
    font-size: 16px;
    width: 100%;
  }
  #view-accounts .table-wrap tr {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 9px;
  }
  #view-accounts .table-wrap td {
    padding: 3px 0 !important;
  }
  #view-accounts .table-wrap td:nth-child(5) {
    grid-row: 4;
    grid-column: 2/4;
  }
  .account-name {
    font-size: 12px;
  }
  .account-status .pill {
    font-size: 9px;
  }
  .account-main .sub {
    font-size: 10px;
  }
  .tag-management {
    padding: 9px;
    overflow: auto;
  }
  .proxy-bind-panel {
    flex-wrap: wrap;
    padding: 10px;
  }
  .proxy-bind-panel select {
    min-width: 0;
    max-width: 100%;
  }
  .address-book-strip {
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px;
  }
  .account-workspace.open {
    grid-template-columns: 1fr;
  }
  .account-workbench {
    padding: 15px;
  }
  .account-actions {
    justify-content: flex-end;
  }
  .account-status {
    gap: 5px;
  }
  .table-wrap table,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap td {
    min-width: 0;
  }
  .command-layer {
    padding: 8vh 12px 12px;
  }
  .command-dialog footer {
    font-size: 9px;
  }
  .command-input input {
    font-size: 16px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .gate-box {
    padding: 25px;
  }
  .modal {
    max-height: 90dvh;
    overflow: auto;
  }
  .toast {
    left: 15px;
    right: 15px;
    bottom: 15px;
    text-align: center;
  }
  .terminal-head select {
    min-width: 0;
  }
  .audit-detail {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  .preference-row {
    gap: 15px;
  }
  .login-input-panel {
    flex-direction: column;
    align-items: stretch;
  }
  .login-input-panel form {
    margin: 0;
    width: 100%;
    flex-wrap: wrap;
  }
  .login-input-panel input {
    flex: 1;
    width: auto;
    min-width: 100px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
