@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Noto+Sans+Bengali:wght@400;500;600&family=Noto+Sans+Arabic:wght@400;500;600&family=Noto+Sans+Devanagari:wght@400;500;600&display=swap');

:root {
  --bg: #F3F0FF;
  --surface: #FFFFFF;
  --surface-glass: rgba(255, 255, 255, 0.86);
  --ink: #221A3A;
  --ink-soft: #665F7A;

  /* Vibrant core palette */
  --primary: #7C3AED;         /* violet */
  --primary-dark: #4C1D95;
  --accent: #EC4899;          /* pink */
  --accent-soft: #FCE7F3;
  --teal: #06B6D4;
  --teal-soft: #CFFAFE;
  --gold: #F59E0B;            /* amber */
  --gold-soft: #FEF3C7;
  --green: #10B981;
  --green-soft: #D1FAE5;
  --danger: #EF4444;
  --danger-soft: #FEE2E2;

  --grad-main: linear-gradient(135deg, #7C3AED 0%, #EC4899 52%, #F59E0B 100%);
  --grad-cool: linear-gradient(135deg, #4C1D95 0%, #7C3AED 45%, #06B6D4 100%);
  --grad-warm: linear-gradient(120deg, #F59E0B 0%, #EC4899 100%);

  --border: #E9E2FB;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 14px 40px rgba(124, 58, 237, 0.16);
  --shadow-lg: 0 22px 60px rgba(76, 29, 149, 0.22);
  --glow-pink: 0 8px 22px rgba(236, 72, 153, 0.35);
  --glow-violet: 0 8px 22px rgba(124, 58, 237, 0.35);

  --font-display: 'Poppins', 'Noto Sans Bengali', 'Noto Sans Arabic', 'Noto Sans Devanagari', sans-serif;
  --font-body: 'Poppins', 'Noto Sans Bengali', 'Noto Sans Arabic', 'Noto Sans Devanagari', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body[dir="rtl"] { direction: rtl; }

/* ---------- Animated colorful backdrop ---------- */
.app-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 18px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(124,58,237,0.16) 0%, transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(236,72,153,0.16) 0%, transparent 45%),
    radial-gradient(circle at 20% 85%, rgba(6,182,212,0.14) 0%, transparent 45%),
    radial-gradient(circle at 90% 90%, rgba(245,158,11,0.14) 0%, transparent 45%),
    var(--bg);
}
.app-shell::before,
.app-shell::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}
.app-shell::before {
  width: 420px; height: 420px;
  top: -140px; left: -120px;
  background: var(--grad-main);
  animation: blobFloat 16s ease-in-out infinite;
}
.app-shell::after {
  width: 340px; height: 340px;
  bottom: -120px; right: -100px;
  background: var(--grad-cool);
  animation: blobFloat 20s ease-in-out infinite reverse;
}
@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, 25px) scale(1.08); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

.card, .split-shell { position: relative; z-index: 1; }

.card {
  width: 100%;
  max-width: 560px;
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  border-top: 4px solid transparent;
  border-image: var(--grad-main) 1;
  padding: 42px 38px;
}

@media (max-width: 480px) {
  .card { padding: 30px 22px; }
}

/* ---------- Split layout: left profile panel + right form panel ---------- */
.split-shell {
  width: 100%;
  max-width: 900px;
  display: flex;
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.left-panel {
  flex: 0 0 300px;
  background: var(--grad-cool);
  background-size: 220% 220%;
  animation: gradientShift 12s ease infinite;
  color: #fff;
  padding: 46px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.left-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 15%, rgba(255,255,255,0.16) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(255,255,255,0.12) 0%, transparent 45%);
  pointer-events: none;
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.left-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}
.profile-avatar-lg {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.55);
  margin-bottom: 16px;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.profile-avatar-lg-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
}
.profile-name-lg {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  margin: 0 0 6px;
  color: #fff;
}
.left-tagline {
  font-family: var(--font-display);
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  font-weight: 700;
  margin: 0 0 14px;
}

/* ---------- Personality elements: motto, values, live counter ---------- */
.profile-motto {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(255,255,255,0.95);
  margin: 0 0 16px;
  opacity: 0;
  animation: fadeIn .6s ease .1s forwards;
}
.values-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 18px;
}
.value-pill {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #fff;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  padding: 5px 12px;
  opacity: 0;
  transform: translateY(6px);
  animation: pillIn .45s ease forwards;
}
.stats-line {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  margin: 0 0 20px;
  opacity: 0;
  animation: fadeIn .6s ease .3s forwards;
}
.stats-line b { color: #fff; font-weight: 800; }

.avatar-ring-pulse {
  position: relative;
  display: inline-flex;
  border-radius: 50%;
  margin-bottom: 16px;
}
.avatar-ring-pulse::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5);
  animation: ringPulse 2.6s ease-out infinite;
}
.avatar-ring-pulse::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(245,158,11,0.6);
  animation: ringPulse 2.6s ease-out 1.3s infinite;
}
.avatar-ring-pulse .profile-avatar-lg { margin-bottom: 0; }

.left-trust {
  list-style: none;
  padding: 0;
  margin: auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  text-align: start;
}
.left-trust li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  line-height: 1.5;
}
.left-trust svg { flex-shrink: 0; margin-top: 2px; color: #FDE68A; }

.right-panel {
  flex: 1;
  min-width: 0;
  padding: 44px 42px;
  position: relative;
  z-index: 1;
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pillIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ringPulse {
  0%   { transform: scale(0.94); opacity: .9; }
  70%  { transform: scale(1.16); opacity: 0; }
  100% { transform: scale(1.16); opacity: 0; }
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim-fade-up { animation: fadeSlideUp .45s cubic-bezier(.2,.7,.3,1) both; }

@keyframes starPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.4) rotate(-8deg); }
  100% { transform: scale(1); }
}
.star.pop { animation: starPop .35s cubic-bezier(.3,1.4,.5,1); }

@keyframes confettiFall {
  0%   { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(140px) rotate(280deg); opacity: 0; }
}
.confetti-wrap {
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 0;
  pointer-events: none;
}
.confetti-piece {
  position: absolute;
  top: 0;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  animation-name: confettiFall;
  animation-timing-function: ease-in;
  animation-fill-mode: forwards;
}

@keyframes checkDraw {
  from { stroke-dashoffset: 24; }
  to   { stroke-dashoffset: 0; }
}
.check-path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: checkDraw .5s ease .2s forwards;
}

@media (max-width: 720px) {
  .split-shell { flex-direction: column; max-width: 480px; }
  .left-panel {
    flex: none;
    flex-direction: row;
    align-items: center;
    text-align: start;
    padding: 22px 24px;
    gap: 14px;
  }
  .left-inner {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    height: auto;
  }
  .profile-avatar-lg { width: 52px; height: 52px; margin-bottom: 0; }
  .avatar-ring-pulse::before, .avatar-ring-pulse::after { inset: -4px; }
  .profile-name-lg { font-size: 15px; margin: 0; }
  .left-tagline { display: none; }
  .left-trust { display: none; }
  .profile-motto { display: none; }
  .values-row { display: none; }
  .stats-line { display: none; }
  .right-panel { padding: 30px 24px; }
}

@media (max-width: 480px) {
  .right-panel { padding: 26px 20px; }
}

/* ---------- Language picker ---------- */
.lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}
.lang-btn {
  border: 1.5px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 15px 12px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: all .2s ease;
  text-align: center;
}
.lang-btn:hover {
  border-color: transparent;
  background: var(--grad-main);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--glow-violet);
}

/* ---------- Header ---------- */
.eyebrow {
  font-family: var(--font-display);
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
  margin: 0 0 10px;
}
h1.headline {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 800;
  line-height: 1.28;
  margin: 0 0 14px;
  color: var(--primary-dark);
  letter-spacing: -0.01em;
}
p.body-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 18px;
  font-weight: 400;
}

.trust-points {
  list-style: none;
  padding: 0;
  margin: 20px 0 28px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.trust-points li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 500;
}
.trust-points svg { flex-shrink: 0; }

/* ---------- Growth ring (signature element) ---------- */
.ring-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.ring-svg { transform: rotate(-90deg); }
.ring-track { stroke: var(--border); fill: none; stroke-width: 5; }
.ring-progress {
  stroke: url(#ringGradient);
  stroke: var(--accent);
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset .5s ease;
}
.ring-label { font-family: var(--font-display); font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.ring-label b { color: var(--primary-dark); font-weight: 800; font-size: 14.5px; }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14.5px;
  border-radius: var(--radius-sm);
  padding: 13px 24px;
  border: none;
  cursor: pointer;
  transition: all .2s ease;
  letter-spacing: .01em;
}
.btn-primary {
  background: var(--grad-main);
  background-size: 200% 200%;
  color: #fff;
  width: 100%;
  box-shadow: var(--glow-violet);
}
.btn-primary:hover { background-position: 100% 0; transform: translateY(-2px); box-shadow: var(--glow-pink); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-secondary {
  background: var(--surface);
  color: var(--ink-soft);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--primary-dark); background: var(--accent-soft); }
.btn-row { display: flex; gap: 10px; margin-top: 8px; }
.btn-row .btn-primary { flex: 1; }

.btn-danger {
  background: linear-gradient(120deg, #EF4444, #F59E0B);
  color: #fff;
  box-shadow: 0 8px 20px rgba(239,68,68,0.3);
}
.btn-danger:hover { transform: translateY(-2px); }

/* ---------- Relationship chips ---------- */
.chip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 22px 0 6px;
}
.chip {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 10px;
  text-align: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  transition: all .2s ease;
  background: var(--surface);
  color: var(--ink);
}
.chip:hover { border-color: var(--accent); transform: translateY(-1px); }
.chip.selected {
  border-color: transparent;
  background: var(--grad-main);
  color: #fff;
  box-shadow: var(--glow-violet);
}

/* ---------- Rating rows ---------- */
.rating-block { margin-bottom: 26px; }
.rating-question {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}
.star-row { display: flex; gap: 6px; }
.star {
  width: 36px;
  height: 36px;
  cursor: pointer;
  color: var(--border);
  transition: color .15s ease, transform .12s ease;
}
.star.filled { color: var(--gold); filter: drop-shadow(0 2px 5px rgba(245,158,11,0.45)); }
.star:hover { transform: scale(1.12); color: var(--gold); }
.scale-caption {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 6px;
  min-height: 16px;
  font-weight: 600;
}

/* ---------- Open text ---------- */
.text-block { margin-bottom: 22px; }
.text-question {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}
textarea.answer-input {
  width: 100%;
  min-height: 78px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  resize: vertical;
  transition: border-color .15s ease, box-shadow .15s ease;
  background: var(--bg);
}
textarea.answer-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.notice {
  font-size: 12px;
  color: var(--ink-soft);
  margin: 10px 0 20px;
  text-align: center;
  font-weight: 600;
}

/* ---------- Thank you screen ---------- */
.thankyou-wrap { text-align: center; padding: 14px 0 4px; position: relative; overflow: hidden; }
.check-badge {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: var(--grad-main);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 22px;
  box-shadow: var(--glow-pink);
}
.quote-box {
  margin-top: 26px;
  padding: 18px 20px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  font-style: italic;
  color: var(--primary-dark);
  font-size: 13.5px;
  border-inline-start: 3px solid var(--gold);
}

.footer-note {
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-soft);
  margin-top: 24px;
  font-weight: 600;
}

/* ---------- Error ---------- */
.error-text {
  color: var(--danger);
  font-size: 13px;
  margin-top: 10px;
  text-align: center;
  font-weight: 600;
}
.success-text {
  color: var(--green);
  font-size: 13px;
  margin-top: 10px;
  text-align: center;
  font-weight: 700;
}

/* =====================================================================
   ADMIN DASHBOARD — sidebar layout
   ===================================================================== */
.admin-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 10%, rgba(124,58,237,0.10) 0%, transparent 40%),
    radial-gradient(circle at 90% 20%, rgba(236,72,153,0.10) 0%, transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(6,182,212,0.08) 0%, transparent 40%),
    var(--bg);
}
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.admin-sidebar {
  flex: 0 0 240px;
  background: var(--grad-cool);
  background-size: 220% 220%;
  animation: gradientShift 18s ease infinite;
  color: #fff;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 22px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.16);
}
.sidebar-brand-logo {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.sidebar-brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  line-height: 1.2;
}
.sidebar-brand-text span {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.82);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all .18s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: start;
  font-family: var(--font-body);
}
.nav-item svg { flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-item.active {
  background: rgba(255,255,255,0.18);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
}
.sidebar-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.16);
}

/* ---- Main content ---- */
.admin-main {
  flex: 1;
  min-width: 0;
  padding: 36px 40px 80px;
  max-width: 1080px;
}
.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 12px;
}
.admin-header-actions { display: flex; gap: 10px; align-items: center; }
.admin-header .btn { width: auto; }

/* Mobile top bar (hidden on desktop) */
.admin-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: var(--grad-cool);
  color: #fff;
  padding: 14px 18px;
}
.admin-topbar button {
  background: rgba(255,255,255,0.16);
  border: none;
  color: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

@media (max-width: 880px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    padding: 14px 16px;
    gap: 8px;
  }
  .sidebar-brand { display: none; }
  .sidebar-footer { margin-top: 0; padding-top: 0; border-top: none; }
  .nav-item { white-space: nowrap; }
  .admin-main { padding: 24px 18px 60px; }
}

/* ---- Stat cards ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 90px; height: 90px;
  border-radius: 50%;
  opacity: 0.14;
  background: var(--stat-color, var(--primary));
}
.stat-card-icon {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: var(--stat-color-soft, var(--accent-soft));
  color: var(--stat-color, var(--primary));
  margin-bottom: 12px;
}
.stat-card-label { font-size: 12.5px; color: var(--ink-soft); margin: 0 0 6px; font-weight: 600; }
.stat-card-value {
  font-family: var(--font-display); font-size: 32px; font-weight: 800; margin: 0;
  color: var(--stat-color-dark, var(--primary-dark));
}
.stat-card-value span { font-size: 15px; color: var(--ink-soft); font-weight: 600; }

/* ---- Generic panel/card ---- */
.response-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: 0 6px 20px rgba(124,58,237,0.06);
}
.panel-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-title svg { color: var(--accent); }

.bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.bar-label {
  flex: 0 0 190px;
  font-size: 12.5px;
  color: var(--ink-soft);
  font-weight: 600;
}
.bar-track {
  flex: 1;
  height: 10px;
  background: var(--bg);
  border-radius: 6px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 6px;
  width: 0%;
  transition: width 1s cubic-bezier(.2,.8,.3,1);
  background: var(--grad-main);
}
.bar-value {
  flex: 0 0 32px;
  text-align: right;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--primary-dark);
}
@media (max-width: 600px) {
  .bar-label { flex-basis: 120px; font-size: 11.5px; }
}

.stat-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
}

.response-meta {
  display: flex; gap: 12px; align-items: center;
  font-size: 12px; color: var(--ink-soft); margin-bottom: 14px; font-weight: 600;
}
.tag {
  background: var(--grad-main); color: #fff;
  border-radius: 999px; padding: 3px 12px; font-weight: 700;
}
.rating-mini-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr));
  gap: 8px 16px; margin-bottom: 14px;
}
.rating-mini {
  display: flex; justify-content: space-between; font-size: 12.5px;
  border-bottom: 1px dashed var(--border); padding-bottom: 4px; font-weight: 600;
}
.rating-mini b { color: var(--primary-dark); font-weight: 800; }
.answer-item { margin-bottom: 10px; }
.answer-item .q { font-size: 12px; color: var(--accent); font-weight: 700; margin-bottom: 2px; }
.answer-item .a { font-size: 13.5px; color: var(--ink); line-height: 1.55; font-weight: 400; }

.login-card { max-width: 380px; margin: 90px auto; }
input.password-input,
input.text-input,
select.select-input {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); font-size: 14.5px; margin: 8px 0;
  font-family: var(--font-body);
  background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input.password-input:focus,
input.text-input:focus,
select.select-input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}

.hidden { display: none !important; }

/* ---------- Admin loading / error state ---------- */
.admin-loading-wrap {
  text-align: center;
  padding: 100px 20px;
  color: var(--ink-soft);
  font-size: 14px;
}
.admin-loading-wrap .spinner {
  width: 34px; height: 34px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.admin-error-card {
  max-width: 440px; margin: 90px auto; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-top: 4px solid var(--danger); border-radius: var(--radius);
  padding: 32px 28px; box-shadow: var(--shadow);
}

/* ---------- Profile & Settings page ---------- */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 900px) {
  .settings-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}
.avatar-upload-row {
  display: flex; align-items: center; gap: 18px; margin-bottom: 16px; flex-wrap: wrap;
}
.avatar-upload-preview img,
.avatar-upload-preview div {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--accent-soft);
}
.field-label {
  font-size: 12.5px; font-weight: 700; color: var(--ink-soft);
  margin: 14px 0 6px; display: block;
}
.field-label:first-child { margin-top: 0; }
.password-strength-row {
  display: flex; gap: 5px; margin: 8px 0 2px;
}
.password-strength-seg {
  height: 5px; flex: 1; border-radius: 4px; background: var(--border); transition: background .2s ease;
}
.password-hint { font-size: 11.5px; color: var(--ink-soft); margin: 4px 0 0; }
