* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #142033;
  --muted: #6b7280;
  --line: #dbe3ee;
  --primary: #1f5eff;
  --primary-hover: #184fd8;
  --shadow: 0 20px 50px rgba(20, 32, 51, 0.08);
  --radius: 18px;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #f7f9fc 0%, #eef3f9 100%);
}

.login-body {
  min-height: 100vh;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 48px;
  padding: 40px 6vw;
}

.login-brand {
  max-width: 560px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: #e9f0ff;
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.4px;
  margin-bottom: 22px;
}

.login-brand h1 {
  font-size: 44px;
  line-height: 1.1;
  margin-bottom: 18px;
  color: var(--text);
  font-weight: 700;
}

.login-brand p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 500px;
}

.login-card {
  width: 100%;
  max-width: 460px;
  justify-self: end;
  background: var(--card);
  border: 1px solid rgba(219, 227, 238, 0.95);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px;
}

.login-card-header {
  margin-bottom: 28px;
}

.login-card-header h2 {
  font-size: 28px;
  margin-bottom: 6px;
  color: var(--text);
}

.login-card-header span {
  font-size: 14px;
  color: var(--muted);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.form-group input {
  width: 100%;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 15px;
  font-size: 15px;
  color: var(--text);
  outline: none;
  background: #fff;
  transition: 0.2s ease;
}

.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(31, 94, 255, 0.10);
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -2px;
}

.checkbox-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}

.checkbox-wrap input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.form-link {
  font-size: 14px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.form-link:hover {
  text-decoration: underline;
}

.btn-primary {
  height: 52px;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
  margin-top: 8px;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.login-message {
  min-height: 20px;
  font-size: 14px;
  color: #c0392b;
  margin-top: 2px;
}

.login-message.success {
  color: #198754;
}

@media (max-width: 980px) {
  .login-page {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 20px;
  }

  .login-brand {
    max-width: 100%;
  }

  .login-brand h1 {
    font-size: 34px;
  }

  .login-brand p {
    font-size: 15px;
  }

  .login-card {
    max-width: 100%;
    justify-self: stretch;
  }
}

/* DASHBOARD */

.dashboard-body {
  background: #f4f7fb;
}

.dashboard {
  display: grid;
  grid-template-columns: 240px 320px 1fr;
  height: 100vh;
}

/* SIDEBAR */

.sidebar {
  background: #fff;
  border-right: 1px solid #e5e9f2;
  padding: 20px;
}

.logo {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 30px;
  color: #1f5eff;
}

.menu h4 {
  font-size: 13px;
  color: #888;
  margin-bottom: 10px;
}

.tag {
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 5px;
  font-size: 14px;
}

.tag:hover {
  background: #f0f4ff;
}

.tag.active {
  background: #e9f0ff;
  color: #1f5eff;
  font-weight: 600;
}

/* LISTA */

.chat-list {
  background: #fff;
  border-right: 1px solid #e5e9f2;
  display: flex;
  flex-direction: column;
}

.chat-list-header {
  padding: 15px;
  border-bottom: 1px solid #e5e9f2;
}

.chat-list-header input {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.chat-items {
  overflow-y: auto;
  flex: 1;
}

.chat-item {
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}

.chat-item:hover {
  background: #f7f9fc;
}

.chat-item.active {
  background: #e9f0ff;
}

.chat-item strong {
  display: block;
}

.chat-item span {
  font-size: 13px;
  color: #666;
}

.chat-item small {
  font-size: 11px;
  color: #aaa;
}

/* CHAT */

.chat-area {
  display: flex;
  flex-direction: column;
  background: #f9fbff;
}

.chat-header {
  padding: 15px;
  border-bottom: 1px solid #e5e9f2;
  background: #fff;
}

.messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.msg {
  margin-bottom: 12px;
  max-width: 60%;
  padding: 10px 14px;
  border-radius: 12px;
}

.msg.recebida {
  background: #fff;
  border: 1px solid #e5e9f2;
}

.msg.enviada {
  background: #1f5eff;
  color: white;
  margin-left: auto;
}

/* INPUT */

.chat-input {
  display: flex;
  padding: 10px;
  border-top: 1px solid #e5e9f2;
  background: #fff;
}

.chat-input input {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #ddd;
}

.chat-input button {
  margin-left: 10px;
  padding: 10px 16px;
  border: none;
  background: #1f5eff;
  color: white;
  border-radius: 10px;
  cursor: pointer;
}

.chat-input button:hover {
  background: #184fd8;
}