.cn-staff { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; margin-inline-start: 4px; border-radius: 99px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: linear-gradient(135deg, var(--lg-a2), var(--lg-ai)); box-shadow: 0 4px 10px rgba(10, 102, 209, .25); white-space: nowrap; flex-shrink: 0; }

.cn-mods { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: -4px; }
.cn-mods-t { font-size: 12px; font-weight: 700; color: var(--lg-mute); letter-spacing: .02em; }
.cn-mod { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 99px; font-size: 12px; font-weight: 700; color: var(--lg-a2); background: rgba(255, 255, 255, .8); border: 1px solid var(--lg-line2); }
.cn-mod::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--lg-ok); box-shadow: 0 0 0 3px rgba(15, 157, 107, .14); }
.cn-mod-iot { color: #0a8aa6; }
.cn-mod-ai { color: var(--lg-ai); }
.cn-mod-asset { color: #9a5b00; }

.cn-ai-btn { position: absolute; z-index: 3; bottom: -18px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px 0 12px; border-radius: 99px; border: 1px solid rgba(13, 148, 136, .35); background: #fff; color: #0b6f66; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: 0 10px 24px rgba(13, 148, 136, .2); transition: transform .25s var(--lg-ease), box-shadow .25s, border-color .2s; white-space: nowrap; }
.cn-ai-btn svg { width: 17px; height: 17px; fill: var(--lg-ai); animation: lgBlink 2.4s ease-in-out infinite; }
.cn-ai-btn:hover, .cn-ai-btn:focus-visible { transform: translateX(-50%) translateY(-2px); box-shadow: 0 14px 30px rgba(13, 148, 136, .28); border-color: var(--lg-ai); outline: none; }
.cn-ai-btn[aria-expanded="true"] { background: linear-gradient(135deg, var(--lg-ai), #0b7fc4); color: #fff; border-color: transparent; }
.cn-ai-btn[aria-expanded="true"] svg { fill: #fff; }
.lg-busy .cn-ai-btn, .lg-success .cn-ai-btn { opacity: 0; pointer-events: none; transition: opacity .3s; }
.lg-fb { margin-top: 14px; }

.cn-ai { position: fixed; z-index: 20; inset-inline-end: 22px; bottom: 22px; width: min(380px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 120px)); display: flex; flex-direction: column; border-radius: 22px; background: rgba(255, 255, 255, .96); border: 1px solid var(--lg-line2); box-shadow: 0 30px 70px rgba(11, 31, 58, .22); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); overflow: hidden; animation: lgRise .35s var(--lg-ease); }
.cn-ai[hidden] { display: none; }
.cn-ai-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px 16px; border-bottom: 1px solid var(--lg-line); background: linear-gradient(135deg, rgba(13, 148, 136, .08), rgba(26, 140, 255, .06)); }
.cn-ai-ic { width: 34px; height: 34px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--lg-ai), var(--lg-a)); flex-shrink: 0; }
.cn-ai-ic svg { width: 17px; height: 17px; fill: #fff; }
.cn-ai-tt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cn-ai-tt strong { font-size: 14px; }
.cn-ai-tt span { font-size: 11.5px; color: var(--lg-mute); }
.cn-ai-x { width: 32px; height: 32px; border: 0; border-radius: 9px; background: transparent; color: var(--lg-mute); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cn-ai-x:hover, .cn-ai-x:focus-visible { background: rgba(26, 140, 255, .1); color: var(--lg-a2); outline: none; }
.cn-ai-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.cn-ai-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 140px; scroll-behavior: smooth; }
.cn-msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; font-size: 13.5px; line-height: 1.5; animation: lgRise .3s var(--lg-ease); white-space: pre-line; overflow-wrap: anywhere; }
.cn-msg-bot { align-self: flex-start; background: #f1f7fd; color: var(--lg-ink); border-end-start-radius: 5px; }
.cn-msg-me { align-self: flex-end; background: linear-gradient(135deg, var(--lg-a), var(--lg-a2)); color: #fff; border-end-end-radius: 5px; }
.cn-msg-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cn-msg-acts a { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border-radius: 99px; font-size: 12px; font-weight: 700; color: var(--lg-a2); background: #fff; border: 1px solid var(--lg-line2); text-decoration: none; }
.cn-msg-acts a:hover, .cn-msg-acts a:focus-visible { border-color: var(--lg-a); outline: none; }
.cn-typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; border-radius: 16px; background: #f1f7fd; }
.cn-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--lg-ai); animation: cnDot 1s ease-in-out infinite; }
.cn-typing i:nth-child(2) { animation-delay: .15s; }
.cn-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes cnDot { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-4px); opacity: 1; } }
.cn-ai-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.cn-ai-chips button { height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid rgba(13, 148, 136, .3); background: #fff; color: #0b6f66; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; transition: background .2s, border-color .2s, transform .2s; }
.cn-ai-chips button:hover, .cn-ai-chips button:focus-visible { background: rgba(13, 148, 136, .08); border-color: var(--lg-ai); transform: translateY(-1px); outline: none; }
.cn-ai-form { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--lg-line); }
.cn-ai-q { flex: 1; min-width: 0; height: 42px; padding: 0 14px; border-radius: 21px; border: 1px solid var(--lg-line2); background: var(--lg-field); font: inherit; font-size: 14px; color: var(--lg-ink); outline: none; }
.cn-ai-q:focus { border-color: var(--lg-a); background: #fff; box-shadow: 0 0 0 3px rgba(26, 140, 255, .14); }
.cn-ai-send { width: 42px; height: 42px; flex-shrink: 0; border: 0; border-radius: 50%; background: linear-gradient(135deg, var(--lg-ai), var(--lg-a)); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cn-ai-send svg { width: 18px; height: 18px; fill: #fff; }
[dir="rtl"] .cn-ai-send svg { transform: scaleX(-1); }
.cn-ai-send:focus-visible { outline: 3px solid rgba(26, 140, 255, .4); outline-offset: 2px; }

.cn-insight { list-style: none; margin: 2px 0 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 5px; }
.cn-insight[hidden] { display: none; }
.cn-insight li { display: flex; align-items: flex-start; gap: 7px; padding: 6px 10px; border-radius: 10px; font-size: 12px; line-height: 1.4; text-align: start; background: rgba(26, 140, 255, .07); color: var(--lg-ink2); animation: lgRise .4s var(--lg-ease) both; }
.cn-insight li:nth-child(2) { animation-delay: .12s; }
.cn-insight li:nth-child(3) { animation-delay: .24s; }
.cn-insight li:nth-child(4) { animation-delay: .36s; }
.cn-insight li::before { content: ''; width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; flex-shrink: 0; background: var(--lg-a); }
.cn-insight .cn-warn { background: rgba(154, 91, 0, .09); color: #6d4100; }
.cn-insight .cn-warn::before { background: #d48806; }
.cn-insight .cn-ok { background: rgba(15, 157, 107, .08); color: #0b6b4a; }
.cn-insight .cn-ok::before { background: var(--lg-ok); }
.cn-go { font-size: 12.5px; font-weight: 700; color: var(--lg-a2); text-decoration: none; }
.cn-go[hidden] { display: none; }
.cn-go:hover, .cn-go:focus-visible { text-decoration: underline; outline: none; }
.lg-done.cn-has-insight .lg-avatar { width: 54px; height: 54px; font-size: 22px; }
.lg-done.cn-has-insight .lg-greet { font-size: 18px; margin-top: 2px; }
.lg-done.cn-has-insight { gap: 7px; }

.lg-caps.cn-kbd { color: var(--lg-warn); }

@media (max-width: 600px) {
  .cn-staff { height: 20px; padding: 0 7px; font-size: 9.5px; }
  .cn-ai { inset-inline: 0; bottom: 0; width: 100%; max-height: 78vh; border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .cn-ai-btn { bottom: -16px; height: 34px; font-size: 12px; }
  .cn-insight li { font-size: 11px; padding: 5px 8px; }
  .lg-done.cn-has-insight .lg-avatar { width: 44px; height: 44px; font-size: 18px; }
  .lg-done.cn-has-insight .lg-greet { font-size: 16px; }
  .lg-done.cn-has-insight .lg-bar { display: none; }
}
.cn-ai-btn.cn-pulse { animation: cnPulse 1.6s ease-out 3; }
@keyframes cnPulse { 0% { box-shadow: 0 0 0 0 rgba(13, 148, 136, .45), 0 10px 24px rgba(13, 148, 136, .2); } 100% { box-shadow: 0 0 0 16px rgba(13, 148, 136, 0), 0 10px 24px rgba(13, 148, 136, .2); } }
@media (max-width: 420px) {
  .cn-staff { display: none; }
  .lg-brand-name { white-space: normal; line-height: 1.15; }
  .lg-head { gap: 8px; }
}
