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

:root {
  --bg: #FFFDF5;
  --text: #1a1a1a;
  --text-muted: #8a8580;
  --lesa-bubble: #F0EDE6;
  --user-bubble: #E8F0FE;
  --accent: #0033FF;
  --accent-hover: #0033FF;
  --input-bg: #F5F3ED;
  --input-border: #E0DDD6;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
}

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ── Login Page ── */

.login-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  height: 100dvh;
  padding: 24px;
  padding-top: calc(24px + env(safe-area-inset-top, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.login-card {
  position: relative;
  max-width: 380px;
  width: 100%;
  text-align: center;
}

.login-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.login-byline {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}

.login-tagline {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 40px;
  letter-spacing: 0.3px;
}

.login-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.btn {
  display: block;
  width: 100%;
  padding: 18px;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--input-border);
}

.btn-secondary:hover {
  background: #EBE8E1;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.login-status {
  margin-top: 16px;
  font-size: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  display: none;
  text-align: left;
}

.login-status.show { display: block; }
.login-status.loading { background: #E8EEFF; color: var(--accent); }
.login-status.error { background: #FFF0F0; color: #D32F2F; }
.login-status.success { background: #F0FFF4; color: #2E7D32; }

.login-footer {
  margin-top: 48px;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.2px;
}

