/* ============================================
   استایل‌های اصلی نور اریا - نسخه ۲
   طراحی مدرن با انیمیشن
   ============================================ */

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

:root {
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --primary-darker: #134e4a;
    --primary-light: #ccfbf1;
    --accent: #c9a227;
    --accent-dark: #a8861a;
    --bg: #f8fafc;
    --bg-soft: #f1f5f9;
    --card: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
    --shadow-xl: 0 24px 48px rgba(0,0,0,0.16);
    --shadow-primary: 0 10px 30px -5px rgba(13,148,136,0.35);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    font-size: 15px;
    direction: rtl;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--primary-light); color: var(--primary-darker); }

/* ---------- اسکرول‌بار ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--primary), var(--primary-dark)); border-radius: 4px; }

/* ---------- انیمیشن‌های پایه ---------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes gradientShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes blob { 0%,100% { border-radius: 60% 40% 30% 70%/60% 30% 70% 40%; } 50% { border-radius: 30% 60% 70% 40%/50% 60% 30% 60%; } }
@keyframes typingDot { 0%,80%,100% { transform: scale(0); } 40% { transform: scale(1); } }

/* ---------- سکلتون ---------- */
.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

/* ---------- ظرف‌ها ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.card {
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-header { padding: 20px 24px; border-bottom: 1px solid var(--border); background: linear-gradient(135deg, #f8fafc, #fff); }
.card-body { padding: 24px; }

/* ---------- دکمه‌ها ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.25), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}
.btn:hover::after { transform: translateX(100%); }
.btn:active { transform: scale(0.97); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; box-shadow: var(--shadow-primary); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -5px rgba(13,148,136,0.45); }
.btn-accent { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); background: var(--primary-light); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-lg { padding: 15px 34px; font-size: 16px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-icon { width: 44px; height: 44px; padding: 0; border-radius: 50%; }

/* ---------- فرم‌ها ---------- */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.form-label .req { color: var(--danger); }
.form-control {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 15px;
    color: var(--text);
    background: #fff;
    transition: var(--transition);
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(13,148,136,0.12); }
textarea.form-control { min-height: 100px; resize: vertical; }
select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%230d9488' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    padding-left: 42px;
}
.form-check {
    display: flex; align-items: center; gap: 10px;
    cursor: pointer; padding: 9px 12px; border-radius: var(--radius-sm);
    transition: var(--transition); font-size: 14px;
}
.form-check:hover { background: var(--primary-light); }
.form-check input[type="checkbox"], .form-check input[type="radio"] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }

/* ---------- سلکتور نوع پوست ---------- */
.skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.skin-card {
    background: #fff; border: 2px solid var(--border); border-radius: var(--radius-lg);
    padding: 24px 16px; text-align: center; cursor: pointer; transition: var(--transition);
}
.skin-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.skin-card.selected { border-color: var(--primary); background: var(--primary-light); box-shadow: var(--shadow-primary); }
.skin-card .icon { font-size: 34px; margin-bottom: 10px; }
.skin-card .label { font-size: 14px; font-weight: 600; }

/* ---------- نقشه بدن ---------- */
.body-map-wrap {
    position: relative;
    background: radial-gradient(circle at 50% 30%, #ecfdf5, #f0fdfa);
    border-radius: var(--radius-xl);
    border: 2px dashed var(--primary-light);
    padding: 20px;
    overflow: hidden;
    min-height: 520px;
}
.body-map-wrap .bg-blob {
    position: absolute; width: 300px; height: 300px; background: rgba(13,148,136,0.06);
    animation: blob 12s ease-in-out infinite;
}
.body-svg { width: 100%; max-width: 320px; display: block; margin: 0 auto; position: relative; z-index: 1; }
.body-part {
    cursor: pointer;
    transition: all 0.25s ease;
    fill: #e2e8f0;
    stroke: #cbd5e1;
    stroke-width: 1.5;
}
.body-part:hover { fill: #99f6e4; stroke: var(--primary); }
.body-part.selected { fill: var(--primary); stroke: var(--primary-dark); filter: drop-shadow(0 0 8px rgba(13,148,136,0.6)); }
.body-part.highlight { animation: pulse 1.5s ease-in-out infinite; }
.body-gender-toggle { display: flex; gap: 10px; justify-content: center; margin-bottom: 16px; position: relative; z-index: 2; }
.body-gender-toggle button {
    padding: 8px 22px; border-radius: 50px; border: 2px solid var(--border);
    background: #fff; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 14px;
    transition: var(--transition);
}
.body-gender-toggle button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.body-selected-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; position: relative; z-index: 2; }
.body-selected-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--primary); color: #fff; padding: 6px 14px; border-radius: 50px; font-size: 13px;
    animation: scaleIn 0.3s ease;
}
.body-selected-chip button { background: none; border: none; color: #fff; cursor: pointer; font-size: 14px; }

/* ---------- چت ---------- */
.chat-container {
    display: flex; flex-direction: column; height: calc(100vh - 180px);
    max-width: 860px; margin: 0 auto; background: #fff;
    border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); border: 1px solid var(--border); overflow: hidden;
}
.chat-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-darker));
    color: #fff; padding: 16px 22px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.chat-header-info { display: flex; align-items: center; gap: 12px; }
.chat-avatar {
    width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center; font-size: 22px; border: 2px solid rgba(255,255,255,0.3);
}
.chat-messages { flex: 1; overflow-y: auto; padding: 26px; background: linear-gradient(180deg, #f0fdfa, #f8fafc); display: flex; flex-direction: column; gap: 18px; }
.message { display: flex; gap: 10px; max-width: 82%; animation: slideUp 0.35s ease; }
.message.user { align-self: flex-start; flex-direction: row-reverse; }
.message.ai { align-self: flex-end; }
.message .msg-bubble {
    padding: 14px 18px; border-radius: var(--radius-lg); font-size: 15px; line-height: 1.9;
    box-shadow: var(--shadow-sm); white-space: normal; word-break: break-word; overflow-wrap: anywhere;
}
.message.user .msg-bubble { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border-bottom-left-radius: 4px; white-space: pre-wrap; }
.message.ai .msg-bubble { background: #fff; border: 1px solid var(--border); border-bottom-right-radius: 4px; }
.message.ai .msg-bubble h1, .message.ai .msg-bubble h2, .message.ai .msg-bubble h3 { margin: 12px 0 6px; color: var(--primary-dark); }
.message.ai .msg-bubble ul, .message.ai .msg-bubble ol { padding-right: 22px; margin: 8px 0; }
.message.ai .msg-bubble strong { color: var(--primary-dark); }
.msg-actions { display: flex; gap: 6px; margin-top: 6px; opacity: 0; transition: var(--transition); }
.message:hover .msg-actions { opacity: 1; }
.msg-actions button { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px; cursor: pointer; font-size: 12px; font-family: inherit; color: var(--text-muted); transition: var(--transition); }
.msg-actions button:hover { color: var(--primary); border-color: var(--primary); }
/* قالب‌بندی محتوای پیام هوش مصنوعی */
.message.ai .msg-bubble h2, .message.ai .msg-bubble h3, .message.ai .msg-bubble h4 { margin: 14px 0 6px; font-size: 16px; color: var(--primary-dark); }
.message.ai .msg-bubble p { margin: 6px 0; }
.message.ai .msg-bubble ul, .message.ai .msg-bubble ol { margin: 6px 0; padding-right: 20px; }
.message.ai .msg-bubble li { margin: 3px 0; }
.message.ai .msg-bubble hr { border: none; border-top: 1px solid var(--border); margin: 14px 0; }
.message.ai .msg-bubble code { background: #f1f5f9; padding: 2px 6px; border-radius: 6px; font-size: 13px; direction: ltr; display: inline-block; }
.message.ai .msg-bubble a { color: var(--primary); text-decoration: underline; word-break: break-all; }
.message .msg-actions { align-self: flex-end; }
@media (hover: none) { .msg-actions { opacity: 1; } }
.typing-dots { display: flex; gap: 5px; padding: 16px 20px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); align-self: flex-end; }
.typing-dots span { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; animation: typingDot 1.4s infinite; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
.chat-input-area { padding: 16px 20px; background: #fff; border-top: 1px solid var(--border); display: flex; gap: 10px; align-items: flex-end; flex-shrink: 0; }
.chat-input-area .form-control { flex: 1; min-height: 50px; max-height: 130px; resize: none; border-radius: 25px; padding: 13px 20px; }

/* ---------- اپ شل ---------- */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
    width: 264px; background: linear-gradient(180deg, var(--primary-darker), #0b3532);
    color: #fff; padding: 22px 14px; display: flex; flex-direction: column; gap: 4px;
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 100; transition: var(--transition);
}
.app-brand { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.app-brand .logo { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,0.12); display: flex; align-items: center; justify-content: center; }
.app-brand .logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.nav-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius-md);
    color: rgba(255,255,255,0.78); text-decoration: none; font-size: 14px; font-weight: 500;
    transition: var(--transition); cursor: pointer; border: none; background: none; font-family: inherit; width: 100%; text-align: right;
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active { background: rgba(255,255,255,0.14); color: #fff; border-right: 3px solid var(--accent); }
.nav-item .nav-icon { font-size: 19px; }
.app-main { flex: 1; margin-right: 264px; padding: 24px; transition: var(--transition); }
.app-header {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px;
    padding: 16px 24px; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.app-header .page-title { font-size: 19px; font-weight: 700; }
.user-info { display: flex; align-items: center; gap: 12px; }
.user-avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; overflow: hidden; }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.page-section { display: none; animation: fadeIn 0.4s ease; }
.page-section.active { display: block; }
.mobile-menu-btn { display: none; background: none; border: none; font-size: 24px; cursor: pointer; }

/* ---------- داشبورد ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 26px; }
.stat-card {
    background: #fff; border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); transition: var(--transition);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card .stat-icon { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 14px; }
.stat-card .stat-value { font-size: 30px; font-weight: 800; line-height: 1; }
.stat-card .stat-label { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

/* ---------- روتین ---------- */
.routine-card { background: #fff; border-radius: var(--radius-lg); padding: 22px; border: 1px solid var(--border); margin-bottom: 18px; transition: var(--transition); }
.routine-card:hover { box-shadow: var(--shadow-md); }
.routine-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.badge { padding: 5px 12px; border-radius: 50px; font-size: 12px; font-weight: 600; }
.badge.active { background: #d1fae5; color: #065f46; }
.badge.paused { background: #fef3c7; color: #92400e; }
.routine-content { white-space: pre-wrap; line-height: 2; font-size: 15px; }

/* ---------- پیشرفت ---------- */
.progress-track { width: 100%; height: 10px; background: var(--bg-soft); border-radius: 5px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width 0.6s ease; }

/* ---------- تب‌ها ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 22px; overflow-x: auto; }
.tab {
    padding: 12px 22px; font-size: 14px; font-weight: 600; color: var(--text-muted); cursor: pointer;
    border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: var(--transition);
    background: none; font-family: inherit; white-space: nowrap;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- پروفایل ---------- */
.profile-cover { background: linear-gradient(135deg, var(--primary), var(--primary-darker)); height: 140px; border-radius: var(--radius-xl); position: relative; margin-bottom: 60px; }
.profile-avatar-wrap { position: absolute; bottom: -45px; right: 30px; }
.profile-avatar-lg {
    width: 90px; height: 90px; border-radius: 50%; border: 4px solid #fff; background: #fff;
    display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: var(--shadow-md);
}
.profile-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.avatar-upload-btn {
    position: absolute; bottom: 0; left: 0; width: 30px; height: 30px; border-radius: 50%;
    background: var(--accent); color: #fff; border: 2px solid #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px;
}

/* ---------- آلرت ---------- */
.alert { padding: 15px 18px; border-radius: var(--radius-md); display: flex; gap: 12px; margin-bottom: 18px; font-size: 14px; }
.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-danger { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* ---------- مودال ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15,23,42,0.5); z-index: 900; opacity: 0; visibility: hidden; transition: var(--transition); backdrop-filter: blur(4px); }
.overlay.active { opacity: 1; visibility: visible; }
.modal-content { background: #fff; border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); max-width: 560px; width: 92%; margin: 60px auto; animation: scaleIn 0.3s ease; }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- توست ---------- */
.toast {
    position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
    padding: 15px 24px; border-radius: var(--radius-md); color: #fff; font-weight: 600; font-size: 14px;
    box-shadow: var(--shadow-xl); z-index: 2000; animation: slideUp 0.3s ease; max-width: 90%; text-align: center;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--info); }

/* ---------- PWA نصب ---------- */
.pwa-install-banner {
    position: fixed; bottom: 20px; left: 20px; right: 20px; max-width: 480px; margin: 0 auto;
    background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); border: 1px solid var(--border);
    padding: 18px 20px; display: none; align-items: center; gap: 14px; z-index: 1500; animation: slideUp 0.4s ease;
}
.pwa-install-banner.show { display: flex; }
.pwa-install-banner .icon { font-size: 30px; }
.pwa-install-banner .text { flex: 1; }
.pwa-install-banner .text h4 { font-size: 15px; margin-bottom: 2px; }
.pwa-install-banner .text p { font-size: 12px; color: var(--text-muted); }

/* ============================================
   فرم ویزارد چندمرحله‌ای تحلیل پوست
   ============================================ */
.wizard {
    max-width: 760px;
    margin: 0 auto;
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}
.wizard-progress {
    display: flex;
    align-items: center;
    padding: 24px 30px;
    background: linear-gradient(135deg, #f0fdfa, #f8fafc);
    border-bottom: 1px solid var(--border);
    gap: 6px;
    overflow-x: auto;
}
.wizard-step-dot {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.wizard-step-dot .dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    transition: all 0.3s;
}
.wizard-step-dot.active .dot { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; box-shadow: 0 4px 12px rgba(13,148,136,0.4); }
.wizard-step-dot.done .dot { background: #10b981; color: #fff; }
.wizard-step-dot .step-label { font-size: 12px; color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.wizard-step-dot.active .step-label { color: var(--primary-dark); }
.wizard-line { width: 22px; height: 2px; background: #e2e8f0; flex-shrink: 0; }
.wizard-line.done { background: #10b981; }

.wizard-body { padding: 30px; min-height: 400px; }
.wizard-step { display: none; animation: slideRight 0.4s ease; }
.wizard-step.active { display: block; }
.wizard-step h3 { font-size: 20px; font-weight: 800; margin-bottom: 6px; color: #0f172a; }
.wizard-step .step-desc { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }
.wizard-footer {
    padding: 18px 30px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

/* انتخاب بزرگ با انیمیشن */
.big-select-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.big-select {
    position: relative;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fff;
}
.big-select:hover { border-color: var(--primary); transform: translateY(-3px); }
.big-select.selected { border-color: var(--primary); background: var(--primary-light); box-shadow: 0 8px 20px rgba(13,148,136,0.18); }
.big-select .check {
    position: absolute; top: 10px; left: 10px; width: 22px; height: 22px; border-radius: 50%;
    background: #e2e8f0; color: #fff; display: none; align-items: center; justify-content: center; font-size: 12px;
}
.big-select.selected .check { display: flex; background: var(--primary); }
.big-select .s-icon { font-size: 32px; margin-bottom: 8px; }
.big-select .s-label { font-size: 14px; font-weight: 600; }

/* ============================================
   نقشه بدن حرفه‌ای
   ============================================ */
.body-map-pro {
    position: relative;
    background: radial-gradient(ellipse at center, #f0fdfa 0%, #ecfdf5 60%, #e2e8f0 100%);
    border-radius: var(--radius-xl);
    padding: 20px;
    min-height: 480px;
    overflow: hidden;
}
.body-map-pro .bm-watermark { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); font-size: 12px; color: #94a3b8; }
.body-view-toggle { display: flex; gap: 8px; justify-content: center; margin-bottom: 14px; position: relative; z-index: 3; }
.body-view-toggle button {
    padding: 8px 20px; border-radius: 50px; border: 2px solid var(--border); background: #fff;
    cursor: pointer; font-family: inherit; font-weight: 600; font-size: 13px; color: var(--text-muted); transition: all 0.3s;
}
.body-view-toggle button.active { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border-color: var(--primary); }

.body-svg-pro { width: 100%; max-width: 300px; display: block; margin: 0 auto; position: relative; z-index: 2; }
.body-svg-pro .bp-part {
    cursor: pointer;
    transition: all 0.25s ease;
    fill: #cbd5e1;
    stroke: #94a3b8;
    stroke-width: 1;
    opacity: 0.9;
}
.body-svg-pro .bp-part:hover { fill: #5eead4; stroke: var(--primary); opacity: 1; }
.body-svg-pro .bp-part.selected { fill: var(--primary); stroke: var(--primary-dark); opacity: 1; }
.body-svg-pro .bp-part.selected:hover { fill: var(--primary-dark); }
.bp-hover-label {
    position: absolute; background: #0f172a; color: #fff; padding: 4px 10px; border-radius: 6px;
    font-size: 12px; pointer-events: none; display: none; z-index: 10; white-space: nowrap;
}
.body-selected-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; justify-content: center; position: relative; z-index: 3; }
.body-selected-chips .chip {
    display: inline-flex; align-items: center; gap: 6px; background: var(--primary);
    color: #fff; padding: 6px 14px; border-radius: 50px; font-size: 13px; animation: scaleIn 0.3s ease;
}
.body-selected-chips .chip button { background: none; border: none; color: #fff; cursor: pointer; font-size: 14px; }

/* ============================================
   نوتیفیکیشن و چک‌این روزانه
   ============================================ */
.daily-checkin {
    background: linear-gradient(135deg, #0f766e, #134e4a);
    color: #fff; border-radius: var(--radius-lg); padding: 22px;
    display: flex; align-items: center; gap: 16px; margin-bottom: 22px;
}
.daily-checkin .dc-icon { font-size: 32px; }
.daily-checkin .dc-text { flex: 1; }
.daily-checkin .dc-text h4 { font-size: 15px; margin-bottom: 2px; }
.daily-checkin .dc-text p { font-size: 12px; opacity: 0.8; }
.notif-panel {
    position: fixed; top: 0; left: 0; width: 360px; max-width: 92vw; height: 100vh;
    background: #fff; box-shadow: var(--shadow-xl); z-index: 1300; padding: 20px;
    transform: translateX(-110%); transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    overflow-y: auto; visibility: hidden;
}
.notif-panel.open { transform: translateX(0); visibility: visible; }
.notif-overlay {
    position: fixed; inset: 0; background: rgba(15,23,42,0.4); z-index: 1250;
    opacity: 0; visibility: hidden; transition: all 0.3s; backdrop-filter: blur(2px);
}
.notif-overlay.active { opacity: 1; visibility: visible; }
.notif-item { padding: 14px; border-radius: var(--radius-md); border: 1px solid var(--border); margin-bottom: 10px; transition: all 0.2s; cursor: pointer; }
.notif-item:hover { background: #f8fafc; }
.notif-item.unread { border-right: 3px solid var(--primary); background: #f0fdfa; }
.notif-item .n-title { font-weight: 600; font-size: 14px; margin-bottom: 3px; }
.notif-item .n-msg { font-size: 13px; color: var(--text-muted); }
.notif-item .n-time { font-size: 11px; color: #94a3b8; margin-top: 4px; }
.notif-bell { position: relative; cursor: pointer; }
.notif-bell .badge-dot {
    position: absolute; top: -4px; left: -4px; width: 18px; height: 18px; border-radius: 50%;
    background: var(--danger); color: #fff; font-size: 10px; display: flex; align-items: center; justify-content: center; font-weight: 700;
}

/* حالت نمایش */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mb-10 { margin-bottom: 10px; } .mb-20 { margin-bottom: 20px; } .mb-30 { margin-bottom: 30px; } .mb-40 { margin-bottom: 40px; }
.mt-20 { margin-top: 20px; } .mt-30 { margin-top: 30px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

/* ---------- ریسپانسیو موبایل ---------- */
@media (max-width: 992px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    /* z-index بالاتر از overlay تا منوی موبایل تار و غیرقابل کلیک نشود */
    .app-sidebar { transform: translateX(100%); width: 250px; z-index: 1100; }
    .app-sidebar.open { transform: translateX(0); }
    #sidebarOverlay { backdrop-filter: none; -webkit-backdrop-filter: none; }
    .app-main { margin-right: 0; padding: 14px; }
    .mobile-menu-btn { display: flex !important; }
    .app-header { padding: 12px 16px; }
    .chat-container { height: calc(100vh - 120px); }
    .message { max-width: 92%; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat-card { padding: 16px; }
    .body-map-wrap { min-height: 420px; }
    .body-svg { max-width: 250px; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .chat-input-area { padding: 10px; }
    .btn-lg { padding: 13px 24px; font-size: 15px; }
}

/* ============================================
   دکمه تغییر پوسته (دارک مود)
   ============================================ */
.theme-toggle {
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
    background: var(--bg-soft); color: var(--text); cursor: pointer; font-size: 18px;
    display: flex; align-items: center; justify-content: center; transition: var(--transition); flex-shrink: 0;
}
.theme-toggle:hover { background: var(--primary-light); border-color: var(--primary); }

/* ============================================
   حالت تاریک (Dark Mode)
   ============================================ */
[data-theme="dark"] {
    --bg: #0b1220;
    --bg-soft: #111a2e;
    --card: #111a2e;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --border: #24324a;
    --primary-light: rgba(13,148,136,0.18);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.55);
    --shadow-xl: 0 24px 48px rgba(0,0,0,0.6);
}
[data-theme="dark"] body { background: var(--bg); color: var(--text); }
[data-theme="dark"] .app-header,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .routine-card,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .notif-panel,
[data-theme="dark"] .chat-input-area,
[data-theme="dark"] .message.ai .msg-bubble,
[data-theme="dark"] .msg-actions button,
[data-theme="dark"] .typing-dots,
[data-theme="dark"] .form-control,
[data-theme="dark"] .big-select { background: var(--card); color: var(--text); }
[data-theme="dark"] .chat-messages { background: linear-gradient(180deg, #0b1220, #0e1729); }
[data-theme="dark"] .message.ai .msg-bubble code { background: #1e293b; color: #e2e8f0; }
[data-theme="dark"] .notif-item:hover { background: #182339; }
[data-theme="dark"] .notif-item.unread { background: rgba(13,148,136,0.12); }
[data-theme="dark"] .wizard-step h3 { color: var(--text); }
[data-theme="dark"] .profile-avatar-lg { border-color: var(--border); background: var(--card); }
[data-theme="dark"] .skeleton { background: linear-gradient(90deg, #1e293b 25%, #24324a 50%, #1e293b 75%); background-size: 200% 100%; }
[data-theme="dark"] .tab:hover, [data-theme="dark"] .tab.active { color: #5eead4; }
[data-theme="dark"] .text-muted, [data-theme="dark"] .stat-card .stat-label { color: var(--text-muted); }
[data-theme="dark"] .alert-success { background: rgba(16,185,129,0.14); border-color: rgba(16,185,129,0.35); color: #6ee7b7; }
[data-theme="dark"] .alert-warning { background: rgba(245,158,11,0.14); border-color: rgba(245,158,11,0.35); color: #fcd34d; }
[data-theme="dark"] .alert-danger  { background: rgba(239,68,68,0.14);  border-color: rgba(239,68,68,0.35);  color: #fca5a5; }
[data-theme="dark"] .alert-info    { background: rgba(59,130,246,0.14); border-color: rgba(59,130,246,0.35); color: #93c5fd; }
[data-theme="dark"] .s-lg { color: var(--text); }
[data-theme="dark"] .badge.active { background: rgba(16,185,129,0.2); color: #6ee7b7; }
[data-theme="dark"] .badge.paused { background: rgba(245,158,11,0.2); color: #fcd34d; }

/* ============================================
   بهبودهای رسپانسیو
   ============================================ */
img, svg, video { max-width: 100%; height: auto; }
.form-control { max-width: 100%; }
.btn { max-width: 100%; }

@media (max-width: 768px) {
    .app-header { flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
    .app-header .page-title { font-size: 17px; }
    .user-info { gap: 8px; }
    #userNameDisplay { display: none; }
    .wizard-body { padding: 22px 16px; }
    .wizard-step h3 { font-size: 18px; }
    .big-select-grid { grid-template-columns: repeat(2, 1fr); }
    .modal-content { margin: 24px auto; width: 94%; }
    .chat-header { padding: 12px 14px; }
    .chat-header .chat-avatar { width: 40px; height: 40px; font-size: 18px; }
    .chat-messages { padding: 16px; }
    .message { max-width: 92%; }
    .profile-avatar-wrap { right: 16px; }
    .app-sidebar { padding: 18px 12px; }
    .routine-header { flex-wrap: wrap; gap: 8px; }
}
@media (max-width: 480px) {
    .stat-value { font-size: 24px; }
    .stat-card { padding: 14px; }
    .stat-card .stat-icon { width: 40px; height: 40px; font-size: 18px; }
    .wizard-footer { flex-direction: column-reverse; }
    .wizard-footer .btn { width: 100%; }
    .otp-box { width: 42px; height: 50px; font-size: 20px; }
    .btn-lg { width: 100%; }
    h2 { font-size: 19px !important; }
    .daily-checkin { flex-wrap: wrap; }
}

/* ============================================
   نظرسنجی تعاملی
   ============================================ */
.survey-question { padding: 14px 0; border-bottom: 1px dashed var(--border); }
.survey-question:last-child { border-bottom: none; }
.survey-question .sq-title { font-weight: 600; margin-bottom: 10px; font-size: 14px; }
.rating-input { display: flex; gap: 6px; direction: ltr; justify-content: flex-start; }
.rating-star { background: none; border: none; cursor: pointer; font-size: 30px; line-height: 1; color: var(--border); padding: 0; transition: var(--transition); }
.rating-star.on { color: #f59e0b; }
.rating-star:hover { transform: scale(1.12); }
.choice-row { display: flex; gap: 10px; flex-wrap: wrap; }
.choice-btn { padding: 9px 24px; border-radius: 12px; border: 2px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; transition: var(--transition); }
.choice-btn.on { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); }
.choice-col { display: flex; flex-direction: column; gap: 8px; }
[data-theme="dark"] .choice-btn.on { color: #5eead4; }
[data-theme="dark"] .rating-star { color: #334155; }
[data-theme="dark"] .rating-star.on { color: #fbbf24; }

/* ============================================
   محصولات روتین (یادآوری و دستور مصرف)
   ============================================ */
.routine-products { margin-bottom: 14px; }
.rp-title { font-size: 13px; font-weight: 700; color: var(--primary-dark); margin-bottom: 8px; }
[data-theme="dark"] .rp-title { color: #5eead4; }
.rp-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 8px; background: var(--bg-soft); transition: var(--transition); }
.rp-item.done { border-color: var(--primary); background: var(--primary-light); }
.rp-check { padding-top: 2px; }
.rp-check input { width: 20px; height: 20px; accent-color: var(--primary); cursor: pointer; }
.rp-info { flex: 1; }
.rp-name { font-weight: 600; font-size: 14px; }
.rp-time { font-size: 12px; color: var(--primary); font-weight: 600; }
.rp-step { font-size: 11px; background: var(--primary-light); color: var(--primary-dark); padding: 2px 8px; border-radius: 50px; margin-right: 4px; }
.rp-usage { font-size: 13px; color: var(--text-muted); line-height: 1.9; margin-top: 4px; }
[data-theme="dark"] .rp-step { color: #5eead4; }
[data-theme="dark"] .rp-usage { color: var(--text-muted); }

/* ============================================
   پایش پیشرفت (خلاصه + نمودار + تاریخچه)
   ============================================ */
.progress-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.ps-item { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px; text-align: center; }
.ps-value { font-size: 24px; font-weight: 800; color: var(--primary); }
.ps-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.progress-chart { margin-bottom: 20px; }
.progress-chart svg { width: 100%; height: auto; }
.progress-list { display: flex; flex-direction: column; }
.progress-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.progress-row:last-child { border-bottom: none; }
@media (max-width: 480px) {
    .progress-summary { grid-template-columns: 1fr 1fr; }
    .ps-value { font-size: 20px; }
}

/* ============================================
   کارت‌های خدمات زیبایی
   ============================================ */
.beauty-service .bs-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.beauty-service .bs-head h4 { font-size: 15px; }
.beauty-service .bs-benefit { margin-top: 8px; font-size: 13px; color: var(--primary-dark); font-weight: 600; }
.beauty-service .bs-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 12px; color: var(--text-muted); }
[data-theme="dark"] .beauty-service .bs-benefit { color: #5eead4; }

/* ============================================
   خلاصه ویزارد زیبایی
   ============================================ */
.bw-summary { display: flex; flex-direction: column; gap: 8px; }
.bw-row {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-soft);
}
.bw-row span { color: var(--text-muted); font-size: 13px; white-space: nowrap; }
.bw-row strong { font-size: 14px; text-align: left; }
@media (max-width: 480px) {
    .bw-row { flex-direction: column; align-items: flex-start; gap: 2px; }
    .bw-row strong { text-align: right; }
}
