/* =====================================================================
   رسا، زبان طراحی پنل (نسخهٔ ۱۴۰۵/۰۷)

   این لایه آخرین استایل هر صفحهٔ پنل است و ظاهر را یکدست می‌کند:
   رنگ سطح‌ها، مرز، دکمه، نشان، ورودی، ریل و نوار بالا. ساختار و رفتار
   صفحه‌ها (کلاس‌ها، شناسه‌ها و اسکریپت‌ها) دست نخورده‌اند؛ هر چه این‌جا
   هست فقط «چطور دیده شود» است.

   اصول:
     ۱) سطح تخت و آرام به‌جای شیشهٔ مات و درخشش. blur فقط برای
        نوارهای چسبان مانده است.
     ۲) رنگ برند (سبز رسا) فقط برای کار اصلی و وضعیت فعال؛ بقیهٔ
        دکمه‌ها خنثی‌اند تا چشم بداند کجا را بزند.
     ۳) فاصله‌ها روی پلهٔ ۴ پیکسلی و گوشه‌ها سه اندازه دارند.
     ۴) هر رنگ وضعیت یک جفت دارد: متن پررنگ روی زمینهٔ کم‌رنگ.
   ===================================================================== */

:root {
    --r-bg: #0a0e15;
    --r-bg-soft: #0c111a;
    --r-surface: #10151f;
    --r-surface-2: #141a26;
    --r-surface-3: #1a2231;
    --r-overlay: rgba(6, 9, 14, 0.72);

    --r-line: rgba(148, 163, 184, 0.11);
    --r-line-2: rgba(148, 163, 184, 0.18);
    --r-line-3: rgba(148, 163, 184, 0.28);

    --r-text: #e8edf4;
    --r-text-2: #a7b1c1;
    --r-text-3: #7a8699;
    --r-text-4: #5b6679;

    --r-accent: #12b886;
    --r-accent-hover: #0fa678;
    --r-accent-strong: #3ddba6;
    --r-accent-soft: rgba(18, 184, 134, 0.12);
    --r-accent-line: rgba(18, 184, 134, 0.32);
    --r-on-accent: #03140d;

    --r-blue: #7c9bff;
    --r-blue-soft: rgba(124, 155, 255, 0.12);
    --r-amber: #f3b24d;
    --r-amber-soft: rgba(243, 178, 77, 0.12);
    --r-red: #f47a89;
    --r-red-soft: rgba(244, 122, 137, 0.12);
    --r-violet: #b197fc;
    --r-violet-soft: rgba(177, 151, 252, 0.12);
    --r-cyan: #4fd1e0;
    --r-cyan-soft: rgba(79, 209, 224, 0.12);
    --r-teal: #3fd3bd;
    --r-teal-soft: rgba(63, 211, 189, 0.12);
    --r-indigo: #97a1ff;
    --r-indigo-soft: rgba(151, 161, 255, 0.12);
    --r-rose: #fb8aa0;
    --r-rose-soft: rgba(251, 138, 160, 0.12);
    --r-slate: #a3afc2;
    --r-slate-soft: rgba(163, 175, 194, 0.1);

    --r-radius-xl: 20px;
    --r-radius-lg: 16px;
    --r-radius: 12px;
    --r-radius-sm: 9px;

    --r-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);
    --r-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px rgba(0, 0, 0, 0.22);
    --r-shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.45);
    --r-ring: 0 0 0 3px rgba(18, 184, 134, 0.32);

    --r-ease: cubic-bezier(0.2, 0.8, 0.2, 1);

    /* نگاشت متغیرهای قدیمی به زبان تازه، تا استایل‌های صفحه‌ای که
       هنوز از آن‌ها می‌خوانند خودبه‌خود هماهنگ شوند. */
    --bg-dark: var(--r-bg);
    --text-main: var(--r-text);
    --text-muted: var(--r-text-3);
    --accent: var(--r-accent);
    --accent-hover: var(--r-accent-hover);
    --accent-glow: rgba(18, 184, 134, 0.22);
    --success: var(--r-accent);
    --danger: #f25f72;
    --warning: var(--r-amber);
    --info: var(--r-blue);
    --neutral: var(--r-surface-2);
    --neutral-hover: var(--r-surface-3);

    --shell-bg: var(--r-bg);
    --shell-panel: var(--r-surface);
    --shell-panel-solid: var(--r-surface);
    --shell-line: var(--r-line);
    --shell-line-strong: var(--r-line-2);
    --shell-radius: var(--r-radius-lg);
    --shell-radius-sm: var(--r-radius);
    --shell-shadow: var(--r-shadow);
    --shell-rail: 256px;

    --dashboard-bg: var(--r-bg);
    --dashboard-surface: var(--r-surface);
    --dashboard-surface-strong: var(--r-surface-2);
    --dashboard-line: var(--r-line);
    --dashboard-line-strong: var(--r-line-2);
    --dashboard-text: var(--r-text);
    --dashboard-muted: var(--r-text-3);
    --dashboard-accent: var(--r-accent-strong);
    --dashboard-blue: var(--r-blue);
    --dashboard-radius: var(--r-radius-lg);
    --dashboard-shadow: var(--r-shadow);
}

/* ---------------------------------------------------------------------
   پایه
   --------------------------------------------------------------------- */
body.dashboard-body,
body.rasa-shell-body,
body.r-body {
    background: var(--r-bg);
    background-image: radial-gradient(1100px 420px at 85% -120px, rgba(18, 184, 134, 0.07), transparent 70%);
    background-attachment: fixed;
    color: var(--r-text);
    font-family: 'Farhang', Tahoma, sans-serif;
    font-size: 16px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.dashboard-body::before { display: none; }

body.dashboard-body ::selection,
body.r-body ::selection { background: rgba(18, 184, 134, 0.3); color: #fff; }

body.dashboard-body a,
body.r-body a { text-underline-offset: 3px; }

body.dashboard-body :focus-visible,
body.r-body :focus-visible {
    outline: none;
    box-shadow: var(--r-ring);
    border-radius: 8px;
}

body.dashboard-body *,
body.r-body * { scrollbar-width: thin; scrollbar-color: rgba(148, 163, 184, 0.22) transparent; }

body.dashboard-body h1,
body.dashboard-body h2,
body.dashboard-body h3,
body.dashboard-body h4 { letter-spacing: -0.01em; color: var(--r-text); }

/* ---------------------------------------------------------------------
   پوسته: ریل ناوبری
   --------------------------------------------------------------------- */
body.dashboard-body .ws-shell {
    grid-template-columns: var(--shell-rail) minmax(0, 1fr);
    gap: 22px;
    max-width: 1520px;
    padding: 16px clamp(12px, 2.2vw, 28px) 48px;
}

body.dashboard-body .ws-rail {
    top: 16px;
    gap: 10px;
    padding: 14px 12px 12px;
    border: 1px solid var(--r-line);
    border-radius: var(--r-radius-xl);
    background: var(--r-surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: var(--r-shadow-sm);
}

body.dashboard-body .ws-rail-brand {
    gap: 10px;
    padding: 4px 8px 14px;
    border-bottom: 1px solid var(--r-line);
}
body.dashboard-body .ws-rail-brand img { height: 30px; }
body.dashboard-body .ws-rail-brand strong { font-size: 0.98rem; font-weight: 800; }
body.dashboard-body .ws-rail-brand small { font-size: 0.72rem; color: var(--r-text-3); }

body.dashboard-body .ws-rail-group {
    margin: 12px 12px 4px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
    color: var(--r-text-4);
    opacity: 1;
}
body.dashboard-body .ws-rail-group:first-child { margin-top: 6px; }

body.dashboard-body .ws-rail-nav {
    gap: 1px;
    /* سایهٔ اسکرول: فقط وقتی مقصد دیگری بالا یا پایین ریل پنهان مانده دیده
       می‌شود (دو لایهٔ local روی دو لایهٔ scroll). */
    background:
        linear-gradient(var(--r-surface) 30%, rgba(16, 21, 31, 0)) center top / 100% 28px no-repeat local,
        linear-gradient(rgba(16, 21, 31, 0), var(--r-surface) 70%) center bottom / 100% 28px no-repeat local,
        radial-gradient(farthest-side at 50% 0, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0)) center top / 100% 12px no-repeat scroll,
        radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0)) center bottom / 100% 12px no-repeat scroll;
}

body.dashboard-body .ws-rail-nav a {
    position: relative;
    gap: 11px;
    min-height: 36px;
    padding: 6px 12px;
    border-radius: 10px;
    color: var(--r-text-2);
    font-size: 0.86rem;
    font-weight: 700;
    transition: background 0.16s var(--r-ease), color 0.16s var(--r-ease);
}
body.dashboard-body .ws-rail-nav a:visited { color: var(--r-text-2); }
body.dashboard-body .ws-rail-nav a i { width: 18px; font-size: 0.9rem; color: var(--r-text-3); opacity: 1; }
body.dashboard-body .ws-rail-nav a:hover { background: var(--r-surface-2); color: var(--r-text); }
body.dashboard-body .ws-rail-nav a:hover i { color: var(--r-text-2); }

body.dashboard-body .ws-rail-nav a.is-current {
    background: var(--r-surface-3);
    color: #fff;
    box-shadow: none;
}
body.dashboard-body .ws-rail-nav a.is-current::before {
    content: "";
    position: absolute;
    top: 9px;
    bottom: 9px;
    right: -12px;
    width: 3px;
    border-radius: 3px 0 0 3px;
    background: var(--r-accent);
}
body.dashboard-body .ws-rail-nav a.is-current i { color: var(--r-accent-strong); }

body.dashboard-body .ws-rail-count {
    min-width: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--r-surface-3);
    color: var(--r-text-2);
    font-size: 0.7rem;
    font-weight: 800;
    text-align: center;
}
body.dashboard-body .ws-rail-nav a.is-current .ws-rail-count { background: rgba(255, 255, 255, 0.08); color: #fff; }
body.dashboard-body .ws-rail-count.is-money { background: var(--r-accent-soft); color: var(--r-accent-strong); }
body.dashboard-body .ws-rail-count.is-alert {
    background: var(--r-accent);
    color: var(--r-on-accent);
}
body.dashboard-body .ws-rail-count.is-warn {
    background: var(--r-amber);
    color: #1d1403;
}

/* پای ریل یک ردیف است: کارت حساب و دکمهٔ خروج کنار هم، تا منو جای
   بیشتری داشته باشد و در صفحه‌های کوتاه به اسکرول پنهان نیفتد. */
body.dashboard-body .ws-rail-foot {
    flex-direction: row;
    align-items: stretch;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--r-line);
}
body.dashboard-body .ws-rail-foot .ws-rail-account { flex: 1; min-width: 0; }
body.dashboard-body .ws-rail-foot .ws-rail-logout {
    flex: none;
    justify-content: center;
    width: 44px;
    padding: 0;
    border: 1px solid var(--r-line);
    border-radius: var(--r-radius);
}
body.dashboard-body .ws-rail-foot .ws-rail-logout span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
body.dashboard-body .ws-rail-account {
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid var(--r-line);
    border-radius: var(--r-radius);
    background: var(--r-bg-soft);
}
body.dashboard-body .ws-rail-account:hover { background: var(--r-surface-2); }
body.dashboard-body .ws-rail-account.is-static:hover { background: var(--r-bg-soft); }
body.dashboard-body .ws-avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1fc995, #0e8f68);
    color: #fff;
    font-size: 0.9rem;
}
body.dashboard-body .ws-rail-logout {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--r-text-3);
    font-size: 0.82rem;
}
body.dashboard-body .ws-rail-logout:visited { color: var(--r-text-3); }
body.dashboard-body .ws-rail-logout:hover { background: var(--r-red-soft); color: var(--r-red); }

/* ---------------------------------------------------------------------
   پوسته: نوار بالا
   --------------------------------------------------------------------- */
body.dashboard-body .ws-main { gap: 20px; }

body.dashboard-body .ws-topbar {
    top: 16px;
    gap: 12px;
    min-height: 60px;
    padding: 10px 14px;
    border: 1px solid var(--r-line);
    border-radius: var(--r-radius-lg);
    background: rgba(12, 17, 26, 0.86);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: var(--r-shadow-sm);
}
body.dashboard-body .ws-topbar-title span {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: var(--r-text-3);
}
body.dashboard-body .ws-topbar-title strong { font-size: 1.02rem; font-weight: 800; }
body.dashboard-body .ws-topbar-actions { gap: 8px; }

body.dashboard-body .ws-rail-toggle {
    width: 38px;
    height: 38px;
    border: 1px solid var(--r-line-2);
    border-radius: 10px;
    background: var(--r-surface-2);
}

body.dashboard-body .ws-wallet-chip {
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--r-line-2);
    border-radius: 10px;
    background: var(--r-surface-2);
    color: var(--r-text);
    font-size: 0.84rem;
}
body.dashboard-body .ws-wallet-chip:visited { color: var(--r-text); }
body.dashboard-body .ws-wallet-chip i { color: var(--r-accent-strong); }
body.dashboard-body .ws-wallet-chip:hover { background: var(--r-surface-3); transform: none; }
body.dashboard-body .ws-wallet-chip small { color: var(--r-text-3); opacity: 1; }

/* دکمهٔ راهنما و پشتیبانی نوار بالا */
.ws-help-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--r-line-2);
    border-radius: 10px;
    background: var(--r-surface-2);
    color: var(--r-text-2);
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.16s var(--r-ease), color 0.16s var(--r-ease);
}
.ws-help-chip:visited { color: var(--r-text-2); }
.ws-help-chip:hover { background: var(--r-surface-3); color: var(--r-text); }
.ws-help-chip i { color: var(--r-blue); }
.ws-help-chip .ws-help-dot {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--r-accent);
    color: var(--r-on-accent);
    font-size: 0.66rem;
    font-weight: 900;
    line-height: 18px;
    text-align: center;
}

/* ---------------------------------------------------------------------
   کارت‌ها و سرفصل بخش‌ها
   --------------------------------------------------------------------- */
body.dashboard-body .glass-card,
body.dashboard-body .rasa-card {
    padding: clamp(18px, 2.4vw, 24px);
    border: 1px solid var(--r-line);
    border-radius: var(--r-radius-lg);
    background: var(--r-surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: var(--r-shadow-sm);
    animation: rFadeUp 0.35s var(--r-ease) both;
}

@keyframes rFadeUp {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

body.dashboard-body h3 { font-size: 1.04rem; font-weight: 800; gap: 9px; }
body.dashboard-body .dashboard-section-heading { gap: 16px; margin-bottom: 20px; align-items: flex-start; }
body.dashboard-body .dashboard-section-heading h3 { margin: 0 0 4px; font-size: 1.06rem; }
body.dashboard-body .dashboard-section-heading h3 i { font-size: 0.95rem; color: var(--r-text-3) !important; }
body.dashboard-body .dashboard-section-heading p { font-size: 0.82rem; color: var(--r-text-3); line-height: 1.9; }
body.dashboard-body .dashboard-section-label,
body.dashboard-body .rasa-card-label {
    margin-bottom: 4px;
    color: var(--r-accent-strong);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}
body.dashboard-body .rasa-card-head h2 { font-size: 1.04rem; }
body.dashboard-body .rasa-card-head h2 i { color: var(--r-text-3); }
body.dashboard-body .rasa-card-head p { color: var(--r-text-3); }

/* ---------------------------------------------------------------------
   دکمه‌ها
   --------------------------------------------------------------------- */
body.dashboard-body .btn,
body.dashboard-body .rasa-btn,
.r-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--r-line-2);
    border-radius: 11px;
    background: var(--r-surface-2);
    color: var(--r-text);
    box-shadow: none;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.16s var(--r-ease), border-color 0.16s var(--r-ease), color 0.16s var(--r-ease), transform 0.16s var(--r-ease);
}
body.dashboard-body .btn:visited,
body.dashboard-body .rasa-btn:visited,
.r-btn:visited { color: var(--r-text); }
body.dashboard-body .btn:hover,
body.dashboard-body .rasa-btn:hover,
.r-btn:hover {
    background: var(--r-surface-3);
    border-color: var(--r-line-3);
    box-shadow: none;
    transform: none;
}
body.dashboard-body .btn:active,
body.dashboard-body .rasa-btn:active,
.r-btn:active { transform: translateY(1px); }
body.dashboard-body .btn i,
body.dashboard-body .rasa-btn i,
.r-btn i { font-size: 0.85em; }

body.dashboard-body .btn-sm,
body.dashboard-body .rasa-btn-sm,
.r-btn-sm { min-height: 34px; padding: 0 12px; border-radius: 9px; font-size: 0.8rem; }

body.dashboard-body .btn-enter,
body.dashboard-body .rasa-btn-primary,
.r-btn-primary {
    border-color: transparent;
    background: var(--r-accent);
    color: var(--r-on-accent);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset;
}
body.dashboard-body .btn-enter:visited,
body.dashboard-body .rasa-btn-primary:visited,
.r-btn-primary:visited { color: var(--r-on-accent); }
body.dashboard-body .btn-enter:hover,
body.dashboard-body .rasa-btn-primary:hover,
.r-btn-primary:hover {
    border-color: transparent;
    background: var(--r-accent-strong);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 8px 22px rgba(18, 184, 134, 0.22);
}

body.dashboard-body .btn-primary,
body.dashboard-body .btn-info,
.r-btn-blue {
    border-color: rgba(124, 155, 255, 0.28);
    background: var(--r-blue-soft);
    color: #c9d6ff;
}
body.dashboard-body .btn-primary:hover,
body.dashboard-body .btn-info:hover,
.r-btn-blue:hover { background: rgba(124, 155, 255, 0.2); border-color: rgba(124, 155, 255, 0.42); }

body.dashboard-body .btn-warning,
.r-btn-amber {
    border-color: rgba(243, 178, 77, 0.3);
    background: var(--r-amber-soft);
    color: #ffd99a;
}
body.dashboard-body .btn-warning:hover,
.r-btn-amber:hover { background: rgba(243, 178, 77, 0.2); border-color: rgba(243, 178, 77, 0.45); }

body.dashboard-body .btn-danger,
body.dashboard-body .rasa-btn-danger,
.r-btn-danger {
    border-color: rgba(244, 122, 137, 0.28);
    background: var(--r-red-soft);
    color: #ffb3bd;
}
body.dashboard-body .btn-danger:hover,
body.dashboard-body .rasa-btn-danger:hover,
.r-btn-danger:hover { background: rgba(244, 122, 137, 0.2); border-color: rgba(244, 122, 137, 0.45); box-shadow: none; }

body.dashboard-body .btn-neutral,
body.dashboard-body .rasa-btn-ghost,
.r-btn-ghost { background: var(--r-surface-2); }

.r-btn-quiet {
    border-color: transparent;
    background: transparent;
    color: var(--r-text-2);
}
.r-btn-quiet:hover { background: var(--r-surface-2); border-color: transparent; color: var(--r-text); }

body.dashboard-body .btn-disabled,
body.dashboard-body .btn:disabled,
body.dashboard-body .rasa-btn:disabled,
.r-btn:disabled,
.r-btn[aria-disabled="true"] {
    border-color: var(--r-line);
    background: var(--r-bg-soft);
    color: var(--r-text-4);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.r-btn-block { width: 100%; }
.r-icon-btn {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--r-line-2);
    border-radius: 10px;
    background: var(--r-surface-2);
    color: var(--r-text-2);
    cursor: pointer;
    transition: background 0.16s var(--r-ease), color 0.16s var(--r-ease);
}
.r-icon-btn:hover { background: var(--r-surface-3); color: var(--r-text); }

/* ---------------------------------------------------------------------
   نشان‌ها (badge و pill)
   --------------------------------------------------------------------- */
body.dashboard-body .badge,
.r-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--r-slate-soft);
    color: var(--r-slate);
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}
body.dashboard-body .badge i,
.r-pill i { font-size: 0.72em; }

body.dashboard-body .bg-success,
.r-pill.is-emerald { background: var(--r-accent-soft); border-color: rgba(18, 184, 134, 0.22); color: var(--r-accent-strong); }
body.dashboard-body .bg-info,
.r-pill.is-blue { background: var(--r-blue-soft); border-color: rgba(124, 155, 255, 0.22); color: var(--r-blue); }
body.dashboard-body .bg-warning,
.r-pill.is-amber { background: var(--r-amber-soft); border-color: rgba(243, 178, 77, 0.22); color: var(--r-amber); }
body.dashboard-body .bg-danger,
.r-pill.is-red { background: var(--r-red-soft); border-color: rgba(244, 122, 137, 0.22); color: var(--r-red); }
.r-pill.is-violet { background: var(--r-violet-soft); border-color: rgba(177, 151, 252, 0.22); color: var(--r-violet); }
.r-pill.is-cyan { background: var(--r-cyan-soft); border-color: rgba(79, 209, 224, 0.22); color: var(--r-cyan); }
.r-pill.is-slate { background: var(--r-slate-soft); border-color: rgba(163, 175, 194, 0.16); color: var(--r-slate); }

.r-dot {
    display: inline-block;
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}
.r-dot.is-live { box-shadow: 0 0 0 0 rgba(18, 184, 134, 0.5); animation: rPulse 2s ease-out infinite; }
@keyframes rPulse {
    from { box-shadow: 0 0 0 0 rgba(18, 184, 134, 0.45); }
    to { box-shadow: 0 0 0 8px rgba(18, 184, 134, 0); }
}

/* ---------------------------------------------------------------------
   ورودی‌ها
   --------------------------------------------------------------------- */
body.dashboard-body .glass-input,
body.dashboard-body .rasa-field input,
body.dashboard-body .rasa-field select,
body.dashboard-body .rasa-field textarea,
.r-input {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--r-line-2);
    border-radius: 11px;
    background-color: var(--r-bg-soft);
    color: var(--r-text);
    box-shadow: none;
    font-family: inherit;
    font-size: 0.92rem;
    transition: border-color 0.16s var(--r-ease), box-shadow 0.16s var(--r-ease), background-color 0.16s var(--r-ease);
}
body.dashboard-body .glass-input::placeholder,
.r-input::placeholder { color: var(--r-text-4); }
body.dashboard-body .glass-input:hover,
.r-input:hover { border-color: var(--r-line-3); }
body.dashboard-body .glass-input:focus,
body.dashboard-body .rasa-field input:focus,
body.dashboard-body .rasa-field select:focus,
body.dashboard-body .rasa-field textarea:focus,
.r-input:focus {
    border-color: var(--r-accent);
    background-color: var(--r-bg);
    box-shadow: var(--r-ring);
    outline: none;
}
textarea.r-input { min-height: 120px; line-height: 1.9; resize: vertical; }
/* نشانی و نامک لاتین: فونت اصلی رقم را فارسی می‌کشد و «abc123» را «abc۱۲۳» نشان
   می‌دهد؛ در این فیلدها رقم لاتین درست است. */
.r-input[dir="ltr"]:not([type="time"]):not([type="number"]),
.r-ltr-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.86rem;
}
select.r-input {
    appearance: none;
    -webkit-appearance: none;
    padding-left: 38px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a8699' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 16px;
    cursor: pointer;
}
select.r-input option { background: var(--r-surface-2); color: var(--r-text); }
body.dashboard-body .form-group label,
.r-label {
    display: block;
    margin-bottom: 7px;
    color: var(--r-text-2);
    font-size: 0.82rem;
    font-weight: 800;
}
.r-label small { color: var(--r-text-4); font-weight: 700; }
.r-hint { margin: 6px 0 0; color: var(--r-text-3); font-size: 0.76rem; line-height: 1.9; }

/* ---------------------------------------------------------------------
   هشدارها و پیام‌ها
   --------------------------------------------------------------------- */
body.dashboard-body .rasa-alert,
.r-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 15px;
    border: 1px solid var(--r-line-2);
    border-radius: var(--r-radius);
    background: var(--r-surface-2);
    color: var(--r-text);
    font-size: 0.86rem;
    line-height: 1.9;
}
.r-alert > i { margin-top: 5px; flex: none; }
.r-alert strong { display: block; }
.r-alert p { margin: 0; color: var(--r-text-2); font-size: 0.82rem; }
body.dashboard-body .rasa-alert.is-success, .r-alert.is-success { border-color: rgba(18, 184, 134, 0.3); background: rgba(18, 184, 134, 0.08); }
body.dashboard-body .rasa-alert.is-success i, .r-alert.is-success > i { color: var(--r-accent-strong); }
body.dashboard-body .rasa-alert.is-danger, .r-alert.is-danger { border-color: rgba(244, 122, 137, 0.3); background: rgba(244, 122, 137, 0.08); }
body.dashboard-body .rasa-alert.is-danger i, .r-alert.is-danger > i { color: var(--r-red); }
body.dashboard-body .rasa-alert.is-warning, .r-alert.is-warning { border-color: rgba(243, 178, 77, 0.3); background: rgba(243, 178, 77, 0.08); }
body.dashboard-body .rasa-alert.is-warning i, .r-alert.is-warning > i { color: var(--r-amber); }
body.dashboard-body .rasa-alert.is-info, .r-alert.is-info { border-color: rgba(124, 155, 255, 0.3); background: rgba(124, 155, 255, 0.08); }
body.dashboard-body .rasa-alert.is-info i, .r-alert.is-info > i { color: var(--r-blue); }

body.dashboard-body .alert-success,
body.dashboard-body .alert-danger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border-radius: var(--r-radius);
    box-shadow: none;
    font-size: 0.88rem;
}
body.dashboard-body .alert-success { border: 1px solid rgba(18, 184, 134, 0.3); background: rgba(18, 184, 134, 0.08); }
body.dashboard-body .alert-danger { border: 1px solid rgba(244, 122, 137, 0.3) !important; background: rgba(244, 122, 137, 0.08) !important; }

body.dashboard-body #toast {
    bottom: 26px;
    padding: 11px 18px;
    border: 1px solid var(--r-line-2);
    border-radius: 12px;
    background: var(--r-surface-3);
    box-shadow: var(--r-shadow-lg);
    font-size: 0.88rem;
    font-weight: 700;
}

/* ---------------------------------------------------------------------
   مودال
   --------------------------------------------------------------------- */
body.dashboard-body .modal { background: var(--r-overlay); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
body.dashboard-body .modal-content {
    max-width: 560px;
    margin: 6vh auto;
    padding: 24px !important;
    border: 1px solid var(--r-line-2);
    border-radius: var(--r-radius-xl);
    background: var(--r-surface) !important;
    box-shadow: var(--r-shadow-lg);
}
body.dashboard-body #editWebinarModal .modal-content { max-width: 760px; }
body.dashboard-body .modal-content h3 { margin: 0 0 18px !important; padding-left: 40px; font-size: 1.08rem; }
body.dashboard-body .close-modal {
    top: 18px;
    left: 18px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--r-surface-2);
    color: var(--r-text-3);
    font-size: 1.3rem;
    line-height: 1;
}
body.dashboard-body .close-modal:hover { background: var(--r-red-soft); color: var(--r-red); }

/* ---------------------------------------------------------------------
   جدول‌ها (صفحه‌های گزارش و پنل‌ها)
   --------------------------------------------------------------------- */
body.dashboard-body .table-responsive {
    border: 1px solid var(--r-line);
    border-radius: var(--r-radius);
    background: var(--r-bg-soft);
}
body.dashboard-body th {
    padding: 12px 16px;
    border-bottom: 1px solid var(--r-line);
    background: var(--r-surface-2);
    color: var(--r-text-3);
    font-size: 0.74rem;
    font-weight: 800;
}
body.dashboard-body td { border-color: var(--r-line); }
body.dashboard-body tbody tr:hover { background: rgba(148, 163, 184, 0.035); }

/* ---------------------------------------------------------------------
   اجزای مشترک صفحه‌های تازه (پشتیبانی، مستندات، نمای کلی)
   --------------------------------------------------------------------- */
.r-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.r-page-head h1 { margin: 0; font-size: clamp(1.25rem, 2.4vw, 1.6rem); font-weight: 900; line-height: 1.5; }
.r-page-head p { margin: 4px 0 0; color: var(--r-text-3); font-size: 0.88rem; }
.r-page-head .r-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.r-card {
    border: 1px solid var(--r-line);
    border-radius: var(--r-radius-lg);
    background: var(--r-surface);
    box-shadow: var(--r-shadow-sm);
}
.r-card-pad { padding: clamp(16px, 2.2vw, 22px); }
.r-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--r-line);
}
.r-card-head h2,
.r-card-head h3 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 0.98rem; font-weight: 800; }
.r-card-head h2 i,
.r-card-head h3 i { color: var(--r-text-3); font-size: 0.9rem; }
.r-card-head a { color: var(--r-text-2); font-size: 0.78rem; font-weight: 800; text-decoration: none; }
.r-card-head a:hover { color: var(--r-accent-strong); }

.r-kicker { color: var(--r-accent-strong); font-size: 0.72rem; font-weight: 800; }
.r-muted { color: var(--r-text-3); }
.r-num { font-feature-settings: "tnum" 1; }

.r-grid { display: grid; gap: 16px; }
.r-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.r-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.r-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.r-split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }

.r-kpi {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 16px 18px;
    border: 1px solid var(--r-line);
    border-radius: var(--r-radius-lg);
    background: var(--r-surface);
}
.r-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.r-kpi-label { color: var(--r-text-3); font-size: 0.78rem; font-weight: 800; }
.r-kpi-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--r-surface-3);
    color: var(--r-text-2);
    font-size: 0.8rem;
}
.r-kpi-value { color: var(--r-text); font-size: clamp(1.35rem, 2.6vw, 1.7rem); font-weight: 900; line-height: 1.3; }
.r-kpi-note { color: var(--r-text-4); font-size: 0.74rem; }
.r-kpi-empty { color: var(--r-text-4); font-size: 0.86rem; font-weight: 700; }

/* فهرست کوتاه اطلاعات با جداکنندهٔ خط عمودی. «·» در فونت فرهنگ کنار
   عدد شبیه صفر فارسی دیده می‌شد و «· ۲» را «۲۰» می‌خواندیم. */
.r-meta { display: inline-flex; flex-wrap: wrap; align-items: center; row-gap: 2px; }
.r-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.r-meta > span + span::before {
    content: "";
    display: inline-block;
    width: 1px;
    height: 0.95em;
    margin: 0 8px;
    background: currentColor;
    opacity: 0.35;
}

.r-tone-emerald { --tone: var(--r-accent-strong); --tone-soft: var(--r-accent-soft); }
.r-tone-blue { --tone: var(--r-blue); --tone-soft: var(--r-blue-soft); }
.r-tone-amber { --tone: var(--r-amber); --tone-soft: var(--r-amber-soft); }
.r-tone-red { --tone: var(--r-red); --tone-soft: var(--r-red-soft); }
.r-tone-violet { --tone: var(--r-violet); --tone-soft: var(--r-violet-soft); }
.r-tone-cyan { --tone: var(--r-cyan); --tone-soft: var(--r-cyan-soft); }
.r-tone-teal { --tone: var(--r-teal); --tone-soft: var(--r-teal-soft); }
.r-tone-indigo { --tone: var(--r-indigo); --tone-soft: var(--r-indigo-soft); }
.r-tone-rose { --tone: var(--r-rose); --tone-soft: var(--r-rose-soft); }
.r-tone-slate { --tone: var(--r-slate); --tone-soft: var(--r-slate-soft); }
[class*="r-tone-"] .r-kpi-icon,
.r-tone-icon { background: var(--tone-soft); color: var(--tone); }

.r-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 36px 18px;
    border: 1px dashed var(--r-line-2);
    border-radius: var(--r-radius-lg);
    color: var(--r-text-3);
    text-align: center;
}
.r-empty > i { margin-bottom: 4px; color: var(--r-text-4); font-size: 1.7rem; }
.r-empty strong { color: var(--r-text); font-size: 0.98rem; }
.r-empty p { max-width: 440px; margin: 0; font-size: 0.84rem; line-height: 1.9; }

.r-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--r-line);
    border-radius: 12px;
    background: var(--r-bg-soft);
    overflow-x: auto;
    max-width: 100%;
}
.r-tabs a,
.r-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--r-text-2);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}
.r-tabs a:visited { color: var(--r-text-2); }
.r-tabs a:hover,
.r-tabs button:hover { color: var(--r-text); background: var(--r-surface-2); }
.r-tabs .is-active { background: var(--r-surface-3); color: #fff; box-shadow: var(--r-shadow-sm); }
.r-tabs em {
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    color: var(--r-text-2);
    font-size: 0.68rem;
    font-style: normal;
    text-align: center;
}
.r-tabs .is-active em { background: var(--r-accent); color: var(--r-on-accent); }

.r-help-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--r-line-2);
    border-radius: 999px;
    color: var(--r-text-3);
    font-size: 0.74rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.16s var(--r-ease), border-color 0.16s var(--r-ease), background 0.16s var(--r-ease);
}
.r-help-link:visited { color: var(--r-text-3); }
.r-help-link:hover { border-color: rgba(124, 155, 255, 0.4); background: var(--r-blue-soft); color: #c9d6ff; }
.r-help-link i { color: var(--r-blue); font-size: 0.8em; }

.r-avatar {
    display: grid;
    flex: none;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: var(--r-surface-3);
    color: var(--r-text);
    font-size: 0.92rem;
    font-weight: 900;
}
.r-avatar.is-agent { background: linear-gradient(135deg, #1fc995, #0e8f68); color: #fff; }

.r-divider { height: 1px; margin: 16px 0; border: 0; background: var(--r-line); }

.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------------------------------------------------------------------
   پوستهٔ شرکت‌کننده (داشبورد شاگرد، پشتیبانی و راهنما)
   --------------------------------------------------------------------- */
.r-student-shell {
    width: min(100%, 1240px);
    margin: 0 auto;
    padding: 16px clamp(12px, 2.4vw, 24px) 56px;
}
.r-student-main { display: flex; flex-direction: column; gap: 18px; margin-top: 18px; min-width: 0; }

body.dashboard-body header.dashboard-navbar {
    min-height: 64px;
    padding: 10px 14px !important;
    border: 1px solid var(--r-line) !important;
    border-radius: var(--r-radius-lg) !important;
    background: rgba(12, 17, 26, 0.88) !important;
    box-shadow: var(--r-shadow-sm) !important;
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    animation: none;
}
body.dashboard-body .dashboard-brand-mark { flex-basis: 64px; width: 64px; height: 34px; filter: none; }
body.dashboard-body .dashboard-brand-copy strong { font-size: 0.94rem; font-weight: 800; }
body.dashboard-body .dashboard-brand-copy > span { color: var(--r-text-3); font-size: 0.72rem; }
body.dashboard-body .dashboard-quicknav { gap: 2px; }
body.dashboard-body .dashboard-quicknav a {
    position: relative;
    gap: 7px;
    min-height: 38px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    color: var(--r-text-2);
    font-size: 0.82rem;
}
body.dashboard-body .dashboard-quicknav a:visited { color: var(--r-text-2); }
body.dashboard-body .dashboard-quicknav a:hover { background: var(--r-surface-2); color: var(--r-text); border: 0; }
body.dashboard-body .dashboard-quicknav a.is-current { background: var(--r-surface-3); color: #fff; }
body.dashboard-body .dashboard-quicknav a.is-current i { color: var(--r-accent-strong); }
.r-topnav-dot {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--r-accent);
    color: var(--r-on-accent);
    font-size: 0.64rem;
    font-style: normal;
    font-weight: 900;
    line-height: 18px;
    text-align: center;
}
body.dashboard-body .dashboard-account-meta strong { font-size: 0.8rem; }
body.dashboard-body .dashboard-icon-action { width: 38px; height: 38px; border-radius: 10px; border-color: var(--r-line-2); background: var(--r-surface-2); }
body.dashboard-body .dashboard-icon-action.is-danger { color: var(--r-text-3); }
body.dashboard-body .dashboard-icon-action.is-danger:hover { background: var(--r-red-soft); color: var(--r-red); border-color: rgba(244, 122, 137, 0.3); }

@media (max-width: 900px) {
    body.dashboard-body .dashboard-mobile-nav {
        right: 10px;
        left: 10px;
        border: 1px solid var(--r-line-2);
        border-radius: 16px;
        background: rgba(10, 14, 21, 0.95);
        grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    }
    body.dashboard-body .dashboard-mobile-nav a { color: var(--r-text-3); }
    body.dashboard-body .dashboard-mobile-nav a:visited { color: var(--r-text-3); }
    body.dashboard-body .dashboard-mobile-nav a.is-current { background: var(--r-surface-2); color: var(--r-accent-strong); }
    .r-student-shell { padding-bottom: 96px; }
}

/* ---------------------------------------------------------------------
   ناوبری پایین موبایل
   --------------------------------------------------------------------- */
@media (max-width: 1240px) {
    body.dashboard-body .ws-shell { grid-template-columns: 228px minmax(0, 1fr); gap: 16px; }
}

@media (max-width: 1000px) {
    /* ریل کشویی می‌شود و کل عرض به محتوا می‌رسد؛ قاعدهٔ دسکتاپ بالا نباید بماند. */
    body.dashboard-body .ws-shell { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-top: 10px; }
    body.dashboard-body.ws-has-tabbar .ws-shell { padding-bottom: 96px; }
    body.dashboard-body .ws-rail {
        top: 0;
        border-radius: 0;
        box-shadow: var(--r-shadow-lg);
    }
    body.dashboard-body .ws-rail-nav a.is-current::before { right: -12px; }
    body.dashboard-body .ws-tabbar {
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid var(--r-line);
        background: rgba(10, 14, 21, 0.94);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }
    body.dashboard-body .ws-tabbar a { color: var(--r-text-3); font-size: 0.64rem; }
    body.dashboard-body .ws-tabbar a:visited { color: var(--r-text-3); }
    body.dashboard-body .ws-tabbar a.is-current { background: var(--r-surface-2); color: var(--r-accent-strong); }
    body.dashboard-body .ws-tabbar-primary i { background: var(--r-accent); color: var(--r-on-accent); box-shadow: none; }
    .r-split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
    .r-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .r-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    body.dashboard-body .ws-shell { padding-right: 10px; padding-left: 10px; }
    body.dashboard-body .ws-topbar { top: 8px; min-height: 54px; }
    .ws-help-chip span { display: none; }
    .ws-help-chip { padding: 0 11px; }
    .r-grid-2,
    .r-grid-3 { grid-template-columns: minmax(0, 1fr); }
    .r-page-head { align-items: stretch; }
    body.dashboard-body .modal-content { margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
    body.dashboard-body *,
    body.r-body * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
