:root {
  --bg: #ffffff;
  --side: #fafafa;
  --line: #e8e8e8;
  --text: #1d2129;
  --text-sub: #5f6570;
  --text-faint: #9aa0aa;
  --ink: #23272f;
  --ink-hover: #0f1216;
  --radius: 14px;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  height: 100%;
}
body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
a {
  color: var(--text-sub);
  text-decoration: none;
}
a:hover {
  color: var(--text);
}

.topbar {
  height: 56px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 24px;
  flex: 0 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 700;
}
.brand img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  object-fit: cover;
  display: block;
}
.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  color: var(--text-sub);
}
.nav a {
  cursor: pointer;
}
.nav a.active {
  color: var(--text);
  font-weight: 600;
}
.topbar .spacer {
  flex: 1;
}
.top-right {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--text-sub);
}
.bell {
  cursor: pointer;
  font-size: 15px;
}
.userchip {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  cursor: pointer;
}
.userchip .avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eef0f3;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.userchip .caret {
  font-size: 10px;
  color: var(--text-faint);
}

.main {
  flex: 1;
  display: flex;
  min-height: 0;
}

.side {
  width: 230px;
  background: var(--side);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  padding: 14px 12px;
}
.new-chat {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 0;
  font-size: 13.5px;
  cursor: pointer;
  transition: 0.15s;
  color: var(--text);
}
.new-chat:hover {
  border-color: #cfcfcf;
}
.side-label {
  font-size: 12px;
  color: var(--text-faint);
  margin: 18px 6px 10px;
}
.history-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-faint);
  font-size: 12.5px;
  padding-bottom: 60px;
}
.history-empty .icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #f0f1f3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #c6c9cf;
}

.chat-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* 欢迎态 */
.welcome {
  flex: 1;
  overflow-y: auto;
  padding: 22px 28px 20px;
}
.welcome-inner {
  max-width: 860px;
  margin: 0 auto;
}
.banner {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  height: 250px;
}
.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.banner .shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.05) 30%,
    rgba(0, 0, 0, 0.62) 100%
  );
}
.banner .txt {
  position: absolute;
  left: 22px;
  bottom: 18px;
  color: #fff;
}
.banner .txt .tag {
  display: inline-block;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 8px;
  backdrop-filter: blur(4px);
}
.banner .txt h2 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.banner .txt p {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.85);
}
.banner .stats {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: flex;
  gap: 8px;
}
.banner .stats span {
  font-size: 11.5px;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 5px 10px;
  backdrop-filter: blur(4px);
}

.sec-title {
  font-size: 15px;
  font-weight: 700;
  margin: 20px 2px 12px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.sec-title small {
  font-size: 12px;
  color: var(--text-faint);
  font-weight: 400;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.fcard {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  transition: 0.18s;
}
.fcard:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}
.fcard .pic {
  height: 96px;
  overflow: hidden;
}
.fcard .pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: 0.3s;
}
.fcard:hover .pic img {
  transform: scale(1.04);
}
.fcard .body {
  padding: 11px 13px 13px;
}
.fcard .body b {
  display: block;
  font-size: 13.5px;
  margin-bottom: 4px;
}
.fcard .body p {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.6;
}

.bigcard {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  background: #fff;
  cursor: pointer;
  transition: 0.18s;
}
.bigcard:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}
.bigcard .pic {
  width: 240px;
  flex: 0 0 auto;
  overflow: hidden;
}
.bigcard .pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bigcard .body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.bigcard .body b {
  font-size: 14.5px;
  margin-bottom: 5px;
}
.bigcard .body p {
  font-size: 12.5px;
  color: var(--text-sub);
  line-height: 1.7;
}
.bigcard .body .meta {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--text-faint);
}
.bigcard .body .meta em {
  font-style: normal;
  color: #b3441e;
  font-weight: 600;
}

.llmcard {
  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  cursor: pointer;
  transition: 0.18s;
  background: linear-gradient(135deg, #23272f 0%, #3b4354 60%, #4a5468 100%);
  color: #fff;
}
.llmcard:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(20, 24, 32, 0.28);
}
.llmcard .pic {
  width: 240px;
  flex: 0 0 auto;
  overflow: hidden;
}
.llmcard .pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.llmcard .body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.llmcard .body .llmtag {
  display: inline-block;
  width: fit-content;
  font-size: 11px;
  color: #dfe4ec;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.12);
}
.llmcard .body b {
  font-size: 15.5px;
  margin-bottom: 5px;
}
.llmcard .body p {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}
.llmcard .body .meta {
  margin-top: 8px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.55);
}
.llmcard .body .meta em {
  font-style: normal;
  color: #ffb37e;
  font-weight: 600;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.chip {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--text-sub);
  cursor: pointer;
  transition: 0.15s;
}
.chip:hover {
  border-color: var(--ink);
  color: var(--text);
}
.chip .arrow {
  color: var(--text-faint);
  font-size: 12px;
}

/* 对话区 */
.chat {
  flex: 1;
  overflow-y: auto;
  padding: 26px 24px 10px;
  display: none;
}
.chat-inner {
  max-width: 760px;
  margin: 0 auto;
}
.msg {
  display: flex;
  margin-bottom: 20px;
  gap: 12px;
}
.msg.user {
  justify-content: flex-end;
}
.msg .avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex: 0 0 auto;
  overflow: hidden;
}
.msg .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.msg.user .bubble {
  max-width: 72%;
  background: #f2f3f5;
  border-radius: 14px;
  padding: 11px 15px;
  font-size: 14px;
  line-height: 1.7;
}
.msg.bot .bubble {
  flex: 1;
  font-size: 14px;
  line-height: 1.8;
  padding-top: 3px;
}
.msg.bot .bubble ol {
  margin: 6px 0 6px 20px;
}
.msg.bot .bubble li {
  margin: 3px 0;
}
.typing {
  display: inline-flex;
  gap: 4px;
  padding: 8px 2px;
}
.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #bbb;
  animation: blink 1.2s infinite;
}
.typing span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0.25;
  }
  40% {
    opacity: 1;
  }
}

/* 输入区 */
.composer {
  flex: 0 0 auto;
  padding: 10px 24px 6px;
}
.composer-inner {
  max-width: 760px;
  margin: 0 auto;
}
.input-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 14px 16px 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
  transition: 0.15s;
}
.input-card:focus-within {
  border-color: #b9bec7;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
}
.input-card textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  min-height: 44px;
  max-height: 140px;
  color: var(--text);
  background: transparent;
}
.input-card textarea::placeholder {
  color: #b5b8be;
}
.input-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}
.tool-left {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-faint);
  font-size: 16px;
}
.tool-left span {
  cursor: pointer;
}
.tool-left span:hover {
  color: var(--text-sub);
}
.send-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.15s;
}
.send-btn:hover {
  background: var(--ink-hover);
}
.send-btn:disabled {
  background: #c9ccd2;
  cursor: not-allowed;
}
.ai-mark {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 9px;
}

/* 页脚 */
.footer {
  flex: 0 0 auto;
  text-align: center;
  font-size: 11px;
  color: var(--text-faint);
  padding: 4px 0 10px;
}
.footer a {
  color: var(--text-faint);
}
.footer a:hover {
  color: var(--text-sub);
}
.footer .sep {
  margin: 0 8px;
  color: #e3e3e3;
}

/* 弹窗 */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 32, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.mask.show {
  display: flex;
}
.modal {
  background: #fff;
  border-radius: 14px;
  width: 560px;
  max-width: 92vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}
.modal-head {
  padding: 15px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-head h3 {
  font-size: 15px;
}
.modal-close {
  width: 28px;
  height: 28px;
  border: none;
  background: #f4f4f5;
  border-radius: 7px;
  cursor: pointer;
  font-size: 15px;
  color: var(--text-sub);
}
.modal-body {
  padding: 18px 22px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.85;
  color: #3a3f47;
}
.modal-body h4 {
  font-size: 13.5px;
  margin: 12px 0 5px;
  color: var(--text);
}
.form-row {
  margin-bottom: 13px;
}
.form-row label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  font-weight: 600;
}
.form-row select,
.form-row textarea,
.form-row input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
.form-row select:focus,
.form-row textarea:focus,
.form-row input:focus {
  border-color: #b9bec7;
}
.form-submit {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 9px;
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.form-submit:hover {
  background: var(--ink-hover);
}

button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
:focus-visible {
  outline: 2px solid #66758b;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.banner .stats {
  top: 18px;
  bottom: auto;
}
.banner .txt p {
  max-width: 640px;
}
.source-note {
  margin: 12px 2px 0;
  color: #697380;
  font-size: 11.5px;
}
.side {
  min-width: 0;
}
.history-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin-top: 6px;
}
.history-row {
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 9px;
  margin: 4px 0;
  padding: 4px;
}
.history-row.active {
  background: #e9ebee;
}
.history-open {
  border: 0;
  background: none;
  flex: 1;
  min-width: 0;
  text-align: left;
  padding: 7px;
  color: #4b525e;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  font-size: 12px;
}
.history-action {
  background: none;
  border: 0;
  color: #8d949e;
  padding: 4px;
  font-size: 11px;
}
.side-bottom {
  border-top: 1px solid var(--line);
  padding: 12px 4px 0;
  color: var(--text-sub);
  font-size: 11px;
}
.side-bottom label {
  display: flex;
  gap: 7px;
  align-items: center;
}
.history-empty {
  min-height: 180px;
}
.chat-heading {
  max-width: 760px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-sub);
  font-size: 12px;
}
.plain-btn {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--text-sub);
  font-size: 12px;
}
.small-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.msg.bot .bubble {
  min-width: 0;
}
.answer-head {
  display: flex;
  gap: 8px;
  color: #717984;
  font-size: 11px;
  margin-bottom: 6px;
  align-items: center;
}
.ai-badge {
  border: 1px solid #d5dae2;
  padding: 1px 7px;
  border-radius: 5px;
  background: #f4f6f8;
  color: #515e71;
}
.answer-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}
.answer-actions button {
  border: 0;
  background: none;
  font-size: 11px;
  color: #7e8793;
  padding: 3px 0;
}
.markdown {
  overflow-wrap: anywhere;
}
.markdown p {
  margin: 8px 0;
}
.markdown h1,
.markdown h2,
.markdown h3,
.markdown h4 {
  font-size: 16px;
  margin: 14px 0 7px;
}
.markdown ul,
.markdown ol {
  margin: 8px 0 8px 23px;
}
.markdown blockquote {
  border-left: 3px solid #cad1db;
  background: #f7f8fa;
  margin: 10px 0;
  padding: 5px 12px;
  color: #5f6570;
}
.markdown pre {
  overflow: auto;
  max-width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  background: #f6f7f9;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.65;
}
.markdown code {
  font-family: Consolas, monospace;
  background: #f3f4f6;
  padding: 1px 4px;
  border-radius: 3px;
}
.markdown pre code {
  padding: 0;
}
.markdown .table-scroll {
  overflow: auto;
  max-width: 100%;
}
.markdown table {
  border-collapse: collapse;
  min-width: 300px;
  font-size: 12px;
  margin: 10px 0;
}
.markdown td,
.markdown th {
  border: 1px solid #dce0e6;
  padding: 7px 10px;
  text-align: left;
}
.markdown th {
  background: #f5f6f8;
}
.markdown a {
  color: #365984;
  text-decoration: underline;
}
.markdown hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 14px 0;
}
.bubble.error {
  color: #b3441e;
}
.char-count {
  font-size: 11px;
  color: #747d8a;
}
.provider-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  color: #6b7480;
  display: flex;
  align-items: center;
  gap: 5px;
}
.provider-dot {
  height: 5px;
  width: 5px;
  border-radius: 50%;
  background: #6b8a74;
}
.quick-bar {
  display: flex;
  gap: 6px;
  overflow: auto;
  margin-bottom: 9px;
  scrollbar-width: none;
}
.quick-bar button {
  flex: 0 0 auto;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  color: #666e7b;
}
.consent {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  font-size: 11px;
  color: #697380;
  margin-top: 7px;
}
.consent input {
  margin-top: 3px;
}
.consent button {
  border: 0;
  background: none;
  padding: 0;
  color: #4e5d74;
  text-decoration: underline;
  font-size: 11px;
}
.tool-left {
  font-size: 13px;
  gap: 12px;
}
.mention-button {
  border: 0;
  background: none;
  color: #8c95a2;
  padding: 0;
}
.nav a.active {
  border-bottom: 2px solid var(--ink);
  line-height: 54px;
}
.mobile-menu {
  display: none;
  border: 0;
  background: none;
  font-size: 18px;
}
.toast {
  position: fixed;
  bottom: 160px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 16px;
  max-width: 90vw;
  border-radius: 10px;
  background: #282d35;
  color: white;
  box-shadow: 0 5px 24px #0002;
  font-size: 12px;
  z-index: 200;
}
.form-error {
  color: #b3441e;
  font-size: 12px;
  margin: 10px 0;
  min-height: 18px;
}
.form-note {
  font-size: 11px;
  color: #747d8a;
  margin: 7px 0;
}
.auth-tabs {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.auth-tabs button {
  border: 0;
  background: none;
  color: #888;
  font-size: 13px;
}
.auth-tabs button.active {
  font-weight: 700;
  color: #23272f;
}
.modal-body ul {
  padding-left: 20px;
}
.modal-wide {
  width: 720px;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 14px 0;
}
.metric {
  padding: 20px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: center;
  background: #fafafa;
}
.metric b {
  display: block;
  font-size: 25px;
  color: var(--ink);
}
.metric span {
  font-size: 12px;
}
.module-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 14px 0;
}
.module-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafafa;
}
.module-card b {
  display: block;
  margin-bottom: 6px;
}
.module-card button {
  margin-top: 8px;
}
.empty-panel {
  border: 1px dashed #ced3db;
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  background: #f9fafb;
  color: #7d8796;
}
.camera-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}
.camera {
  background: #23272f;
  color: #c0c8d3;
  border-radius: 10px;
  padding: 24px 12px;
  text-align: center;
}
.camera span {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: #8e98a8;
}
.fullwidth {
  width: 100%;
}
.legal-page {
  display: block;
  height: auto;
  overflow: auto;
  background: #fafafa;
}
.legal-content {
  max-width: 800px;
  margin: 32px auto;
  padding: 32px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.legal-content h1 {
  font-size: 22px;
  margin-bottom: 20px;
}
.legal-content h2 {
  font-size: 16px;
  margin: 20px 0 8px;
}
.legal-content p {
  margin: 10px 0;
}
.legal-content ul {
  padding-left: 20px;
}
.legal-content header {
  margin-bottom: 24px;
  font-size: 12px;
  color: #777;
}
.footer {
  padding-left: 8px;
  padding-right: 8px;
}
.feedback-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.feedback-item p {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.feedback-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #8993a0;
  font-size: 11px;
  margin: 5px 0;
}
.modal-close {
  flex: 0 0 auto;
}
.top-right {
  gap: 12px;
}
.logout-btn {
  color: #a9472c;
}
.user-text {
  white-space: pre-wrap;
}
.banner img,
.pic img {
  background: #eef0f2;
}
.chat-status {
  font-size: 11px;
  color: #9aa0aa;
}
.nav {
  gap: 20px;
}
@media (max-width: 1100px) {
  .side {
    width: 200px;
  }
  .welcome {
    padding: 20px;
  }
  .banner .txt h2 {
    font-size: 19px;
  }
  .banner .txt p {
    max-width: 520px;
  }
  .fcard .body {
    padding: 10px;
  }
  .card-grid {
    gap: 9px;
  }
  .topbar {
    gap: 20px;
  }
  .nav {
    gap: 16px;
  }
}
@media (max-width: 760px) {
  .topbar {
    height: 52px;
    padding: 0 12px;
    gap: 10px;
  }
  .brand {
    font-size: 14px;
  }
  .nav {
    gap: 12px;
    overflow: auto;
    white-space: nowrap;
    font-size: 12px;
    scrollbar-width: none;
  }
  .nav a.active {
    line-height: 50px;
  }
  .top-right .bell,
  .userchip .caret {
    display: none;
  }
  .top-right {
    gap: 0;
  }
  .userchip {
    font-size: 11px;
  }
  .userchip .avatar {
    display: none;
  }
  .mobile-menu {
    display: block;
  }
  .side {
    position: absolute;
    top: 52px;
    bottom: 48px;
    left: 0;
    width: 220px;
    z-index: 50;
    box-shadow: 8px 0 25px #0002;
    display: none;
  }
  .side.open {
    display: flex;
  }
  .welcome {
    padding: 14px 12px;
  }
  .banner {
    height: 230px;
  }
  .banner .txt {
    left: 16px;
    right: 14px;
    bottom: 14px;
  }
  .banner .txt h2 {
    font-size: 18px;
  }
  .banner .txt p {
    font-size: 11px;
  }
  .banner .stats {
    right: 10px;
    top: 10px;
    gap: 5px;
  }
  .banner .stats span {
    font-size: 10px;
    padding: 3px 6px;
  }
  .sec-title {
    flex-wrap: wrap;
    font-size: 14px;
    margin-top: 18px;
    gap: 5px;
  }
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .fcard .pic {
    height: 92px;
  }
  .bigcard .pic,
  .llmcard .pic {
    width: 100px;
  }
  .bigcard .body,
  .llmcard .body {
    padding: 12px;
  }
  .bigcard .body b,
  .llmcard .body b {
    font-size: 13px;
  }
  .bigcard .body p,
  .llmcard .body p {
    font-size: 11px;
  }
  .bigcard .body .meta,
  .llmcard .body .meta {
    font-size: 10px;
  }
  .chips {
    gap: 7px;
  }
  .chip {
    font-size: 11px;
    padding: 7px 10px;
  }
  .composer {
    padding: 8px 12px 4px;
  }
  .input-card {
    padding: 10px 12px;
  }
  .input-card textarea {
    font-size: 13px;
    min-height: 36px;
  }
  .ai-mark {
    font-size: 10px;
    margin-top: 6px;
  }
  .footer {
    font-size: 9px;
    padding-bottom: 7px;
  }
  .footer .sep {
    margin: 0 4px;
  }
  .chat {
    padding: 18px 12px 6px;
  }
  .msg {
    gap: 8px;
  }
  .msg .avatar {
    width: 25px;
    height: 25px;
  }
  .msg.user .bubble {
    max-width: 88%;
    font-size: 13px;
  }
  .msg.bot .bubble {
    font-size: 13px;
  }
  .metric {
    padding: 14px 6px;
  }
  .metric b {
    font-size: 21px;
  }
  .module-grid {
    grid-template-columns: 1fr;
  }
  .legal-content {
    margin: 12px;
    padding: 20px;
  }
  .form-row {
    margin-bottom: 10px;
  }
  .modal-body {
    padding: 14px 18px;
  }
  .quick-bar button {
    font-size: 10px;
  }
  .consent {
    font-size: 10px;
  }
  .provider-pill {
    font-size: 10px;
  }
  .char-count {
    font-size: 10px;
  }
  .toast {
    bottom: 190px;
  }
  .banner .txt .tag {
    font-size: 10px;
  }
  .topbar .spacer {
    display: none;
  }
  .top-right {
    margin-left: auto;
  }
  .welcome-inner {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

.topbar .nav {
  min-width: 0;
  flex-shrink: 1;
}
.brand,
.top-right {
  flex-shrink: 0;
}

@media (max-width: 760px) {
  .brand img {
    display: none;
  }
  .topbar {
    gap: 6px;
  }
  .nav {
    gap: 8px;
    font-size: 11px;
  }
  .userchip #userName {
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
/* Platform redesign: preserve the reference palette and component treatment. */
.app-main {
  min-height: 0;
}
.workspace {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.page-view {
  height: 100%;
  min-height: 0;
}
.platform-page {
  overflow: auto;
  background: #fcfcfd;
}
.platform-inner {
  max-width: 1140px;
  margin: auto;
  padding: 30px 34px 40px;
}
.home-inner {
  max-width: 1060px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.eyebrow {
  display: block;
  font-size: 10px;
  letter-spacing: 1.7px;
  color: #8b939f;
  font-weight: 600;
  margin-bottom: 6px;
}
.page-heading h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-heading p {
  color: #737b87;
  font-size: 12px;
  margin-top: 5px;
}
.page-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.action-btn {
  padding: 9px 14px;
  border: 1px solid #23272f;
  border-radius: 9px;
  background: #23272f;
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
}
.action-btn:hover {
  background: #10131a;
}
.action-btn:disabled {
  opacity: 0.5;
}
.demo-label {
  display: inline-flex;
  font-size: 10px;
  font-weight: 500;
  color: #a76b38;
  background: #fff5e9;
  border: 1px solid #f2dfc8;
  border-radius: 5px;
  padding: 2px 6px;
  white-space: nowrap;
  letter-spacing: 0;
}
.top-demo-label {
  margin-left: 2px;
}
.actual-label {
  font-size: 10px;
  color: #56765f;
  background: #eef5ef;
  padding: 3px 6px;
  border-radius: 5px;
}
.side .first-label {
  margin-top: 6px;
}
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.side-nav button {
  display: flex;
  gap: 10px;
  align-items: center;
  background: none;
  border: 0;
  border-radius: 8px;
  text-align: left;
  padding: 11px 13px;
  font-size: 15px;
  color: #777f8b;
}
.side-nav button span {
  font-size: 12px;
}
.side-nav button:hover {
  background: #f0f1f3;
}
.side-nav button.active {
  background: #eceef1;
  color: #23272f;
  font-weight: 600;
}
.side-ai-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border: 1px solid #d9dde3;
  border-radius: 9px;
  background: #fff;
  padding: 11px;
  font-size: 12px;
  color: #343c48;
  margin-top: 14px;
}
.side-back {
  border: 0;
  background: none;
  font-size: 11px;
  color: #858e9b;
  text-align: left;
  padding: 0 4px 16px;
}
.history-search {
  margin-top: 14px;
}
.history-search input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 8px;
  font-size: 11px;
}
.side-task-summary {
  font-size: 11px;
  padding: 0 5px;
  color: #858e9b;
}
.side-task-summary button {
  width: 100%;
  padding: 8px;
  border: 1px solid #e8e9ed;
  border-radius: 8px;
  background: #fff;
  color: #5c6573;
  text-align: left;
  margin: 4px 0;
}
.side-reset {
  display: block;
  width: 100%;
  background: none;
  border: 0;
  color: #8a919c;
  font-size: 10px;
  text-align: left;
  margin: 15px 0 8px;
  padding: 0;
}
.side-source {
  font-size: 10px;
  line-height: 1.7;
  color: #a0a7b1;
}
.notification-count {
  position: absolute;
  right: -5px;
  top: -6px;
  border-radius: 99px;
  background: #b36039;
  color: white;
  font-size: 8px;
  min-width: 13px;
  padding: 1px 3px;
}
.bell {
  position: relative;
  font-size: 20px;
}
.surface-card {
  background: #fff;
  border: 1px solid #e7e9ee;
  border-radius: 13px;
  padding: 20px;
  margin-bottom: 16px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.section-heading h3 {
  font-size: 14px;
  font-weight: 600;
}
.muted {
  font-size: 11px;
  color: #89919e;
}
.text-btn {
  border: 0;
  background: none;
  color: #6b7481;
  font-size: 11px;
  padding: 0;
}
.home-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
.demo-notice {
  padding: 10px 13px;
  border: 1px solid #eee2d2;
  background: #fffaf3;
  border-radius: 8px;
  font-size: 11px;
  color: #9d794f;
  margin-bottom: 18px;
}
.dashboard-metrics {
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.dashboard-metrics .metric {
  background: #fff;
  text-align: left;
  padding: 18px 20px;
  border-radius: 12px;
}
.dashboard-metrics .metric b {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -1px;
}
.metric-label {
  font-size: 11px;
  color: #89919e;
  margin-bottom: 7px;
}
.metric-foot {
  font-size: 10px;
  color: #89919e;
  margin-top: 8px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 16px;
}
.chart-region {
  width: 100%;
  height: 240px;
}
.chart-region svg {
  width: 100%;
  height: 100%;
  display: block;
}
.distribution-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 15px 0;
  font-size: 11px;
}
.distribution-row label {
  width: 96px;
  color: #7c8592;
}
.distribution-row .bar-track {
  flex: 1;
  border-radius: 4px;
  background: #f0f1f4;
  height: 7px;
}
.distribution-row .bar-fill {
  height: 100%;
  background: #68758a;
  border-radius: 4px;
}
.distribution-row b {
  font-weight: 500;
  width: 24px;
  text-align: right;
}
.device-state-list {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.device-state-item {
  flex: 1;
  padding: 16px 10px;
  background: #f8f9fa;
  border-radius: 9px;
  text-align: center;
  color: #76818e;
  font-size: 11px;
}
.device-state-item b {
  display: block;
  font-size: 24px;
  font-weight: 500;
  color: #3c4552;
  margin-bottom: 4px;
}
.actual-stats .metric-grid {
  margin-bottom: 0;
}
.actual-stats .metric {
  padding: 12px;
  background: #fafafa;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  border-radius: 5px;
  padding: 3px 7px;
  background: #f1f3f5;
  color: #6d7786;
  font-size: 10px;
}
.status-badge.good {
  background: #edf5ef;
  color: #5e806b;
}
.status-badge.warn {
  background: #fff3e7;
  color: #a57546;
}
.status-badge.danger {
  background: #fcf0ed;
  color: #a66655;
}
.status-badge.blue {
  background: #eef1f7;
  color: #657da5;
}
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0;
  flex-wrap: wrap;
}
.filter-controls {
  display: flex;
  gap: 8px;
}
.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.tabs button {
  font-size: 11px;
  border: 1px solid transparent;
  background: none;
  border-radius: 7px;
  color: #858e9b;
  padding: 7px 10px;
}
.tabs button.active {
  border-color: #d7dce4;
  background: #fff;
  color: #313b4a;
}
.page-tabs {
  border-bottom: 1px solid #e5e8ed;
  padding-bottom: 12px;
  margin-bottom: 18px;
}
.page-actions select,
.filter-bar select,
.filter-bar input,
.section-heading select,
.page-heading input {
  font-size: 11px;
  color: #657080;
  padding: 8px 10px;
  border: 1px solid #e2e6ec;
  background: #fff;
  border-radius: 7px;
  max-width: 100%;
}
.filter-bar input {
  min-width: 180px;
}
.table-card {
  padding: 0;
  overflow: hidden;
}
.table-scroll {
  overflow: auto;
  width: 100%;
}
.data-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 11px;
  white-space: nowrap;
}
.data-table th {
  font-weight: 500;
  background: #f8f9fb;
  color: #8992a0;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #eceef2;
}
.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid #f0f1f4;
  color: #657181;
}
.data-table tr:last-child td {
  border-bottom: 0;
}
.data-table tr:hover td {
  background: #fcfcfd;
}
.table-action {
  font-size: 11px;
  color: #52627b;
  border: 0;
  background: none;
  padding: 0 6px 0 0;
  white-space: nowrap;
}
.empty-state {
  text-align: center;
  padding: 30px 16px;
  font-size: 12px;
  color: #9aa3b0;
}
.empty-state strong {
  display: block;
  font-size: 13px;
  color: #768291;
  font-weight: 500;
  margin-bottom: 5px;
}
.mini-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-bottom: 1px solid #f0f1f4;
  padding: 11px 0;
  font-size: 11px;
  color: #77818e;
}
.mini-row:last-child {
  border-bottom: 0;
}
.mini-row .row-main {
  flex: 1;
  min-width: 0;
}
.mini-row b {
  color: #4d5868;
  font-size: 11px;
  font-weight: 500;
}
.mini-row p {
  font-size: 10px;
  color: #939ba7;
  margin-top: 4px;
}
.task-progress {
  height: 4px;
  background: #edf0f3;
  border-radius: 4px;
  margin-top: 9px;
  overflow: hidden;
}
.task-progress span {
  display: block;
  background: #7b8caa;
  height: 100%;
  border-radius: 4px;
}
.task-row {
  display: grid;
  grid-template-columns: 1fr 160px 140px;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid #edf0f4;
  padding: 14px 0;
  font-size: 11px;
  color: #758091;
}
.task-row:last-child {
  border-bottom: 0;
}
.task-row b {
  display: block;
  color: #465265;
  font-size: 12px;
  margin-bottom: 3px;
}
.task-row .task-actions {
  text-align: right;
}
.task-row .task-actions button {
  margin-left: 8px;
}
.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin: -6px 0 18px;
  font-size: 11px;
  color: #89929e;
}
.pagination button {
  background: #fff;
  border: 1px solid #e4e7ed;
  border-radius: 6px;
  padding: 5px 10px;
  color: #748092;
}
.drawer-mask {
  position: fixed;
  inset: 0;
  background: #1c24324d;
  z-index: 120;
  display: flex;
  justify-content: flex-end;
}
.detail-drawer {
  width: 490px;
  max-width: 94vw;
  background: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: -15px 0 40px #0001;
}
.drawer-header {
  padding: 24px;
  border-bottom: 1px solid #e9ecf1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.drawer-header h2 {
  font-size: 19px;
}
.drawer-body {
  padding: 24px;
  overflow: auto;
  flex: 1;
  min-height: 0;
}
.drawer-body p {
  font-size: 12px;
  line-height: 1.9;
  color: #75818e;
}
.drawer-body h3 {
  font-size: 13px;
  margin: 20px 0 12px;
}
.drawer-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 11px;
  margin-bottom: 18px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}
.detail-field {
  background: #f8f9fb;
  border-radius: 8px;
  padding: 12px;
}
.detail-field small {
  display: block;
  color: #939caa;
  font-size: 10px;
  margin-bottom: 4px;
}
.detail-field b {
  font-size: 12px;
  color: #516074;
  font-weight: 500;
}
.dialog-actions {
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  margin-top: 20px;
}
.drawer-body form label {
  display: block;
  font-size: 11px;
  color: #6b7889;
  margin: 13px 0 6px;
}
.drawer-body form input,
.drawer-body form textarea,
.drawer-body form select {
  width: 100%;
  border: 1px solid #e1e6ee;
  border-radius: 8px;
  padding: 10px;
  font-size: 12px;
  color: #536277;
  background: white;
}
.drawer-body form textarea {
  min-height: 80px;
  resize: vertical;
}
.inline-error {
  font-size: 11px !important;
  color: #b56f5c !important;
  min-height: 18px;
  margin-top: 10px;
}
.monitor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.monitor-grid.single {
  grid-template-columns: 1fr;
}
.camera-tile {
  background: #202731;
  border: 2px solid transparent;
  border-radius: 11px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/9;
  cursor: pointer;
}
.camera-tile.selected {
  border-color: #697c9b;
}
.camera-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55) saturate(0.4);
}
.camera-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #e4e7ec;
  padding: 12px;
  font-size: 11px;
}
.camera-top,
.camera-bottom {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.camera-mark {
  background: #141b25aa;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 9px;
  letter-spacing: 0.5px;
}
.camera-target {
  position: absolute;
  left: 39%;
  top: 34%;
  width: 20%;
  height: 33%;
  border: 1px solid #a4c5b3aa;
}
.camera-target::after {
  content: "DEMO TRACK";
  position: absolute;
  left: -1px;
  top: -15px;
  font-size: 8px;
  color: #b6d5c7;
}
.camera-tile.playing .camera-target {
  animation: demoTrack 9s linear infinite;
}
.camera-tile.paused .camera-target {
  animation-play-state: paused;
}
.monitor-control {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0 18px;
  font-size: 11px;
  color: #8a95a3;
  gap: 10px;
}
.monitor-control div {
  display: flex;
  gap: 7px;
}
.event-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.event-card {
  border: 1px solid #e6e9ee;
  background: #fbfcfd;
  border-radius: 9px;
  padding: 12px;
  text-align: left;
  font-size: 11px;
  color: #7c8999;
}
.event-card b {
  display: block;
  font-size: 11px;
  color: #536073;
  font-weight: 500;
  margin: 5px 0;
}
.event-card small {
  font-size: 10px;
  color: #9da7b4;
}
.event-card.active {
  border-color: #92a4be;
  background: #f5f8fc;
}
.navigation-grid,
.ontology-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
}
.factory-map {
  height: 390px;
  width: 100%;
  background: #f8fafc;
  border: 1px solid #edf0f5;
  border-radius: 8px;
  overflow: hidden;
}
.factory-map svg {
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
}
.map-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
  font-size: 10px;
  color: #8b98a8;
}
.ontology-graph {
  height: 420px;
  border: 1px solid #edf0f4;
  border-radius: 9px;
  background: #fbfcfd;
}
.ontology-graph svg {
  width: 100%;
  height: 100%;
}
.graph-node {
  cursor: pointer;
}
.graph-node:hover circle {
  stroke: #536882;
  stroke-width: 2;
}
.detail-small-table .data-table td,
.detail-small-table .data-table th {
  padding: 10px 7px;
  font-size: 10px;
}
.navigation-controls {
  margin-top: 14px;
}
.navigation-controls input {
  width: 80px;
  padding: 6px;
  border: 1px solid #dce3ed;
  border-radius: 6px;
  font-size: 11px;
}
.navigation-controls button {
  margin-left: 6px;
}
.fence-item {
  padding: 12px 0;
  border-bottom: 1px solid #edf0f4;
  font-size: 11px;
  color: #7b8797;
}
.fence-item b {
  display: block;
  color: #58677c;
  font-weight: 500;
  margin-bottom: 5px;
}
.fence-item button {
  margin-right: 8px;
  margin-top: 7px;
}
.camera-grid {
  margin-bottom: 0;
}
.chat-page {
  display: flex;
  flex-direction: column;
  background: #fff;
}
.chat-toolbar {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 20px 30px;
  border-bottom: 1px solid #f0f1f3;
}
.chat-toolbar h1 {
  font-size: 14px;
  font-weight: 600;
  color: #495260;
  max-width: 400px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.chat-toolbar p {
  font-size: 10px;
  color: #9ca5b1;
  margin-top: 3px;
}
.chat-toolbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.chat-toolbar .provider-pill {
  background: white;
  font-size: 10px;
  padding: 5px 9px;
}
.chat-empty {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 30px;
}
.chat-empty-inner {
  max-width: 650px;
  width: 100%;
  text-align: center;
}
.assistant-symbol {
  width: 52px;
  height: 52px;
  margin: 0 auto 20px;
  border: 1px solid #e5e9ef;
  border-radius: 15px;
  background: #f7f8fa;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 26px;
  color: #5b6576;
}
.chat-empty h2 {
  font-size: 24px;
  color: #364052;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin: 10px 0;
}
.chat-empty p {
  font-size: 12px;
  line-height: 1.9;
  color: #8b95a3;
}
.starter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 26px auto 20px;
  text-align: left;
}
.starter-grid button {
  background: #fff;
  border: 1px solid #e5e8ed;
  border-radius: 11px;
  padding: 15px 17px;
  text-align: left;
  transition: 0.15s;
}
.starter-grid button:hover {
  background: #fafbfc;
  border-color: #b8c1cf;
}
.starter-grid span {
  display: block;
  color: #8896aa;
  font-size: 18px;
  margin-bottom: 10px;
}
.starter-grid b {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #4f5c70;
  margin-bottom: 4px;
}
.starter-grid small {
  font-size: 10px;
  color: #a1a9b5;
}
.chat-boundary {
  font-size: 10px;
  color: #a6aebb;
}
.chat-page .chat {
  padding: 26px 30px 18px;
  display: block;
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.chat-page .chat-inner {
  max-width: 800px;
}
.chat-page .composer {
  padding: 12px 30px 14px;
}
.composer-inner {
  max-width: 800px;
}
.context-button {
  font-size: 11px;
  background: none;
  border: 0;
  color: #8692a2;
  padding: 0;
}
.chat-page .input-card textarea {
  font-size: 13px;
  min-height: 46px;
}
.chat-page .input-card {
  border-color: #dee3eb;
  border-radius: 14px;
}
.chat-page .input-tools {
  margin-top: 5px;
}
.chat-page .ai-mark {
  font-size: 10px;
}
.answer-actions .liked {
  color: #5d896d;
}
.answer-error {
  border: 1px solid #edd9d3;
  background: #fff9f7;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 10px 0 18px;
  color: #ab7061;
  font-size: 12px;
}
.answer-error button {
  margin-top: 8px;
}
.provider-dot.unavailable {
  background: #b77562;
}
.provider-dot.unverified {
  background: #bdab80;
}
.provider-dot.available {
  background: #6e9278;
}
.model-status-card {
  border: 1px solid #e8edf3;
  border-radius: 10px;
  background: #fafbfc;
  padding: 18px;
  margin-bottom: 14px;
}
.model-status-card h4 {
  font-size: 13px;
  color: #516074;
  margin-bottom: 7px;
}
.camera-fullscreen {
  background: #1d2430;
  padding: 20px;
}
.camera-fullscreen .monitor-grid {
  height: 90vh;
}
.camera-fullscreen .camera-tile {
  height: 100%;
  aspect-ratio: auto;
}
.page-toast-link {
  cursor: pointer;
}
.home-inner .banner .txt p {
  max-width: 650px;
}
.model-call-state {
  font-size: 10px;
  color: #8e99a8;
}
.task-tally {
  font-size: 12px;
  color: #697990;
  margin-bottom: 10px;
}
.notification-list {
  padding-left: 0;
}
.form-row .checkbox-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}
.device-picker-row {
  width: 100%;
  text-align: left;
  border: 1px solid #e4e9f0;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  color: #617087;
  font-size: 12px;
  margin: 5px 0;
}
.drawer-body .demo-notice {
  line-height: 1.8;
}
.profile-hint {
  font-size: 10px;
  color: #919baa;
}
.home-inner .source-note {
  margin-bottom: 24px;
}
.model-unavailable-notice {
  padding: 9px 14px;
  background: #fff7f0;
  border: 1px solid #eedfd2;
  border-radius: 8px;
  font-size: 11px;
  color: #a88662;
  margin-bottom: 16px;
}
@keyframes demoTrack {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(18px, -6px);
  }
}
@media (max-width: 1100px) {
  .platform-inner {
    padding: 25px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
  .navigation-grid,
  .ontology-grid {
    grid-template-columns: 1fr;
  }
  .factory-map {
    height: 350px;
  }
  .ontology-graph {
    height: 360px;
  }
  .dashboard-metrics .metric {
    padding: 14px;
  }
  .task-row {
    grid-template-columns: 1fr 100px 110px;
  }
  .top-demo-label {
    display: none;
  }
  .chat-toolbar {
    padding: 16px 22px;
  }
  .chat-page .composer {
    padding-left: 22px;
    padding-right: 22px;
  }
  .home-bottom-grid {
    gap: 12px;
  }
}
@media (max-width: 760px) {
  .platform-inner {
    padding: 18px 12px 25px;
  }
  .page-heading {
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
  }
  .page-heading h1 {
    font-size: 20px;
    gap: 6px;
    flex-wrap: wrap;
  }
  .page-heading p {
    font-size: 10px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1.2px;
  }
  .page-heading .action-btn {
    font-size: 10px;
    padding: 8px 10px;
  }
  .page-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .page-actions select {
    max-width: 108px;
  }
  .side {
    top: 52px;
    bottom: 36px;
  }
  .home-bottom-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .surface-card {
    padding: 15px;
    border-radius: 11px;
  }
  .dashboard-metrics {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-bottom: 14px;
  }
  .dashboard-metrics .metric {
    padding: 13px;
  }
  .dashboard-metrics .metric b {
    font-size: 25px;
  }
  .metric-label,
  .metric-foot {
    font-size: 10px;
  }
  .section-heading h3 {
    font-size: 13px;
  }
  .demo-notice {
    font-size: 10px;
  }
  .filter-controls {
    width: 100%;
  }
  .filter-controls input {
    flex: 1;
    min-width: 0;
  }
  .filter-bar {
    gap: 9px;
  }
  .tabs button {
    padding: 6px 7px;
    font-size: 10px;
  }
  .table-card {
    padding: 0;
  }
  .data-table td,
  .data-table th {
    padding: 12px 10px;
    font-size: 10px;
  }
  .task-row {
    grid-template-columns: 1fr 100px;
    gap: 8px;
  }
  .task-row .task-actions {
    grid-column: 1/-1;
    text-align: left;
  }
  .task-row .task-actions button {
    margin-left: 0;
    margin-right: 10px;
  }
  .monitor-grid {
    gap: 8px;
  }
  .camera-overlay {
    padding: 8px;
    font-size: 8px;
  }
  .camera-mark {
    font-size: 7px;
    padding: 2px 3px;
  }
  .camera-target::after {
    font-size: 6px;
    top: -11px;
  }
  .monitor-control {
    font-size: 10px;
    align-items: flex-start;
  }
  .monitor-control div {
    gap: 5px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .monitor-control button {
    font-size: 10px;
    padding: 5px 7px;
  }
  .event-timeline {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .event-card {
    padding: 9px;
    font-size: 10px;
  }
  .factory-map {
    height: 290px;
  }
  .map-legend {
    font-size: 9px;
    gap: 7px;
  }
  .navigation-grid,
  .ontology-grid {
    gap: 8px;
  }
  .ontology-graph {
    height: 330px;
  }
  .drawer-header,
  .drawer-body {
    padding: 20px;
  }
  .detail-drawer {
    max-width: 96vw;
  }
  .drawer-header h2 {
    font-size: 17px;
  }
  .chat-toolbar {
    padding: 12px 14px;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }
  .chat-toolbar h1 {
    max-width: 200px;
    font-size: 12px;
  }
  .chat-toolbar-actions {
    gap: 5px;
  }
  .chat-toolbar .plain-btn {
    font-size: 10px;
    padding: 5px 7px;
  }
  .chat-toolbar .provider-pill {
    font-size: 9px;
    padding: 5px 6px;
  }
  .chat-empty {
    padding: 20px 15px;
  }
  .assistant-symbol {
    width: 43px;
    height: 43px;
    border-radius: 12px;
    font-size: 21px;
    margin-bottom: 15px;
  }
  .chat-empty h2 {
    font-size: 20px;
    line-height: 1.5;
  }
  .chat-empty p {
    font-size: 11px;
  }
  .starter-grid {
    gap: 8px;
    margin-top: 20px;
  }
  .starter-grid button {
    padding: 12px;
  }
  .starter-grid span {
    font-size: 16px;
    margin-bottom: 7px;
  }
  .starter-grid b {
    font-size: 11px;
  }
  .starter-grid small {
    font-size: 9px;
  }
  .chat-boundary {
    font-size: 9px;
    line-height: 1.6;
  }
  .chat-page .composer {
    padding: 8px 12px;
  }
  .chat-page .chat {
    padding: 18px 12px;
  }
  .chat-page .ai-mark {
    font-size: 9px;
  }
  .chat-page .input-card {
    padding: 10px 12px;
  }
  .chat-page .input-card textarea {
    min-height: 38px;
  }
  .context-button {
    font-size: 10px;
  }
  .home-inner .banner .txt p {
    font-size: 10px;
  }
  .page-heading input {
    max-width: 140px;
  }
  .notification-count {
    font-size: 7px;
    min-width: 12px;
  }
  .topbar .brand {
    font-size: 12px;
  }
  .data-table td button {
    font-size: 10px;
  }
  .home-bottom-grid {
    margin-top: 20px;
  }
  .page-tabs {
    gap: 0;
  }
  .section-heading .muted {
    font-size: 10px;
  }
  .footer {
    padding-top: 4px;
  }
}
#cameraGrid:fullscreen {
  background: #1d2430;
  padding: 20px;
  align-content: center;
}
.chat-page .chat-empty[hidden] {
  display: none;
}
.view-heading .eyebrow {
  color: #8593a8;
}

.surface-card {
  min-width: 0;
}

#cameraGrid {
  position: relative;
}
.fullscreen-exit {
  display: none;
}
#cameraGrid:fullscreen .fullscreen-exit {
  display: block;
  position: absolute;
  right: 24px;
  top: 14px;
  z-index: 10;
  border: 1px solid #7c8ba3;
  border-radius: 6px;
  background: #253044;
  color: #fff;
  padding: 7px 12px;
  font-size: 12px;
}
