:root {
  --bg-light: #f5f7fa;
  --bg-white: #ffffff;
  --text-dark: #333333;
  --text-muted: #555555;
  --primary: #1e3a8a;
  --primary-dark: #162c6b;
  --border-radius: 10px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --transition: 0.2s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html {
  height: 100%;
  font-family: 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
}

/* ─── Navigation Bar ─── */
.nav {
  width: 100%;
  background: var(--primary);
  color: #fff;
  display: flex;
  justify-content: flex-end;
  padding: 1rem 2rem;
  box-shadow: var(--shadow);
  border-radius: 0 0 12px 12px;
  position: fixed;
  top: 0;
  z-index: 10;
}

.menu-wrapper {
  position: relative;
  display: inline-block;
}

.menu-button {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #fff;
  cursor: pointer;
  padding: 0.5rem 1rem;
  font-weight: 500;
}

.menu-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--bg-white);
  box-shadow: var(--shadow);
  border-radius: var(--border-radius);
  padding: 0.5rem 0;
  min-width: 180px;
  z-index: 1000;
}

.menu-dropdown a {
  display: block;
  padding: 12px 20px;
  color: var(--text-dark);
  font-size: 0.95rem;
  text-decoration: none;
  transition: background var(--transition);
}

.menu-dropdown a:hover {
  background-color: #f3f4f6;
}

.menu-wrapper:hover .menu-dropdown {
  display: block;
}

/* ─── Container Layout ─── */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 6rem; /* space for fixed nav */
}

/* ─── Card Styling ─── */
.card {
  background: var(--bg-white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.card h1, .card h2, .card h4 {
  color: var(--primary);
  text-align: center;
  margin-bottom: 1rem;
}

/* ─── User Info Block ─── */
.user-info {
  background: #eef2f7;
  padding: 1rem;
  border-radius: var(--border-radius);
  font-size: 0.95rem;
}

.user-info p {
  margin: 0.3rem 0;
  color: var(--text-muted);
}

/* ─── Forms ─── */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

form label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

form input,
form select {
  padding: 0.75rem;
  font-size: 0.95rem;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  transition: border-color var(--transition);
}

form input:focus,
form select:focus {
  outline: none;
  border-color: var(--primary);
}

form button {
  margin-top: 1rem;
  padding: 0.75rem;
  font-size: 1rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background var(--transition);
}

form button:hover {
  background: var(--primary-dark);
}

#message {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.95rem;
}

/* ─── Chat History Cards ─── */
#history-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

#history-list .card {
  margin: 0;
  transform: none;
}

#history-list .message pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ─── Chat Message Styling ─── */
.message {
  background: var(--bg-white);
  padding: 1rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  line-height: 1.5;
}

.message.user {
  align-self: flex-end;
  border-left: 4px solid var(--primary);
}

.message.ai {
  align-self: flex-start;
}
.dropdown-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #fff;
  cursor: pointer;
  padding: 0.5rem 1rem;
  font-weight: 500;
}
/* Customer Name field — match other inputs */
#customer_name{
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d4d9e2;
  border-radius: 12px;
  background: #fff;
  font: inherit;
  box-sizing: border-box;
}
#customer_name::placeholder{ color:#9aa3b2; }
#customer_name:focus{
  outline: none;
  border-color: #2f6bff;
  box-shadow: 0 0 0 3px rgba(47,107,255,.15);
}
