* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, sans-serif; background: #eef2f7; color: #172033; }
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 380px; max-width: 100%; background: white; padding: 32px; border-radius: 20px; box-shadow: 0 20px 50px rgba(0,0,0,.12); }
.auth-card h1 { margin: 0 0 8px; }
.auth-card p { margin-bottom: 24px; color: #6b7280; line-height: 1.4; }
input, button { width: 100%; padding: 14px; margin-bottom: 12px; border-radius: 12px; border: 1px solid #d1d5db; font-size: 15px; }
button { border: none; background: #2563eb; color: white; cursor: pointer; font-weight: bold; }
button:hover { background: #1d4ed8; }
.auth-link { display: block; margin-top: 8px; color: #2563eb; text-decoration: none; }
.error { display: none; margin-top: 14px; color: #dc2626; }
.app { height: 100vh; display: grid; grid-template-columns: 280px 1fr; }
.sidebar { background: #111827; color: white; padding: 24px; }
.sidebar p { color: #9ca3af; }
.sidebar h3 { margin-top: 32px; }
.sidebar ul { list-style: none; padding: 0; }
.sidebar li { padding: 8px 0; color: #d1d5db; }
.logout { margin-top: 24px; background: #374151; }
.chat { display: flex; flex-direction: column; height: 100vh; }
.chat-header { padding: 20px 28px; background: white; border-bottom: 1px solid #e5e7eb; }
.chat-header h1 { margin: 0 0 4px; }
.chat-header span { color: #6b7280; }
.messages { flex: 1; padding: 24px; overflow-y: auto; }
.message { max-width: 760px; background: white; margin-bottom: 14px; padding: 14px 16px; border-radius: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.message-top { display: flex; justify-content: space-between; gap: 16px; color: #374151; }
.message-top span { color: #9ca3af; font-size: 13px; white-space: nowrap; }
.message p { margin: 8px 0 0; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.system-message { text-align: center; color: #6b7280; margin: 12px 0; font-size: 14px; }
.message-form { display: flex; gap: 12px; padding: 18px; background: white; border-top: 1px solid #e5e7eb; }
.message-form input { margin: 0; }
.message-form button { width: 160px; margin: 0; }
@media (max-width: 800px) { .app { grid-template-columns: 1fr; } .sidebar { display: none; } .message-form { flex-direction: column; } .message-form button { width: 100%; } }
