/* =============================================================================
   CodSpoke — Auth pages styles (login, signup, forgot, reset, change password)
   ============================================================================= */

/* ---------------------------------------------------------------------------
   Auth form shared
   --------------------------------------------------------------------------- */
.auth-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
}

.auth-card h1 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.auth-card .sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.auth-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.auth-form input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.auth-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.auth-form .field {
  margin-bottom: 1rem;
}

.auth-form .btn-block {
  margin-top: 0.5rem;
  width: 100%;
}

.auth-card .alt-link {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-card .alt-link a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.auth-card .alt-link a:hover {
  text-decoration: underline;
}

/* Alert / success messages */
.auth-msg {
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.auth-msg.error {
  background: rgba(255, 60, 60, 0.1);
  border: 1px solid rgba(255, 60, 60, 0.25);
  color: #ff6b6b;
}

.auth-msg.success {
  background: rgba(60, 200, 60, 0.1);
  border: 1px solid rgba(60, 200, 60, 0.25);
  color: #6bff6b;
}

.auth-msg.info {
  background: rgba(255, 122, 0, 0.1);
  border: 1px solid rgba(255, 122, 0, 0.25);
  color: var(--accent);
}

/* Password strength indicator */
.pw-strength {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.pw-strength .bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.2s;
}

.pw-strength .bar.active.weak     { background: #ff4444; }
.pw-strength .bar.active.medium   { background: var(--accent); }
.pw-strength .bar.active.strong   { background: #44bb44; }
.pw-strength .bar.active.very-str { background: #22dd22; }

/* ---------------------------------------------------------------------------
   Chat page
   --------------------------------------------------------------------------- */
.chat-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

.chat-sidebar {
  width: 280px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1rem;
  flex-shrink: 0;
}

.chat-sidebar .logo {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
}

.chat-sidebar .logo span { color: var(--accent); }

.chat-sidebar .project-list {
  flex: 1;
  overflow-y: auto;
  list-style: none;
}

.chat-sidebar .project-list li {
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2px;
  transition: background 0.15s;
}

.chat-sidebar .project-list li:hover {
  background: var(--bg-card-hover);
  color: var(--text);
}

.chat-sidebar .project-list li.active {
  background: var(--accent-soft);
  color: var(--text);
  border-left: 2px solid var(--accent);
}

.chat-sidebar .new-project {
  margin-top: auto;
  padding: 0.6rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.15s;
}

.chat-sidebar .new-project:hover {
  background: var(--bg-card-hover);
  color: var(--text);
}

.chat-sidebar .user-info {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.chat-sidebar .user-info a {
  color: var(--accent);
  text-decoration: none;
  display: inline-block;
  margin-top: 4px;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-header {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header h2 {
  font-size: 1rem;
  font-weight: 600;
}

.chat-header .badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-msg {
  max-width: 75%;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  line-height: 1.5;
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.chat-msg.user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-msg.assistant {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  color: var(--text);
}

.chat-input-area {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.chat-input-area textarea {
  flex: 1;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  resize: none;
  min-height: 44px;
  max-height: 150px;
  outline: none;
}

.chat-input-area textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.chat-input-area .btn {
  padding: 0.65rem 1.25rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-align: center;
  padding: 2rem;
}

.chat-empty h2 {
  color: var(--text);
  margin-bottom: 0.5rem;
}

.chat-empty p {
  max-width: 360px;
  font-size: 0.9rem;
}

/* Typing indicator */
.typing-indicator {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing 1.2s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

/* Settings / change password */
.settings-section {
  max-width: 480px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.settings-section h1 {
  margin-bottom: 1.5rem;
}

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.settings-card h2 {
  font-size: 1rem;
  margin-bottom: 1rem;
}
