:root {
  --forest: #17382e;
  --forest-2: #0f2b23;
  --green: #286b50;
  --lime: #bfd276;
  --ink: #27322d;
  --muted: #7d8982;
  --line: #e3e8e1;
  --paper: #f5f6f2;
  --panel: #ffffff;
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body, #app { width: 100%; height: 100%; margin: 0; }
body { overflow: hidden; font-size: 15px; }
button, input, textarea, select { font: inherit; }
button, select { -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .45; cursor: not-allowed !important; }
[hidden] { display: none !important; }

.auth-gate {
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(380px, 1.05fr) minmax(420px, .95fr);
  background: #f4f6f1;
}
.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 38px 48px 54px;
  color: #ecf3ef;
  background:
    radial-gradient(circle at 15% 0%, rgba(190,210,118,.17), transparent 34%),
    radial-gradient(circle at 90% 100%, rgba(100,151,118,.16), transparent 38%),
    linear-gradient(145deg, #183b31, #0e2922);
  overflow: hidden;
}
.auth-visual::after {
  content: "";
  position: absolute; inset: 16% -18% auto auto;
  width: 420px; height: 420px;
  border: 1px solid rgba(220,233,199,.08);
  border-radius: 48% 52% 42% 58%;
  transform: rotate(18deg);
}
.auth-brand { position: relative; z-index: 1; display: flex; gap: 12px; align-items: center; }
.auth-brand strong, .auth-brand small { display: block; }
.auth-brand strong { color: #fff; font-size: 17px; letter-spacing: .05em; }
.auth-brand small { color: #89a69a; margin-top: 3px; font-size: 9px; letter-spacing: .22em; }
.auth-copy { position: relative; z-index: 1; width: min(560px, 90%); margin: auto 0; }
.auth-copy > p { color: #b8cf7c; font-size: 10px; font-weight: 750; letter-spacing: .2em; }
.auth-copy h1 { margin: 18px 0 44px; color: #fff; font-size: clamp(34px, 4.4vw, 60px); line-height: 1.12; letter-spacing: -.045em; }
.auth-copy ul { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.auth-copy li { display: flex; gap: 15px; align-items: center; }
.auth-copy li > i { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(214,229,194,.13); border-radius: 12px; color: #bdd278; background: rgba(255,255,255,.04); font-size: 9px; font-style: normal; }
.auth-copy li strong, .auth-copy li small { display: block; }
.auth-copy li strong { color: #eef4f0; font-size: 12px; }
.auth-copy li small { color: #809c91; margin-top: 4px; font-size: 10px; }
.auth-form-panel { display: grid; place-items: center; padding: 38px; }
.auth-card { width: min(420px, 100%); padding: 34px; border: 1px solid #dfe5dc; border-radius: 22px; background: rgba(255,255,255,.94); box-shadow: 0 24px 70px rgba(38,58,47,.09); }
.auth-kicker { color: #66836b; font-size: 9px; font-weight: 780; letter-spacing: .18em; }
.auth-card h2 { margin: 10px 0 8px; font-size: 27px; letter-spacing: -.035em; }
.auth-card > p:not(.form-error) { margin: 0 0 25px; color: #818d86; font-size: 11px; line-height: 1.65; }
.auth-card label, .member-create label { display: grid; gap: 7px; margin-top: 14px; color: #5e6b64; font-size: 10px; font-weight: 650; }
.auth-card input, .member-create input { width: 100%; border: 1px solid #dbe3da; border-radius: 11px; outline: 0; color: #27322d; background: #fafbf8; padding: 11px 12px; font-size: 13px; }
.auth-card input:focus, .member-create input:focus { border-color: #83a28d; background: #fff; box-shadow: 0 0 0 3px rgba(83,129,101,.08); }
.auth-card > button { width: 100%; margin-top: 22px; border: 0; border-radius: 11px; color: #fff; background: linear-gradient(135deg, #2f7558, #225a45); padding: 12px 15px; cursor: pointer; font-size: 12px; box-shadow: 0 8px 22px rgba(35,91,69,.18); }
.auth-card > button b { float: right; }
.form-error { margin: 12px 0 0 !important; padding: 9px 11px; border-radius: 9px; color: #9a4f45; background: #fff1ee; font-size: 10px; line-height: 1.5; }
.form-error.success { color: #397157; background: #eef7ec; }

#app { display: flex; background: var(--paper); }
.sidebar {
  position: relative;
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  padding: 24px 15px 18px;
  color: #dce8e1;
  background: linear-gradient(180deg, var(--forest), var(--forest-2));
  overflow: hidden;
}
.sidebar::before {
  content: "";
  position: absolute;
  width: 260px; height: 260px;
  top: -150px; left: -90px;
  border-radius: 50%;
  background: rgba(193, 214, 119, .08);
}
.brand { position: relative; display: flex; align-items: center; gap: 11px; padding: 0 10px 28px; }
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 13px 9px 13px 9px;
  color: #17372d;
  background: linear-gradient(145deg, #d9e7aa, #aeca72);
  font-weight: 800;
}
.brand strong, .brand small { display: block; }
.brand strong { color: #fff; font-size: 17px; letter-spacing: .05em; }
.brand small { color: #8ba39a; font-size: 9px; letter-spacing: .24em; margin-top: 3px; }
.sidebar nav { position: relative; display: grid; gap: 6px; }
.sidebar nav button {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 12px;
  border: 0; border-radius: 11px;
  color: #91a89e; background: transparent;
  cursor: pointer; text-align: left;
}
.sidebar nav button.active { color: #fff; background: rgba(223, 235, 182, .12); box-shadow: inset 3px 0 var(--lime); }
.sidebar nav button > span { font-size: 17px; }
.sidebar nav button > i { width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: #91ca74; box-shadow: 0 0 0 4px rgba(145,202,116,.1); }
.sidebar nav button em { margin-left: auto; color: #607b70; font-size: 9px; font-style: normal; }
.sidebar-note { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 14px 9px 2px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-note strong, .sidebar-note small { display: block; }
.sidebar-note strong { color: #e9f0eb; font-size: 11px; }
.sidebar-note small { color: #789287; margin-top: 3px; font-size: 9px; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: #75b67e; box-shadow: 0 0 0 4px rgba(117,182,126,.12); }

.workspace { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.topbar {
  flex: 0 0 65px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 0 22px 0 27px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(14px);
}
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.breadcrumb span { color: var(--muted); }
.breadcrumb b { color: #c3cbc6; }
.shop-picker { display: flex; align-items: center; gap: 9px; }
.device-picker { display: flex; align-items: center; gap: 9px; }
.shop-picker label { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.shop-picker select { padding: 9px 34px 9px 12px; border: 1px solid #dce3db; border-radius: 10px; color: var(--ink); background: #f8faf7; font-size: 11px; }
.shop-picker .hy-select { min-width: 150px; max-width: 240px; }
.device-picker .hy-select { min-width: 185px; max-width: 280px; }

.hy-select {
  position: relative;
  display: inline-block;
  min-width: 120px;
  max-width: 100%;
  vertical-align: middle;
}
.native-select-control {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  pointer-events: none;
}
.hy-select-trigger {
  width: 100%;
  min-height: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  border: 1px solid #d9e3db;
  border-radius: 10px;
  padding: 8px 9px 8px 11px;
  color: #2f493d;
  background: linear-gradient(180deg, #fff, #f8faf7);
  box-shadow: 0 1px 2px rgba(31,61,47,.04);
  cursor: pointer;
  text-align: left;
  font-size: 10px;
  line-height: 1.3;
}
.hy-select-trigger > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hy-select-trigger > i {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #edf3ed;
  transition: transform .14s ease, background .14s ease;
}
.hy-select-trigger > i::before {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 1.5px solid #567163;
  border-bottom: 1.5px solid #567163;
  transform: translateY(-2px) rotate(45deg);
}
.hy-select.open .hy-select-trigger {
  border-color: #82a08d;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(57,114,87,.09);
}
.hy-select.open .hy-select-trigger > i {
  background: #e3eee6;
  transform: rotate(180deg);
}
.hy-select-trigger:disabled {
  color: #8c9791;
  background: #f1f4f0;
  cursor: not-allowed;
  opacity: .7;
}
.hy-select-menu {
  position: absolute;
  z-index: 180;
  top: calc(100% + 6px);
  right: 0;
  width: max-content;
  min-width: max(100%, 190px);
  max-width: min(340px, calc(100vw - 28px));
  max-height: min(310px, 48vh);
  overflow: auto;
  padding: 6px;
  border: 1px solid #dce5dd;
  border-radius: 12px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 16px 38px rgba(22,52,39,.16), 0 3px 10px rgba(22,52,39,.06);
  backdrop-filter: blur(14px);
  animation: select-menu-enter .12s ease-out both;
}
.hy-select.drop-up .hy-select-menu {
  top: auto;
  bottom: calc(100% + 6px);
  transform-origin: bottom center;
}
.hy-select-menu[hidden] { display: none !important; }
.hy-select-menu button {
  width: 100%;
  min-height: 34px;
  display: grid;
  grid-template-columns: minmax(0,1fr) 18px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  padding: 7px 8px 7px 10px;
  color: #3e5549;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 10px;
  line-height: 1.4;
}
.hy-select-menu button > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hy-select-menu button > i {
  color: transparent;
  font-size: 11px;
  font-style: normal;
  text-align: center;
}
.hy-select-menu button:hover,
.hy-select-menu button:focus-visible {
  color: #244b38;
  background: #f0f5ef;
  outline: 0;
  transform: none;
}
.hy-select-menu button:active { transform: scale(.99); }
.hy-select-menu button[aria-selected="true"] {
  color: #24543d;
  background: #e8f1e8;
  font-weight: 680;
}
.hy-select-menu button[aria-selected="true"] > i { color: #397257; }
.hy-select-menu button:disabled {
  color: #a1aaa5;
  cursor: not-allowed;
  opacity: .65;
}
.memory-create .hy-select,
.workspace-preferences .hy-select,
.agent-channel-row .hy-select { width: 100%; }
#deviceSelect { width: 235px; }
#shopSelect { width: 285px; }
.live-badge { display: inline-flex; align-items: center; gap: 7px; color: #397057; background: #ecf4e9; border: 1px solid #dce9d8; border-radius: 99px; padding: 7px 10px; font-size: 9px; }
.live-badge i { width: 6px; height: 6px; border-radius: 50%; background: #59a376; }
.member-menu-button {
  display: flex; align-items: center; gap: 7px;
  border: 1px solid #dae3da; border-radius: 10px;
  color: #42534a; background: #fff;
  padding: 5px 9px 5px 6px; cursor: pointer;
}
.member-menu-button span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: #2f6f55; font-size: 9px; }
.member-menu-button b { max-width: 82px; overflow: hidden; text-overflow: ellipsis; font-size: 9px; white-space: nowrap; }

.workbench { min-height: 0; flex: 1; display: flex; padding: 20px; gap: 0; overflow: hidden; }
.chat-panel {
  width: min(72%, 1050px);
  min-width: 520px;
  display: flex; flex-direction: column;
  border: 1px solid #dfe5dd;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 46px rgba(45, 64, 54, .07);
  overflow: hidden;
}
.agent-header {
  flex: 0 0 66px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid #e8ece6;
  background: rgba(255,255,255,.96);
}
.agent-identity { display: flex; gap: 11px; align-items: center; }
.agent-avatar {
  position: relative;
  flex: 0 0 auto;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  color: #fff; background: linear-gradient(145deg, #235e48, #3c7c5f);
  border-radius: 13px 9px 13px 9px;
  font-size: 12px; font-weight: 750;
  box-shadow: 0 6px 16px rgba(33,92,69,.17);
}
.agent-avatar i { position: absolute; right: -2px; bottom: -1px; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: #91cb71; }
.agent-avatar.small { width: 32px; height: 32px; border-radius: 11px 8px 11px 8px; font-size: 10px; }
.agent-identity strong, .agent-identity small { display: block; }
.agent-identity strong { font-size: 13px; }
.agent-identity small { color: var(--muted); margin-top: 4px; font-size: 10px; }
.agent-meta { display: flex; align-items: center; gap: 9px; }
.agent-meta > span { color: #718078; background: #f3f6f1; border-radius: 99px; padding: 6px 9px; font-size: 9px; }
.agent-meta button { border: 1px solid #dce5dd; border-radius: 9px; color: #376b54; background: #f8faf7; padding: 7px 10px; font-size: 10px; cursor: pointer; }
.agent-meta button b { display: inline-grid; min-width: 17px; height: 17px; place-items: center; margin-left: 4px; border-radius: 99px; color: #fff; background: #5f8b70; padding: 0 5px; font-size: 8px; }

.conversation { min-height: 0; flex: 1; overflow: auto; padding: 26px 28px 18px; scroll-behavior: auto; }
.empty-state { max-width: 780px; margin: 7vh auto 0; text-align: center; }
.empty-state[hidden] { display: none; }
.empty-orbit { width: 62px; height: 62px; display: grid; place-items: center; margin: 0 auto 18px; border: 1px solid #dce7d8; border-radius: 22px 14px 22px 14px; background: linear-gradient(145deg, #eef5e8, #dce9cf); color: #2b694f; box-shadow: 0 12px 28px rgba(48, 86, 63, .09); }
.empty-orbit b { font-size: 18px; }
.eyebrow { color: #73906f !important; font-size: 9px !important; font-weight: 750; letter-spacing: .17em; }
.empty-state h1 { margin: 8px 0 9px; font-size: 30px; letter-spacing: -.04em; }
.empty-state > p:not(.eyebrow) { max-width: 620px; margin: auto; color: var(--muted); font-size: 13px; line-height: 1.7; }
.starter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 28px; text-align: left; }
.starter-grid button {
  display: flex; align-items: center; gap: 10px;
  min-height: 54px; padding: 11px 13px;
  border: 1px solid #e3e9e0; border-radius: 13px;
  color: #48564f; background: #fafbf8;
  cursor: pointer; font-size: 11px; line-height: 1.4;
  transition: .18s ease;
}
.starter-grid button:hover { transform: translateY(-1px); border-color: #bdcebf; background: #fff; box-shadow: 0 8px 20px rgba(51,78,62,.07); }
.starter-grid button span { flex: 0 0 auto; color: #5f806d; font-size: 9px; }

.message { display: flex; gap: 11px; margin-bottom: 22px; }
.message.user { justify-content: flex-end; padding-left: 12%; }
.message.assistant { padding-right: 5%; }
.message-stack { max-width: min(88%, 860px); min-width: 0; }
.message.user .message-stack { display: grid; justify-items: end; }
.bubble { border-radius: 16px; font-size: 14px; line-height: 1.72; }
.message.user .bubble { color: #fff; background: linear-gradient(145deg, #2d7155, #255f49); border-radius: 16px 7px 16px 16px; padding: 11px 15px; box-shadow: 0 7px 18px rgba(39,100,75,.13); }
.message.assistant .bubble { background: #f8faf7; border: 1px solid #e4e9e2; border-radius: 7px 17px 17px 17px; padding: 15px 17px; }
.bubble p { margin: 0 0 10px; }
.bubble p:last-child { margin-bottom: 0; }
.bubble h2, .bubble h3, .bubble h4 { margin: 15px 0 7px; line-height: 1.35; }
.bubble h2:first-child, .bubble h3:first-child { margin-top: 0; }
.bubble h2 { font-size: 18px; }
.bubble h3 { font-size: 16px; }
.bubble h4 { font-size: 14px; }
.bubble ul { margin: 8px 0; padding-left: 20px; }
.bubble li { margin: 4px 0; }
.bubble blockquote { margin: 10px 0; padding: 9px 12px; border-left: 3px solid #88aa82; color: #5c6b63; background: #f0f5ed; border-radius: 0 9px 9px 0; }
.bubble code { color: #3e654f; background: #eaf0e7; border-radius: 5px; padding: 2px 5px; font-size: .88em; }
.md-code { margin: 12px 0; border: 1px solid #dfe6dc; border-radius: 11px; background: #f3f6f1; overflow: hidden; }
.md-code-label { padding: 6px 11px; border-bottom: 1px solid #dfe6dc; color: #75827a; background: #eaf0e7; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.bubble .md-code pre { margin: 0; padding: 13px 14px; overflow-x: auto; color: #34463c; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; white-space: pre; tab-size: 2; }
.bubble .md-code pre code { display: block; min-width: max-content; color: inherit; background: transparent; border-radius: 0; padding: 0; font: inherit; }
.logic-diagram {
  margin: 14px 0;
  border: 1px solid #dce5dc;
  border-radius: 15px;
  background:
    radial-gradient(circle at 95% 0%, rgba(190, 210, 121, .16), transparent 32%),
    linear-gradient(145deg, #fbfcf9, #f2f6ef);
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(50, 76, 61, .055);
}
.logic-diagram figcaption {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px;
  border-bottom: 1px solid #e2e8df;
  color: #506259; background: rgba(255,255,255,.72);
}
.logic-diagram figcaption span { font-size: 10px; font-weight: 760; letter-spacing: .04em; }
.logic-diagram figcaption small { color: #8a968f; font-size: 9px; }
.logic-lanes { display: grid; gap: 11px; padding: 13px; }
.logic-lane {
  min-width: 0;
  border: 1px solid #e1e7df;
  border-radius: 12px;
  background: rgba(255,255,255,.78);
  overflow: hidden;
}
.logic-lane header {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 10px;
  border-bottom: 1px solid #edf0eb;
  color: #526159;
}
.logic-lane header i { width: 7px; height: 7px; border-radius: 50%; background: #8ba397; box-shadow: 0 0 0 4px rgba(139,163,151,.11); }
.logic-lane header strong { font-size: 10px; }
.logic-track {
  display: flex; align-items: stretch;
  gap: 7px;
  padding: 11px;
  overflow-x: auto;
}
.logic-node {
  flex: 1 0 126px;
  min-width: 126px;
  display: grid; place-items: center;
  padding: 10px 11px;
  border: 1px solid #dce4da;
  border-radius: 11px;
  color: #415049;
  background: #fff;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 5px 13px rgba(45,69,55,.045);
}
.logic-arrow {
  flex: 0 0 auto;
  display: grid; place-items: center;
  color: #8fa198;
  font-size: 15px;
}
.tone-risk header { color: #95584d; background: #fff8f5; }
.tone-risk header i { background: #cc7564; box-shadow: 0 0 0 4px rgba(204,117,100,.12); }
.tone-risk .logic-node { border-color: #ead8d3; background: #fffaf8; }
.tone-risk .logic-arrow { color: #c68b7d; }
.tone-positive header { color: #397159; background: #f3f9f1; }
.tone-positive header i { background: #62a27b; box-shadow: 0 0 0 4px rgba(98,162,123,.12); }
.tone-positive .logic-node { border-color: #d4e5d6; background: #f9fcf7; }
.tone-positive .logic-arrow { color: #76a68a; }
.structure-rows { display: grid; gap: 10px; padding: 14px; }
.structure-row {
  display: grid;
  grid-template-columns: minmax(118px, 1.25fr) minmax(120px, 3fr) 42px;
  gap: 11px;
  align-items: center;
}
.structure-label {
  min-width: 0;
  color: #526159;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.4;
}
.structure-bar {
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eee6;
  box-shadow: inset 0 1px 2px rgba(55, 78, 64, .07);
}
.structure-bar i {
  display: block;
  width: var(--share);
  min-width: 3px;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #789a80, #b8c974);
}
.structure-row.is-primary .structure-bar i {
  background: linear-gradient(90deg, #b86658, #d78d6e);
}
.structure-row strong {
  color: #526159;
  font-size: 11px;
  text-align: right;
}
.structure-row.is-primary strong { color: #a85348; }
.metric-bar-rows { display: grid; gap: 10px; padding: 14px; }
.metric-bar-row {
  display: grid;
  grid-template-columns: minmax(108px, 1.1fr) minmax(130px, 2.4fr) minmax(118px, 1.4fr);
  gap: 11px;
  align-items: center;
}
.metric-bar-label {
  min-width: 0;
  overflow: hidden;
  color: #526159;
  font-size: 10px;
  font-weight: 680;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.metric-bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ede5;
  box-shadow: inset 0 1px 2px rgba(55, 78, 64, .07);
}
.metric-bar-track i {
  display: block;
  width: var(--share);
  min-width: 3px;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #668d77, #b9c976);
}
.metric-bar-row.is-primary .metric-bar-track i {
  background: linear-gradient(90deg, #3f775d, #8eae77);
}
.metric-bar-row.is-empty .metric-bar-track i { min-width: 0; }
.metric-bar-row.is-empty .metric-bar-track::after {
  content: "";
  display: block;
  width: 6px;
  height: 100%;
  border-radius: inherit;
  background: #d5ddd4;
}
.metric-bar-row strong {
  min-width: 0;
  color: #5f6d65;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.4;
}
.logic-tree { padding: 16px; overflow-x: auto; }
.tree-node {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #dce4da;
  border-radius: 11px;
  color: #44534b;
  background: #fff;
  text-align: center;
  box-shadow: 0 5px 13px rgba(45,69,55,.045);
}
.tree-node strong { font-size: 10px; line-height: 1.45; }
.tree-root {
  width: min(340px, 70%);
  margin: 0 auto;
  border-color: #afc5ad;
  color: #2f654c;
  background: linear-gradient(145deg, #f8fbf5, #edf4e9);
  box-shadow: 0 7px 17px rgba(48,92,66,.08);
}
.tree-children {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--child-count), minmax(125px, 1fr));
  gap: 10px;
  margin-top: 22px;
  padding-top: 12px;
  border-top: 1px solid #cad7cc;
}
.tree-children::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  height: 11px;
  border-left: 1px solid #cad7cc;
}
.tree-branch { position: relative; min-width: 0; }
.tree-branch::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  height: 12px;
  border-left: 1px solid #cad7cc;
}
.tree-node.tone-positive {
  border-color: #d1e2d2;
  color: #397159;
  background: #f7fbf5;
}
.tree-node.tone-risk {
  border-color: #ead7d1;
  color: #95584d;
  background: #fff9f7;
}
.message time { display: block; margin-top: 6px; color: #9aa29d; font-size: 9px; }
.run-summary {
  width: min(540px, 100%);
  margin-top: 8px;
  border: 1px solid #e1e8df;
  border-radius: 10px;
  color: #68756e;
  background: rgba(249,251,248,.92);
  font-size: 9px;
}
.run-summary summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  cursor: pointer;
  list-style: none;
}
.run-summary summary::-webkit-details-marker { display: none; }
.run-summary summary::before { content: "›"; color: #779180; font-size: 13px; transition: transform .16s ease; }
.run-summary[open] summary::before { transform: rotate(90deg); }
.run-summary summary span { color: #4f6559; font-weight: 720; }
.run-summary summary small { overflow: hidden; color: #8b958f; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.run-summary > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px 14px; padding: 0 10px 9px 27px; }
.run-summary p { display: flex; justify-content: space-between; gap: 10px; margin: 0; padding: 4px 0; border-bottom: 1px solid #edf1eb; }
.run-summary p span { color: #8b958f; }
.run-summary p b { color: #53665b; font-weight: 680; }
.run-summary p.run-summary-warning { grid-column: 1 / -1; }
.run-summary p.run-summary-warning b { color: #95633e; }
.design-run-summary { border-color: #dbe6ec; background: linear-gradient(135deg,rgba(246,252,253,.96),rgba(250,249,255,.94)); }
.design-run-summary .design-run-summary-body p:nth-child(n+3) { grid-column: 1 / -1; }
.design-run-summary .design-run-summary-body p.warning b { color:#906730; }
.design-run-summary .design-run-summary-body p.failed b { color:#a44742; }
.typing-caret::after { content: ""; display: inline-block; width: 7px; height: 14px; margin-left: 4px; background: #6d927d; vertical-align: -2px; animation: blink .8s infinite; }

@media (max-width: 720px) {
  .run-summary > div { grid-template-columns: 1fr; }
}

.suggestions { margin-top: 12px; }
.suggestions > span { display: block; color: #8a948e; margin-bottom: 7px; font-size: 9px; }
.suggestions > div { display: flex; flex-wrap: wrap; gap: 7px; }
.suggestions button { max-width: 320px; display: flex; align-items: center; gap: 7px; border: 1px solid #d6e2d5; border-radius: 10px; color: #366a52; background: #fff; padding: 8px 10px; cursor: pointer; font-size: 10px; }
.suggestions button:hover { border-color: #94b096; background: #f4f8f1; }
.suggestions button b { color: #96a69c; font-size: 11px; }
.suggestions button em { font-style: normal; color: #6f8176; background: #eef4ed; border-radius: 999px; padding: 2px 6px; white-space: nowrap; }

.thinking { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 11px; align-items: start; padding: 11px 28px 12px; border-top: 1px solid #deebe4; background: linear-gradient(90deg, #f5fbf8, #f8fbff); }
.thinking[hidden] { display: none; }
.thinking-copy { display: grid; min-width: 0; gap: 3px; }
.thinking strong { color: #334d40; font-size: 11px; }
.thinking small { color: #718078; font-size: 9px; }
.thinking-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.thinking-facts b { color: #829087; font-size: 8px; font-weight: 620; }
.thinking-safety { width: fit-content; margin-top: 2px; border-radius: 999px; padding: 3px 7px; color: #526c5d; background: #e9f3ed; font-size: 8px; }
.thinking[data-safety="awaiting_confirmation"] .thinking-safety { color: #866126; background: #fff2d9; }
.thinking[data-safety="submitted_external"] .thinking-safety { color: #355e83; background: #e7f1fa; }
.thinking[data-safety="outcome_unknown"] .thinking-safety { color: #9a443e; background: #fcebea; }
.thinking-design { margin-top: 3px; color: #718396; font-size: 8px; }
.thinking-design summary { width: fit-content; cursor: pointer; user-select: none; }
.thinking-design-body { display: grid; gap: 4px; margin-top: 5px; }
.thinking-design-body > span { color: #7c8c82; }
.thinking-design-body ol { display: grid; gap: 3px; max-height: 100px; margin: 0; overflow: auto; padding-left: 18px; }
.thinking-trajectory { margin-top: 3px; color: #78877e; font-size: 8px; }
.thinking-trajectory summary { width: fit-content; cursor: pointer; user-select: none; }
.thinking-trajectory ol { display: grid; gap: 3px; max-height: 100px; margin: 5px 0 1px; padding-left: 18px; overflow: auto; }
.thinking-trajectory li { padding-left: 2px; color: #68786f; }
.thinking-trajectory li.warning { color: #906730; }
.thinking-trajectory li.failed { color: #a44742; }
.thinking-stop { align-self: center; border: 1px solid #cbdcd1; border-radius: 9px; padding: 7px 9px; color: #526b5d; background: #fff; cursor: pointer; font-size: 9px; }
.thinking-stop:hover:not(:disabled) { border-color: #8fab98; background: #f5faf7; }
.thinking-stop:disabled { cursor: default; opacity: .48; }
.dots { display: flex; gap: 3px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: #6e997e; animation: jump 1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .13s; }
.dots i:nth-child(3) { animation-delay: .26s; }

@media (max-width: 720px) {
  .thinking { grid-template-columns: auto auto minmax(0, 1fr); padding-inline: 14px; }
  .thinking-stop { grid-column: 3; justify-self: start; margin-top: 3px; }
}

.composer { flex: 0 0 auto; padding: 12px 20px 13px; border-top: 1px solid #e8ebe6; background: rgba(255,255,255,.96); }
.composer-box { border: 1px solid #d9e2d8; border-radius: 15px; background: #fbfcfa; box-shadow: 0 6px 20px rgba(49,75,60,.05); overflow: hidden; transition: .18s; }
.composer-box:focus-within { border-color: #86a88f; background: #fff; box-shadow: 0 8px 24px rgba(49,87,64,.09); }
.composer textarea { width: 100%; min-height: 58px; max-height: 150px; resize: none; border: 0; outline: 0; color: var(--ink); background: transparent; padding: 13px 15px 8px; font-size: 14px; line-height: 1.5; }
.composer-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 0 7px 7px 14px; }
.composer-foot > button { flex: 0 0 auto; border: 0; border-radius: 9px; color: #fff; background: linear-gradient(135deg, #2e7356, #245f48); padding: 8px 12px; cursor: pointer; font-size: 10px; box-shadow: 0 5px 13px rgba(38,97,73,.17); }
.composer-foot button b { margin-left: 5px; }
.resize-handle { flex: 0 0 16px; width: 16px; border: 0; background: transparent; cursor: col-resize; display: grid; place-items: center; touch-action: none; }
.resize-handle span { width: 3px; height: 52px; border-radius: 99px; background: #cbd5cc; opacity: .55; transition: .18s; }
.resize-handle:hover span, .resizing .resize-handle span { opacity: 1; background: #82a38d; }
.resizing { cursor: col-resize; user-select: none; }
.resizing .chat-panel,
.resizing .context-panel { transition: none !important; }

.context-panel { min-width: 280px; flex: 1; overflow: auto; display: grid; align-content: start; gap: 13px; padding: 2px 2px 10px 7px; }
.welcome-card, .info-card, .shop-card { border: 1px solid #e2e7df; border-radius: 17px; background: #fff; box-shadow: 0 8px 26px rgba(45,64,54,.035); }
.welcome-card { padding: 24px; background: linear-gradient(145deg, #fff, #f8faf5); }
.welcome-card h2 { margin: 6px 0 9px; font-size: 24px; letter-spacing: -.04em; }
.welcome-card p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.info-card { padding: 18px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; color: #58665f; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.section-title small { color: #929c96; font-size: 8px; font-weight: 560; letter-spacing: 0; }
.workspace-settings-button { border: 1px solid #d9e4da; border-radius: 999px; padding: 5px 9px; color: #4f705e; background: #f8fbf8; cursor: pointer; font-size: 9px; font-weight: 700; }
.quick-actions-card { padding: 15px; }
.quick-action-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin: -3px 0 13px;
  padding: 3px;
  border: 1px solid #e2e8df;
  border-radius: 11px;
  background: #f4f7f2;
}
.quick-action-tabs button {
  min-width: 0;
  border: 0;
  border-radius: 8px;
  color: #829087;
  background: transparent;
  padding: 7px 4px;
  cursor: pointer;
  font-size: 8px;
  font-weight: 680;
  white-space: nowrap;
}
.quick-action-tabs button.active {
  color: #31684f;
  background: #fff;
  box-shadow: 0 3px 10px rgba(46,77,59,.08);
}
.quick-action-groups { display: grid; gap: 14px; }
.quick-action-group { min-width: 0; }
.quick-action-group > header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: #5d6b63;
}
.quick-action-group > header i {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #397158;
  background: #edf4e9;
  font-size: 8px;
  font-style: normal;
  font-weight: 760;
}
.quick-action-group > header strong { font-size: 9px; letter-spacing: .025em; }
.quick-action-group > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.quick-action-group button {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  border: 1px solid #dde6dc;
  border-radius: 10px;
  color: #3d6250;
  background: linear-gradient(145deg, #fff, #f8faf6);
  padding: 8px 8px 8px 10px;
  cursor: pointer;
  font-size: 9px;
  line-height: 1.25;
  text-align: left;
  transition: border-color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease;
}
.quick-action-group button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quick-action-group button b { flex: 0 0 auto; color: #9aaa9f; font-size: 9px; }
.quick-action-group button:hover {
  border-color: #9fb8a2;
  background: #f3f8f0;
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(43, 80, 59, .065);
}
.quick-action-group button:disabled { opacity: .46; cursor: not-allowed; transform: none; box-shadow: none; }
.workspace-density-comfortable .quick-action-group > div { grid-template-columns: 1fr; gap: 8px; }
.workspace-density-comfortable .quick-action-group button { min-height: 42px; padding: 10px 12px; }
.workspace-font-large .context-panel,
.workspace-font-large .quick-action-group button { font-size: 1.12em; }
.hide-runtime-cards .runtime-explainer-card { display: none; }
.cli-maintenance {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #dce6dc;
  border-radius: 13px;
  background:
    radial-gradient(circle at 100% 0, rgba(191,210,118,.15), transparent 36%),
    linear-gradient(145deg, #fbfcf9, #f3f7f0);
}
.cli-maintenance > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.cli-maintenance > header span,
.cli-maintenance > header strong { display: block; }
.cli-maintenance > header span {
  color: #87958c;
  font-size: 7px;
  font-weight: 760;
  letter-spacing: .14em;
}
.cli-maintenance > header strong {
  margin-top: 3px;
  color: #41564b;
  font-size: 10px;
}
.cli-maintenance > header i {
  border-radius: 99px;
  color: #3f745a;
  background: #e8f2e5;
  padding: 5px 7px;
  font-size: 7px;
  font-style: normal;
  white-space: nowrap;
}
.cli-maintenance > header i[data-phase="update_available"] {
  color: #8a682b;
  background: #f7efd9;
}
.cli-maintenance > header i[data-phase="failed"] {
  color: #97584e;
  background: #fff0ec;
}
.cli-maintenance > header i[data-phase="checking"],
.cli-maintenance > header i[data-phase="updating"] {
  color: #426a79;
  background: #e9f1f3;
}
.cli-version-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  margin-top: 11px;
}
.cli-version-row p {
  margin: 0;
  padding: 8px 9px;
  border: 1px solid #e0e7de;
  border-radius: 9px;
  background: rgba(255,255,255,.8);
}
.cli-version-row p span,
.cli-version-row p strong { display: block; }
.cli-version-row p span { color: #929d97; font-size: 7px; }
.cli-version-row p strong { margin-top: 3px; color: #42604f; font-size: 10px; }
.cli-version-row > b { color: #96a49b; font-size: 9px; }
.cli-update-message {
  margin: 8px 1px 0;
  color: #728079;
  font-size: 8px;
  line-height: 1.55;
}

.fastmoss-mcp-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 9px 0;
}

.fastmoss-mcp-row p {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid #e4ebe7;
  border-radius: 10px;
  background: #f8fbf9;
}

.fastmoss-mcp-row span,
.fastmoss-mcp-row strong { display: block; }
.fastmoss-mcp-row span { color: #87948d; font-size: 8px; margin-bottom: 4px; }
.fastmoss-mcp-row strong { color: #21372f; font-size: 10px; overflow-wrap: anywhere; }
.cli-auto-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e0e7de;
}
.cli-auto-row strong,
.cli-auto-row small { display: block; }
.cli-auto-row strong { color: #506158; font-size: 9px; }
.cli-auto-row small { margin-top: 3px; color: #8b9790; font-size: 7px; }
.switch { position: relative; flex: 0 0 auto; width: 32px; height: 18px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: #cfd8d0;
  cursor: pointer;
  transition: .18s;
}
.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(34,54,43,.18);
  transition: .18s;
}
.switch input:checked + span { background: #559171; }
.switch input:checked + span::after { transform: translateX(14px); }
.switch input:disabled + span { opacity: .5; cursor: not-allowed; }
.cli-update-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
}
.cli-update-actions button,
.cli-update-dialog footer button {
  border: 1px solid #d9e3d9;
  border-radius: 9px;
  color: #426650;
  background: #fff;
  padding: 7px 8px;
  cursor: pointer;
  font-size: 8px;
}
.cli-update-actions button.primary,
.cli-update-dialog footer button.primary {
  border-color: #306b51;
  color: #fff;
  background: linear-gradient(135deg, #36795b, #286248);
}
.cli-admin-note {
  display: block;
  margin-top: 8px;
  color: #8a958f;
  font-size: 7px;
  line-height: 1.45;
}
.runtime-flow { list-style: none; display: grid; gap: 12px; margin: 0; padding: 0; }
.runtime-flow li { display: flex; gap: 10px; align-items: center; }
.runtime-flow li > b { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: #48745e; background: #edf4e9; font-size: 9px; }
.runtime-flow strong, .runtime-flow small { display: block; }
.runtime-flow strong { font-size: 11px; }
.runtime-flow small { color: #929b95; margin-top: 3px; font-size: 9px; }
.boundary-list { display: grid; gap: 9px; }
.boundary-list p { display: flex; align-items: center; gap: 9px; margin: 0; color: #66736c; font-size: 10px; }
.boundary-list i { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 7px; font-style: normal; font-size: 9px; }
.check { color: #397258; background: #e9f3e6; }
.pause { color: #9b7432; background: #f7eed9; }
.shop-card { padding: 17px 18px; }
.shop-card span, .shop-card strong, .shop-card small { display: block; }
.shop-card span { color: #8b948f; font-size: 9px; }
.shop-card strong { margin: 7px 0 5px; font-size: 12px; }
.shop-card small { color: #929b96; font-size: 9px; line-height: 1.45; }

.md-table { margin: 12px 0; border: 1px solid #e0e6de; border-radius: 11px; background: #fff; overflow: hidden; }
.table-scroll { width: 100%; overflow: auto; }
.md-table table { width: 100%; border-collapse: collapse; font-size: 11px; }
.md-table th { color: #68766f; background: #f2f5f0; text-align: left; padding: 8px 10px; white-space: nowrap; border-bottom: 1px solid #dfe5dd; }
.md-table td { padding: 8px 10px; white-space: nowrap; border-bottom: 1px solid #edf0eb; }
.md-table td:not(:first-child), .md-table th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.table-pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 8px 10px; color: #7d8881; background: #fafbf8; font-size: 9px; }
.table-pager span { margin-right: auto; }
.table-pager select { border: 1px solid #dbe2da; border-radius: 6px; background: #fff; padding: 3px 5px; font-size: 9px; }
.table-pager button { width: 24px; height: 24px; border: 1px solid #dbe2da; border-radius: 6px; background: #fff; color: #49715d; cursor: pointer; }

.fatal { max-width: 560px; margin: 18vh auto; padding: 28px; border: 1px solid #e1e6df; border-radius: 18px; background: #fff; }
.fatal h1 { font-size: 22px; }
.fatal p { color: var(--muted); line-height: 1.6; }

.auth-security-note {
  display: block;
  margin: -2px 0 14px;
  color: #77867e;
  font-size: 10px;
  line-height: 1.6;
}
.auth-card .auth-secondary-button {
  margin-top: 9px;
  border: 1px solid #d9e3db;
  color: #5f7268;
  background: #fff;
  box-shadow: none;
}

.member-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  padding: 0;
  border: 1px solid #dce4db;
  border-radius: 20px;
  color: var(--ink);
  background: #f8faf6;
  box-shadow: 0 30px 90px rgba(24,54,42,.24);
  overflow: auto;
}
#memberDialog { overflow: hidden; }
#memberDialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
#memberDialog > .dialog-head { position: relative; }
.member-dialog-scroll {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(126, 149, 168, .68) transparent;
}
.member-dialog-scroll::-webkit-scrollbar { width: 9px; }
.member-dialog-scroll::-webkit-scrollbar-track { background: transparent; }
.member-dialog-scroll::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(126, 149, 168, .68);
  background-clip: padding-box;
}
.member-dialog-scroll::-webkit-scrollbar-thumb:hover { background: rgba(93, 120, 143, .82); background-clip: padding-box; }
.member-dialog::backdrop { background: rgba(12,31,24,.48); backdrop-filter: blur(4px); }
.dialog-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 21px 24px 17px; border-bottom: 1px solid #e1e7df; background: rgba(255,255,255,.95); backdrop-filter: blur(12px); }
.dialog-head span { color: #75907c; font-size: 8px; font-weight: 760; letter-spacing: .18em; }
.dialog-head h2 { margin: 5px 0 0; font-size: 20px; letter-spacing: -.025em; }
.dialog-head button { width: 31px; height: 31px; border: 1px solid #dce3db; border-radius: 9px; color: #6f7a74; background: #fff; cursor: pointer; font-size: 18px; }
.dialog-intro { margin: 18px 24px 10px; color: #77827c; font-size: 10px; line-height: 1.6; }
.member-list { display: grid; gap: 8px; padding: 10px 24px 18px; }
.member-row { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 11px 12px; border: 1px solid #e0e6de; border-radius: 12px; background: #fff; }
.member-row > i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: #376f58; font-size: 10px; font-style: normal; }
.member-row strong, .member-row small { display: block; }
.member-row strong { font-size: 11px; }
.member-row small { color: #8b958f; margin-top: 3px; font-size: 9px; }
.member-row > em { border-radius: 99px; color: #4c745f; background: #edf4e9; padding: 5px 8px; font-size: 8px; font-style: normal; }
.member-row.inactive { opacity: .66; background: #f7f8f5; }
.member-row-actions {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
}
.member-row-actions button,
.identity-actions button {
  border: 1px solid #dce4dc;
  border-radius: 8px;
  color: #557064;
  background: #fff;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 8px;
}
.member-row-actions button.danger,
.identity-actions button.danger {
  border-color: #ead9d5;
  color: #9a5b51;
  background: #fff8f6;
}
.member-create { margin: 0 24px 18px; padding: 18px; border: 1px solid #dee5dc; border-radius: 15px; background: #fff; }
.member-create h3 { margin: 0 0 12px; font-size: 13px; }
.fastmoss-settings-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.fastmoss-settings-head span { color: #75907c; font-size: 8px; font-weight: 760; letter-spacing: .12em; }
.fastmoss-settings-head h3 { margin: 4px 0 0; }
.fastmoss-settings-head i { border-radius: 99px; padding: 5px 8px; color: #765e2d; background: #f6eedb; font-size: 8px; font-style: normal; white-space: nowrap; }
.fastmoss-settings-head i.ready { color: #397258; background: #e9f3e6; }
.fastmoss-settings > p:not(.form-error) { margin: 10px 0 0; color: #7e8a83; font-size: 9px; line-height: 1.55; }
.member-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.member-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 15px; }
.member-form-actions small { color: #8a948e; font-size: 8px; line-height: 1.5; }
.member-form-actions button { flex: 0 0 auto; border: 0; border-radius: 9px; color: #fff; background: #2c6c51; padding: 9px 12px; cursor: pointer; font-size: 9px; }
.member-dialog > footer,
.member-dialog-scroll > footer { display: flex; justify-content: flex-end; padding: 0 24px 22px; }
.member-dialog > footer button,
.member-dialog-scroll > footer button { border: 1px solid #e1d7d4; border-radius: 9px; color: #9a5b51; background: #fff8f6; padding: 8px 11px; cursor: pointer; font-size: 9px; }
.member-dialog > footer.member-dialog-footer,
.member-dialog-scroll > footer.member-dialog-footer {
  align-items: center;
  justify-content: space-between;
}
.member-dialog-footer > div { display: flex; gap: 7px; }
.member-dialog > footer button.neutral,
.member-dialog-scroll > footer button.neutral {
  border-color: #d9e3db;
  color: #527061;
  background: #fff;
}
.identity-list { display: grid; gap: 8px; padding: 10px 24px 18px; }
.identity-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid #dfe6de;
  border-radius: 13px;
  background: #fff;
}
.identity-row.default {
  border-color: #8faf9a;
  box-shadow: inset 3px 0 0 #397257;
}
.identity-row > i {
  border-radius: 8px;
  color: #4b735d;
  background: #edf4e9;
  padding: 6px 8px;
  font-size: 8px;
  font-style: normal;
}
.identity-row strong,
.identity-row small { display: block; }
.identity-row strong { font-size: 11px; }
.identity-row small { margin-top: 4px; color: #87928c; font-size: 9px; }
.identity-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.password-dialog { width: min(520px, calc(100vw - 32px)); }

.history-dialog {
  width: min(640px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 28px));
  padding: 0;
  border: 1px solid #dce4db;
  border-radius: 20px;
  color: var(--ink);
  background: #f7f9f5;
  box-shadow: 0 30px 90px rgba(24,54,42,.24);
  overflow: auto;
}
.history-dialog::backdrop { background: rgba(12,31,24,.48); backdrop-filter: blur(4px); }
.history-list { display: grid; gap: 8px; padding: 10px 20px 22px; transition: opacity .15s ease; }
.history-list.loading { opacity: .58; pointer-events: none; }
.history-row {
  width: 100%;
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px;
  align-items: center; padding: 13px 14px;
  border: 1px solid #dfe6dc; border-radius: 13px;
  color: #35483f; background: #fff;
  text-align: left; cursor: pointer; transition: .16s ease;
}
.history-row:hover { border-color: #b8cdbb; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(45,76,59,.07); }
.history-row.active { border-color: #7fa58b; background: #f0f6ed; box-shadow: inset 3px 0 0 #397257; }
.history-row > span, .history-row strong, .history-row small { min-width: 0; display: block; }
.history-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.history-row small { margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #849089; font-size: 9px; }
.history-row > em { display: grid; justify-items: end; gap: 6px; color: #88938d; font-size: 8px; font-style: normal; white-space: nowrap; }
.history-row > em b { border-radius: 99px; color: #4f745f; background: #edf4e9; padding: 4px 7px; font-size: 8px; font-weight: 650; }
.history-empty { margin: 8px 0; padding: 28px 18px; border: 1px dashed #d8e1d7; border-radius: 13px; color: #89938d; background: #fff; text-align: center; font-size: 10px; }
.history-empty.error { color: #9a5b51; border-color: #ead8d3; background: #fff8f6; }

.memory-status-grid { display: grid; gap: 8px; }
.memory-status-grid p {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0; padding: 8px 9px;
  border: 1px solid #e5ebe3; border-radius: 9px;
  background: #fafcf8;
}
.memory-status-grid span { color: #7b8881; font-size: 9px; }
.memory-status-grid strong { max-width: 145px; overflow: hidden; color: #496a58; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.memory-dialog {
  width: min(720px, calc(100vw - 28px));
  max-height: min(780px, calc(100vh - 28px));
  padding: 0;
  border: 1px solid #dce4db;
  border-radius: 20px;
  color: var(--ink);
  background: #f7f9f5;
  box-shadow: 0 30px 90px rgba(24,54,42,.24);
  overflow: auto;
}
.memory-dialog::backdrop { background: rgba(12,31,24,.48); backdrop-filter: blur(4px); }
.memory-create {
  display: grid; grid-template-columns: 150px minmax(0,1fr) auto; gap: 9px;
  margin: 8px 20px 12px; padding: 13px;
  border: 1px solid #dde6dc; border-radius: 13px;
  background: #fff;
}
.memory-create select, .memory-create input {
  min-width: 0; border: 1px solid #dbe3da; border-radius: 9px;
  outline: 0; color: #34473d; background: #fafbf8;
  padding: 9px 10px; font-size: 10px;
}
.memory-create input:focus { border-color: #83a28d; box-shadow: 0 0 0 3px rgba(83,129,101,.08); }
.memory-create button {
  border: 0; border-radius: 9px; color: #fff; background: #2c6c51;
  padding: 9px 13px; cursor: pointer; font-size: 9px;
}
.memory-dialog > .form-error { margin: 0 20px 10px !important; }
.memory-list { display: grid; gap: 8px; padding: 2px 20px 22px; }
.memory-row {
  display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 11px;
  align-items: center; padding: 12px 13px;
  border: 1px solid #dfe6dc; border-radius: 12px; background: #fff;
}
.memory-row > i {
  border-radius: 99px; color: #557361; background: #edf4e9;
  padding: 5px 8px; font-size: 8px; font-style: normal; white-space: nowrap;
}
.memory-row strong, .memory-row small { display: block; }
.memory-row strong { color: #3b4d43; font-size: 11px; line-height: 1.55; }
.memory-row small { margin-top: 4px; color: #8b958f; font-size: 8px; }
.memory-row button {
  border: 1px solid #eadbd7; border-radius: 8px; color: #9a5b51;
  background: #fff9f7; padding: 6px 8px; cursor: pointer; font-size: 8px;
}

.cli-update-dialog {
  width: min(500px, calc(100vw - 28px));
  max-height: calc(100vh - 34px);
  border: 1px solid #d9e2d8;
  border-radius: 19px;
  color: var(--ink);
  background: #fff;
  padding: 0;
  box-shadow: 0 28px 90px rgba(18,46,35,.24);
}
.cli-update-dialog::backdrop {
  background: rgba(12,31,24,.48);
  backdrop-filter: blur(4px);
}
.cli-update-confirm { padding: 20px 24px 10px; }
.cli-update-confirm > p {
  margin: 0;
  color: #66756d;
  font-size: 11px;
  line-height: 1.7;
}
.cli-update-confirm > div {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 18px 0 12px;
}
.cli-update-confirm > div span {
  padding: 11px 12px;
  border: 1px solid #dfe7dd;
  border-radius: 11px;
  color: #3e5b4b;
  background: #f7faf5;
  font-size: 10px;
  text-align: center;
}
.cli-update-confirm > div b { color: #8a9b91; font-size: 11px; }
.cli-update-confirm > small {
  display: block;
  color: #8a958e;
  font-size: 9px;
  line-height: 1.55;
}
.cli-update-dialog > footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 15px 24px 22px;
}
.cli-update-dialog > footer button { padding: 9px 13px; font-size: 9px; }
.agent-maintenance { margin-top: 12px; }
.tiktok-ads-maintenance { margin-top: 12px; }
.agent-channel-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.agent-channel-row > label { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #687a70; font-size: 9px; }
.agent-channel-row select { border: 1px solid #d9e3da; border-radius: 8px; padding: 6px 8px; color: #315342; background: #fff; font-size: 9px; }
.agent-channel-row .switch-row { justify-content: flex-end; }

.quick-input-dialog {
  width: min(520px, calc(100vw - 30px));
  padding: 0;
  border: 1px solid #dfe7df;
  border-radius: 18px;
  color: #20342b;
  background: #fff;
  box-shadow: 0 24px 70px rgba(13, 41, 29, .2);
}
.quick-input-dialog::backdrop {
  background: rgba(12,31,24,.48);
  backdrop-filter: blur(4px);
}
.quick-input-dialog form { padding: 20px 24px 22px; }
.quick-input-dialog label { display: grid; gap: 8px; }
.quick-input-dialog label > span {
  color: #66766d;
  font-size: 10px;
  font-weight: 700;
}
.quick-input-dialog input,
.quick-input-dialog select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d9e3da;
  border-radius: 12px;
  padding: 13px 14px;
  color: #20342b;
  background: #f9fbf9;
  outline: none;
  font: inherit;
  font-size: 14px;
}
.quick-input-dialog select {
  min-height: 48px;
  cursor: pointer;
}
.quick-input-dialog input:focus,
.quick-input-dialog select:focus {
  border-color: #72a087;
  outline: none;
  box-shadow: 0 0 0 3px rgba(65,126,95,.11);
}
.quick-input-dialog select:disabled {
  cursor: wait;
  color: #89958e;
}
.quick-input-status {
  min-height: 18px;
  margin: 10px 0 0;
  color: #6b7c73;
  font-size: 10px;
  line-height: 1.6;
}
.quick-input-status[data-state="error"] { color: #a35b5b; }
.quick-input-status[data-state="empty"] { color: #8a7452; }
.quick-input-lifecycle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #e0e9e2;
  border-radius: 12px;
  background: #f8fbf9;
}
.quick-input-lifecycle[hidden] { display: none; }
.quick-input-lifecycle div {
  min-width: 0;
  padding: 8px 0;
  border-bottom: 1px solid #e7eee9;
}
.quick-input-lifecycle span {
  display: block;
  color: #89958e;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
}
.quick-input-lifecycle strong {
  display: block;
  margin-top: 4px;
  color: #304b3d;
  font-size: 12px;
  line-height: 1.45;
}
.quick-input-lifecycle small {
  grid-column: 1 / -1;
  padding-top: 9px;
  color: #7c8c83;
  font-size: 10px;
  line-height: 1.55;
}
.quick-input-campaign-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.quick-input-campaign-tools small {
  color: #89958e;
  font-size: 9px;
  line-height: 1.5;
}
.quick-input-campaign-tools button {
  flex: 0 0 auto;
  border: 1px solid #dbe5dc;
  border-radius: 8px;
  padding: 6px 9px;
  color: #567063;
  background: #fff;
  cursor: pointer;
  font-size: 9px;
}
.quick-input-campaign-tools button:disabled { cursor: wait; opacity: .55; }
.quick-input-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.quick-input-chips button {
  border: 1px solid #dbe5dc;
  border-radius: 999px;
  padding: 7px 10px;
  color: #567063;
  background: #f7faf7;
  cursor: pointer;
  font-size: 10px;
}
.quick-input-dialog form > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
}
.quick-input-dialog form > footer small {
  color: #89958e;
  font-size: 9px;
  line-height: 1.5;
}
.quick-input-dialog form > footer button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 10px;
  padding: 10px 15px;
  color: #fff;
  background: #2c6c51;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.workspace-config-dialog,
.agent-update-dialog {
  width: min(860px, calc(100vw - 28px));
  max-height: min(86vh, 900px);
  padding: 0;
  border: 1px solid #dfe7df;
  border-radius: 18px;
  color: #20342b;
  background: #fff;
  box-shadow: 0 24px 70px rgba(13, 41, 29, .2);
}
.agent-update-dialog { width: min(570px, calc(100vw - 28px)); }
.workspace-config-dialog::backdrop,
.agent-update-dialog::backdrop { background: rgba(12,31,24,.48); backdrop-filter: blur(4px); }
.workspace-config-dialog form { padding: 10px 24px 24px; }
.workspace-preferences { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 14px; border: 1px solid #e1e8e1; border-radius: 13px; background: #f8faf8; }
.workspace-preferences label { display: grid; gap: 6px; color: #6c7a73; font-size: 9px; }
.workspace-preferences select { min-width: 0; border: 1px solid #d8e2d9; border-radius: 8px; padding: 8px; color: #29493a; background: #fff; font-size: 10px; }
.workspace-preferences .workspace-toggle { display: flex; align-items: center; padding-top: 18px; }
.workspace-action-editor { display: grid; gap: 16px; max-height: 50vh; overflow: auto; margin-top: 16px; padding-right: 5px; }
.workspace-editor-group > header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.workspace-editor-group > header i { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 8px; color: #fff; background: #4d7963; font-style: normal; font-size: 9px; }
.workspace-editor-group > header strong { font-size: 11px; }
.workspace-editor-row { display: grid; grid-template-columns: 28px minmax(110px, .8fr) minmax(240px, 2fr) 58px; gap: 8px; align-items: center; padding: 8px; border-top: 1px solid #edf1ed; }
.workspace-editor-row input[type="text"],
.workspace-editor-row textarea,
.workspace-editor-row input[type="number"] { width: 100%; box-sizing: border-box; border: 1px solid #dbe4dc; border-radius: 8px; padding: 8px; color: #263c31; background: #fff; font: inherit; font-size: 10px; }
.workspace-editor-row textarea { min-height: 56px; resize: vertical; line-height: 1.45; }
.workspace-config-dialog form > footer,
.agent-update-dialog > footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.agent-update-dialog > footer { padding: 0 24px 22px; }
.workspace-config-dialog form > footer button,
.agent-update-dialog > footer button { border: 1px solid #dce4dd; border-radius: 9px; padding: 9px 13px; color: #5f6f66; background: #fff; cursor: pointer; font-size: 9px; }
.workspace-config-dialog form > footer button.primary,
.agent-update-dialog > footer button.primary { border-color: #2c6c51; color: #fff; background: #2c6c51; }

dialog[open] {
  transform-origin: 50% 42%;
  animation: dialog-enter .16s cubic-bezier(.2,.72,.3,1) both;
}
dialog[open]::backdrop {
  animation: backdrop-enter .14s ease-out both;
}
dialog[open].is-closing {
  pointer-events: none;
  animation: dialog-exit .13s ease-in both;
}
dialog[open].is-closing::backdrop {
  animation: backdrop-exit .13s ease-in both;
}

dialog button,
.starter-grid button,
.quick-actions button,
.quick-action-tabs button,
.agent-meta button,
.member-menu-button {
  transition:
    transform .14s ease,
    border-color .14s ease,
    background-color .14s ease,
    color .14s ease,
    box-shadow .14s ease,
    opacity .14s ease;
}
dialog button:active,
.starter-grid button:active,
.quick-actions button:active,
.quick-action-tabs button:active,
.agent-meta button:active,
.member-menu-button:active {
  transform: translateY(0) scale(.985);
}
dialog button:focus-visible,
.starter-grid button:focus-visible,
.quick-actions button:focus-visible,
.quick-action-tabs button:focus-visible,
.agent-meta button:focus-visible,
.member-menu-button:focus-visible {
  outline: 2px solid rgba(55,111,88,.32);
  outline-offset: 2px;
}

@media (hover: hover) {
  dialog button:not(:disabled):hover,
  .starter-grid button:not(:disabled):hover,
  .quick-actions button:not(:disabled):hover,
  .quick-action-tabs button:not(:disabled):hover,
  .agent-meta button:not(:disabled):hover,
  .member-menu-button:not(:disabled):hover {
    transform: translateY(-1px);
  }
}

@keyframes jump { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes dialog-enter {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes dialog-exit {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(5px) scale(.99); }
}
@keyframes backdrop-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes backdrop-exit {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes select-menu-enter {
  from { opacity: 0; transform: translateY(-4px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 1100px) {
  .sidebar { flex-basis: 78px; width: 78px; padding-inline: 10px; }
  .brand { padding-inline: 9px; }
  .brand > div, .sidebar nav button:not(.active), .sidebar nav button.active:not(:first-child), .sidebar nav button { font-size: 0; }
  .sidebar nav button { justify-content: center; }
  .sidebar nav button > span { font-size: 18px; }
  .sidebar nav button i, .sidebar nav button em, .sidebar-note div { display: none; }
  .sidebar-note { justify-content: center; }
  .chat-panel { min-width: 500px; }
  .context-panel { min-width: 250px; }
}

@media (max-width: 820px) {
  .auth-gate { grid-template-columns: 1fr; }
  .auth-visual { min-height: auto; padding: 25px 22px; }
  .auth-copy { display: none; }
  .auth-form-panel { padding: 22px 14px; }
  .auth-card { padding: 25px 20px; }
  .workspace-preferences { grid-template-columns: 1fr 1fr; }
  .workspace-editor-row { grid-template-columns: 26px 1fr 54px; }
  .workspace-editor-row textarea { grid-column: 2 / -1; }
  body { overflow: auto; }
  #app { min-height: 100%; height: auto; }
  .sidebar { display: none; }
  .workspace { min-height: 100vh; }
  .topbar { position: sticky; top: 0; z-index: 20; padding: 10px 13px; height: auto; flex-wrap: wrap; }
  .breadcrumb { display: none; }
  .shop-picker { width: 100%; }
  .shop-picker { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .device-picker { min-width: 0; }
  .shop-picker label, .live-badge { display: none; }
  .shop-picker .hy-select,
  .device-picker .hy-select { width: 100%; min-width: 0; max-width: none; }
  .hy-select-trigger,
  .hy-select-menu { display: none !important; }
  .native-select-control {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    padding: 9px 30px 9px 10px !important;
    border: 1px solid #dce3db !important;
    border-radius: 10px;
    opacity: 1;
    pointer-events: auto;
    color: var(--ink);
    background: #f8faf7;
  }
  .member-menu-button { position: fixed; right: 14px; bottom: 14px; z-index: 40; border-radius: 12px; box-shadow: 0 9px 25px rgba(29,67,52,.2); }
  .member-menu-button b { display: none; }
  .workbench { min-height: calc(100vh - 60px); padding: 8px; }
  .chat-panel { width: 100% !important; min-width: 0; border-radius: 16px; }
  .context-panel, .resize-handle { display: none; }
  .agent-meta > span { display: none; }
  .conversation { padding: 18px 14px 12px; }
  .starter-grid { grid-template-columns: 1fr; }
  .message.assistant { padding-right: 0; }
  .message.user { padding-left: 10%; }
  .message-stack { max-width: 92%; }
  .logic-track { flex-direction: column; align-items: stretch; overflow: visible; }
  .logic-node { flex-basis: auto; min-width: 0; }
  .logic-arrow { min-height: 14px; transform: rotate(90deg); }
  .structure-row { grid-template-columns: minmax(92px, 1.2fr) minmax(80px, 2fr) 38px; gap: 8px; }
  .metric-bar-row { grid-template-columns: minmax(84px, 1fr) minmax(82px, 1.4fr); gap: 8px; }
  .metric-bar-row strong { grid-column: 1 / -1; padding-left: 92px; color: #7a857f; font-size: 9px; }
  .logic-tree { padding: 13px; overflow: visible; }
  .tree-root { width: auto; }
  .tree-children { grid-template-columns: 1fr; border-top: 0; padding-top: 0; }
  .tree-children::before { display: none; }
  .tree-branch { padding-left: 14px; }
  .tree-branch::before { top: -10px; bottom: auto; left: 2px; width: 10px; height: 31px; border-left: 1px solid #cad7cc; border-bottom: 1px solid #cad7cc; }
  .composer { padding: 10px; }
  .composer-foot > span { display: none; }
  .member-form-grid { grid-template-columns: 1fr; }
  .member-form-actions { align-items: stretch; flex-direction: column; }
  .identity-row { grid-template-columns: auto minmax(0, 1fr); }
  .identity-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .agent-meta { gap: 6px; }
  .agent-meta button { padding-inline: 8px; }
  .history-row { grid-template-columns: 1fr; gap: 8px; }
  .history-row > em { grid-auto-flow: column; justify-content: space-between; }
  .memory-create { grid-template-columns: 1fr; }
  .memory-row { grid-template-columns: auto minmax(0,1fr); }
  .memory-row button { grid-column: 2; justify-self: start; }
}
/* TikTok Ads internal controlled workspace */
.ads-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid rgba(120, 150, 210, .22);
  border-radius: 22px;
  color: #15233f;
  background: #f7f9fd;
  box-shadow: 0 28px 80px rgba(20, 35, 70, .28);
}

.ads-dialog .dialog-head,
.ads-dialog > section,
.ads-dialog > form,
.ads-dialog > .dialog-intro { margin-left: 26px; margin-right: 26px; }
.ads-dialog .dialog-head { margin-top: 22px; }
.ads-dialog > .dialog-intro { color: #68758e; }
.ads-dialog > form,
.ads-dialog > section {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid #dce4f2;
  border-radius: 16px;
  background: #fff;
}
.ads-dialog > form:last-child,
.ads-dialog > section:last-child { margin-bottom: 26px; }
.ads-status-card { display: flex; align-items: center; gap: 12px; }
.ads-status-card div { display: grid; gap: 3px; flex: 1; }
.ads-status-card small { color: #748099; }
.ads-status-dot { width: 11px; height: 11px; border-radius: 50%; background: #9aa6b9; box-shadow: 0 0 0 5px rgba(154,166,185,.13); }
.ads-status-dot.connected_read_only { background: #28a879; box-shadow: 0 0 0 5px rgba(40,168,121,.13); }
.ads-status-dot.reauth_required { background: #e16c63; box-shadow: 0 0 0 5px rgba(225,108,99,.13); }
.ads-setup-card,
.ads-discovery-form { display: flex; align-items: end; gap: 18px; }
.ads-setup-card > div,
.ads-discovery-form > div { flex: 1; }
.ads-setup-card { flex-wrap: wrap; }
.ads-auth-actions { display: flex; flex: 0 0 auto !important; gap: 8px; }
.ads-connection-list {
  display: flex;
  flex: 1 0 100% !important;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #e4e9f3;
}
.ads-connection-chip {
  display: grid;
  gap: 2px;
  min-width: 170px;
  padding: 9px 12px;
  border: 1px solid #dce4f2;
  border-radius: 11px;
  background: #f8faff;
}
.ads-connection-chip strong { font-size: 13px; }
.ads-connection-chip small { color: #758199; }
.ads-connection-chip.connected_read_only { border-color: rgba(40,168,121,.36); background: rgba(40,168,121,.06); }
.ads-connection-chip.awaiting_provider { border-color: rgba(49,92,233,.32); background: rgba(49,92,233,.06); }
.ads-dialog button.secondary { color: #315ce9; background: #edf2ff; }
.ads-copy-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  flex: 1 0 100% !important;
  padding-top: 12px;
  border-top: 1px solid #e4e9f3;
}
.ads-copy-panel small { grid-column: 1 / -1; color: #758199; }
.ads-dialog h3 { margin: 0 0 5px; font-size: 15px; }
.ads-dialog p { margin: 0; line-height: 1.55; }
.ads-dialog label { display: grid; gap: 7px; font-size: 13px; color: #53617b; }
.ads-dialog input,
.ads-dialog select {
  min-height: 40px;
  border: 1px solid #ccd7e8;
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  color: #192946;
}
.ads-dialog button[type="button"],
.ads-dialog button[type="submit"] {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  padding: 0 16px;
  color: #fff;
  background: #315ce9;
  font-weight: 700;
}
.ads-dialog button:disabled { opacity: .48; cursor: not-allowed; }
.ads-store-list { display: grid; gap: 9px; margin: 14px 0; }
.ads-store-row {
  grid-template-columns: auto 1fr minmax(210px, 280px);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e0e7f1;
  border-radius: 12px;
}
.ads-store-row > input { min-height: auto; }
.ads-store-row span { display: grid; gap: 3px; }
.ads-store-row small { color: #7c879a; }
.ads-operation-history > div:first-child { margin-bottom: 13px; }
.ads-operation-list { display: grid; gap: 9px; }
.ads-operation-list > p { color: #748099; }
.ads-operation-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e0e7f1;
  border-radius: 12px;
  background: #fbfcff;
}
.ads-operation-row > div { display: grid; gap: 3px; min-width: 0; }
.ads-operation-row small { overflow: hidden; color: #758199; text-overflow: ellipsis; white-space: nowrap; }
.ads-operation-row time { color: #7c879a; font-size: 11px; }
.ads-operation-row > p { grid-column: 2 / -1; color: #a74b43; font-size: 12px; }
.ads-operation-state {
  min-width: 78px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #315ce9;
  background: #edf2ff;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}
.ads-operation-state.terminal_verified { color: #167a58; background: rgba(40,168,121,.11); }
.ads-operation-state.provider_rejected,
.ads-operation-state.preflight_rejected,
.ads-operation-state.terminal_mismatch { color: #aa4941; background: rgba(225,108,99,.11); }
.ads-operation-state.provider_acceptance_unknown,
.ads-operation-state.verification_timeout { color: #9a6816; background: rgba(225,166,65,.15); }
@media (max-width: 720px) {
  .ads-setup-card, .ads-discovery-form { display: grid; align-items: stretch; }
  .ads-store-row { grid-template-columns: auto 1fr; }
  .ads-store-row select { grid-column: 1 / -1; }
  .ads-operation-row { grid-template-columns: 1fr; }
  .ads-operation-state { justify-self: start; }
  .ads-operation-row > p { grid-column: 1; }
}
