/* ==========================================================================
   Neko demo — the fake app window
   Colors/sizes sampled from the real screenshots in assets/screens/.
   Everything is scoped under .nk-win so it never leaks into the page.
   ========================================================================== */

/* ---------- stage & scaling ---------- */
.nk-stage {
  position: relative;
  width: 100%;
  overflow: hidden;            /* the scaled window's layout box is wider than the stage */
  border-radius: 12px;
}
.nk-scaler {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
}

/* ---------- tokens (dark "Preto" theme by default) ---------- */
.nk-win {
  --nk-bg: #0a0a0a;
  --nk-bg-1: #0f0f0f;
  --nk-bg-2: #141414;
  --nk-bg-3: #1f1f1f;
  --nk-bg-4: #262626;
  --nk-bg-input: #1e1e1e;
  --nk-line: #1c1c1c;
  --nk-line-soft: #131313;
  --nk-line-2: #2a2a2a;
  --nk-line-input: #252525;
  --nk-text: #ededed;
  --nk-text-2: #a3a3a3;
  --nk-text-3: #6b6b6b;
  --nk-accent: #efb4d4;
  --nk-accent-text: var(--nk-accent);
  --nk-accent-ink: #1a1216;
  --nk-accent-soft: color-mix(in srgb, var(--nk-accent) 14%, var(--nk-bg));
  --nk-accent-line: color-mix(in srgb, var(--nk-accent) 34%, var(--nk-bg-2));
  --nk-ok: #7bd88f;
  --nk-warn: #f0c36a;
  --nk-danger-bg: #3b2328;
  --nk-danger-text: #f2a7b0;
  --nk-shadow: 0 16px 40px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .4);
  --nk-mono: "JetBrains Mono", Consolas, ui-monospace, "Cascadia Mono", monospace;
  --nk-text-scale: 1;

  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--nk-bg);
  color: var(--nk-text);
  border: 1px solid var(--nk-line-2);
  border-radius: 10px;
  font-family: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-align: left;
  outline: none;
  user-select: none;
}
.nk-win:focus-visible { box-shadow: inset 0 0 0 2px var(--nk-accent); }

.nk-win[data-theme="escuro"] {
  --nk-bg: #17171a; --nk-bg-1: #1c1c20; --nk-bg-2: #212125; --nk-bg-3: #2b2b30; --nk-bg-4: #34343a;
  --nk-bg-input: #26262b; --nk-line: #29292f; --nk-line-soft: #222227; --nk-line-2: #36363d; --nk-line-input: #36363d;
}
.nk-win[data-theme="claro"] {
  --nk-bg: #f7f6f8; --nk-bg-1: #efedf2; --nk-bg-2: #ffffff; --nk-bg-3: #e7e4eb; --nk-bg-4: #dcd8e1;
  --nk-bg-input: #ffffff; --nk-line: #e3e0e8; --nk-line-soft: #e8e5ec; --nk-line-2: #d2cdd8; --nk-line-input: #d2cdd8;
  --nk-text: #1c1a21; --nk-text-2: #4b4754; --nk-text-3: #77727f;
  --nk-accent-text: color-mix(in srgb, var(--nk-accent) 45%, #3a1029);
  --nk-accent-soft: color-mix(in srgb, var(--nk-accent) 30%, #ffffff);
  --nk-accent-line: color-mix(in srgb, var(--nk-accent) 70%, #ffffff);
  --nk-danger-bg: #f8dde2; --nk-danger-text: #9b2c3f;
  --nk-shadow: 0 16px 40px rgba(40, 20, 50, .18), 0 2px 6px rgba(40, 20, 50, .1);
}

/* Resets use :where() so they have zero specificity and never beat the
   component classes below (e.g. .nk-conv padding, .nk-hero-title margin). */
:where(.nk-win) *,
:where(.nk-win) *::before,
:where(.nk-win) *::after { box-sizing: border-box; }
:where(.nk-win) :where(button, input, textarea, select) {
  font: inherit;
  color: inherit;
  margin: 0;
}
:where(.nk-win) button { cursor: pointer; background: none; border: 0; padding: 0; }
:where(.nk-win) button:disabled { cursor: default; }
.nk-win :focus-visible { outline: 2px solid var(--nk-accent); outline-offset: 1px; }
.nk-win input:focus-visible,
.nk-win textarea:focus-visible { outline: none; }
:where(.nk-win) :where(h2, h3, h4, p, ul, ol) { margin: 0; padding: 0; }
:where(.nk-win) ul { list-style: none; }
:where(.nk-win) a { color: inherit; text-decoration: none; }
/* undo the page's global code/kbd styles inside the fake app */
:where(.nk-win) code, :where(.nk-win) kbd { padding: 0; border: 0; border-radius: 0; background: none; font-size: inherit; } /* (0,0,1): beats the page rule because this file loads later */
:where(.nk-win) :where(input, textarea) { user-select: text; }

.nk-i { width: 16px; height: 16px; flex: none; display: block; }
.nk-spin { animation: nk-spin .8s linear infinite; }
@keyframes nk-spin { to { transform: rotate(360deg); } }

/* thin scrollbars */
.nk-win ::-webkit-scrollbar { width: 8px; height: 8px; }
.nk-win ::-webkit-scrollbar-thumb { background: var(--nk-line-2); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
.nk-win ::-webkit-scrollbar-track { background: transparent; }
.nk-win * { scrollbar-width: thin; scrollbar-color: var(--nk-line-2) transparent; }

/* ==========================================================================
   Title bar (44px)
   ========================================================================== */
.nk-titlebar {
  position: relative;
  height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 8px;
}
.nk-tb-left, .nk-tb-right { display: flex; align-items: center; gap: 2px; }
.nk-tb-btn {
  width: 32px; height: 30px;
  display: grid; place-items: center;
  border-radius: 6px;
  color: var(--nk-text-2);
  transition: background .12s, color .12s;
}
.nk-tb-btn:hover { background: var(--nk-bg-3); color: var(--nk-text); }
.nk-tb-btn .nk-i { width: 16px; height: 16px; }
.nk-wc { width: 34px; }
.nk-wc.is-close:hover { background: #c42b1c; color: #fff; }
.nk-brand { display: flex; align-items: center; gap: 7px; margin-left: 10px; }
.nk-brand img { width: 18px; height: 18px; }
.nk-brand span { font-size: 17px; font-weight: 400; letter-spacing: -.01em; color: #f6f2fb; }
.nk-win[data-theme="claro"] .nk-brand span { color: var(--nk-text); }
.nk-handle {
  position: absolute; left: 50%; top: -2px;
  width: 96px; height: 7px; margin-left: -48px;
  border-radius: 0 0 6px 6px;
  background: var(--nk-text-3);
  opacity: .9;
}
.nk-help-pill {
  height: 30px;
  display: flex; align-items: center; gap: 7px;
  padding: 0 10px;
  margin-right: 6px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--nk-text-2);
}
.nk-help-pill .nk-i { width: 15px; height: 12px; color: var(--nk-accent); }
.nk-help-pill:hover, .nk-help-pill[aria-expanded="true"] { background: var(--nk-bg-3); color: var(--nk-text); }
.nk-tb-sep { width: 1px; height: 18px; background: var(--nk-line-2); margin: 0 8px; }

/* minimize / maximize feedback */
.nk-win.is-bump-min { animation: nk-bump-min .5s cubic-bezier(.3, .7, .3, 1); }
.nk-win.is-bump-max { animation: nk-bump-max .45s cubic-bezier(.3, .7, .3, 1); }
@keyframes nk-bump-min { 40% { transform: translateY(10px) scale(.95); opacity: .55; } }
@keyframes nk-bump-max { 40% { transform: scale(1.012); } }

/* ==========================================================================
   Body: sidebar + main
   ========================================================================== */
.nk-body { flex: 1; min-height: 0; display: flex; }

.nk-sidebar {
  width: 267px;
  flex: none;
  border-right: 1px solid var(--nk-line);
  overflow: hidden;
  transition: width .22s cubic-bezier(.3, .7, .3, 1), border-color .22s;
}
.nk-body.is-collapsed .nk-sidebar { width: 0; border-right-color: transparent; }
.nk-side-inner { width: 266px; height: 100%; display: flex; flex-direction: column; }

.nk-newchat {
  margin: 8px 12px 0;
  height: 34px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--nk-bg-3);
  border: 1px solid var(--nk-line-2);
  border-radius: 8px;
  font-size: 13px;
  color: var(--nk-text);
  transition: background .12s;
}
.nk-newchat:hover { background: var(--nk-bg-4); }
.nk-newchat .nk-i { width: 15px; height: 15px; color: var(--nk-accent-text); }

.nk-search {
  margin: 9px 12px 0;
  height: 33px;
  display: flex; align-items: center; gap: 8px;
  padding: 0 10px;
  background: var(--nk-bg-1);
  border: 1px solid var(--nk-line-soft);
  border-radius: 8px;
  color: var(--nk-text-3);
  cursor: text;
}
.nk-search .nk-i { width: 13px; height: 13px; }
.nk-search:focus-within { border-color: var(--nk-accent-line); }
.nk-search input {
  flex: 1; min-width: 0;
  background: none; border: 0; outline: none;
  font-size: 12.5px; color: var(--nk-text);
}
.nk-search input::placeholder { color: var(--nk-text-3); }
.nk-search input::-webkit-search-cancel-button { filter: grayscale(1) opacity(.5); }

.nk-convs { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 12px 12px; }
.nk-conv-group + .nk-conv-group { margin-top: 12px; }
.nk-conv-label {
  padding: 6px 7px 4px;
  font-size: 10.5px;
  letter-spacing: .03em;
  color: var(--nk-text-3);
}
.nk-conv {
  width: 100%;
  height: 30px;
  display: block;
  padding: 0 7px;
  border-radius: 7px;
  text-align: left;
  font-size: 13px;
  color: var(--nk-text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background .12s, color .12s;
}
.nk-conv:hover { background: var(--nk-bg-1); color: var(--nk-text); }
.nk-conv.is-active { background: var(--nk-bg-3); color: var(--nk-text); }
.nk-conv-empty { padding: 14px 7px; font-size: 12.5px; color: var(--nk-text-3); }

.nk-side-settings {
  height: 62px; flex: none;
  display: flex; align-items: center; gap: 11px;
  padding: 0 14px;
  border-top: 1px solid var(--nk-line-soft);
  text-align: left;
  transition: background .12s;
}
.nk-side-settings:hover { background: var(--nk-bg-1); }
.nk-side-settings-txt { display: flex; flex-direction: column; line-height: 1.3; }
.nk-side-settings-txt span { font-size: 13px; color: var(--nk-text); }
.nk-side-settings-txt small { font-size: 11.5px; color: var(--nk-text-3); }

.nk-tile {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--nk-bg-3);
  color: var(--nk-text-2);
}
.nk-tile.is-accent { background: var(--nk-accent-soft); color: var(--nk-accent-text); }
.nk-tile.is-lg { width: 44px; height: 44px; border-radius: 10px; }
.nk-tile.is-lg .nk-i { width: 20px; height: 20px; }
.nk-tile.is-xl { width: 48px; height: 48px; border-radius: 12px; }
.nk-tile.is-xl .nk-i { width: 20px; height: 20px; }

/* ---------- main ---------- */
.nk-main {
  position: relative;
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}
.nk-main.is-empty { justify-content: center; padding-bottom: 14px; }
.nk-hero { display: none; flex-direction: column; align-items: center; text-align: center; }
.nk-main.is-empty .nk-hero { display: flex; }
.nk-main.is-empty .nk-thread { display: none; }
.nk-main:not(.is-empty) .nk-suggestions { display: none; }

.nk-hero-cat {
  position: relative;
  width: 64px; height: 56px;
  border-radius: 6px;
}
.nk-hero-cat .nk-pixelcat { width: 64px; height: 56px; display: block; }
.nk-pixelcat .nk-cat-eyes { transform-box: fill-box; transform-origin: center; }
.nk-hero-cat.is-meow .nk-cat-eyes { animation: nk-blink .5s 2; }
@keyframes nk-blink { 0%, 100% { transform: scaleY(1); } 45%, 55% { transform: scaleY(.15); } }
.nk-miau {
  position: absolute; left: 62px; top: -16px;
  padding: 3px 9px;
  border-radius: 10px 10px 10px 2px;
  background: var(--nk-accent); color: var(--nk-accent-ink);
  font-size: 12px; font-weight: 600;
  opacity: 0; transform: translateY(6px) scale(.8);
  transition: opacity .15s, transform .2s cubic-bezier(.3, 1.6, .5, 1);
  pointer-events: none;
}
.nk-hero-cat.is-meow .nk-miau { opacity: 1; transform: none; }

.nk-hero-title { margin-top: 18px; font-size: 21px; font-weight: 600; letter-spacing: -.005em; color: var(--nk-text); }
.nk-hero-hint { margin-top: 5px; font-size: 12.5px; color: var(--nk-text-3); }

/* ---------- thread ---------- */
.nk-thread { flex: 1; min-height: 0; overflow-y: auto; padding: 0 24px; user-select: text; }
.nk-thread-inner {
  max-width: 780px; margin: 0 auto;
  padding: 26px 0 16px;
  display: flex; flex-direction: column; gap: 18px;
  font-size: calc(14px * var(--nk-text-scale));
}
.nk-msg-user { display: flex; justify-content: flex-end; }
.nk-bubble {
  max-width: 78%;
  padding: 9px 14px;
  border-radius: 16px 16px 4px 16px;
  background: var(--nk-bg-3);
  color: var(--nk-text);
  line-height: 1.5;
  white-space: pre-wrap; word-wrap: break-word;
}
.nk-bubble.is-cmd { font-family: var(--nk-mono); font-size: .9em; color: var(--nk-warn); }
.nk-bubble-att { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.nk-mention { color: var(--nk-accent-text); font-weight: 500; }

.nk-msg-ai { color: var(--nk-text); line-height: 1.62; }
.nk-md > * + * { margin-top: .7em; }
.nk-md ul, .nk-md ol { padding-left: 1.3em; }
.nk-md ul { list-style: disc; }
.nk-md ol { list-style: decimal; }
.nk-md li + li { margin-top: .25em; }
.nk-md li::marker { color: var(--nk-text-3); }
.nk-md strong { font-weight: 600; color: var(--nk-text); }
.nk-md em { color: var(--nk-text-2); }
.nk-md code {
  font-family: var(--nk-mono);
  font-size: .86em;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--nk-bg-3);
  color: var(--nk-text);
}
.nk-code {
  border: 1px solid var(--nk-line-2);
  border-radius: 10px;
  overflow: hidden;
  background: var(--nk-bg-1);
}
.nk-code-head {
  height: 32px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 6px 0 12px;
  border-bottom: 1px solid var(--nk-line);
  font-size: 11.5px; color: var(--nk-text-3);
}
.nk-copy {
  height: 24px;
  display: flex; align-items: center; gap: 5px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11.5px; color: var(--nk-text-2);
}
.nk-copy .nk-i { width: 13px; height: 13px; }
.nk-copy:hover { background: var(--nk-bg-3); color: var(--nk-text); }
.nk-code pre { margin: 0; padding: 12px 14px; overflow-x: auto; }
.nk-code code {
  padding: 0; background: none; border-radius: 0;
  font-family: var(--nk-mono); font-size: calc(12.5px * var(--nk-text-scale)); line-height: 1.6;
  color: #d8d8d8; white-space: pre;
}
.nk-win[data-theme="claro"] .nk-code code { color: #2b2733; }
.nk-caret {
  display: inline-block; width: 7px; height: 1.05em;
  margin-left: 2px; vertical-align: -2px;
  background: var(--nk-accent);
  border-radius: 1px;
  animation: nk-caret 1s steps(1) infinite;
}
@keyframes nk-caret { 50% { opacity: 0; } }

.nk-msg-foot {
  display: flex; align-items: center; gap: 6px;
  margin-top: 8px;
  font-size: 11.5px; color: var(--nk-text-3);
}
.nk-msg-foot:empty { display: none; }
.nk-stopped { color: var(--nk-warn); }
.nk-demo-tag {
  margin-left: 4px;
  padding: 0 6px;
  border: 1px solid var(--nk-line-2);
  border-radius: 999px;
  font-size: 10px; line-height: 16px;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--nk-text-3);
}

/* agent steps */
.nk-steps { margin-bottom: 10px; }
.nk-steps-head {
  display: inline-flex; align-items: center; gap: 7px;
  height: 26px;
  padding: 0 8px 0 6px;
  margin-left: -6px;
  border-radius: 7px;
  font-size: 12.5px; color: var(--nk-text-3);
}
.nk-steps-head:hover { background: var(--nk-bg-1); color: var(--nk-text-2); }
.nk-steps-head .nk-i { width: 14px; height: 14px; }
.nk-steps-ic { color: var(--nk-accent-text); display: grid; }
.nk-steps-label { color: var(--nk-text-2); }
.nk-steps.is-running .nk-steps-label { color: var(--nk-text); }
.nk-steps-head > .nk-i:last-child { transition: transform .15s; color: var(--nk-text-3); }
.nk-steps.is-open .nk-steps-head > .nk-i:last-child { transform: rotate(90deg); }
.nk-steps-list {
  display: none;
  margin: 6px 0 2px 7px;
  padding: 2px 0 2px 16px;
  border-left: 1px solid var(--nk-line-2);
  list-style: none;
}
.nk-steps.is-open .nk-steps-list { display: block; }
.nk-step {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 4px 0;
  font-size: 12.5px; color: var(--nk-text-2);
}
.nk-step.is-new { animation: nk-rise .28s ease both; }
.nk-step-ic { color: var(--nk-text-3); padding-top: 1px; }
.nk-step-ic .nk-i { width: 14px; height: 14px; }
.nk-step:not(.is-done) .nk-step-ic { color: var(--nk-accent-text); }
.nk-step-txt { display: flex; flex-direction: column; min-width: 0; }
.nk-step-detail { font-size: 12px; color: var(--nk-text-3); }
.nk-step-detail.is-mono { font-family: var(--nk-mono); font-size: 11.5px; }
@keyframes nk-rise { from { opacity: 0; transform: translateY(4px); } }

/* terminal block */
.nk-term {
  border: 1px solid color-mix(in srgb, var(--nk-warn) 28%, var(--nk-line-2));
  border-radius: 10px;
  background: #0c0c0c;
  overflow: hidden;
}
.nk-win[data-theme="claro"] .nk-term { background: #1b1a1f; }
.nk-term.is-new { animation: nk-rise .25s ease both; }
.nk-term-head {
  height: 32px;
  display: flex; align-items: center; gap: 8px;
  padding: 0 10px 0 12px;
  border-bottom: 1px solid #1f1f1f;
  font-size: 11.5px; color: #8d8d8d;
}
.nk-term-head .nk-i { width: 14px; height: 14px; color: var(--nk-warn); }
.nk-term-path { font-family: var(--nk-mono); font-size: 11px; color: #6b6b6b; }
.nk-term-head .nk-demo-tag { margin-left: auto; border-color: #2a2a2a; color: #6b6b6b; }
.nk-term pre { margin: 0; padding: 10px 14px 12px; overflow-x: auto; }
.nk-term code { font-family: var(--nk-mono); font-size: calc(12px * var(--nk-text-scale)); line-height: 1.55; color: #d4d4d4; white-space: pre; }
.nk-term-prompt { color: var(--nk-warn); }

/* ---------- composer dock ---------- */
.nk-dock {
  flex: none;
  width: 100%;
  max-width: 828px;
  margin: 0 auto;
  padding: 22px 24px 0;
}
.nk-main:not(.is-empty) .nk-dock { padding: 6px 24px 14px; }
.nk-composer {
  position: relative;
  background: var(--nk-bg-2);
  border: 1px solid var(--nk-accent-line);
  border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.nk-composer:focus-within { border-color: color-mix(in srgb, var(--nk-accent) 55%, var(--nk-bg-2)); }
.nk-composer.is-terminal { border-color: color-mix(in srgb, var(--nk-warn) 60%, var(--nk-bg-2)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--nk-warn) 10%, transparent); }
.nk-composer.is-listening { border-color: var(--nk-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--nk-accent) 16%, transparent); }

.nk-attachments { display: none; flex-wrap: wrap; gap: 6px; padding: 12px 14px 0; }
.nk-attachments.has-items { display: flex; }
.nk-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 6px 0 8px;
  border: 1px solid var(--nk-line-2);
  border-radius: 7px;
  background: var(--nk-bg-3);
  font-size: 12px; color: var(--nk-text-2);
}
.nk-chip .nk-i { width: 13px; height: 13px; color: var(--nk-accent-text); }
.nk-chip button { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; color: var(--nk-text-3); }
.nk-chip button:hover { background: var(--nk-bg-4); color: var(--nk-text); }
.nk-chip button .nk-i { width: 12px; height: 12px; color: inherit; }

.nk-composer textarea {
  display: block;
  width: 100%;
  min-height: 56px;
  max-height: 180px;
  resize: none;
  padding: 16px 18px 8px;
  background: none;
  border: 0;
  outline: none;
  font-size: calc(14.5px * var(--nk-text-scale));
  line-height: 21px;
  color: var(--nk-text);
}
.nk-composer textarea::placeholder { color: var(--nk-text-3); }
.nk-composer.is-terminal textarea { font-family: var(--nk-mono); font-size: calc(13px * var(--nk-text-scale)); color: var(--nk-warn); }

.nk-toolbar {
  height: 42px;
  display: flex; align-items: center; gap: 2px;
  padding: 0 13px 6px 13px;
}
.nk-tool {
  height: 28px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 7px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--nk-text-2);
  white-space: nowrap;
  transition: background .12s, color .12s;
}
.nk-tool:hover, .nk-tool[aria-expanded="true"] { background: var(--nk-bg-3); color: var(--nk-text); }
.nk-tool > .nk-i:last-child:not(:first-child) { width: 11px; height: 11px; color: var(--nk-text-3); margin-left: -1px; }
.nk-tool-mode > .nk-i:first-child { width: 14px; height: 14px; color: var(--nk-accent-text); }
.nk-tool > .nk-i:first-child:not(:last-child) { width: 14px; height: 14px; }
.nk-tool-icon { width: 28px; padding: 0; justify-content: center; }
.nk-tool-icon .nk-i { width: 17px; height: 17px; color: inherit; }
.nk-tool[data-act="attach"] { margin-right: 6px; }
.nk-spacer { flex: 1; }

.nk-term-badge {
  display: none; align-items: center; gap: 5px;
  height: 24px; padding: 0 8px; margin-right: 4px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--nk-warn) 12%, transparent);
  color: var(--nk-warn);
  font-size: 11.5px; font-family: var(--nk-mono);
}
.nk-term-badge .nk-i { width: 13px; height: 13px; }
.nk-composer.is-terminal .nk-term-badge { display: inline-flex; }

.nk-mic.is-listening { color: var(--nk-accent-text); background: var(--nk-accent-soft); animation: nk-pulse 1s ease-in-out infinite; }
@keyframes nk-pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--nk-accent) 18%, transparent); } }

.nk-ctx {
  display: flex; align-items: center; gap: 6px;
  margin: 0 8px 0 6px;
  font-size: 12px; color: var(--nk-text-2);
}
.nk-ctx svg { width: 18px; height: 18px; transform: rotate(-90deg); }
.nk-ctx circle { fill: none; stroke-width: 2; }
.nk-ctx-track { stroke: var(--nk-line-2); }
.nk-ctx-fill { stroke: var(--nk-accent); stroke-linecap: round; transition: stroke-dashoffset .5s ease; }

.nk-send {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--nk-bg-3);
  color: var(--nk-text-3);
  transition: background .15s, color .15s, transform .1s;
}
.nk-send .nk-i { width: 16px; height: 16px; }
.nk-send.is-ready { background: var(--nk-accent); color: var(--nk-accent-ink); }
.nk-send.is-ready:hover { filter: brightness(1.06); }
.nk-send:active { transform: scale(.94); }
.nk-composer.is-running .nk-send { background: var(--nk-text); color: var(--nk-bg); }

.nk-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px;
  padding: 0 12px;
  font-size: 13px; color: var(--nk-text-2);
}
.nk-main:not(.is-empty) .nk-meta { margin-top: 8px; font-size: 12px; }
.nk-user { display: flex; align-items: center; gap: 9px; }
.nk-avatar {
  width: 16px; height: 16px;
  display: grid; place-items: center;
  border-radius: 4px;
  background: #5c5c5c; color: #fff;
  font-size: 10px; font-weight: 700;
}
.nk-suggestions { margin-top: 16px; }
.nk-sugg {
  width: 100%;
  height: 35px;
  display: flex; align-items: center; gap: 16px;
  padding: 0 10px;
  border-radius: 8px;
  text-align: left;
  font-size: 13px; color: var(--nk-text-2);
  transition: background .12s, color .12s;
}
.nk-sugg .nk-i { color: #666; }
.nk-sugg:hover { background: var(--nk-bg-1); color: var(--nk-text); }
.nk-sugg:hover .nk-i { color: var(--nk-accent-text); }

/* ==========================================================================
   Popovers, menus, picker, toasts
   ========================================================================== */
.nk-layer { position: absolute; inset: 0; pointer-events: none; z-index: 40; }
.nk-pop {
  position: absolute;
  pointer-events: auto;
  min-width: 200px;
  padding: 6px;
  background: var(--nk-bg-2);
  border: 1px solid var(--nk-line-2);
  border-radius: 12px;
  box-shadow: var(--nk-shadow);
  animation: nk-pop .14s ease-out both;
}
@keyframes nk-pop { from { opacity: 0; transform: translateY(4px) scale(.98); } }
.nk-menu-title { padding: 6px 10px 6px; font-size: 11px; letter-spacing: .03em; color: var(--nk-text-3); }
.nk-menu-item {
  width: 100%;
  min-height: 34px;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  text-align: left;
}
.nk-menu-item:hover, .nk-menu-item:focus-visible { background: var(--nk-bg-3); outline: none; }
.nk-menu-ic { color: var(--nk-text-2); display: grid; }
.nk-menu-txt { flex: 1; display: flex; flex-direction: column; }
.nk-menu-label { font-size: 13px; color: var(--nk-text); }
.nk-menu-hint { font-size: 11.5px; color: var(--nk-text-3); }
.nk-menu-check { width: 16px; color: var(--nk-accent-text); }
.nk-pop-menu { min-width: 250px; }

/* trigger menus (/ and @) */
.nk-pop-trig { width: 420px; }
.nk-trig-item {
  display: flex; align-items: center; gap: 10px;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  cursor: pointer;
}
.nk-trig-item.is-active { background: var(--nk-bg-3); }
.nk-trig-item.is-active .nk-menu-ic { color: var(--nk-accent-text); }
.nk-trig-main { font-family: var(--nk-mono); font-size: 12.5px; color: var(--nk-text); }
.nk-trig-sub { margin-left: auto; font-size: 12px; color: var(--nk-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nk-trig-foot { padding: 7px 10px 3px; border-top: 1px solid var(--nk-line); margin-top: 4px; font-size: 11px; color: var(--nk-text-3); }

/* model picker */
.nk-pop-picker { width: 340px; padding: 0; overflow: hidden; }
.nk-picker-search {
  display: flex; align-items: center; gap: 8px;
  height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid var(--nk-line);
  color: var(--nk-text-3);
}
.nk-picker-search input { flex: 1; background: none; border: 0; outline: none; font-size: 13px; color: var(--nk-text); }
.nk-picker-search input::placeholder { color: var(--nk-text-3); }
.nk-picker-list { position: relative; max-height: 300px; overflow-y: auto; padding: 4px 6px 6px; }
.nk-picker-group { padding: 10px 8px 4px; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--nk-text-3); }
.nk-picker-opt {
  width: 100%;
  display: grid; grid-template-columns: 1fr 16px; grid-template-rows: auto auto;
  column-gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  text-align: left;
}
.nk-picker-opt.is-active, .nk-picker-opt:hover { background: var(--nk-bg-3); }
.nk-picker-name { font-size: 13px; color: var(--nk-text); }
.nk-picker-slug { grid-row: 2; font-family: var(--nk-mono); font-size: 10.5px; color: var(--nk-text-3); }
.nk-picker-opt .nk-menu-check { grid-row: 1 / 3; grid-column: 2; align-self: center; }
.nk-picker-empty { padding: 20px 12px; text-align: center; font-size: 12.5px; color: var(--nk-text-3); }
.nk-picker-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px;
  border-top: 1px solid var(--nk-line);
  font-size: 11px; color: var(--nk-text-3);
}
.nk-kbd, .nk-win kbd {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid var(--nk-line-2);
  border-radius: 6px;
  background: var(--nk-bg-3);
  font-family: inherit; font-size: 11.5px; line-height: 18px;
  color: var(--nk-text);
  white-space: nowrap;
}

/* help popover */
.nk-pop-help { width: 470px; padding: 14px 16px; }
.nk-helppop-head { display: flex; align-items: center; gap: 9px; }
.nk-helppop-head .nk-i { width: 18px; height: 14px; color: var(--nk-accent); }
.nk-helppop-head strong { font-size: 14px; font-weight: 600; }
.nk-helppop-head .nk-kbd { margin-left: auto; }
.nk-helppop-sub { margin-top: 4px; font-size: 12px; color: var(--nk-text-3); }
.nk-helppop-list { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; margin-top: 12px; }
.nk-helppop-list div { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 28px; font-size: 12px; color: var(--nk-text-2); }
.nk-helppop-list kbd { font-size: 11px; }
.nk-helppop-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--nk-line);
  font-size: 12px; color: var(--nk-text-3);
}
.nk-helppop-foot kbd { padding: 0 5px; font-size: 11px; line-height: 16px; }
.nk-helppop-foot a {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px;
  border-radius: 8px;
  background: var(--nk-accent-soft); color: var(--nk-accent-text);
  font-weight: 500;
}
.nk-helppop-foot a .nk-i { width: 14px; height: 14px; }
.nk-helppop-foot a .nk-i:last-child { width: 12px; height: 12px; }
.nk-helppop-foot a:hover { filter: brightness(1.15); }

/* confirm popover */
.nk-pop-confirm { width: 260px; padding: 14px; }
.nk-confirm p { font-size: 12.5px; color: var(--nk-text-2); line-height: 1.5; }
.nk-confirm strong { color: var(--nk-text); font-weight: 600; }
.nk-confirm-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* toasts */
.nk-toasts {
  position: absolute; right: 16px; bottom: 16px; z-index: 60;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  pointer-events: none;
}
.nk-toast {
  display: flex; align-items: center; gap: 9px;
  max-width: 420px;
  padding: 10px 14px;
  background: var(--nk-bg-3);
  border: 1px solid var(--nk-line-2);
  border-radius: 10px;
  box-shadow: var(--nk-shadow);
  font-size: 13px; color: var(--nk-text);
  animation: nk-toast-in .2s cubic-bezier(.3, .7, .3, 1) both;
}
.nk-toast .nk-i { color: var(--nk-accent-text); }
.nk-toast.is-warn .nk-i { color: var(--nk-warn); }
.nk-toast.is-leaving { animation: nk-toast-out .2s ease both; }
@keyframes nk-toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes nk-toast-out { to { opacity: 0; transform: translateX(10px); } }

/* ==========================================================================
   Settings modal
   ========================================================================== */
.nk-modal-host { position: absolute; inset: 0; z-index: 30; pointer-events: none; }
.nk-overlay {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, .6);
  pointer-events: auto;
  animation: nk-fade .15s ease both;
}
.nk-overlay[hidden] { display: none; }
.nk-overlay.is-closing { animation: nk-fade-out .14s ease both; }
@keyframes nk-fade { from { opacity: 0; } }
@keyframes nk-fade-out { to { opacity: 0; } }
.nk-win[data-theme="claro"] .nk-overlay { background: rgba(40, 30, 50, .28); }

.nk-modal {
  width: min(1140px, calc(100% - 48px));
  height: min(720px, calc(100% - 36px));
  display: grid;
  grid-template-columns: 235px 1fr;
  background: var(--nk-bg);
  border: 1px solid var(--nk-line-2);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  animation: nk-modal-in .18s cubic-bezier(.3, .7, .3, 1) both;
}
@keyframes nk-modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }

/* rail */
.nk-rail {
  position: relative;
  display: flex; flex-direction: column;
  padding: 16px 10px 0;
  background: var(--nk-bg-1);
  border-right: 1px solid var(--nk-line);
}
.nk-rail-head { display: flex; align-items: center; gap: 11px; padding: 0 8px; }
.nk-rail-head span:last-child { font-size: 16px; font-weight: 600; letter-spacing: -.005em; }
.nk-rail-tabs { display: flex; flex-direction: column; gap: 3px; margin-top: 22px; }
.nk-rail-item {
  position: relative;
  height: 48px;
  display: flex; align-items: center; gap: 11px;
  padding: 0 12px;
  border-radius: 10px;
  text-align: left;
  transition: background .12s;
}
.nk-rail-item:hover { background: var(--nk-bg-3); }
.nk-rail-item.is-active { background: var(--nk-bg-3); }
.nk-rail-item.is-active::before {
  content: "";
  position: absolute; left: 0; top: 13px; bottom: 13px;
  width: 3px; border-radius: 2px;
  background: var(--nk-accent);
}
.nk-rail-item.is-active .nk-tile { background: var(--nk-accent-soft); color: var(--nk-accent-text); }
.nk-rail-item .nk-tile { background: var(--nk-bg-3); }
.nk-rail-item:hover .nk-tile { background: var(--nk-bg-4); }
.nk-rail-item.is-active:hover .nk-tile { background: var(--nk-accent-soft); }
.nk-rail-txt { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.nk-rail-txt span { font-size: 14px; color: var(--nk-text); }
.nk-rail-txt small { font-size: 11.5px; color: var(--nk-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nk-rail-foot {
  margin-top: auto;
  height: 46px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px;
  font-size: 11.5px; color: var(--nk-text-3);
}
.nk-rail-ver { display: flex; align-items: center; gap: 8px; }
.nk-rail-ver .nk-pixelcat { width: 14px; height: 12px; }

/* pane */
.nk-pane { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.nk-pane-head { padding: 18px 64px 0 26px; flex: none; }
.nk-pane-title { font-size: 17px; font-weight: 600; letter-spacing: -.005em; }
.nk-pane-sub { margin-top: 1px; font-size: 12.5px; color: var(--nk-text-3); }
.nk-x {
  position: absolute; right: 18px; top: 18px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 8px;
  color: var(--nk-text-2);
}
.nk-x:hover { background: var(--nk-bg-3); color: var(--nk-text); }
.nk-pane-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 26px 26px; user-select: text; }
.nk-pane-foot {
  flex: none;
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 26px;
  border-top: 1px solid var(--nk-line);
  background: var(--nk-bg);
}
.nk-pane-foot[hidden] { display: none; }

/* sections, cards, rows */
.nk-sections { max-width: 664px; }
.nk-sec + .nk-sec, .nk-about + .nk-sec { margin-top: 24px; }
.nk-sec h4 { font-size: 14px; font-weight: 600; color: var(--nk-text); }
.nk-sec-sub { margin: 2px 0 10px; font-size: 12.5px; color: var(--nk-text-3); }
.nk-card {
  background: var(--nk-bg-1);
  border: 1px solid var(--nk-line);
  border-radius: 12px;
}
.nk-card-pad { padding: 16px 18px; }
.nk-row {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  min-height: 62px;
  padding: 12px 18px;
}
.nk-row + .nk-row { border-top: 1px solid var(--nk-line); }
.nk-row-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nk-row-txt > span { font-size: 13.5px; color: var(--nk-text); }
.nk-row-txt small { font-size: 12px; color: var(--nk-text-3); }
.nk-row.is-credit { min-height: 42px; }
.nk-row.is-credit > span { font-size: 13.5px; color: var(--nk-text); }
.nk-row.is-credit small { font-size: 12px; color: var(--nk-text-3); text-align: right; }
.nk-row-flat { display: flex; align-items: center; justify-content: space-between; }
.nk-status { display: inline-flex; align-items: center; gap: 9px; }
.nk-status .nk-i { width: 16px; height: 16px; color: var(--nk-accent-text); }
.nk-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--nk-text-3); display: inline-block; }
.nk-dot.is-ok { background: var(--nk-ok); }
.nk-dot.is-warn { background: var(--nk-warn); }

/* switch */
.nk-switch {
  position: relative;
  width: 40px; height: 22px; flex: none;
  border-radius: 999px;
  border: 1.5px solid #8b8b8b;
  background: var(--nk-bg-3);
  transition: background .15s, border-color .15s;
}
.nk-switch span {
  position: absolute; top: 3px; left: 3px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #a3a3a3;
  transition: transform .18s cubic-bezier(.3, .7, .3, 1), background .15s;
}
.nk-switch[aria-checked="true"] { background: var(--nk-accent); border-color: var(--nk-accent); }
.nk-switch[aria-checked="true"] span { transform: translateX(18px); background: var(--nk-accent-ink); }

/* segmented control */
.nk-seg {
  display: flex; gap: 2px;
  padding: 3px;
  border-radius: 9px;
  background: var(--nk-bg-2);
  border: 1px solid var(--nk-line-2);
}
.nk-seg button { height: 30px; padding: 0 13px; border-radius: 7px; font-size: 13px; color: var(--nk-text-2); }
.nk-seg button:hover { color: var(--nk-text); }
.nk-seg button[aria-checked="true"] { background: var(--nk-bg-4); color: var(--nk-text); }

/* inputs */
.nk-input {
  width: 100%;
  height: 34px;
  padding: 0 11px;
  background: var(--nk-bg-input);
  border: 1px solid var(--nk-line-input);
  border-radius: 6px;
  outline: none;
  font-size: 13.5px;
  color: var(--nk-text);
  transition: border-color .12s, box-shadow .12s;
}
.nk-input::placeholder { color: var(--nk-text-3); }
.nk-input:focus { border-color: var(--nk-accent-line); box-shadow: 0 0 0 3px color-mix(in srgb, var(--nk-accent) 14%, transparent); }
.nk-input.is-mono { font-family: var(--nk-mono); font-size: 12.5px; }
.nk-input[readonly] { color: var(--nk-text-2); }
.nk-masked:not(:placeholder-shown) { -webkit-text-security: disc; }
select.nk-input { appearance: none; padding-right: 34px; cursor: pointer; }
.nk-select-wrap { position: relative; display: block; }
.nk-select-wrap .nk-i { position: absolute; right: 11px; top: 50%; margin-top: -7px; width: 14px; height: 14px; color: var(--nk-text-2); pointer-events: none; }
.nk-label { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--nk-text-2); }
.nk-label.is-strong { font-size: 13.5px; font-weight: 600; color: var(--nk-text); }
.nk-label-sm { margin: 18px 0 8px; font-size: 12.5px; color: var(--nk-text-2); }
.nk-form { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.nk-form + .nk-form, .nk-form + .nk-collapse, .nk-prov-head + .nk-form, .nk-prov-head + .nk-card { margin-top: 14px; }
.nk-help { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--nk-text-3); }
.nk-help .nk-i { width: 13px; height: 13px; }
.nk-inline-form { display: flex; gap: 10px; margin-top: 12px; }
.nk-saved { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12px; color: var(--nk-ok); }
.nk-saved .nk-i { width: 13px; height: 13px; }
.nk-saved[hidden] { display: none; }
.nk-key-row { display: flex; gap: 6px; align-items: center; }
.nk-icon-btn {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  border-radius: 8px;
  color: var(--nk-text-2);
}
.nk-icon-btn:hover { background: var(--nk-bg-3); color: var(--nk-text); }
.nk-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--nk-accent-text);
}
.nk-link .nk-i { width: 13px; height: 13px; }
.nk-link:hover { text-decoration: underline; }

/* buttons */
.nk-btn {
  height: 32px; flex: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--nk-line-2);
  border-radius: 8px;
  background: var(--nk-bg-3);
  font-size: 13px; color: var(--nk-text);
  white-space: nowrap;
  transition: background .12s, filter .12s, opacity .12s;
}
.nk-btn .nk-i { width: 15px; height: 15px; }
.nk-btn:hover { background: var(--nk-bg-4); }
.nk-btn:disabled { opacity: .45; }
.nk-btn.is-primary {
  border-color: transparent;
  background: linear-gradient(180deg, color-mix(in srgb, var(--nk-accent) 92%, #fff), color-mix(in srgb, var(--nk-accent) 88%, #6a2a50));
  color: #2a1420;
  font-weight: 500;
}
.nk-btn.is-primary:hover { filter: brightness(1.05); }
.nk-btn.is-soft { background: color-mix(in srgb, var(--nk-accent) 42%, var(--nk-bg-2)); border-color: transparent; color: #f5e9ef; }
.nk-win[data-theme="claro"] .nk-btn.is-soft { color: #2a1420; }
.nk-btn.is-danger { background: var(--nk-danger-bg); color: var(--nk-danger-text); }
.nk-btn.is-danger:hover { filter: brightness(1.15); }
.nk-btn.is-danger-solid { background: #b4374f; border-color: transparent; color: #fff; }
.nk-btn.is-ghost { background: transparent; color: var(--nk-text-2); }
.nk-btn.is-ghost:hover:not(:disabled) { background: var(--nk-bg-3); color: var(--nk-text); }
.nk-btn.is-block { width: 100%; height: 34px; }
.nk-btn.is-text { border-color: transparent; background: transparent; color: var(--nk-text-2); justify-content: flex-start; padding: 0 8px; }
.nk-btn.is-text:hover { color: var(--nk-text); background: var(--nk-bg-3); }
.nk-actions { display: flex; gap: 10px; margin-top: 18px; }
.nk-actions.is-end { justify-content: flex-end; margin-top: 4px; }
.nk-demo-note {
  display: flex; align-items: center; gap: 7px;
  margin-top: 14px;
  font-size: 12px; color: var(--nk-text-3);
}
.nk-demo-note .nk-i { width: 13px; height: 13px; color: var(--nk-accent-text); }

.nk-badge {
  height: 26px; flex: none;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--nk-bg-3);
  font-size: 12.5px; color: var(--nk-text-2);
}
.nk-badge.is-ok { background: rgba(123, 216, 143, .13); color: var(--nk-ok); }
.nk-pill { padding: 2px 8px; border-radius: 6px; background: var(--nk-bg-3); font-size: 12px; color: var(--nk-text-2); }

/* --- Geral --- */
/* (uses rows/cards above) */

/* --- Aparência --- */
.nk-themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.nk-theme {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px;
  border: 1px solid var(--nk-line);
  border-radius: 12px;
  background: var(--nk-bg-1);
  text-align: left;
  transition: border-color .12s;
}
.nk-theme:hover { border-color: var(--nk-line-2); }
.nk-theme[aria-checked="true"] { border-color: var(--nk-accent); box-shadow: 0 0 0 1px var(--nk-accent); }
.nk-theme-prev {
  position: relative;
  height: 86px;
  margin-bottom: 8px;
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 30% 1fr;
  grid-template-rows: 1fr 1fr;
  border: 1px solid rgba(128, 128, 128, .25);
}
.nk-theme-prev i { grid-row: 1 / 3; border-right: 1px solid rgba(128, 128, 128, .22); }
.nk-theme-prev b { margin: 10px 12px 0; height: 8px; border-radius: 4px; opacity: .65; }
.nk-theme-prev b + b { margin-top: 2px; width: 50%; }
.nk-theme-prev em { position: absolute; left: 38%; right: 10px; bottom: 10px; height: 16px; border-radius: 5px; border: 1px solid var(--nk-accent); }
.nk-theme-prev.is-preto { background: #0a0a0a; } .nk-theme-prev.is-preto i { background: #0f0f0f; } .nk-theme-prev.is-preto b { background: #3a3a3a; }
.nk-theme-prev.is-escuro { background: #1d1d21; } .nk-theme-prev.is-escuro i { background: #232328; } .nk-theme-prev.is-escuro b { background: #4a4a52; }
.nk-theme-prev.is-claro { background: #f7f6f8; } .nk-theme-prev.is-claro i { background: #ecebef; } .nk-theme-prev.is-claro b { background: #c6c2cc; }
.nk-theme-name { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; color: var(--nk-text); }
.nk-theme-name .nk-i { width: 15px; height: 15px; color: var(--nk-accent-text); }
.nk-theme small { font-size: 11.5px; color: var(--nk-text-3); }
.nk-swatches { display: flex; gap: 14px; flex-wrap: wrap; }
.nk-swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 58px; padding: 4px 0; border-radius: 10px; }
.nk-swatch span { width: 30px; height: 30px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2); transition: box-shadow .12s, transform .12s; }
.nk-swatch:hover span { transform: scale(1.06); }
.nk-swatch[aria-checked="true"] span { box-shadow: 0 0 0 2px var(--nk-bg-1), 0 0 0 4px var(--sw); }
.nk-swatch small { font-size: 11.5px; color: var(--nk-text-2); }
.nk-range-row { display: flex; align-items: center; gap: 14px; }
.nk-range-a { color: var(--nk-text-2); font-weight: 600; }
.nk-range-a.is-sm { font-size: 12px; } .nk-range-a.is-lg { font-size: 18px; }
.nk-range { flex: 1; accent-color: var(--nk-accent); }
.nk-range-val { width: 46px; text-align: right; font-size: 13px; color: var(--nk-text); font-variant-numeric: tabular-nums; }

/* --- Instruções --- */
.nk-pilltabs { display: flex; gap: 6px; margin-bottom: 12px; }
.nk-pilltabs button {
  height: 32px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 13.5px; color: var(--nk-text-2);
}
.nk-pilltabs button:hover { color: var(--nk-text); background: var(--nk-bg-1); }
.nk-pilltabs button[aria-selected="true"] { background: var(--nk-accent-soft); color: var(--nk-text); }
.nk-pilltabs .nk-i { width: 15px; height: 15px; }
.nk-ta-head { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 8px; }
.nk-ta-head label { font-size: 14px; font-weight: 600; color: var(--nk-text); }
.nk-ta-head small { font-size: 12px; color: var(--nk-text-3); }
.nk-textarea {
  display: block;
  width: 100%;
  height: 112px;
  resize: none;
  padding: 10px 12px;
  background: var(--nk-bg-1);
  border: 1px solid var(--nk-line-2);
  border-radius: 6px;
  outline: none;
  font-size: 13.5px; line-height: 1.5;
}
.nk-textarea:focus { border-color: var(--nk-accent-line); }
.nk-instr .nk-help { margin-top: 6px; padding-left: 2px; }
.nk-instr-fields.is-off .nk-textarea, .nk-instr-fields.is-off .nk-chips { opacity: .45; }
.nk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.nk-chip-btn {
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  background: var(--nk-bg-1);
  font-size: 13px; color: var(--nk-text-2);
  transition: background .12s, color .12s;
}
.nk-chip-btn:hover { background: var(--nk-bg-3); color: var(--nk-text); }

/* --- Provedores --- */
.nk-prov { display: grid; grid-template-columns: 224px 1fr; gap: 12px; height: 100%; min-height: 0; }
.nk-pane[data-tab="provedores"] .nk-pane-body,
.nk-pane[data-tab="mcp"] .nk-pane-body { overflow: hidden; padding-left: 24px; padding-right: 24px; padding-bottom: 20px; }
.nk-prov-side { display: flex; flex-direction: column; min-height: 0; }
.nk-field-search {
  height: 36px; flex: none;
  display: flex; align-items: center; gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--nk-line);
  border-radius: 10px;
  background: var(--nk-bg-1);
  color: var(--nk-text-3);
  cursor: text;
}
.nk-field-search:focus-within { border-color: var(--nk-accent-line); }
.nk-field-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 13px; color: var(--nk-text); }
.nk-field-search input::placeholder { color: var(--nk-text-3); }
.nk-prov-list { flex: 1; min-height: 0; overflow-y: auto; margin-top: 12px; padding-right: 4px; }
.nk-group-label { padding: 12px 12px 6px; font-size: 10.5px; letter-spacing: .05em; color: var(--nk-text-3); }
.nk-group-label:first-child { padding-top: 6px; }
.nk-prov-item {
  width: 100%;
  height: 49px;
  display: flex; align-items: center; gap: 11px;
  padding: 0 8px;
  border-radius: 10px;
  text-align: left;
  transition: background .12s;
}
.nk-prov-item:hover { background: var(--nk-bg-3); }
.nk-prov-item.is-sel { background: var(--nk-accent-soft); }
.nk-prov-item .nk-dot { margin-left: auto; margin-right: 4px; }
.nk-prov-item.is-custom { margin-top: 10px; }
.nk-prov-item.is-custom .nk-prov-txt span { color: var(--nk-accent-text); }
.nk-prov-txt { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.nk-prov-txt span { font-size: 14px; color: var(--nk-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nk-prov-txt small { font-size: 12px; color: var(--nk-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nk-ptile {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--nk-bg-3);
  border: 1px solid var(--nk-line-2);
  font-size: 11.5px; font-weight: 600; letter-spacing: -.01em;
  color: var(--nk-text);
}
.nk-ptile.is-color { background: var(--c); border-color: transparent; color: #f2f5f8; font-size: 14px; }
.nk-ptile.is-plus { border-radius: 50%; background: transparent; border: 1px solid var(--nk-text-3); color: var(--nk-text); }
.nk-ptile.is-lg { width: 52px; height: 52px; border-radius: 12px; font-size: 18px; }
.nk-ptile.is-lg.is-plus { border-radius: 50%; }
.nk-ptile.is-lg .nk-i { width: 22px; height: 22px; }

.nk-prov-detail {
  min-height: 0;
  overflow-y: auto;
  padding: 22px 26px 24px;
  background: var(--nk-bg-1);
  border: 1px solid var(--nk-line);
  border-radius: 14px;
}
.nk-prov-detail .nk-card { background: var(--nk-bg-2); }
.nk-prov-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.nk-prov-head-txt { flex: 1; min-width: 0; }
.nk-prov-head h4 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.nk-prov-head p { font-size: 12.5px; color: var(--nk-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nk-collapse {
  display: inline-flex; align-items: center; gap: 7px;
  height: 30px;
  margin-top: 12px;
  font-size: 13px; color: var(--nk-text-2);
}
.nk-collapse:hover { color: var(--nk-text); }
.nk-collapse .nk-i { width: 13px; height: 13px; transition: transform .15s; }
.nk-collapse[aria-expanded="false"] .nk-i { transform: rotate(-90deg); }
.nk-collapse + .nk-card { margin-top: 8px; }
.nk-collapse + .nk-card[hidden] { display: none; }

/* --- MCP --- */
.nk-mcp { display: grid; grid-template-columns: 214px 1fr; gap: 12px; height: 100%; min-height: 0; }
.nk-mcp-side { display: flex; flex-direction: column; min-height: 0; }
.nk-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 46px 12px 0; }
.nk-empty .nk-tile { margin-bottom: 10px; }
.nk-empty strong { font-size: 13.5px; font-weight: 600; }
.nk-empty small { font-size: 12.5px; color: var(--nk-text-3); }
.nk-mcp-list { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.nk-mcp-item {
  display: flex; align-items: center; gap: 11px;
  min-height: 48px;
  padding: 0 4px 0 12px;
  border-radius: 10px;
  background: var(--nk-bg-1);
  border: 1px solid var(--nk-line);
}
.nk-mcp-item .nk-icon-btn { margin-left: auto; }
.nk-mcp-btns { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: 12px; }
.nk-mcp-card {
  min-height: 0;
  overflow-y: auto;
  padding: 24px 26px;
  background: var(--nk-bg-1);
  border: 1px solid var(--nk-line);
  border-radius: 14px;
}
.nk-mcp-card .nk-card { background: var(--nk-bg-2); margin-top: 20px; }
.nk-mcp-head { display: flex; align-items: flex-start; gap: 16px; }
.nk-mcp-head > div { flex: 1; }
.nk-mcp-head h4 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.nk-mcp-head p { font-size: 12.5px; color: var(--nk-text-2); max-width: 420px; }
.nk-mcp-sugg { display: grid; grid-template-columns: repeat(2, minmax(0, 196px)); gap: 9px; }
.nk-sugg-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 11px 12px;
  border: 1px solid var(--nk-line-2);
  border-radius: 9px;
  background: var(--nk-bg-2);
  text-align: left;
  transition: border-color .12s, background .12s;
}
.nk-sugg-card:hover { border-color: var(--nk-accent-line); background: var(--nk-bg-3); }
.nk-sugg-title { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--nk-text); }
.nk-sugg-title .nk-i { width: 14px; height: 14px; color: var(--nk-text-2); }
.nk-sugg-card small { font-size: 12px; line-height: 1.35; color: var(--nk-text-3); }
.nk-radios { display: flex; gap: 18px; margin-top: -6px; }
.nk-radio { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--nk-text); }
.nk-radio span { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--nk-text-2); position: relative; }
.nk-radio[aria-checked="true"] span { border-color: var(--nk-accent); }
.nk-radio[aria-checked="true"] span::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--nk-accent); }

/* --- Sobre --- */
.nk-about { display: flex; gap: 20px; align-items: flex-start; padding: 20px 22px; }
.nk-about-icon { width: 84px; height: 84px; flex: none; }
.nk-about-name { display: flex; align-items: center; gap: 12px; }
.nk-about-name strong { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.nk-about-txt p { margin-top: 4px; font-size: 13px; color: var(--nk-text-2); line-height: 1.45; }
.nk-about-by { color: var(--nk-text-3); margin-top: 8px; }
.nk-about-by span { color: var(--nk-accent-text); font-weight: 600; }
.nk-shortcuts { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; padding: 10px 18px; }
.nk-sc { display: flex; align-items: center; justify-content: space-between; height: 33px; font-size: 13px; color: var(--nk-text-2); }
.nk-about-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.nk-about-cta p { font-size: 12px; color: var(--nk-text-3); }

/* ==========================================================================
   Narrow logical window (phones): window is narrower, sidebar collapsed
   ========================================================================== */
.nk-win.is-narrow .nk-help-pill span { display: none; }
.nk-win.is-narrow .nk-modal { grid-template-columns: 76px 1fr; }
.nk-win.is-narrow .nk-rail-txt, .nk-win.is-narrow .nk-rail-head span:last-child, .nk-win.is-narrow .nk-rail-foot span:last-child { display: none; }
.nk-win.is-narrow .nk-rail-item { justify-content: center; padding: 0; }
.nk-win.is-narrow .nk-rail-head { justify-content: center; padding: 0; }
.nk-win.is-narrow .nk-prov, .nk-win.is-narrow .nk-mcp { grid-template-columns: 180px 1fr; }
.nk-win.is-narrow .nk-themes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nk-win.is-narrow .nk-pop-trig { width: 360px; }

/* ==========================================================================
   Reduced motion: no animations, instant state changes
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .nk-win, .nk-win *, .nk-win *::before, .nk-win *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .nk-caret { display: none; }
}
