.chat-shell {
  min-height: 100vh;
  background: linear-gradient(180deg, #e8f4fc 0%, #ffffff 40%);
}

.chat-panel {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 5rem);
  max-height: 720px;
  border-radius: 1.25rem;
  border: 1px solid rgba(0, 84, 166, 0.12);
  background: #fff;
  box-shadow: 0 8px 32px rgba(0, 84, 166, 0.1);
  overflow: hidden;
}

@media (min-width: 1024px) {
  .chat-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1rem;
    height: calc(100vh - 8rem);
    max-height: 760px;
  }

  .chat-panel--list {
    max-height: none;
    height: 100%;
  }

  .chat-panel--thread {
    max-height: none;
    height: 100%;
  }
}

.chat-list {
  flex: 1;
  overflow-y: auto;
}

.chat-list-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e8f4fc;
  transition: background 0.15s ease;
}

.chat-list-item:hover,
.chat-list-item.is-active {
  background: #e8f4fc;
}

.chat-list-item__subject {
  font-size: 0.9rem;
  font-weight: 700;
  color: #003366;
}

.chat-list-item__meta {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #4a6a85;
}

.chat-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.chat-badge--unread {
  background: #0054A6;
  color: #fff;
}

.chat-badge--read {
  background: #edf7e6;
  color: #00A99D;
}

.chat-thread {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  background: #f8fbfe;
}

.chat-bubble {
  max-width: 85%;
  margin-bottom: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  font-size: 0.9rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble--mine {
  margin-left: auto;
  background: linear-gradient(135deg, #0054A6, #00AEEF);
  color: #fff;
  border-bottom-right-radius: 0.25rem;
}

.chat-bubble--theirs {
  margin-right: auto;
  background: #fff;
  color: #003366;
  border: 1px solid #c5dff0;
  border-bottom-left-radius: 0.25rem;
}

.chat-bubble__meta {
  margin-top: 0.35rem;
  font-size: 0.65rem;
  opacity: 0.8;
}

.chat-compose {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid #e8f4fc;
  background: #fff;
}

.chat-compose textarea {
  flex: 1;
  min-height: 2.75rem;
  max-height: 8rem;
  resize: vertical;
  border-radius: 0.75rem;
  border: 1px solid #c5dff0;
  padding: 0.65rem 0.85rem;
  font-family: inherit;
  font-size: 0.9rem;
  color: #003366;
}

.chat-compose textarea:focus {
  outline: none;
  border-color: #00AEEF;
  box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.2);
}

.chat-empty {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  color: #4a6a85;
  font-size: 0.95rem;
}

.form-sis label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #003366;
}

.form-sis input,
.form-sis textarea,
.form-sis select {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid #c5dff0;
  padding: 0.7rem 0.9rem;
  font-family: inherit;
  font-size: 0.9rem;
  color: #003366;
  background: #fff;
}

.form-sis input:focus,
.form-sis textarea:focus,
.form-sis select:focus {
  outline: none;
  border-color: #00AEEF;
  box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.2);
}

.btn-sis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-sis--primary {
  background: linear-gradient(90deg, #0054A6, #00AEEF);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 84, 166, 0.25);
}

.btn-sis--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 84, 166, 0.3);
}

.btn-sis--ghost {
  background: #fff;
  color: #0054A6;
  border: 1px solid #c5dff0;
}

.alert-sis {
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
}

.alert-sis--info {
  background: #e8f4fc;
  color: #0054A6;
  border: 1px solid #c5dff0;
}

.alert-sis--error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.alert-sis--success {
  background: #edf7e6;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.fab-contact {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  padding: 0.85rem 1.25rem;
  background: linear-gradient(90deg, #0054A6, #00AEEF);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 8px 28px rgba(0, 84, 166, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fab-contact:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0, 84, 166, 0.4);
}

@media (max-width: 640px) {
  .fab-contact span.fab-label {
    display: none;
  }
  .fab-contact {
    padding: 1rem;
    border-radius: 9999px;
  }
}
