/* =====================================================================
   طراحی: پنل مراجع مشاوره
   پالت: تیره و آرامش‌بخش (سیج تیل + یاسی ملایم) — مخصوص فضای روان‌شناسی
   فونت: Vazirmatn برای متن فارسی، JetBrains Mono برای اعداد/داده
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
  /* -- رنگ پایه -- */
  --bg-0: #0b1615;          /* پس‌زمینه اصلی: تیل بسیار تیره، نه مشکی خالص */
  --bg-1: #10201d;          /* پس‌زمینه لایه دوم */
  --bg-radial: radial-gradient(120% 90% at 50% -10%, #17342d 0%, #0b1615 55%);

  --glass-fill: rgba(255, 255, 255, 0.055);
  --glass-fill-strong: rgba(255, 255, 255, 0.09);
  --glass-border: rgba(255, 255, 255, 0.11);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);

  --accent: #5FBFA0;        /* سیج تیل — عمل مثبت / تکمیل‌شده */
  --accent-strong: #7DD4B4;
  --accent-2: #9B9BE0;      /* یاسی ملایم — عمل ثانویه / پیام */
  --warm: #D9B27C;          /* شن ملایم — هزینه/توجه، بدون حس اضطراب */
  --rose: #C98B8B;          /* رز کدر — لغو/خطا، بدون قرمز تند */

  --text-0: #EAF3EF;
  --text-1: #AEC4BE;
  --text-2: #728782;

  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;

  --font-fa: 'Vazirmatn', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --app-max: 480px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--bg-0);
  color: var(--text-0);
  font-family: var(--font-fa);
  direction: rtl;
}

body {
  background-image: var(--bg-radial);
  background-attachment: fixed;
}

/* قاب اپ‌مانند: روی گوشی تمام‌عرض، روی صفحه بزرگ وسط‌چین با حاشیه */
.app-frame {
  max-width: var(--app-max);
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding: 20px 18px 100px;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

::selection { background: var(--accent); color: #06110e; }

/* -- تایپوگرافی -- */
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-2);
  text-transform: uppercase;
}
.mono { font-family: var(--font-mono); direction: ltr; unicode-bidi: plaintext; }

/* =====================================================================
   شیشه (Glassmorphism) — واحد پایه بصری
   ===================================================================== */
.glass {
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: var(--glass-shadow);
}

.glass-card {
  padding: 20px;
}

.glass-strong {
  background: var(--glass-fill-strong);
}

/* =====================================================================
   حلقهٔ پیشرفت — عنصر امضا (signature element)
   یک هالهٔ شیشه‌ای با تپش آرام، نشان‌دهنده پیشرفت جلسات درمان
   ===================================================================== */
.progress-ring-wrap {
  position: relative;
  width: 168px;
  height: 168px;
  margin: 6px auto 4px;
}
.progress-ring-wrap svg { transform: rotate(-90deg); }
.progress-ring-track { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 10; }
.progress-ring-value {
  fill: none;
  stroke: var(--accent);
  stroke-width: 10;
  stroke-linecap: round;
  filter: drop-shadow(0 0 10px rgba(95, 191, 160, 0.55));
  transition: stroke-dashoffset 1s cubic-bezier(.4,0,.2,1);
}
.progress-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.progress-ring-center .num { font-family: var(--font-mono); font-size: 30px; font-weight: 600; }
.progress-ring-center .label { font-size: 12px; color: var(--text-1); margin-top: 2px; }

@keyframes breathe {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(95, 191, 160, 0.45)); }
  50%      { filter: drop-shadow(0 0 18px rgba(95, 191, 160, 0.8)); }
}
.progress-ring-value { animation: breathe 4.5s ease-in-out infinite; }

/* =====================================================================
   دکمه‌ها
   ===================================================================== */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 18px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #05130f;
  box-shadow: 0 10px 24px rgba(95, 191, 160, 0.25);
}
.btn-ghost {
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  color: var(--text-0);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* =====================================================================
   فرم‌ها
   ===================================================================== */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 13px;
  color: var(--text-1);
  margin-bottom: 7px;
}
.field input, .field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.045);
  color: var(--text-0);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}
.field input:focus, .field textarea:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.07);
}
.field .error {
  color: var(--rose);
  font-size: 12.5px;
  margin-top: 6px;
  min-height: 16px;
}

/* =====================================================================
   ناوبری پایین (bottom nav) — شیشه‌ای، ثابت
   ===================================================================== */
.bottom-nav {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: calc(var(--app-max) - 32px);
  display: flex;
  justify-content: space-around;
  padding: 10px 6px;
  z-index: 50;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 10.5px;
  position: relative;
  transition: color .15s ease;
}
.nav-item svg { width: 21px; height: 21px; }
.nav-item.active { color: var(--accent-strong); }
.nav-item .dot {
  position: absolute;
  top: 4px;
  left: 22px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warm);
  display: none;
}
.nav-item .dot.show { display: block; }

/* =====================================================================
   هدر بالای صفحه
   ===================================================================== */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.top-header .greet .hi { font-size: 13px; color: var(--text-1); }
.top-header .greet h1 { font-size: 19px; }
.avatar-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* -- کمکی -- */
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.muted { color: var(--text-1); }
.small { font-size: 12.5px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(95, 191, 160, 0.14);
  color: var(--accent-strong);
}
.pill.warm { background: rgba(217, 178, 124, 0.16); color: var(--warm); }
.pill.rose { background: rgba(201, 139, 139, 0.16); color: var(--rose); }

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.09) 37%, rgba(255,255,255,0.04) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

@media (prefers-reduced-motion: reduce) {
  .progress-ring-value { animation: none; }
  .skeleton { animation: none; }
}

@media (min-width: 540px) {
  body { display: flex; justify-content: center; }
  .app-frame { border-inline: 1px solid rgba(255,255,255,0.06); }
}
