/* Auth-page styles for the chat channel.
 *
 * Loaded ONLY by login.html, forgot-password.html and reset-password.html.
 * The chat surface itself (templates/index.html) does not link this file — it
 * loads tailwind.css plus its own inline <style> block, and that block is where
 * chat/markdown CSS belongs. This file was called styles.css until #2212; the
 * name implied it styled the whole channel, which is how a dead `.message-bubble`
 * rule family and every `.msg-content` rule survived here unnoticed (#2094,
 * #2107). Renamed so the next person doesn't make the same assumption.
 */

:root {
  --color-bg: #ffffff;
  --color-surface: #f0f0f0;
  --color-border: #d0d0d0;
  --color-text: #333333;
  --color-text-muted: #888;
  --color-primary: #3b82f6;
  --color-primary-hover: #2563eb;
  --color-input-bg: #ffffff;
  --color-input-text: #000000;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

html, body {
  height: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
}

/* All three pages toggle their error/success banners with the `hidden`
   attribute, which the `*` reset above would otherwise leave visible. */
[hidden] {
  display: none !important;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.15s, opacity 0.15s;
}

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

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

.btn-primary:hover:not(:disabled) {
  background-color: var(--color-primary-hover);
}

/* Login / password-reset cards */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  text-align: center;
}

.login-card h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.login-subtitle {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
}

.form-group input {
  padding: 0.625rem 0.75rem;
  font-family: inherit;
  font-size: 0.875rem;
  background-color: var(--color-input-bg);
  color: var(--color-input-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.form-group input:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.form-group input::placeholder {
  color: var(--color-text-muted);
}

.login-btn {
  width: 100%;
  padding: 0.625rem;
  margin-top: 0.5rem;
}

.login-error {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.login-success {
  background-color: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.forgot-password-link {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.forgot-password-link a {
  color: var(--color-primary);
  text-decoration: none;
}

.forgot-password-link a:hover {
  text-decoration: underline;
}

.login-back-link {
  margin-top: 1rem;
  font-size: 0.875rem;
}

.login-back-link a {
  color: var(--color-primary);
  text-decoration: none;
}

.login-back-link a:hover {
  text-decoration: underline;
}
