/* ==========================================================================
   طراحی سایت پزشک — گلس‌مورفیسم روشن با پالت سبز آرام
   رنگ‌ها و اندازه‌ها از نمونه طراحی تأییدشده گرفته شده‌اند.
   ========================================================================== */

@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/Vazirmatn-Variable.woff2") format("woff2-variations"),
         url("../fonts/Vazirmatn-Variable.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --ds-ground: #EEF6F1;
    --ds-primary: #1F8A5B;
    --ds-primary-hover: #187049;
    --ds-link: #17714A;
    --ds-link-hover: #0F5636;
    --ds-text: #12352A;
    --ds-text-2: #3A5A4E;
    --ds-text-body: #2E4C41;
    --ds-warn: #8A3B12;
    --ds-border-soft: #C9DCD2;
    --ds-tint: rgba(31, 138, 91, 0.12);
    --ds-glass: rgba(255, 255, 255, 0.62);
    --ds-glass-strong: rgba(255, 255, 255, 0.78);
    --ds-glass-border: rgba(255, 255, 255, 0.85);
    --ds-blob-a: #BFE7D1;
    --ds-blob-b: #D9F2C9;
    --ds-radius-lg: 28px;
    --ds-radius: 22px;
    --ds-radius-sm: 14px;
    --ds-shadow: 0 20px 50px rgba(23, 113, 74, 0.14);
    --ds-font: "Vazirmatn", Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--ds-ground);
    color: var(--ds-text);
    font-family: var(--ds-font);
    font-size: 16px;
    line-height: 1.9;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--ds-link); }
a:hover { color: var(--ds-link-hover); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.5; margin: 0; }
h1:focus { outline: none; }

/* MudBlazor فونت خودش را تحمیل می‌کند؛ این‌جا یکسان می‌شود. */
.mud-typography, .mud-input, .mud-button-root, .mud-input-label, .mud-snackbar, .mud-tooltip {
    font-family: var(--ds-font) !important;
}

/* ---------- صفحه و پس‌زمینه ---------- */
.ds-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    isolation: isolate;
}

.ds-page--center {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.ds-blob {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.8;
    pointer-events: none;
}

.ds-blob--a { top: -160px; left: -120px; width: 560px; height: 560px; background: var(--ds-blob-a); }
.ds-blob--b { top: 720px; right: -160px; width: 560px; height: 560px; background: var(--ds-blob-b); }
.ds-blob--c { bottom: -200px; left: 30%; width: 520px; height: 520px; background: var(--ds-blob-a); opacity: 0.6; }

.ds-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 600px) {
    .ds-container { padding: 0 16px; }
}

/* ---------- کارت شیشه‌ای ---------- */
.ds-glass {
    background: var(--ds-glass);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border: 1px solid var(--ds-glass-border);
    border-radius: var(--ds-radius);
}

.ds-glass--strong {
    background: var(--ds-glass-strong);
    box-shadow: var(--ds-shadow);
    border-radius: var(--ds-radius-lg);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .ds-glass { background: rgba(255, 255, 255, 0.9); }
}

.ds-card { padding: 24px; }
.ds-section { padding: 28px 0; }
.ds-section__title { font-size: 26px; font-weight: 800; margin-bottom: 18px; }
.ds-muted { color: var(--ds-text-2); }

/* ---------- دکمه‌ها ---------- */
.ds-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: var(--ds-radius-sm);
    border: 1px solid transparent;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, box-shadow .15s ease;
}

.ds-btn--primary { background: var(--ds-primary); color: #fff; box-shadow: 0 12px 26px rgba(31, 138, 91, 0.28); }
.ds-btn--primary:hover { background: var(--ds-primary-hover); color: #fff; }
.ds-btn--soft { background: var(--ds-tint); color: var(--ds-link); }
.ds-btn--soft:hover { background: rgba(31, 138, 91, 0.2); }
.ds-btn--ghost { background: #fff; border-color: var(--ds-border-soft); color: var(--ds-text); }
.ds-btn--danger { background: #fff; border-color: var(--ds-border-soft); color: var(--ds-warn); }
.ds-btn--block { width: 100%; }
.ds-btn:disabled { background: #7FA696; box-shadow: none; cursor: not-allowed; }
.ds-btn:focus-visible { outline: 3px solid rgba(31, 138, 91, 0.45); outline-offset: 2px; }

/* ---------- فرم ساده (صفحه سمت سرور) ---------- */
.ds-form { display: flex; flex-direction: column; gap: 16px; }
.ds-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ds-text-2); }
.ds-input {
    min-height: 46px;
    padding: 0 14px;
    border-radius: var(--ds-radius-sm);
    border: 1px solid var(--ds-border-soft);
    background: rgba(255, 255, 255, 0.85);
    font: inherit;
    color: var(--ds-text);
}
.ds-input:focus { outline: 2px solid rgba(31, 138, 91, 0.45); border-color: var(--ds-primary); }
.ds-captcha { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.ds-captcha img { border-radius: 12px; border: 1px solid var(--ds-border-soft); }
.ds-captcha .ds-field { flex: 1 1 140px; }

.ds-alert { margin: 0; padding: 12px 16px; border-radius: var(--ds-radius-sm); font-size: 14px; }
.ds-alert--error { background: rgba(138, 59, 18, 0.1); color: var(--ds-warn); }
.ds-alert--info { background: var(--ds-tint); color: var(--ds-link); }

/* ---------- کارت ورود ---------- */
.ds-auth-card {
    width: 100%;
    max-width: 420px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: var(--ds-shadow);
}
.ds-auth-card__title { font-size: 26px; font-weight: 800; }

/* ---------- هدر عمومی ---------- */
.ds-header { position: sticky; top: 0; z-index: 20; padding: 14px 0; }
.ds-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 18px;
}
.ds-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--ds-text); text-decoration: none; }
.ds-brand__mark {
    width: 38px; height: 38px; border-radius: 12px;
    background: var(--ds-primary); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
}
.ds-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ds-nav a.ds-nav__link {
    display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
    border-radius: 12px; color: var(--ds-text); text-decoration: none;
}
.ds-nav a.ds-nav__link.active, .ds-nav a.ds-nav__link:hover { background: var(--ds-tint); color: var(--ds-link); }

@media (max-width: 720px) {
    .ds-nav__links { display: none; }
}

/* ---------- لندینگ ---------- */
.ds-hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
    align-items: center;
    padding: 36px 0 20px;
}
.ds-hero__kicker {
    align-self: flex-start;
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--ds-tint);
    color: var(--ds-link);
    font-weight: 700;
    font-size: 14px;
}
.ds-hero__title { font-size: clamp(32px, 5vw, 52px); font-weight: 800; margin: 14px 0 10px; }
.ds-hero__slogan { font-size: 20px; color: var(--ds-link); font-weight: 700; margin: 0 0 12px; }
.ds-hero__intro { font-size: 17px; color: var(--ds-text-body); margin: 0 0 22px; max-width: 56ch; }
.ds-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ds-hero__media {
    aspect-ratio: 4 / 5;
    border-radius: 36px;
    overflow: hidden;
    background: #CDEAD9;
    display: flex; align-items: center; justify-content: center;
    color: var(--ds-text-2);
}
.ds-hero__media img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 860px) {
    .ds-hero { grid-template-columns: 1fr; }
    .ds-hero__media { max-width: 420px; aspect-ratio: 1 / 1; }
}

.ds-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.ds-stat { padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.ds-stat__value { font-size: 32px; font-weight: 800; color: var(--ds-link); line-height: 1.3; }
.ds-stat__label { font-size: 14px; color: var(--ds-text-2); }

.ds-grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.ds-service { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.ds-service__icon {
    width: 48px; height: 48px; border-radius: 16px;
    background: var(--ds-tint); color: var(--ds-link);
    display: inline-flex; align-items: center; justify-content: center;
}
.ds-service__title { font-size: 18px; font-weight: 800; }
.ds-service__text { font-size: 15px; color: var(--ds-text-body); margin: 0; }

.ds-about { padding: 26px; font-size: 16px; color: var(--ds-text-body); white-space: pre-line; }

.ds-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ds-contact__list { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.ds-contact__row { display: flex; gap: 12px; align-items: flex-start; }
.ds-contact__row strong { display: block; font-size: 13px; color: var(--ds-text-2); font-weight: 500; }
.ds-map { border-radius: var(--ds-radius); overflow: hidden; min-height: 280px; background: #DCEFE3; }
.ds-map iframe { width: 100%; height: 100%; min-height: 280px; border: 0; }

@media (max-width: 860px) {
    .ds-contact { grid-template-columns: 1fr; }
}

.ds-socials { display: flex; flex-wrap: wrap; gap: 10px; }

.ds-footer { padding: 28px 0 36px; color: var(--ds-text-2); font-size: 14px; text-align: center; }

/* ---------- پنل‌ها ---------- */
.ds-panel { display: flex; flex-wrap: wrap; gap: 20px; padding: 20px; position: relative; }
.ds-sidebar {
    flex: 1 1 240px;
    max-width: 100%;
    align-self: flex-start;
    position: sticky;
    top: 20px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ds-sidebar__title { font-weight: 800; font-size: 17px; padding: 8px 12px 14px; }
.ds-sidebar a.ds-side-link {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    min-height: 44px; padding: 0 14px; border-radius: 14px;
    color: var(--ds-text); text-decoration: none;
}
.ds-sidebar a.ds-side-link:hover { background: var(--ds-tint); }
.ds-sidebar a.ds-side-link.active { background: var(--ds-primary); color: #fff; font-weight: 700; }
.ds-sidebar__footer { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(18, 53, 42, 0.08); }

.ds-panel__main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.ds-panel__header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.ds-panel__title { font-size: 28px; font-weight: 800; }

@media (max-width: 900px) {
    .ds-sidebar { position: static; }
}

.ds-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 24px; padding: 2px 10px; border-radius: 999px;
    background: var(--ds-tint); color: var(--ds-link);
    font-size: 12px; font-weight: 700; line-height: 1.6;
}
.ds-badge--warn { background: var(--ds-warn); color: #fff; }
.ds-badge--muted { background: rgba(18, 53, 42, 0.08); color: var(--ds-text-2); }

/* ---------- جدول ---------- */
.ds-table-wrap { overflow-x: auto; }
.ds-table { width: 100%; min-width: 640px; border-collapse: separate; border-spacing: 0 8px; font-size: 14px; }
.ds-table th { padding: 6px 12px; font-weight: 500; color: var(--ds-text-2); text-align: right; }
.ds-table td { padding: 12px; background: rgba(255, 255, 255, 0.8); vertical-align: middle; }
.ds-table td:first-child { border-radius: 0 14px 14px 0; font-weight: 700; }
.ds-table td:last-child { border-radius: 14px 0 0 14px; }
.ds-table tr.ds-table__expand td { background: rgba(255, 255, 255, 0.6); border-radius: 14px; font-weight: 400; }

/* ---------- متفرقه ---------- */
.ds-loader { display: flex; align-items: center; justify-content: center; min-height: 40vh; }
.ds-empty { padding: 28px; text-align: center; color: var(--ds-text-2); }
.ds-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ds-stack { display: flex; flex-direction: column; gap: 14px; }
.ds-list-editor__item { padding: 16px; border-radius: 18px; background: rgba(255, 255, 255, 0.7); }
.ds-perm-group { padding: 14px 16px; border-radius: 18px; background: rgba(255, 255, 255, 0.7); }
.ds-perm-group h3 { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.ds-image-preview { width: 160px; height: 160px; border-radius: 22px; object-fit: cover; background: #DCEFE3; }
.ds-notif { padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.75); display: flex; gap: 12px; justify-content: space-between; }
.ds-notif--unread { border-inline-start: 4px solid var(--ds-primary); }
.ds-notif__time { font-size: 12px; color: var(--ds-text-2); white-space: nowrap; }

.ds-sr-only {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

/* نوار خطای Blazor */
#blazor-error-ui {
    display: none;
    position: fixed; bottom: 16px; left: 16px; right: 16px; z-index: 1000;
    padding: 12px 18px; border-radius: 14px;
    background: #FFF4EC; color: var(--ds-warn);
    box-shadow: var(--ds-shadow);
}
#blazor-error-ui .dismiss { float: left; border: 0; background: none; cursor: pointer; color: inherit; }

/* ==========================================================================
   فاز ۲ — بلاگ
   ========================================================================== */

.ds-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ds-chip {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 36px; padding: 0 14px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.7); border: 1px solid var(--ds-glass-border);
    color: var(--ds-text); text-decoration: none; font-size: 14px; cursor: pointer;
    font-family: inherit;
}
.ds-chip:hover { background: var(--ds-tint); color: var(--ds-link); }
.ds-chip--active { background: var(--ds-primary); color: #fff; border-color: var(--ds-primary); }
.ds-chip--active:hover { background: var(--ds-primary-hover); color: #fff; }

.ds-post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.ds-post-card { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.ds-post-card:hover { transform: translateY(-2px); box-shadow: var(--ds-shadow); color: inherit; }
.ds-post-card__media { aspect-ratio: 16 / 9; background: #D3EDDE; display: flex; align-items: center; justify-content: center; color: var(--ds-text-2); }
.ds-post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.ds-post-card__body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ds-post-card__title { font-size: 18px; font-weight: 800; line-height: 1.6; }
.ds-post-card__summary {
    margin: 0; font-size: 14px; color: var(--ds-text-body);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ds-post-card__meta { margin-top: auto; display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ds-text-2); }
.ds-read-more { color: var(--ds-link); font-weight: 700; }

.ds-article { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.ds-article__title { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.ds-article__meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--ds-text-2); font-size: 14px; }
.ds-article__cover { border-radius: var(--ds-radius-lg); overflow: hidden; }
.ds-article__cover img { width: 100%; max-height: 460px; object-fit: cover; }
.ds-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--ds-radius); overflow: hidden; background: #12352A; }
.ds-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ds-article__summary { font-size: 17px; color: var(--ds-text-body); padding: 18px 22px; border-inline-start: 4px solid var(--ds-primary); }

.ds-post-body { font-size: 17px; line-height: 2.1; color: var(--ds-text-body); padding: 26px; overflow-wrap: anywhere; }
.ds-post-body h2, .ds-post-body h3, .ds-post-body h4 { color: var(--ds-text); margin: 1.4em 0 .5em; }
.ds-post-body h2 { font-size: 24px; }
.ds-post-body h3 { font-size: 20px; }
.ds-post-body h4 { font-size: 18px; }
.ds-post-body p { margin: 0 0 1em; }
.ds-post-body img { max-width: 100%; height: auto; border-radius: 18px; margin: 12px auto; }
.ds-post-body blockquote { margin: 1em 0; padding: 12px 18px; border-inline-start: 4px solid var(--ds-primary); background: rgba(255, 255, 255, 0.6); border-radius: 12px; }
.ds-post-body pre { direction: ltr; text-align: left; background: #12352A; color: #EEF6F1; padding: 14px; border-radius: 12px; overflow-x: auto; }
.ds-post-body .ql-align-center { text-align: center; }
.ds-post-body .ql-align-right { text-align: right; }
.ds-post-body .ql-align-left { text-align: left; }
.ds-post-body .ql-align-justify { text-align: justify; }
.ds-post-body .ql-direction-ltr { direction: ltr; }
.ds-post-body .ql-indent-1 { padding-inline-start: 2em; }
.ds-post-body .ql-indent-2 { padding-inline-start: 4em; }
.ds-post-body .ql-indent-3 { padding-inline-start: 6em; }

.ds-reactions { display: flex; flex-wrap: wrap; gap: 10px; }
.ds-reaction {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 44px; padding: 0 16px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.75); border: 1px solid var(--ds-glass-border);
    font: inherit; font-size: 15px; cursor: pointer; color: var(--ds-text);
}
.ds-reaction:hover { background: var(--ds-tint); }
.ds-reaction--mine { background: var(--ds-tint); border-color: var(--ds-primary); color: var(--ds-link); font-weight: 700; }
.ds-reaction__emoji { font-size: 20px; line-height: 1; }

.ds-comment { padding: 16px 18px; border-radius: 18px; background: rgba(255, 255, 255, 0.75); display: flex; flex-direction: column; gap: 6px; }
.ds-comment__head { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.ds-comment__text { margin: 0; white-space: pre-line; color: var(--ds-text-body); }
.ds-textarea { min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.9; }

.ds-emoji-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.ds-emoji-option {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 8px; border-radius: 14px; border: 1px solid var(--ds-border-soft);
    background: #fff; cursor: pointer; font: inherit; font-size: 12px; color: var(--ds-text-2);
}
.ds-emoji-option span:first-child { font-size: 22px; }
.ds-emoji-option--on { border-color: var(--ds-primary); background: var(--ds-tint); color: var(--ds-link); font-weight: 700; }
.ds-emoji-option:disabled { opacity: .45; cursor: not-allowed; }

.ds-status { display: inline-flex; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.ds-status--draft { background: rgba(18, 53, 42, 0.08); color: var(--ds-text-2); }
.ds-status--scheduled { background: rgba(31, 90, 138, 0.12); color: #1F5A8A; }
.ds-status--published, .ds-status--approved { background: var(--ds-tint); color: var(--ds-link); }
.ds-status--pending { background: rgba(160, 110, 10, 0.14); color: #7A5200; }
.ds-status--rejected { background: rgba(138, 59, 18, 0.12); color: var(--ds-warn); }

.ds-editor-layout { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.ds-editor-layout__main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.ds-editor-layout__side { flex: 1 1 280px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 20px; }
@media (max-width: 900px) { .ds-editor-layout__side { position: static; } }

/* ویرایشگر Quill راست‌به‌چپ */
.ds-editor .ql-toolbar.ql-snow { border-radius: 14px 14px 0 0; border-color: var(--ds-border-soft); background: rgba(255, 255, 255, 0.85); direction: ltr; }
.ds-editor .ql-container.ql-snow { border-radius: 0 0 14px 14px; border-color: var(--ds-border-soft); background: #fff; font-family: var(--ds-font); font-size: 16px; }
.ds-editor .ql-editor { min-height: 360px; direction: rtl; text-align: right; line-height: 2; }
.ds-editor .ql-editor.ql-blank::before { right: 15px; left: auto; font-style: normal; color: #7FA696; }
.ds-editor .ql-editor img { max-width: 100%; border-radius: 12px; }

/* ==========================================================================
   فاز ۳ — دوره‌ها
   ========================================================================== */

.ds-course-banner {
    height: 300px; border-radius: 30px; overflow: hidden; background: #CDEAD9;
    display: flex; align-items: center; justify-content: center; color: var(--ds-text-2);
}
.ds-course-banner img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 600px) { .ds-course-banner { height: 190px; border-radius: 22px; } }

.ds-course-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.ds-course-layout__main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.ds-course-layout__aside {
    flex: 1 1 300px; display: flex; flex-direction: column; gap: 14px; padding: 24px;
    position: sticky; top: 96px;
}
@media (max-width: 900px) { .ds-course-layout__aside { position: static; } }

.ds-kicker {
    align-self: flex-start; padding: 6px 12px; border-radius: 999px;
    background: var(--ds-tint); color: var(--ds-link); font-weight: 700; font-size: 13px; text-decoration: none;
}
.ds-course-title { font-size: clamp(28px, 4vw, 38px); font-weight: 800; }
.ds-block-title { font-size: 22px; font-weight: 800; }

.ds-sessions { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.ds-session { padding: 16px; border-radius: 18px; background: rgba(255, 255, 255, 0.8); display: flex; flex-direction: column; gap: 4px; }
.ds-session__no { font-weight: 800; color: var(--ds-link); }
.ds-session__day { font-size: 14px; color: var(--ds-text-body); }
.ds-session__time { font-size: 13px; color: var(--ds-text-2); }

.ds-videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.ds-video-item { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ds-text-body); }
.ds-video-item .ds-video { border-radius: 18px; }

.ds-teacher-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 22px; }
.ds-avatar {
    width: 84px; height: 84px; border-radius: 50%; overflow: hidden; flex: none;
    background: #CDEAD9; display: flex; align-items: center; justify-content: center; color: var(--ds-text-2);
}
.ds-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ds-avatar--lg { width: 140px; height: 140px; }

.ds-price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ds-price { font-size: 24px; font-weight: 800; color: var(--ds-link); }
.ds-facts { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--ds-text-body); margin: 0; padding: 0; list-style: none; }

.ds-check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.8; cursor: pointer; }
.ds-check input { width: 20px; height: 20px; margin-top: 4px; accent-color: var(--ds-primary); flex: none; }
.ds-link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--ds-link); text-decoration: underline; cursor: pointer; }

.ds-agreement {
    max-height: 280px; overflow-y: auto; white-space: pre-line; font-size: 14px; line-height: 2;
    padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.85); color: var(--ds-text-body);
}
.ds-btn--lg { min-height: 52px; border-radius: 16px; font-size: 16px; font-weight: 800; }
.ds-note { margin: 0; font-size: 13px; line-height: 1.9; color: var(--ds-text-2); }

.ds-segmented { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, 0.7); }
.ds-segmented a, .ds-segmented button {
    min-height: 36px; padding: 0 14px; border-radius: 10px; border: 0; background: none;
    display: inline-flex; align-items: center; color: var(--ds-text); text-decoration: none; font: inherit; cursor: pointer;
}
.ds-segmented .ds-segmented--on { background: var(--ds-primary); color: #fff; font-weight: 700; }

.ds-icon-btn {
    width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--ds-border-soft);
    background: #fff; color: var(--ds-link); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.ds-icon-btn:hover { background: var(--ds-tint); }
.ds-btn--sm { min-height: 38px; padding: 0 14px; }

.ds-registration { padding: 16px 18px; border-radius: 18px; background: rgba(255, 255, 255, 0.75); display: flex; flex-direction: column; gap: 8px; }
.ds-registration__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.ds-code { direction: ltr; font-family: ui-monospace, Consolas, monospace; letter-spacing: 1px; }

.ds-session-editor { display: grid; grid-template-columns: auto 1fr 1fr 1fr auto; gap: 8px; align-items: end; }
@media (max-width: 760px) { .ds-session-editor { grid-template-columns: 1fr 1fr; } }

/* ---------- انتخاب تاریخ شمسی ---------- */
.ds-jdp { position: relative; }
.ds-jdp__field {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
    cursor: pointer; text-align: right;
}
.ds-jdp__field:disabled { cursor: not-allowed; opacity: .6; }
/* پشت پنجره؛ کلیک بیرون از تقویم آن را می‌بندد. چون کارت شیشه‌ای مرجع position: fixed است، اندازه بزرگ گرفته شده. */
.ds-jdp__backdrop { position: fixed; top: -200vh; bottom: -200vh; left: -200vw; right: -200vw; z-index: 40; }
.ds-jdp__popup {
    position: absolute; top: calc(100% + 6px); right: 0; z-index: 41;
    width: 300px; max-width: calc(100vw - 32px); padding: 14px;
    display: flex; flex-direction: column; gap: 10px;
}
.ds-jdp__head { display: flex; align-items: center; gap: 6px; }
.ds-jdp__select { min-height: 38px; padding: 0 8px; flex: 1 1 auto; }
.ds-jdp__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.ds-jdp__weekday { font-size: 12px; color: var(--ds-text-2); padding: 4px 0; }
.ds-jdp__day {
    min-height: 36px; border-radius: 10px; border: 1px solid transparent; background: rgba(255, 255, 255, 0.7);
    font: inherit; font-size: 14px; color: var(--ds-text); cursor: pointer;
}
.ds-jdp__day:hover { background: var(--ds-tint); color: var(--ds-link); }
.ds-jdp__day--today { border-color: var(--ds-primary); }
.ds-jdp__day--selected, .ds-jdp__day--selected:hover { background: var(--ds-primary); color: #fff; font-weight: 700; }
.ds-jdp__foot { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
/* کارتی که تقویم باز دارد روی کارت‌های بعدی قرار می‌گیرد. */
.ds-glass:has(.ds-jdp__popup), .ds-list-editor__item:has(.ds-jdp__popup) { position: relative; z-index: 30; }
