/* ==========================================================================
   中建钢构北非公司项目周报系统 · AI 助手可拖动浮标 & 独立答疑页样式 (E651u2)
   严格 CSP 合规：0 外链、纯 Hex/RGBA 配色、与现网晴空海蓝 (#134C80 / #2276BE) 统一
   ========================================================================== */

.ai-fab {
  position: fixed;
  z-index: 9600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  overflow: visible;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: linear-gradient(135deg, #134c80 0%, #2276be 100%);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(19, 76, 128, 0.32), 0 2px 6px rgba(15, 23, 42, 0.14);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transition: width 0.22s cubic-bezier(0.22, 1, 0.36, 1),
              height 0.22s cubic-bezier(0.22, 1, 0.36, 1),
              padding 0.22s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.2s ease,
              transform 0.16s ease;
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
}

.ai-fab:hover {
  box-shadow: 0 8px 24px rgba(19, 76, 128, 0.42), 0 3px 8px rgba(15, 23, 42, 0.16);
}

.ai-fab.is-dragging {
  cursor: grabbing;
  transition: none;
  transform: scale(1.04);
}

.ai-fab.is-peek {
  width: auto;
  min-width: 112px;
  height: 46px;
  padding: 0 15px 0 12px;
  gap: 7px;
  cursor: pointer;
  background: linear-gradient(135deg, #0f3f6c 0%, #1d6eb5 100%);
  box-shadow: 0 10px 28px rgba(19, 76, 128, 0.42), 0 0 0 4px rgba(34, 118, 190, 0.18);
}

.ai-fab.is-hidden {
  display: none !important;
}

.ai-fab-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: block;
}

.ai-fab-label {
  display: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.4px;
  white-space: nowrap;
  line-height: 1;
}

.ai-fab.is-peek .ai-fab-label {
  display: inline-block;
}

.ai-fab-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  border: 1.5px solid #ffffff;
  pointer-events: none;
}

.ai-fab.is-peek .ai-fab-dot {
  top: 4px;
  right: 6px;
}

.ai-fab.has-precheck-badge .ai-fab-dot {
  display: none;
}

.ai-fab-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.45);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  z-index: 2;
}

.ai-fab-badge[hidden] {
  display: none !important;
}

.ai-fab.is-peek .ai-fab-badge {
  top: -6px;
  right: -4px;
}

.ai-fab-badge.is-bump {
  animation: aiFabBadgeBump 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes aiFabBadgeBump {
  0% { transform: scale(0.76); }
  55% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* 对话浮窗容器 */
.ai-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9650;
  background: rgba(15, 23, 42, 0.24);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 20px;
  box-sizing: border-box;
}

.ai-dialog-backdrop[hidden] {
  display: none !important;
}

.ai-dialog {
  width: 416px;
  max-width: calc(100vw - 24px);
  height: 600px;
  max-height: calc(100vh - 36px);
  background: #f8fbfe;
  border-radius: 16px;
  border: 1px solid #cbd9e8;
  box-shadow: 0 20px 50px rgba(15, 35, 66, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1e293b;
}

/* 顶部标题栏（双行舒展布局，杜绝任何窄屏挤成竖排） */
.ai-head {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 11px 13px 10px;
  background: linear-gradient(135deg, #134c80 0%, #2276be 100%);
  color: #ffffff;
  flex-shrink: 0;
}

.ai-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.ai-head-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding-top: 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.ai-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.ai-head-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-head-title-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ai-head-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: nowrap;
}

.ai-head-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
  white-space: nowrap;
  flex-shrink: 0;
}

.ai-head-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.22);
  border: 1px solid rgba(167, 243, 208, 0.55);
  color: #ecfdf5;
  white-space: nowrap;
}

.ai-head-sub {
  font-size: 11.5px;
  color: rgba(224, 242, 254, 0.9);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-head-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.ai-icon-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-radius: 8px;
  height: 28px;
  padding: 0 8px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.ai-icon-btn:hover {
  background: rgba(255, 255, 255, 0.26);
}

.ai-icon-btn-close {
  width: 28px;
  padding: 0;
  font-size: 17px;
  line-height: 1;
}

/* 当前上下文提示条 */
.ai-ctx-bar {
  padding: 7px 14px;
  background: #eaf3fb;
  border-bottom: 1px solid #d5e5f4;
  font-size: 12px;
  color: #134c80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.ai-ctx-bar[hidden] {
  display: none !important;
}

.ai-ctx-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-ctx-select {
  max-width: 220px;
  height: 26px;
  font-size: 12px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid #b6cde3;
  background: #ffffff;
  color: #134c80;
}

/* 对话窗顶部待处理预审提醒条（随表单改对动态减数，归零自动隐藏） */
.ai-precheck-bar {
  padding: 7px 12px;
  background: #fef2f2;
  border-bottom: 1px solid #fecaca;
  color: #991b1b;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.ai-precheck-bar[hidden] {
  display: none !important;
}

.ai-precheck-bar-main {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1 1 auto;
}

.ai-precheck-bar-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.ai-precheck-bar-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.ai-precheck-action-btn {
  appearance: none;
  border: 1px solid #f87171;
  background: #ffffff;
  color: #b91c1c;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ai-precheck-action-btn:hover:not(:disabled) {
  background: #fee2e2;
  border-color: #dc2626;
  color: #991b1b;
}

.ai-precheck-action-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* 消息滚动区 */
.ai-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.ai-welcome-card {
  background: #ffffff;
  border: 1px solid #d8e6f3;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #334155;
  box-shadow: 0 2px 6px rgba(19, 76, 128, 0.05);
}

.ai-welcome-title {
  margin: 0 0 6px 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #134c80;
}

.ai-welcome-desc {
  margin: 0 0 10px 0;
  font-size: 12.5px;
  color: #475569;
}

.ai-quick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-quick-btn {
  appearance: none;
  border: 1px solid #bfd7ee;
  background: #f2f8fd;
  color: #134c80;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  line-height: 1.3;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ai-quick-btn:hover {
  background: #e1effb;
  border-color: #2276be;
}

/* 单条聊天气泡 */
.ai-msg {
  display: flex;
  flex-direction: column;
  max-width: 88%;
  gap: 4px;
}

.ai-msg.is-user {
  align-self: flex-end;
  align-items: flex-end;
}

.ai-msg.is-assistant {
  align-self: flex-start;
  align-items: flex-start;
}

.ai-bubble {
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.62;
  word-break: break-word;
}

.ai-msg.is-user .ai-bubble {
  background: linear-gradient(135deg, #134c80 0%, #2276be 100%);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.ai-msg.is-assistant .ai-bubble {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #dbe7f3;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.ai-msg.is-error .ai-bubble {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.ai-bubble-p {
  margin: 0 0 6px 0;
}

.ai-bubble-p:last-child {
  margin-bottom: 0;
}

.ai-bubble-list {
  margin: 4px 0 6px 0;
  padding-left: 18px;
}

.ai-bubble-list:last-child {
  margin-bottom: 0;
}

.ai-bubble-list li {
  margin: 2px 0;
}

.ai-bubble-code {
  display: inline-block;
  padding: 0 5px;
  border-radius: 4px;
  background: #eef4fa;
  color: #0f4c81;
  font-family: Consolas, Menlo, monospace;
  font-size: 12.5px;
}

.ai-msg.is-user .ai-bubble-code {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.ai-bubble-img {
  display: block;
  max-width: 220px;
  max-height: 160px;
  border-radius: 8px;
  margin-bottom: 6px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  object-fit: contain;
  background: #ffffff;
}

.ai-typing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #475569;
}

.ai-typing-dots {
  display: inline-flex;
  gap: 4px;
}

.ai-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2276be;
  animation: aiDotBounce 1.2s infinite ease-in-out;
}

.ai-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes aiDotBounce {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.1); }
}

/* 底部输入与截图预览区 */
.ai-composer {
  border-top: 1px solid #d5e4f2;
  background: #ffffff;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.ai-img-preview-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f1f7fd;
  border: 1px solid #cfe0f1;
}

.ai-img-preview-bar[hidden] {
  display: none !important;
}

.ai-img-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #cbd5e1;
  background: #ffffff;
}

.ai-img-meta {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  color: #1e3a5f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-img-remove {
  appearance: none;
  border: none;
  background: #e2e8f0;
  color: #334155;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.ai-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.ai-img-pick-btn {
  appearance: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid #cbd9e8;
  background: #f4f8fc;
  color: #134c80;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ai-img-pick-btn:hover {
  background: #e3f0fb;
  border-color: #2276be;
}

.ai-img-pick-btn[hidden] {
  display: none !important;
}

.ai-file-input {
  display: none !important;
}

.ai-textarea {
  flex: 1 1 auto;
  min-height: 40px;
  max-height: 112px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid #cbd9e8;
  background: #f8fbfe;
  color: #0f172a;
  font-size: 13.5px;
  line-height: 1.45;
  resize: none;
  overflow-y: hidden;
  box-sizing: border-box;
  font-family: inherit;
}

.ai-textarea:focus {
  outline: none;
  border-color: #2276be;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(34, 118, 190, 0.14);
}

.ai-img-preview-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #edf6ff;
  border: 1px solid #93c5fd;
}

.ai-img-preview-bar[hidden] {
  display: none !important;
}

.ai-img-thumb {
  width: 44px;
  height: 44px;
  border-radius: 7px;
  object-fit: cover;
  border: 1px solid #cbd9e8;
  flex-shrink: 0;
}

.ai-img-meta-wrap {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ai-img-meta {
  font-size: 12px;
  font-weight: 600;
  color: #134c80;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-img-tip {
  font-size: 11px;
  color: #475569;
  line-height: 1.35;
}

.ai-img-voice-btn {
  appearance: none;
  border: 1px solid #93c5fd;
  background: #ffffff;
  color: #134c80;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.ai-img-voice-btn:hover:not(:disabled) {
  background: #dbeafe;
}

.ai-img-voice-btn[hidden] {
  display: none !important;
}

.ai-voice-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 9px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  font-size: 12px;
  color: #0c4a6e;
}

.ai-voice-bar.is-recording {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

.ai-voice-bar[hidden] {
  display: none !important;
}

.ai-voice-bar-main {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}

.ai-voice-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dc2626;
  flex-shrink: 0;
  animation: ai-voice-pulse 1.1s ease-in-out infinite;
}

.ai-voice-bar:not(.is-recording) .ai-voice-dot {
  display: none;
}

@keyframes ai-voice-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.82); }
}

.ai-voice-bar-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-voice-bar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ai-voice-mini-btn {
  appearance: none;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  border-radius: 7px;
  padding: 2px 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.ai-voice-mini-btn[hidden] {
  display: none !important;
}

.ai-voice-btn {
  appearance: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid #cbd9e8;
  background: #f4f9ff;
  color: #134c80;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ai-voice-btn:hover:not(:disabled) {
  background: #e1effc;
  border-color: #7bb4e8;
}

.ai-voice-btn.is-recording {
  background: #dc2626;
  border-color: #b91c1c;
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18);
}

.ai-voice-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ai-voice-btn[hidden] {
  display: none !important;
}

.ai-send-btn {
  appearance: none;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #134c80 0%, #2276be 100%);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}

.ai-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ai-foot-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: #64748b;
  gap: 8px;
}

.ai-toast {
  font-size: 11.5px;
  color: #047857;
  font-weight: 600;
}

/* ==========================================================================
   独立分享答疑页 (/assistant.html) 专属全屏布局
   ========================================================================== */
body.ai-standalone-body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(160deg, #eaf3fb 0%, #f6faff 55%, #edf4fb 100%);
  color: #1e293b;
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
  display: flex;
  flex-direction: column;
}

.ai-page-shell {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
  box-sizing: border-box;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.ai-page-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #134c80 0%, #2276be 100%);
  color: #ffffff;
  margin-bottom: 12px;
  box-shadow: 0 6px 20px rgba(19, 76, 128, 0.18);
}

.ai-page-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ai-page-ci {
  height: 26px;
  width: auto;
  display: block;
}

.ai-page-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ai-page-titles h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.ai-page-titles span {
  font-size: 11.5px;
  color: rgba(224, 242, 254, 0.92);
}

.ai-page-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ai-page-link {
  text-decoration: none;
  color: #134c80;
  background: #ffffff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.ai-page-link:hover {
  background: #eaf3fb;
}

.ai-standalone-body .ai-dialog {
  width: 100%;
  max-width: none;
  height: auto;
  max-height: none;
  flex: 1 1 auto;
  min-height: calc(100vh - 108px);
}

.ai-auth-card {
  width: 100%;
  max-width: 420px;
  margin: 48px auto;
  background: #ffffff;
  border: 1px solid #d5e4f2;
  border-radius: 16px;
  padding: 26px 24px;
  box-shadow: 0 12px 32px rgba(19, 76, 128, 0.12);
  box-sizing: border-box;
}

.ai-auth-card[hidden] {
  display: none !important;
}

.ai-auth-title {
  margin: 0 0 6px 0;
  font-size: 18px;
  font-weight: 700;
  color: #134c80;
}

.ai-auth-desc {
  margin: 0 0 18px 0;
  font-size: 13px;
  color: #475569;
  line-height: 1.55;
}

.ai-auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 13px;
  font-size: 13px;
  color: #334155;
  font-weight: 600;
}

.ai-auth-field input {
  height: 40px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid #cbd9e8;
  font-size: 14px;
  box-sizing: border-box;
}

.ai-auth-field input:focus {
  outline: none;
  border-color: #2276be;
  box-shadow: 0 0 0 3px rgba(34, 118, 190, 0.14);
}

.ai-auth-err {
  margin: 0 0 12px 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 12.5px;
}

.ai-auth-err[hidden] {
  display: none !important;
}

.ai-auth-submit {
  width: 100%;
  height: 42px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #134c80 0%, #2276be 100%);
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
}

.ai-auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ai-auth-foot {
  margin-top: 14px;
  text-align: center;
  font-size: 12.5px;
  color: #64748b;
}

.ai-auth-foot a {
  color: #2276be;
  font-weight: 600;
  text-decoration: none;
}

/* 移动端自适应收口 */
@media (max-width: 760px) {
  .ai-dialog-backdrop {
    padding: 0;
    align-items: flex-end;
    justify-content: center;
  }

  .ai-dialog {
    width: 100vw;
    max-width: 100vw;
    height: 88vh;
    max-height: 88vh;
    border-radius: 16px 16px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
  }

  .ai-page-shell {
    padding: 8px;
  }

  .ai-page-topbar {
    padding: 9px 12px;
    border-radius: 10px;
    margin-bottom: 8px;
  }

  .ai-page-titles h1 {
    font-size: 14.5px;
  }

  .ai-page-titles span {
    display: none;
  }

  .ai-standalone-body .ai-dialog {
    min-height: calc(100vh - 76px);
    height: auto;
    max-height: none;
    border-radius: 12px;
    border: 1px solid #cbd9e8;
  }
}
