.teams-app {
  min-height: 100vh;
  background: transparent;
}

.teams-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.teams-view.hidden {
  display: none;
}

.teams-auth-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 36px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--fx-radius-xl);
  box-shadow: 0 12px 48px rgba(45, 90, 135, 0.12);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.teams-app .btn-primary {
  background: #12121a !important;
  color: #fff !important;
}

.teams-logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--fx-text);
  text-decoration: none;
  display: block;
  margin-bottom: 12px;
}

.teams-auth-lead {
  font-size: 14px;
  color: var(--fx-text-secondary);
  line-height: 1.55;
  margin-bottom: 28px;
}

.teams-auth-foot {
  margin-top: 20px;
  font-size: 13px;
  color: var(--fx-text-tertiary);
  text-align: center;
}

.teams-auth-foot a {
  color: var(--fx-sky, #3b6fd9);
  font-weight: 600;
}

.teams-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--fx-nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--fx-border);
  backdrop-filter: blur(12px);
}

.teams-logo-sm {
  font-weight: 700;
  font-size: 16px;
}

.teams-agent-name {
  font-size: 12px;
  color: var(--fx-text-secondary);
}

#view-chat {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding-top: var(--fx-nav-h);
  padding-bottom: 88px;
}

.teams-chat {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

.msg {
  max-width: 85%;
  margin-bottom: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.5;
}

.msg.user {
  margin-left: auto;
  background: var(--fx-accent, #12121a);
  color: #fff;
}

.msg.bot {
  background: #fff;
  border: 1px solid var(--fx-border);
  color: var(--fx-text);
}

.msg.err {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.teams-compose {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid var(--fx-border);
  max-width: 720px;
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
}

.teams-compose textarea {
  flex: 1;
  resize: none;
  padding: 12px 14px;
  border: 1px solid var(--fx-border-strong);
  border-radius: var(--fx-radius-sm);
  font-family: inherit;
  font-size: 14px;
}

.teams-compose .btn {
  flex: 0 0 auto;
  align-self: flex-end;
}

.teams-auth-lead a {
  color: var(--fx-sky, #2d5a87);
  font-weight: 600;
  text-decoration: none;
}

.teams-auth-lead a:hover {
  text-decoration: underline;
}

#btn-join:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
