:root {
  --bg: #fdfaf7;
  --card: #ffffff;
  --text: #4a3f35;
  --text-2: #8c7e6d;
  --accent: #bc8f8f;
  --border: #e8ded1;
  --primary: #8b5e3c;
  --primary-dark: #6f4a30;
  --secondary: #d2b48c;
  --soft-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

body {
  margin: 0;
  font-family: 'Kanit', sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app-container {
  max-width: 500px;
  margin: 0 auto;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.top-bar h1 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  margin: 0;
}

.bar-right {
  display: flex;
  gap: 8px;
}

.chip {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  box-shadow: var(--soft-shadow);
}

.chat-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-card {
  background: var(--card);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--soft-shadow);
  border: 1px solid var(--border);
}

.form-header {
  text-align: center;
  margin-bottom: 20px;
}

.form-header h2 {
  margin: 0;
  font-family: 'Playfair Display', serif;
}

.form-subtitle {
  font-size: 14px;
  color: var(--text-2);
  margin: 4px 0 0;
}

.form-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 4px;
  display: block;
}

.input-wrapper-single {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-family: inherit;
  box-sizing: border-box;
}

.input-suffix {
  font-size: 11px;
  color: var(--text-2);
  float: right;
}

.error-message {
  color: #d9534f;
  font-size: 12px;
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:disabled {
  background: var(--border);
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.success-card {
  text-align: center;
  padding: 40px 20px;
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

.success-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.success-name {
  font-size: 24px;
  font-weight: 600;
  margin: 12px 0;
}

.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: 16px;
  border: 1px solid var(--border);
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-name {
  flex: 1;
  font-weight: 500;
}

.users-list {
  margin-top: 20px;
}

.list-header h3 {
  font-size: 16px;
  margin-bottom: 12px;
}

.input-container {
  margin-top: auto;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.footer-content {
  text-align: center;
}

.footer-status {
  font-size: 12px;
  color: var(--text-2);
  display: block;
  margin-bottom: 8px;
}
