.app-sync-toast {
  position: fixed;
  left: 20px;
  bottom: 22px;
  z-index: 9996;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(420px, calc(100vw - 112px));
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(109, 77, 168, 0.18);
  background: rgba(255, 255, 255, 0.94);
  color: var(--accent-strong);
  box-shadow: 0 16px 36px rgba(76, 29, 149, 0.14);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.app-sync-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.app-sync-toast.is-offline {
  color: #9a3412;
  border-color: rgba(234, 88, 12, 0.18);
}

.app-sync-dot {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #8b5cf6;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.14);
}

.app-sync-toast.is-offline .app-sync-dot {
  background: #f97316;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.chat-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  height: 58px;
  padding: 0 16px 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(109, 77, 168, 0.18);
  border-radius: 20px;
  background: linear-gradient(135deg, #6f3cc3 0%, #4c1d95 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 18px 34px rgba(76, 29, 149, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.2s ease;
}

.chat-fab:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 40px rgba(76, 29, 149, 0.34);
}

.chat-fab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.18), 0 18px 34px rgba(76, 29, 149, 0.28);
}

.chat-fab[hidden] {
  display: none;
}

.chat-fab-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  font-size: 1rem;
}

.chat-fab-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.05;
}

.chat-fab-title {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.chat-fab-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.84);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.chat-fab-subtitle::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d8b4fe;
  box-shadow: 0 0 0 3px rgba(216, 180, 254, 0.18);
}

.chat-window {
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 9998;
  width: min(760px, calc(100vw - 48px));
  max-width: calc(100vw - 28px);
  height: min(620px, calc(100vh - 128px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(109, 77, 168, 0.16);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 28px 58px rgba(76, 29, 149, 0.20);
  backdrop-filter: blur(24px) saturate(1.15);
  -webkit-backdrop-filter: blur(24px) saturate(1.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.chat-window.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chat-window.fullscreen {
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  border-radius: 0;
  z-index: 10000;
}

.chat-header {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #6f3cc3 0%, #4c1d95 68%, #3b0d7e 100%);
  color: #fff;
}

.chat-header-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  font-size: 1.05rem;
}

.chat-header-info {
  min-width: 0;
}

.chat-header-info h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.chat-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
}

.chat-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18);
}

.chat-status.is-offline .chat-status-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-new-btn {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  transition: background 0.18s ease, transform 0.18s ease;
}

.chat-new-btn:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: translateY(-1px);
}

.chat-header-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.chat-header-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.chat-header-btn.is-active {
  background: rgba(255, 255, 255, 0.26);
}

.chat-shell {
  min-height: 0;
  flex: 1 1 auto;
  position: relative;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  background: #f6f7fb;
}

.chat-shell:has(.chat-sidebar.is-collapsed) {
  grid-template-columns: minmax(0, 1fr);
}

.chat-sidebar {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  transition: width 0.2s ease, opacity 0.18s ease;
}

.chat-sidebar.is-collapsed {
  width: 0;
  overflow: hidden;
  opacity: 0;
  border-right: 0;
}

.chat-sidebar-head {
  padding: 13px 12px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.chat-sidebar-head strong,
.chat-sidebar-head span {
  display: block;
}

.chat-sidebar-head strong {
  color: #111827;
  font-size: 0.86rem;
  letter-spacing: 0;
}

.chat-sidebar-head span {
  margin-top: 2px;
  color: #64748b;
  font-size: 0.72rem;
}

.chat-sidebar-new {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 10px;
  background: #ecfdf5;
  color: #047857;
  cursor: pointer;
}

.chat-sidebar-list {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 10px;
}

.chat-sidebar-empty {
  padding: 18px 10px;
  border: 1px dashed rgba(15, 23, 42, 0.14);
  border-radius: 12px;
  color: #64748b;
  font-size: 0.8rem;
  text-align: center;
}

.chat-thread {
  width: 100%;
  min-height: 82px;
  padding: 10px;
  display: grid;
  gap: 4px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.chat-thread:hover {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.chat-thread.is-active {
  background: #ffffff;
  border-color: rgba(15, 118, 110, 0.24);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.chat-thread-title,
.chat-thread-preview,
.chat-thread-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-thread-title {
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 850;
}

.chat-thread-preview {
  color: #64748b;
  font-size: 0.74rem;
}

.chat-thread-meta {
  color: #0f766e;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.chat-conversation {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chat-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(180deg, #faf7ff 0%, #f4efff 100%);
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(111, 60, 195, 0.18);
  border-radius: 999px;
}

.chat-msg {
  max-width: 84%;
  display: flex;
  flex-direction: column;
  animation: msg-slide-in 0.24s ease;
}

.chat-msg.bot {
  align-self: flex-start;
}

.chat-msg.user {
  align-self: flex-end;
}

@keyframes msg-slide-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-bubble {
  padding: 12px 14px;
  border-radius: 18px;
  line-height: 1.5;
  font-size: 0.9rem;
  word-break: break-word;
  max-width: 100%;
  overflow-x: auto;
}

.chat-msg.bot .chat-bubble {
  border: 1px solid rgba(109, 77, 168, 0.14);
  background: #fff;
  box-shadow: 0 10px 20px rgba(76, 29, 149, 0.06);
  border-bottom-left-radius: 6px;
}

.chat-msg.user .chat-bubble {
  background: linear-gradient(135deg, #6f3cc3 0%, #4c1d95 100%);
  color: #fff;
  box-shadow: 0 14px 24px rgba(76, 29, 149, 0.18);
  border-bottom-right-radius: 6px;
}

.chat-msg-time {
  margin-top: 4px;
  padding: 0 4px;
  font-size: 0.68rem;
  color: var(--muted);
}

.chat-msg.user .chat-msg-time {
  text-align: right;
}

.markdown-content p {
  margin: 0 0 8px;
}

.markdown-content p:last-child {
  margin-bottom: 0;
}

.markdown-content strong {
  color: var(--accent-strong);
}

.chat-msg.user .markdown-content strong {
  color: #fff;
}

.markdown-content ul,
.markdown-content ol {
  margin: 8px 0;
  padding-left: 18px;
}

.markdown-content code {
  padding: 1px 4px;
  border-radius: 6px;
  background: #ecfeff;
  color: #0f766e;
  font-size: 0.86em;
}

.chat-code-card {
  margin: 8px 0;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 14px;
  overflow: hidden;
  background: #08111f;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

.chat-code-head {
  min-height: 34px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.16), rgba(59, 130, 246, 0.12));
  color: #cbd5e1;
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.chat-code-head span:first-child {
  color: #67e8f9;
}

.markdown-content pre {
  margin: 0;
  padding: 12px 14px;
  overflow-x: auto;
  background: transparent;
  color: #dbeafe;
  font-size: 0.8rem;
  line-height: 1.55;
}

.markdown-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.markdown-content table {
  width: 100%;
  margin: 8px 0;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
  font-size: 0.84em;
}

.markdown-content th,
.markdown-content td {
  padding: 6px 8px;
  border: 1px solid rgba(109, 77, 168, 0.14);
  text-align: left;
  background: #fff;
  color: var(--text);
}

.markdown-content th {
  background: #faf7ff;
  color: var(--accent-strong);
}

.chat-file-card {
  margin-top: 12px;
  padding: 10px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 14px;
  background: linear-gradient(135deg, #f0fdfa 0%, #eff6ff 100%);
}

.chat-file-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #0f766e;
  color: #fff;
}

.chat-file-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.chat-file-copy strong,
.chat-file-copy span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-file-copy strong {
  color: #0f172a;
  font-size: 0.82rem;
}

.chat-file-copy span {
  color: #64748b;
  font-size: 0.72rem;
}

.chat-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  width: fit-content;
  border: 0;
  border-radius: 11px;
  background: #0f766e;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 10px 18px rgba(15, 118, 110, 0.18);
}

.chat-download-btn:hover {
  background: #115e59;
  color: #fff;
}

.typing-indicator {
  display: none;
  align-self: flex-start;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(109, 77, 168, 0.14);
  border-bottom-left-radius: 6px;
  background: #fff;
}

.typing-indicator.show {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: typing-bounce 1.3s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.18s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes typing-bounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }

  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

.chat-welcome {
  padding: 6px 2px 2px;
  text-align: center;
}

.chat-welcome-emoji {
  font-size: 1.9rem;
  margin-bottom: 8px;
}

.chat-welcome h4 {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: 0.98rem;
}

.chat-welcome p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.chat-quick-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 16px 14px;
  background: linear-gradient(180deg, transparent 0%, rgba(243, 238, 255, 0.82) 100%);
}

.chat-quick-actions[hidden] {
  display: none;
}

.qa-category {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qa-category-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 2px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.qa-category-label .qa-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.qa-dot.green {
  background: #22c55e;
}

.qa-dot.blue {
  background: #3b82f6;
}

.qa-dot.yellow {
  background: #eab308;
}

.qa-category-label.green {
  color: #15803d;
}

.qa-category-label.blue {
  color: #2563eb;
}

.qa-category-label.yellow {
  color: #ca8a04;
}

.qa-category-hint {
  padding: 0 2px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.qa-btns-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quick-action-btn {
  padding: 7px 11px;
  border: 1px solid rgba(109, 77, 168, 0.14);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.quick-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(76, 29, 149, 0.08);
}

.quick-action-btn.green:hover {
  border-color: rgba(34, 197, 94, 0.32);
}

.quick-action-btn.blue:hover {
  border-color: rgba(59, 130, 246, 0.28);
}

.quick-action-btn.yellow:hover {
  border-color: rgba(234, 179, 8, 0.30);
}

.chat-input-area {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(109, 77, 168, 0.10);
  background: rgba(255, 255, 255, 0.94);
}

.chat-input-wrapper {
  flex: 1 1 auto;
}

.chat-input {
  width: 100%;
  min-height: 44px;
  max-height: 110px;
  padding: 11px 14px;
  border: 1.5px solid rgba(109, 77, 168, 0.18);
  border-radius: 14px;
  background: #faf7ff;
  color: var(--text);
  font: inherit;
  resize: none;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.chat-input:focus {
  border-color: rgba(124, 58, 237, 0.46);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.10);
}

.chat-input::placeholder {
  color: #a792cb;
}

.chat-send {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: none;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6f3cc3 0%, #4c1d95 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(76, 29, 149, 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.chat-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 26px rgba(76, 29, 149, 0.26);
}

.chat-send svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat-window.fullscreen .chat-messages,
.chat-window.fullscreen .chat-quick-actions,
.chat-window.fullscreen .chat-input-area {
  padding-left: min(8vw, 92px);
  padding-right: min(8vw, 92px);
}

.chat-window.fullscreen .chat-msg {
  max-width: min(70%, 760px);
}

@media (max-width: 768px) {
  .app-sync-toast {
    left: 12px;
    right: 12px;
    bottom: 88px;
    max-width: none;
  }

  .chat-window.fullscreen .chat-messages,
  .chat-window.fullscreen .chat-quick-actions,
  .chat-window.fullscreen .chat-input-area {
    padding-left: 16px;
    padding-right: 16px;
  }

  .chat-window.fullscreen .chat-msg {
    max-width: 84%;
  }

  .chat-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .chat-sidebar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 4;
    width: min(280px, 86vw);
    box-shadow: 18px 0 34px rgba(15, 23, 42, 0.16);
  }

  .chat-sidebar.is-collapsed {
    transform: translateX(-100%);
  }

  .chat-new-btn span {
    display: none;
  }
}

@media (max-width: 520px) {
  .chat-window {
    inset: auto 0 0 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .chat-fab {
    right: 16px;
    bottom: 16px;
    width: 56px;
    padding: 0;
    justify-content: center;
    border-radius: 18px;
  }

  .chat-fab-copy {
    display: none;
  }

  .app-sync-toast {
    bottom: 82px;
  }

  .chat-msg {
    max-width: 90%;
  }

  .chat-header,
  .chat-input-area,
  .chat-quick-actions,
  .chat-messages {
    padding-left: 14px;
    padding-right: 14px;
  }

  .chat-file-card {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .chat-download-btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}

.call-alert-widget[hidden] {
  display: none;
}

.call-alert-fab {
  position: fixed;
  right: 24px;
  bottom: 94px;
  z-index: 9999;
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(180, 83, 9, 0.24);
  border-radius: 10px;
  background: #f59e0b;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 18px 34px rgba(146, 64, 14, 0.24);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.call-alert-fab:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 42px rgba(146, 64, 14, 0.3);
}

.call-alert-fab i {
  font-size: 1.16rem;
}

.call-alert-count {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 23px;
  height: 23px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  border: 2px solid #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.call-alert-panel {
  position: fixed;
  right: 24px;
  bottom: 154px;
  z-index: 10001;
  width: 420px;
  max-width: calc(100vw - 28px);
  height: min(680px, calc(100vh - 180px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 58px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(22px) saturate(1.12);
  -webkit-backdrop-filter: blur(22px) saturate(1.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.call-alert-panel.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.call-alert-header {
  padding: 15px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #0f766e;
  color: #fff;
}

.call-alert-header-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.call-alert-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
}

.call-alert-header h3,
.call-alert-detail h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0;
}

.call-alert-subtitle {
  margin-top: 3px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.84);
}

.call-alert-close {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  cursor: pointer;
  font-size: 1.1rem;
}

.call-alert-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
}

.call-alert-tab {
  min-height: 38px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 12px;
  background: #fff;
  color: #334155;
  font-weight: 700;
  cursor: pointer;
}

.call-alert-tab.is-active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.call-alert-body {
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.call-alert-view {
  display: none;
  height: 100%;
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.call-alert-view.is-active {
  display: block;
}

.call-alert-bot-line {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #ecfeff;
  color: #155e75;
  font-size: 0.88rem;
  font-weight: 650;
}

.call-alert-type-grid {
  display: grid;
  gap: 8px;
}

.call-alert-type-option {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.call-alert-type-option:has(input:checked) {
  border-color: rgba(15, 118, 110, 0.48);
  background: #f0fdfa;
}

.call-alert-type-option input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #0f766e;
}

.call-alert-type-title {
  display: block;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 800;
}

.call-alert-type-desc {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.35;
}

.call-alert-field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: #334155;
  font-size: 0.84rem;
  font-weight: 750;
}

.call-alert-field textarea,
.call-alert-admin-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 82px;
  padding: 10px 11px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-weight: 500;
}

.call-alert-context {
  margin-top: 10px;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.4;
}

.call-alert-submit,
.call-alert-admin-save {
  width: 100%;
  min-height: 42px;
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  background: #0f766e;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.call-alert-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: #0f172a;
}

.call-alert-list-head strong,
.call-alert-list-head span {
  display: block;
}

.call-alert-list-head span {
  margin-top: 2px;
  color: #64748b;
  font-size: 0.78rem;
}

.call-alert-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 700;
}

.call-alert-list {
  display: grid;
  gap: 8px;
}

.call-alert-item {
  width: 100%;
  padding: 11px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.call-alert-item:hover {
  border-color: rgba(15, 118, 110, 0.38);
}

.call-alert-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.call-alert-item-title {
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.25;
}

.call-alert-item-meta {
  margin-top: 5px;
  color: #64748b;
  font-size: 0.76rem;
  line-height: 1.35;
}

.call-alert-status {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.7rem;
  font-weight: 850;
}

.call-alert-status.doing {
  background: #dbeafe;
  color: #1d4ed8;
}

.call-alert-status.done {
  background: #dcfce7;
  color: #166534;
}

.call-alert-empty {
  padding: 22px 12px;
  border-radius: 14px;
  background: #f8fafc;
  color: #64748b;
  text-align: center;
  font-size: 0.86rem;
}

.call-alert-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.38);
}

.call-alert-detail-backdrop[hidden] {
  display: none;
}

.call-alert-detail {
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 58px rgba(15, 23, 42, 0.24);
}

.call-alert-detail-head {
  padding: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: #0f766e;
  color: #fff;
}

.call-alert-kicker {
  margin-bottom: 3px;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.78);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.call-alert-detail-body {
  min-height: 0;
  overflow: auto;
  padding: 16px;
}

.call-alert-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.call-alert-info {
  padding: 10px 11px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 12px;
  background: #f8fafc;
}

.call-alert-info span {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.call-alert-info strong,
.call-alert-info div {
  color: #0f172a;
  font-size: 0.9rem;
  line-height: 1.35;
}

.call-alert-section-title {
  margin: 16px 0 8px;
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 850;
}

.call-alert-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.call-alert-chip {
  padding: 6px 9px;
  border-radius: 999px;
  background: #ecfeff;
  color: #155e75;
  font-size: 0.78rem;
  font-weight: 750;
}

.call-alert-action-list {
  display: grid;
  gap: 7px;
}

.call-alert-action-line {
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.82rem;
}

.call-alert-admin-form {
  display: grid;
  gap: 9px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.10);
}

.call-alert-admin-form label {
  display: grid;
  gap: 5px;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 750;
}

.call-alert-admin-form select {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font: inherit;
}

.call-alert-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10003;
  max-width: min(360px, calc(100vw - 48px));
  padding: 10px 12px;
  border-radius: 12px;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.24);
  font-size: 0.84rem;
  font-weight: 700;
}

@media (max-width: 520px) {
  .call-alert-fab {
    right: 16px;
    bottom: 86px;
  }

  .call-alert-panel {
    inset: auto 0 0 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .call-alert-detail-grid {
    grid-template-columns: 1fr;
  }
}
