/* ============================================================
   Lehja AI — style.css
   Palette: emerald primary on clean white, soft shadows
============================================================ */

:root {
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --emerald-100: #d1fae5;
  --emerald-50:  #ecfdf5;
  --ink-900: #0f172a;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-400: #94a3b8;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --purple-soft: #ede9fe;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 8px 30px rgba(15, 23, 42, 0.06);
  --shadow-card: 0 12px 40px rgba(15, 23, 42, 0.08);
  --font-latin: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-arabic: "IBM Plex Sans Arabic", "Plus Jakarta Sans", sans-serif;
}

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

html, body { height: 100%; }

body {
  font-family: var(--font-latin);
  color: var(--ink-900);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

[dir="rtl"], [dir="auto"] { font-family: var(--font-arabic); }

/* ---------- Screens ---------- */
.screen { display: none; min-height: 100vh; }
.screen.active { display: block; animation: screenIn 0.45s ease both; }

@keyframes screenIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Shared: brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35);
}
.brand-name { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.brand-name em { font-style: normal; color: var(--emerald-600); }

/* ---------- Shared: buttons & fields ---------- */
.btn-primary {
  border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
  color: #fff; font-family: inherit; font-weight: 700; font-size: 15px;
  padding: 13px 26px; border-radius: var(--radius-md);
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.28);
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(5, 150, 105, 0.36); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn-block { width: 100%; }

.btn-ghost {
  border: none; background: transparent; cursor: pointer;
  color: var(--ink-500); font-family: inherit; font-weight: 600; font-size: 15px;
  padding: 13px 18px; border-radius: var(--radius-md);
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-ghost:hover { background: var(--bg-soft); color: var(--ink-700); }

.field { display: block; margin-bottom: 18px; }
.field-label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-700); margin-bottom: 7px; }
.field input {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink-900);
  padding: 13px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-md);
  background: #fff; outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input::placeholder { color: var(--ink-400); }
.field input:focus { border-color: var(--emerald-500); box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12); }

.eyebrow {
  font-size: 12px; font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--emerald-600); margin-bottom: 10px;
}

/* ============================================================
   1 · LOGIN
============================================================ */
.login-layout { display: grid; grid-template-columns: 1fr 1.05fr; min-height: 100vh; }

.login-left {
  display: flex; align-items: center; justify-content: center;
  padding: 48px 32px;
  background: linear-gradient(180deg, #fff 0%, var(--emerald-50) 130%);
}
.login-form-wrap { width: 100%; max-width: 420px; }
.login-form-wrap .brand { margin-bottom: 42px; }

.login-title { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 10px; }
.login-sub { color: var(--ink-500); font-size: 15.5px; margin-bottom: 34px; }

#login-form .btn-primary { margin-top: 6px; }
.login-alt { text-align: center; margin-top: 26px; font-size: 14.5px; color: var(--ink-500); font-weight: 500; }
.login-alt a { color: var(--emerald-600); font-weight: 700; text-decoration: none; }
.login-alt a:hover { text-decoration: underline; }

.login-right {
  position: relative; overflow: hidden;
  display: flex; align-items: center;
  background: linear-gradient(160deg, #059669 0%, #047857 55%, #065f46 100%);
  padding: 64px;
}
.login-right-inner { position: relative; z-index: 2; max-width: 560px; }

.hero-chip {
  display: inline-flex; align-items: center;
  padding: 9px 20px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff; font-size: 15px; font-weight: 600;
  backdrop-filter: blur(6px);
}
.hero-chip-top { margin-bottom: 34px; }

.hero-title { color: #fff; font-size: clamp(36px, 4vw, 52px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; margin-bottom: 18px; }
.hero-sub { color: rgba(255, 255, 255, 0.85); font-size: 17px; margin-bottom: 34px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.5; }
.hero-orb-a { width: 420px; height: 420px; background: #34d399; top: -140px; right: -120px; }
.hero-orb-b { width: 360px; height: 360px; background: #065f46; bottom: -140px; left: -100px; }

/* ============================================================
   2 · PLACEMENT TEST
============================================================ */
#screen-test { background: var(--bg-soft); }
.test-layout { max-width: 860px; margin: 0 auto; padding: 44px 24px 80px; }
.test-top .brand { margin-bottom: 26px; }

.test-progress-track { height: 8px; border-radius: 999px; background: var(--emerald-100); overflow: hidden; }
.test-progress-fill {
  height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--emerald-500), var(--emerald-600));
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.test-progress-label { margin-top: 10px; font-size: 13.5px; font-weight: 600; color: var(--ink-500); }

.test-card {
  margin-top: 32px; background: #fff; border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card); padding: 40px 44px 34px;
}
.test-card.slide { animation: slideQ 0.35s ease both; }
@keyframes slideQ {
  from { opacity: 0; transform: translateX(18px); }
  to   { opacity: 1; transform: none; }
}

.test-question { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 26px; }

.test-options { display: flex; flex-direction: column; gap: 14px; }
.option {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left; cursor: pointer;
  font-family: inherit; font-size: 16.5px; font-weight: 500; color: var(--ink-900);
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-md);
  padding: 17px 20px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.option:hover { border-color: var(--emerald-400); background: var(--emerald-50); }
.option .radio {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--ink-400); position: relative;
  transition: border-color 0.15s ease;
}
.option.selected { border-color: var(--emerald-500); background: var(--emerald-50); box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.10); }
.option.selected .radio { border-color: var(--emerald-600); }
.option.selected .radio::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%;
  background: var(--emerald-600);
}
.option [dir="rtl"] { font-size: 18px; }

.test-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 30px; }

/* ============================================================
   3 · PREPARING PERSONALIZED LESSONS  (polished)
============================================================ */
#screen-preparing {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 600px at 18% 12%, rgba(167, 243, 208, 0.35), transparent 60%),
    radial-gradient(900px 620px at 84% 86%, rgba(221, 214, 254, 0.45), transparent 60%),
    linear-gradient(180deg, #fbfdfc 0%, #f7f7fd 100%);
}
#screen-preparing.active { display: flex; align-items: center; justify-content: center; }

.prep-bg { position: absolute; inset: 0; pointer-events: none; }
.prep-orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.45; animation: orbFloat 9s ease-in-out infinite alternate; }
.prep-orb-green  { width: 460px; height: 460px; background: #a7f3d0; top: -160px; left: -120px; }
.prep-orb-purple { width: 480px; height: 480px; background: #ddd6fe; bottom: -180px; right: -140px; animation-delay: -4s; }
@keyframes orbFloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, -24px) scale(1.06); }
}
.prep-grid {
  position: absolute; inset: 0; opacity: 0.5;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(closest-side at 50% 45%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(closest-side at 50% 45%, #000 30%, transparent 100%);
}

.prep-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 40px 24px; max-width: 640px;
  animation: prepIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes prepIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* Robot */
.prep-bot-wrap { position: relative; margin-bottom: 34px; }
.prep-bot {
  position: relative; z-index: 2;
  width: 92px; height: 92px; border-radius: 26px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #ffffff, #f0fdf7);
  border: 1px solid rgba(16, 185, 129, 0.18);
  box-shadow:
    0 18px 40px rgba(5, 150, 105, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  animation: botBob 3.2s ease-in-out infinite;
}
@keyframes botBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-8px) rotate(-1.5deg); }
}
.prep-bot-ring {
  position: absolute; inset: -14px; border-radius: 34px; z-index: 1;
  border: 1.5px dashed rgba(16, 185, 129, 0.35);
  animation: ringSpin 14s linear infinite;
}
@keyframes ringSpin { to { transform: rotate(360deg); } }

.bot-eye { animation: blink 4.2s infinite; transform-origin: center; }
@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95%           { transform: scaleY(0.12); }
}

.prep-spark { position: absolute; color: var(--emerald-400); font-size: 14px; animation: spark 2.6s ease-in-out infinite; }
.prep-spark.s1 { top: -8px; right: -18px; }
.prep-spark.s2 { bottom: 2px; left: -22px; animation-delay: -0.9s; color: #a78bfa; }
.prep-spark.s3 { top: 30px; right: -30px; animation-delay: -1.7s; font-size: 10px; }
@keyframes spark {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50%      { opacity: 1; transform: scale(1); }
}

.prep-badge {
  display: inline-flex; padding: 7px 16px; border-radius: 999px;
  background: rgba(16, 185, 129, 0.10); border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--emerald-600); font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
  margin-bottom: 20px;
}

.prep-title {
  font-size: clamp(26px, 3.4vw, 36px); font-weight: 800;
  letter-spacing: -0.025em; line-height: 1.2; margin-bottom: 14px;
}
.prep-ellipsis span { animation: dotPulse 1.4s infinite; display: inline-block; }
.prep-ellipsis span:nth-child(2) { animation-delay: 0.2s; }
.prep-ellipsis span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

.prep-sub { color: var(--ink-500); font-size: 16px; margin-bottom: 38px; max-width: 460px; }

.prep-bar-track {
  width: min(380px, 82vw); height: 10px; border-radius: 999px;
  background: rgba(15, 23, 42, 0.06); overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}
.prep-bar-fill {
  position: relative; height: 100%; width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #34d399, #059669 60%, #8b5cf6 140%);
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.prep-bar-shine {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-100%);
  animation: shine 1.4s ease-in-out infinite;
}
@keyframes shine { to { transform: translateX(100%); } }

.prep-step { margin-top: 20px; font-size: 14px; font-weight: 600; color: var(--ink-400); min-height: 20px; transition: opacity 0.25s ease; }
.prep-step.fade { opacity: 0; }

/* ============================================================
   4 · MAIN CHAT DASHBOARD
============================================================ */
#screen-app.active { display: flex; flex-direction: column; height: 100vh; }

.app-header {
  flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 24px;
  background: #fff; border-bottom: 1px solid var(--line);
  position: relative; z-index: 30;
}

/* Mode toggle */
.mode-toggle {
  position: relative; display: flex; align-items: center;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px;
}
.mode-btn {
  position: relative; z-index: 2;
  border: none; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 14.5px; font-weight: 600; color: var(--ink-500);
  padding: 9px 22px; border-radius: 999px;
  transition: color 0.2s ease;
}
.mode-btn.active { color: var(--emerald-600); font-weight: 700; }
.mode-pill {
  position: absolute; top: 4px; bottom: 4px; z-index: 1;
  border-radius: 999px; background: #fff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.10);
  transition: left 0.28s cubic-bezier(0.22, 1, 0.36, 1), width 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Profile */
.profile-area { position: relative; }
.profile-btn {
  display: flex; align-items: center; gap: 11px;
  border: 1px solid transparent; background: transparent; cursor: pointer;
  font-family: inherit; padding: 6px 10px; border-radius: var(--radius-md);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.profile-btn:hover { background: var(--bg-soft); border-color: var(--line); }

.avatar {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
  color: #fff; font-weight: 800; font-size: 14px; letter-spacing: 0.02em;
}
.profile-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.profile-name { font-size: 14.5px; font-weight: 700; color: var(--ink-900); }
.profile-email { font-size: 12.5px; color: var(--ink-500); }
.profile-caret { color: var(--ink-400); transition: transform 0.2s ease; }
.profile-btn[aria-expanded="true"] .profile-caret { transform: rotate(180deg); }

.profile-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 300px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  padding: 20px; z-index: 50;
  animation: dropIn 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.dropdown-title { font-size: 15px; font-weight: 800; margin-bottom: 16px; }
.field-sm { margin-bottom: 13px; }
.field-sm input { padding: 10px 13px; font-size: 14px; border-radius: var(--radius-sm); }
.save-confirm { margin-top: 10px; text-align: center; font-size: 13px; font-weight: 700; color: var(--emerald-600); }

.evaluation-divider {
  height: 1px; background: var(--line); margin: 18px 0 14px;
}
.survey-note {
  color: var(--ink-500); font-size: 12.5px; line-height: 1.55; margin-bottom: 10px;
}
.btn-survey {
  border: 1.5px solid rgba(5, 150, 105, 0.28);
  cursor: pointer;
  background: var(--emerald-50);
  color: var(--emerald-600);
  font-family: inherit;
  font-weight: 800;
  font-size: 13.5px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn-survey:hover {
  background: #dcfce7; border-color: var(--emerald-400); transform: translateY(-1px);
}

/* Chat shell */
.chat-shell {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  width: 100%; max-width: 900px; margin: 0 auto;
  padding: 0 20px;
}

/* Learning progress card */
.progress-card {
  flex: none; margin-top: 18px;
  background: linear-gradient(135deg, #f0fdf7, #fbfefd 60%);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 18px 22px 16px;
  animation: dropIn 0.3s ease both;
}
.progress-card-stats {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
  margin-bottom: 13px;
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-400); }
.stat-value { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.stat-value.accent { color: var(--emerald-600); }
.progress-card-bar { height: 8px; border-radius: 999px; background: rgba(15, 23, 42, 0.07); overflow: hidden; }
.progress-card-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--emerald-400), var(--emerald-600));
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Messages */
.chat-messages {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 24px 4px 12px;
  display: flex; flex-direction: column; gap: 18px;
  scroll-behavior: smooth;
}

.msg { display: flex; gap: 12px; max-width: 78%; animation: msgIn 0.3s ease both; }
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.msg.ai   { align-self: flex-start; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }

.msg-avatar {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff;
}
.msg.ai .msg-avatar   { background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600)); }
.msg.user .msg-avatar { background: var(--ink-700); }

.msg-bubble {
  padding: 14px 18px; font-size: 15.5px; line-height: 1.65;
  border-radius: 18px; white-space: pre-line;
  unicode-bidi: plaintext;
}
.msg.ai .msg-bubble {
  background: #fff; border: 1px solid var(--line);
  border-top-left-radius: 6px;
  box-shadow: var(--shadow-soft);
}
.msg.user .msg-bubble {
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
  color: #fff; border-top-right-radius: 6px;
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.22);
}

/* Typing indicator */
.typing { display: inline-flex; gap: 5px; padding: 6px 2px; }
.typing i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ink-400);
  animation: typingDot 1.1s infinite ease-in-out;
}
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-5px); opacity: 1; }
}

/* Quiz answer chips inside chat */
.quiz-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.quiz-opt {
  border: 1.5px solid var(--line); background: #fff; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 700; color: var(--ink-700);
  padding: 8px 16px; border-radius: 999px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.quiz-opt:hover:not(:disabled) { border-color: var(--emerald-500); background: var(--emerald-50); color: var(--emerald-600); }
.quiz-opt:disabled { opacity: 0.5; cursor: default; }

/* Composer */
.composer-area { flex: none; padding: 10px 0 14px; }
.prompt-chips { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-bottom: 12px; }
.prompt-chip {
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-700);
  padding: 9px 16px; border-radius: 999px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
  unicode-bidi: plaintext;
}
.prompt-chip:hover { border-color: var(--emerald-400); background: var(--emerald-50); transform: translateY(-1px); }

.composer {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1.5px solid var(--line);
  border-radius: 999px; padding: 8px 8px 8px 22px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.composer:focus-within { border-color: var(--emerald-500); box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.10); }
.composer input {
  flex: 1; border: none; outline: none; background: transparent;
  font-family: inherit; font-size: 15.5px; color: var(--ink-900);
  unicode-bidi: plaintext;
}
.composer input::placeholder { color: var(--ink-400); }
.send-btn {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
  box-shadow: 0 6px 14px rgba(5, 150, 105, 0.3);
  transition: transform 0.12s ease;
}
.send-btn:hover { transform: scale(1.06); }
.send-btn:active { transform: scale(0.97); }

.composer-hint { text-align: center; margin-top: 9px; font-size: 12.5px; color: var(--ink-400); }

/* ============================================================
   Responsive
============================================================ */
@media (max-width: 960px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-right { min-height: 46vh; padding: 44px 28px; order: -1; }
  .login-left { padding: 40px 24px 60px; }
  .progress-card-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .test-card { padding: 28px 22px; }
  .test-question { font-size: 22px; }
  .profile-meta { display: none; }
  .mode-btn { padding: 8px 14px; font-size: 13px; }
  .app-header { padding: 10px 14px; }
  .brand-name { display: none; }
  .msg { max-width: 92%; }
  .progress-card-stats { grid-template-columns: repeat(2, 1fr); }
  .prompt-chips {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
  }
  .prompt-chip { padding: 7px 11px; font-size: 12px; }
  .profile-dropdown { right: -8px; width: calc(100vw - 32px); max-width: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}
