/* TUI AI Literacy Mentor — design system.
 * TUI brand: navy #092A5E (primary), action blue, sky tints, TUI red #D40E14
 * reserved for the brand mark, alerts and small accents. */

:root {
  --navy: #092a5e;
  --navy-2: #0d3a80;
  --blue: #0c5fae;
  --blue-dark: #094a88;
  --sky: #e8f2fb;
  --sky-2: #f5f9fd;
  --red: #d40e14;
  --yellow: #ffb400;
  --green: #1d7d4f;
  --bg: #eef2f8;
  --card: #ffffff;
  --text: #14213d;
  --muted: #5b6b8c;
  --border: #dce4f0;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 6px 24px rgba(9, 42, 94, 0.08);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
}

.hidden { display: none !important; }

button { font-family: var(--font); }

/* ------------------------------------------------------------- top bar -- */

.topbar {
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.6rem 1.2rem;
  flex-shrink: 0;
}

.brand { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }

.brand-mark {
  background: var(--red);
  border-radius: 50%;
  width: 2.3rem;
  height: 2.3rem;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.brand-title {
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }

.level-badge {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0.22rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.local-badge {
  background: var(--yellow);
  color: #2b2200;
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.lang-toggle {
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  overflow: hidden;
}

.lang-btn {
  background: transparent;
  color: #fff;
  border: 0;
  padding: 0.3rem 0.65rem;
  cursor: pointer;
  font-size: 0.85rem;
}

.lang-btn.active { background: #fff; color: var(--navy); font-weight: 700; }

.ghost-btn {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  font-size: 0.85rem;
  white-space: nowrap;
}

.ghost-btn:hover { background: rgba(255, 255, 255, 0.12); }

.ghost-btn.dark {
  color: var(--navy);
  border-color: var(--navy);
}

.ghost-btn.dark:hover { background: var(--sky); }

/* ---------------------------------------------------------------- auth -- */

.auth-view {
  flex: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 0;
}

.auth-hero {
  background:
    radial-gradient(120% 140% at 0% 0%, var(--navy-2) 0%, var(--navy) 55%, #061d42 100%);
  color: #fff;
  display: grid;
  place-items: center;
  padding: 3rem 2rem;
}

.auth-hero-inner { max-width: 26rem; }

.auth-emblem {
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 1.4rem;
  color: var(--yellow);
  margin-bottom: 1.4rem;
}

.auth-hero h2 {
  font-size: 1.9rem;
  line-height: 1.25;
  margin: 0 0 1.2rem;
  letter-spacing: -0.01em;
}

.auth-points { list-style: none; margin: 0; padding: 0; }

.auth-points li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.7rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
}

.auth-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--yellow);
  font-weight: 700;
}

.auth-side {
  display: grid;
  place-items: center;
  padding: 2rem 1.2rem;
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem;
  width: min(26rem, 100%);
  box-shadow: var(--shadow);
}

.auth-card h1 { margin: 0 0 0.4rem; color: var(--navy); font-size: 1.6rem; }
.auth-card p { margin: 0 0 1.4rem; color: var(--muted); font-size: 0.95rem; }

.auth-card label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.85rem 0 0.3rem;
}

.auth-card input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font);
}

.auth-card input:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }

.auth-card button {
  margin-top: 1.5rem;
  width: 100%;
  background: var(--navy);
  color: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.auth-card button:hover { background: var(--navy-2); }

.error { color: var(--red); font-size: 0.85rem; margin-top: 0.8rem; }

/* ----------------------------------------------------------- app shell -- */

.app {
  flex: 1;
  display: grid;
  grid-template-columns: 19rem minmax(0, 1fr);
  gap: 1.2rem;
  width: 100%;
  max-width: 75rem;
  margin: 0 auto;
  padding: 1.2rem;
  min-height: 0;
}

/* ------------------------------------------------------------- sidebar -- */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
  overflow-y: auto;
}

.side-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
}

.side-card h3 {
  margin: 0 0 0.9rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

/* journey stepper */
.journey { list-style: none; margin: 0; padding: 0; }

.journey li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.45rem 0;
}

.journey li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 0.95rem;
  top: 2.35rem;
  bottom: -0.45rem;
  width: 2px;
  background: var(--border);
}

.journey li.done:not(:last-child)::after { background: var(--green); }

.j-dot {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--sky-2);
  border: 2px solid var(--border);
  color: var(--muted);
  flex-shrink: 0;
  z-index: 1;
}

.journey li.done .j-dot { background: var(--green); border-color: var(--green); color: #fff; }

.journey li.current .j-dot {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  box-shadow: 0 0 0 4px var(--sky);
}

.j-label { font-size: 0.92rem; font-weight: 600; line-height: 1.2; }
.j-sub { display: block; font-size: 0.76rem; color: var(--muted); font-weight: 500; }

.journey li.current .j-label { color: var(--navy); }

/* assessment progress inside journey card */
.j-progress { margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid var(--border); }

.j-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.progress-track {
  height: 0.5rem;
  border-radius: 999px;
  background: var(--sky);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--navy) 100%);
  transition: width 0.4s ease;
}

/* learning path card */
.path-items { list-style: none; margin: 0 0 0.8rem; padding: 0; }

.path-items li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.4rem 0;
  font-size: 0.88rem;
  line-height: 1.3;
}

.p-check {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  color: #fff;
  margin-top: 0.1rem;
}

.path-items li.completed .p-check { background: var(--green); border-color: var(--green); }
.path-items li.completed a { color: var(--muted); text-decoration: line-through; }

.path-items a { color: var(--navy); text-decoration: none; font-weight: 600; }
.path-items a:hover { text-decoration: underline; }

.p-mins { color: var(--muted); font-size: 0.78rem; white-space: nowrap; }

.path-meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.7rem; }

.path-techme {
  display: inline-block;
  background: var(--sky);
  color: var(--navy);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.8rem;
}

.path-techme:hover { background: #d9eafa; }

.admin-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--card);
  border: 1px dashed var(--blue);
  color: var(--blue);
  border-radius: var(--radius);
  padding: 0.65rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.admin-toggle:hover { background: var(--sky-2); }

/* ---------------------------------------------------------------- chat -- */

.chat-view {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 0.3rem 0.2rem;
}

.msg-row { display: flex; gap: 0.6rem; max-width: 88%; }
.msg-row.user { align-self: flex-end; flex-direction: row-reverse; }
.msg-row.agent, .msg-row.thinking, .msg-row.error { align-self: flex-start; }

.avatar {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  background: var(--navy);
  color: var(--yellow);
  margin-top: 0.15rem;
}

.msg {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  line-height: 1.5;
  font-size: 0.95rem;
  min-width: 0;
  overflow-wrap: break-word;
}

.msg-row.user .msg {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.msg-row.agent .msg {
  background: var(--card);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 10px rgba(9, 42, 94, 0.05);
}

.msg-row.error .msg { background: #fdf0f0; border: 1px solid #f3c2c4; color: var(--red); }

.msg a { color: var(--blue); font-weight: 600; }
.msg ul { margin: 0.4rem 0; padding-left: 1.2rem; }

/* typing indicator */
.msg.typing { display: flex; align-items: center; gap: 0.7rem; color: var(--muted); }

.dots { display: inline-flex; gap: 0.25rem; }

.dots span {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--blue);
  opacity: 0.35;
  animation: pulse 1.2s infinite ease-in-out;
}

.dots span:nth-child(2) { animation-delay: 0.18s; }
.dots span:nth-child(3) { animation-delay: 0.36s; }

@keyframes pulse {
  0%, 70%, 100% { opacity: 0.3; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-3px); }
}

.typing-note { font-size: 0.85rem; font-style: italic; }

/* welcome / empty state */
.welcome {
  margin: auto 0;
  text-align: center;
  padding: 2rem 1rem 1rem;
}

.welcome-emblem {
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--yellow);
  font-size: 1.5rem;
  box-shadow: var(--shadow);
}

.welcome h2 { margin: 0 0 0.3rem; color: var(--navy); font-size: 1.45rem; }
.welcome p { margin: 0 auto 1.4rem; color: var(--muted); max-width: 28rem; }

.starter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.7rem;
  max-width: 34rem;
  margin: 0 auto;
}

.starter-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  text-align: left;
  cursor: pointer;
  font-size: 0.9rem;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.starter-card:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.starter-card .s-icon { font-size: 1.15rem; display: block; margin-bottom: 0.35rem; }
.starter-card .s-title { font-weight: 700; color: var(--navy); display: block; }

/* starter chips (after the conversation started) */
.starters { display: flex; flex-wrap: wrap; gap: 0.5rem; padding-top: 0.6rem; }

.starter-chip {
  background: var(--card);
  color: var(--navy);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.starter-chip:hover { border-color: var(--navy); background: var(--sky-2); }

/* ------------------------------------------------------ question panel -- */

.question-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.2rem;
  margin-top: 0.8rem;
  box-shadow: var(--shadow);
}

.q-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.5rem;
}

.q-count { font-size: 0.8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.q-topic {
  background: var(--sky);
  color: var(--navy);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.18rem 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55%;
}

.q-panel-track { margin-bottom: 0.9rem; }

.q-text { font-size: 1rem; line-height: 1.5; font-weight: 600; color: var(--text); margin-bottom: 0.9rem; }

.q-hint { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.3rem; }

.q-option {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.65rem 0.8rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  cursor: pointer;
  font-size: 0.93rem;
  line-height: 1.4;
  transition: border-color 0.12s, background 0.12s;
}

.q-option:hover { border-color: var(--blue); background: var(--sky-2); }
.q-option.selected { border-color: var(--navy); background: var(--sky); }

.q-option input { margin-top: 0.25rem; accent-color: var(--navy); }

.q-letter {
  font-weight: 700;
  color: var(--navy);
  background: var(--sky);
  border-radius: 6px;
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.82rem;
}

.q-option.selected .q-letter { background: var(--navy); color: #fff; }

#question-form button[type="submit"] {
  margin-top: 0.4rem;
  background: var(--navy);
  color: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

#question-form button[type="submit"]:hover { background: var(--navy-2); }

.open-answer-cue {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--blue);
  font-size: 0.88rem;
  font-weight: 600;
}

.open-answer-cue::after { content: "↓"; font-size: 1rem; }

/* --------------------------------------------------------------- input -- */

.chat-form { display: flex; gap: 0.6rem; padding-top: 0.8rem; }

.chat-form input {
  flex: 1;
  padding: 0.75rem 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: 1rem;
  background: var(--card);
  font-family: var(--font);
  min-width: 0;
}

.chat-form input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--sky); }

.chat-form input.open-active { border-color: var(--blue); box-shadow: 0 0 0 3px var(--sky); }

.chat-form button {
  background: var(--navy);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 0 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.chat-form button:hover { background: var(--navy-2); }
.chat-form button:disabled { opacity: 0.5; cursor: default; }

/* --------------------------------------------------------------- admin -- */

.admin-view {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.admin-head h2 { margin: 0; color: var(--navy); font-size: 1.25rem; }

.admin-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1rem; }

.admin-tab {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.admin-tab.active { background: var(--navy); border-color: var(--navy); color: #fff; }

.admin-body {
  flex: 1;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
  min-height: 0;
}

.level-pills { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1rem; }

.level-pill {
  background: var(--sky-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
}

.level-pill.active { background: var(--sky); border-color: var(--navy); color: var(--navy); }

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.admin-count { color: var(--muted); font-size: 0.86rem; }

.primary-btn {
  background: var(--navy);
  color: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1.1rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

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

.danger-btn {
  background: #fff;
  color: var(--red);
  border: 1px solid var(--red);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1.1rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.danger-btn:hover { background: #fdf0f0; }

.admin-category { margin: 1.1rem 0 0.4rem; font-size: 0.95rem; font-weight: 700; color: var(--navy); }
.admin-category:first-child { margin-top: 0; }

.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.45rem;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}

.admin-row:hover { border-color: var(--blue); background: var(--sky-2); }

.admin-row .r-title { font-weight: 600; font-size: 0.92rem; min-width: 0; }
.admin-row .r-sub { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 500; margin-top: 0.1rem; }
.admin-row .r-meta { color: var(--muted); font-size: 0.8rem; white-space: nowrap; flex-shrink: 0; }

.admin-empty { color: var(--muted); padding: 1.5rem 0; text-align: center; font-size: 0.92rem; }

/* settings form */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; max-width: 46rem; }

.setting-field label { display: block; font-size: 0.86rem; font-weight: 600; margin-bottom: 0.3rem; }
.setting-field .hint { display: block; color: var(--muted); font-size: 0.76rem; font-weight: 400; margin-top: 0.25rem; }

.setting-field input, .setting-field select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font);
}

.settings-save-row { margin-top: 1.2rem; display: flex; gap: 0.7rem; align-items: center; }
.save-note { color: var(--green); font-size: 0.88rem; font-weight: 600; }

/* --------------------------------------------------------------- modal -- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 42, 94, 0.45);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 50;
}

.modal {
  background: var(--card);
  border-radius: var(--radius);
  width: min(46rem, 100%);
  max-height: 92vh;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: 0 18px 60px rgba(6, 23, 52, 0.35);
}

.modal h3 { margin: 0 0 1rem; color: var(--navy); }

.modal label { display: block; font-size: 0.85rem; font-weight: 600; margin: 0.8rem 0 0.25rem; }

.modal input, .modal textarea, .modal select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.93rem;
  font-family: var(--font);
}

.modal textarea { min-height: 6rem; resize: vertical; line-height: 1.45; }
.modal textarea.tall { min-height: 9rem; }

.modal .field-hint { font-size: 0.76rem; color: var(--muted); margin-top: 0.2rem; }

.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

.modal-actions .right { display: flex; gap: 0.7rem; margin-left: auto; }

.modal-error { color: var(--red); font-size: 0.86rem; margin-top: 0.8rem; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }

/* ---------------------------------------------------------- responsive -- */

@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; padding: 0.8rem; gap: 0.8rem; }

  .sidebar { flex-direction: row; flex-wrap: wrap; overflow: visible; }
  .side-card { flex: 1 1 16rem; }
  .admin-toggle { flex: 1 1 100%; }

  .journey li { padding: 0.3rem 0; }

  .auth-view { grid-template-columns: 1fr; }
  .auth-hero { display: none; }

  .brand-title { font-size: 0.95rem; }
  .field-row { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .topbar { padding: 0.5rem 0.7rem; }
  .level-badge { display: none; }
  .msg-row { max-width: 100%; }
  .avatar { display: none; }
  .q-topic { display: none; }
}
