/* Implentio OS Admin: the few rules the app needs on top of Keel (keel/components.css). Tokens only. */

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Sign-in, not allowed, sign-in failed: the product mark (with the Rive orbit on sign-in), one card, a footer. */
.bare {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
.bare__main {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space-6) var(--space-4);
}
/* A faint dot grid behind the card, fading out towards the edges of the window. */
.bare__main::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(var(--border) 1px, transparent 1.5px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 55% 50% at 50% 45%, currentColor, transparent 80%);
}
.bare__stack {
  display: grid;
  justify-items: center;
  gap: var(--space-4);
  width: min(420px, 100%);
}
.bare__hero {
  position: relative;
  display: grid;
  place-items: center;
  width: 160px;
  height: 160px;
  margin: calc(var(--space-6) * -1) 0 calc(var(--space-2) * -1);
}
.bare__hero > .rive--orbit {
  position: absolute;
  inset: 0;
}
.orbit-still {
  width: 160px;
  height: 160px;
}
.orbit-still__node {
  fill: var(--accent-solid);
}
.bare__mark {
  position: relative;
  width: var(--mark-lg);
  height: var(--mark-lg);
  border-radius: var(--radius-lg);
  font-size: var(--fs-14);
  box-shadow:
    0 0 0 6px var(--bg),
    var(--shadow-2);
}
.bare__tile {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: var(--space-4) 0;
  border: var(--bw) solid;
  border-radius: var(--radius-xl);
}
.bare__tile--warn {
  background: var(--warn-subtle);
  border-color: var(--warn-border);
  color: var(--warn-fg);
}
.bare__tile--bad {
  background: var(--bad-subtle);
  border-color: var(--bad-border);
  color: var(--bad-fg);
}
.bare__card {
  width: 100%;
  display: grid;
  gap: var(--space-4);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2);
}
.bare__title {
  display: grid;
  gap: var(--space-1);
  text-align: center;
}
.bare__name {
  font-size: var(--fs-24);
  line-height: var(--lh-24);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-tight);
}
.bare__button {
  width: 100%;
  justify-content: center;
}
.bare__dev {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: var(--space-3);
  border: var(--bw) dashed var(--border-control);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}
.bare__dev-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1) var(--space-2);
}
.bare__person {
  width: 100%;
  height: auto;
  justify-content: flex-start;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  text-align: left;
  white-space: normal;
}
.bare__person-text {
  flex: 1;
  display: grid;
  gap: 2px;
}
.bare__person-text b {
  font-weight: var(--fw-semibold);
}
.bare__person > .icon {
  color: var(--text-subtle);
}
.bare__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-1h);
  margin: 0;
}

/* User menu in the top bar: a native details element, so it works without script. */
.user-menu {
  position: relative;
}
.user-menu > summary {
  list-style: none;
  cursor: pointer;
}
.user-menu > summary::-webkit-details-marker {
  display: none;
}
.user-menu > .menu {
  position: absolute;
  right: 0;
  top: calc(100% + var(--space-2));
  display: grid;
  gap: var(--space-1);
}
.menu__label {
  padding: var(--space-1) var(--space-2) 0;
}
.user-menu form {
  margin: 0;
}

.note-line {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.note-block {
  margin-top: var(--space-4);
}
.switch-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
  font-size: var(--fs-13);
}

/* Setup steps on a connection page: numbered, with the screenshots from the setup guide. */
.setup-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}
.setup-step {
  grid-template-columns: 22px minmax(0, 1fr);
}
.setup-step .check-step__tick {
  color: var(--text-muted);
  font-size: var(--fs-11);
}
.setup-step__main p {
  margin: var(--space-1) 0 0;
}
.setup-step__action {
  margin: var(--space-2) 0 0;
}
/* Values a setup step asks for: each one a button that copies it. */
.copy-values {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin: var(--space-2) 0 0;
}
.copy-value {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  max-width: 100%;
  padding: 2px var(--space-2);
  border: var(--bw) solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-13);
  cursor: pointer;
}
.copy-value:hover {
  border-color: var(--border-strong, var(--border));
}
.copy-value__label {
  color: var(--text-muted);
}
.copy-value code {
  overflow-wrap: anywhere;
}
.paste-file {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-2) 0 0;
}
.paste-file__show > summary {
  cursor: pointer;
  width: max-content;
  color: var(--text-subtle);
  font-size: var(--fs-12);
}
.paste-file__show pre {
  max-height: 320px;
  overflow: auto;
  margin: var(--space-1) 0 0;
  padding: var(--space-2);
  border: var(--bw) solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  font: var(--fw-regular) var(--fs-12) / 18px var(--font-mono);
}
.setup-step__figure {
  margin: var(--space-3) 0 0;
  max-width: 640px;
}
.setup-step__figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: var(--bw) solid var(--border);
}

.dialog__foot {
  display: flex;
  justify-content: flex-end;
  padding: 0 var(--space-4) var(--space-4);
}
.ai-panel .secure-form {
  margin-top: var(--space-2);
}

/* Workflow drafts: a source chip opens to the row or message it came from (a native details element). */
.source-detail {
  display: inline-block;
  max-width: 100%;
}
.source-detail > summary {
  cursor: pointer;
  list-style: none;
}
/* A long label wraps inside the chip (a phone is narrower than some labels); the page never scrolls sideways. */
.source-detail > summary.source {
  height: auto;
  min-height: 20px;
  max-width: 100%;
  padding-top: 3px;
  padding-bottom: 3px;
  line-height: var(--lh-12);
  white-space: normal;
  overflow-wrap: anywhere;
}
.source-detail > summary::-webkit-details-marker {
  display: none;
}
.source-detail[open] {
  display: block;
  margin: var(--space-1) 0;
}
.source-detail__body {
  margin-top: var(--space-1);
  padding: var(--space-2);
  border: var(--bw) solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: var(--fs-12);
  overflow-wrap: anywhere;
}

/* A long id (task, run, draft) inside a row breaks anywhere instead of pushing the row wider. */
.id-wrap {
  overflow-wrap: anywhere;
}

/* The "run now" form of a workflow: space between the question and its button. */
.run-now {
  display: grid;
  gap: var(--space-3);
}

/* The admin AI's Markdown (markdown.js): headings as bold lines, not titles; compact lists; code in an inset well. */
.msg__md .md-h {
  font-weight: var(--fw-semibold);
}
.msg__md .md-list {
  margin: 0;
  padding-left: var(--space-5);
}
.msg__md .md-list li + li,
.msg__md li > .md-list {
  margin-top: var(--space-1);
}
.msg__md li > p + p {
  margin-top: var(--space-2);
}
.msg__md .md-code {
  padding: 0 var(--space-1);
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  overflow-wrap: anywhere;
}
.msg__md .md-pre {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border: var(--bw) solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: var(--fs-12);
  line-height: var(--lh-12);
  overflow-x: auto;
}
.msg__md .md-quote {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding-left: var(--space-3);
  border-left: 2px solid var(--border);
  color: var(--text-muted);
}
.msg__md .md-hr {
  width: 100%;
  margin: 0;
  border: 0;
  border-top: var(--bw) solid var(--border);
}
.msg__md a {
  overflow-wrap: anywhere;
}

/* Images in the chat: the tray above the box (each with a remove button), and the thumbnails of a sent message. */
.composer__images {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding-top: var(--space-1);
}
.composer__thumb {
  position: relative;
  display: inline-flex;
}
.img-thumb {
  display: block;
  height: 56px;
  width: auto;
  max-width: 180px;
  object-fit: cover;
  border: var(--bw) solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.composer__thumb-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: var(--bw) solid var(--border-control);
  border-radius: var(--radius-full);
  background: var(--surface-1);
  color: var(--text-muted);
  cursor: pointer;
}
.composer__thumb-remove:hover {
  color: var(--text);
}
.msg__images {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-1h);
  max-width: 88%;
}
aside[data-drop] .composer__box {
  outline: var(--focus-w) dashed var(--focus-ring);
  outline-offset: 2px;
}
/* With images waiting to be sent: never one that shows a key. */
.composer__warn {
  display: flex;
  gap: var(--space-1);
  align-items: center;
  margin: 0 0 var(--space-1);
  color: var(--warn-fg);
  font-size: var(--fs-12);
  line-height: var(--lh-12);
}
.composer__warn[hidden] {
  display: none;
}
/* A web call's link on its activity line: the page it read. */
.activity {
  flex-wrap: wrap;
}
.activity__link {
  max-width: 40ch;
  overflow: hidden;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity__link:hover {
  color: var(--text);
}
/* A web search's Google Search Suggestions (src/web/search-suggestions.ts): Google's own look inside the frame (its CSS
   picks light or dark), the full width of the answer, no border or background of ours. */
.search-suggestions {
  display: block;
  width: 100%;
  height: 56px;
  margin: var(--space-1) 0 var(--space-2);
  border: 0;
  background: transparent;
}

/* Health: setup steps the admin AI found wrong, with the way that worked. */
.setup-reports__lede {
  margin: 0 0 var(--space-3);
}
.setup-reports {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.setup-report {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-3);
  border: var(--bw) solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-1);
}
.setup-report__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1h);
}
.setup-report__when {
  margin-left: auto;
}
.setup-report p {
  margin: 0;
  overflow-wrap: anywhere;
}
