/* Student portal — academic theme matching the site (navy, gold, warm paper), with a night mode.
   Colours live in tokens: <html data-theme="light|dark"> (set before first paint, toggled by js/theme.js). Mobile first. */

:root {
    color-scheme: light;
    --bg: #f4f1ea;
    --surface: #fffdf9;
    --surface-2: #f8f4ec;
    --surface-3: #f0eadd;
    --field: #ffffff;
    --line: #e6dfd1;
    --line-strong: #d4c8b0;
    --ink: #1c2430;
    --heading: #152238;
    --muted: #677082;
    --link: #1e3a66;
    --accent: #a8822f;
    --accent-2: #d4bc7a;
    --accent-soft: rgba(176, 141, 62, 0.12);
    --accent-ring: rgba(176, 141, 62, 0.22);
    --brand: #152238;
    --brand-2: #22406b;
    --brand-ink: #f7f1e4;
    --primary-bg: linear-gradient(135deg, #22406b, #152238);
    --primary-ink: #f7f1e4;
    --primary-ico: #e2c27a;
    --primary-shadow: 0 8px 20px rgba(21, 34, 56, 0.22);
    --ok: #2f8a5b; --ok-bg: #e5f4ec; --ok-line: #b8dcc6; --ok-ink: #1f5c3c;
    --warn: #a5671a; --warn-bg: #fbf0dc; --warn-line: #eed3a5; --warn-ink: #7a4b10;
    --info: #2f6db0; --info-bg: #e8f0fa; --info-line: #c6d9ef; --info-ink: #24507f;
    --danger: #b54a3c; --danger-bg: #fbece9; --danger-line: #e7c0b8; --danger-ink: #8a2e22;
    --hover: rgba(176, 141, 62, 0.06);
    --shadow: 0 1px 2px rgba(21, 34, 56, 0.05), 0 10px 30px rgba(21, 34, 56, 0.07);
    --shadow-lift: 0 2px 4px rgba(21, 34, 56, 0.06), 0 18px 40px rgba(21, 34, 56, 0.13);
    --tabbar: rgba(255, 253, 249, 0.94);
    --mine-bg: linear-gradient(135deg, #22406b, #152238);
    --mine-ink: #f7f1e4;
    --teacher-bg: #f0f4fa;
    --teacher-line: #d8e2f0;
    --chat-bg: radial-gradient(circle at 20% 0%, #fbf8f1, #f5f0e5);
    --tag-bg: linear-gradient(135deg, #f6eed9, #efe3c3);
    --tag-ink: #6b5420;
    --radius: 16px;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0c1322;
    --surface: #131c2e;
    --surface-2: #172238;
    --surface-3: #1e2a42;
    --field: #0f1829;
    --line: #24304a;
    --line-strong: #34425f;
    --ink: #e3e8f2;
    --heading: #f3f5fa;
    --muted: #97a2ba;
    --link: #a9c3f0;
    --accent: #e2c27a;
    --accent-2: #e9d197;
    --accent-soft: rgba(226, 194, 122, 0.12);
    --accent-ring: rgba(226, 194, 122, 0.25);
    --brand: #0a111f;
    --brand-2: #16264a;
    --brand-ink: #f1ead9;
    --primary-bg: linear-gradient(135deg, #f0d48f, #c89b45);
    --primary-ink: #141a28;
    --primary-ico: #4a3609;
    --primary-shadow: 0 8px 22px rgba(226, 194, 122, 0.16);
    --ok: #5fd39c; --ok-bg: rgba(74, 210, 149, 0.12); --ok-line: rgba(74, 210, 149, 0.32); --ok-ink: #9ee8c3;
    --warn: #f1b866; --warn-bg: rgba(243, 180, 90, 0.12); --warn-line: rgba(243, 180, 90, 0.32); --warn-ink: #f7d29b;
    --info: #7fb2f2; --info-bg: rgba(90, 166, 255, 0.12); --info-line: rgba(90, 166, 255, 0.3); --info-ink: #b5d3fb;
    --danger: #ff8a7d; --danger-bg: rgba(255, 107, 107, 0.12); --danger-line: rgba(255, 107, 107, 0.32); --danger-ink: #ffb8b0;
    --hover: rgba(255, 255, 255, 0.04);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 30px rgba(0, 0, 0, 0.22);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.35), 0 20px 44px rgba(0, 0, 0, 0.35);
    --tabbar: rgba(15, 22, 38, 0.94);
    --mine-bg: linear-gradient(135deg, #2b4a7c, #1d3459);
    --mine-ink: #eef3fc;
    --teacher-bg: #18243b;
    --teacher-line: #2a3a5a;
    --chat-bg: radial-gradient(circle at 20% 0%, #131d31, #0e1626);
    --tag-bg: rgba(226, 194, 122, 0.14);
    --tag-ink: #ecd49c;
}

/* Day/night switch: circular reveal from the button (js/theme.js) instead of the default cross-fade. */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

* { box-sizing: border-box; }

body.st {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: "Vazirmatn", Tahoma, sans-serif;
    font-size: 15px;
    line-height: 1.85;
    -webkit-font-smoothing: antialiased;
}

.st a { color: var(--link); text-decoration: none; }
.st a:hover { color: var(--accent); }
.st :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.st ::selection { background: var(--accent-ring); }
.st-wrap { width: min(1120px, calc(100% - 28px)); margin: 0 auto; }

/* ---------- Brand ---------- */
.st-mark {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    border-radius: 11px;
    box-shadow: 0 6px 16px rgba(5, 10, 22, 0.28);
}

.st-brand, .st-auth-brand { display: flex; align-items: center; gap: 10px; }
.st-brand b, .st-auth-brand b { display: block; font-size: 15px; line-height: 1.3; }
.st-brand small, .st-auth-brand small { display: block; font-size: 12px; opacity: 0.75; }

/* ---------- Day/night button ---------- */
.mdy-theme-btn {
    position: relative;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 11px;
    background: transparent;
    color: rgba(247, 241, 228, 0.85);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.mdy-theme-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.mdy-theme-btn svg { grid-area: 1 / 1; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.45s var(--ease), opacity 0.3s ease; }
.mdy-theme-btn .is-sun { opacity: 0; transform: rotate(-90deg) scale(0.6); }
[data-theme="dark"] .mdy-theme-btn .is-moon { opacity: 0; transform: rotate(90deg) scale(0.6); }
[data-theme="dark"] .mdy-theme-btn .is-sun { opacity: 1; transform: none; }

/* ---------- Top bar ---------- */
.st-top {
    position: sticky;
    top: 0;
    z-index: 20;
    background: linear-gradient(120deg, #0f192b, #152238 55%, #1b2c4a);
    color: #f7f1e4;
    box-shadow: 0 4px 18px rgba(10, 17, 31, 0.25);
}
[data-theme="dark"] .st-top { background: linear-gradient(120deg, #080e1a, #0d1627 55%, #111d33); border-bottom: 1px solid var(--line); }

.st-top-in { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.st .st-brand { color: #f7f1e4; }
.st-nav { display: flex; gap: 2px; margin-inline-start: auto; }
.st .st-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border-radius: 10px;
    color: rgba(247, 241, 228, 0.78);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}
.st .st-nav a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.st .st-nav a.is-active { background: rgba(212, 188, 122, 0.16); color: #e2c27a; box-shadow: inset 0 0 0 1px rgba(212, 188, 122, 0.3); }

.st-badge {
    min-width: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e05a47;
    color: #fff;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
    line-height: 19px;
    text-align: center;
}

.st-me { display: flex; align-items: center; gap: 8px; }
.st-avatar, .st-avatar-lg {
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(135deg, #2d4672, #4a6aa0);
    color: #fff;
    font-weight: 800;
}
.st-avatar { width: 38px; height: 38px; box-shadow: 0 0 0 2px #d4bc7a; }
.st-avatar img, .st-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.st-me form { margin: 0; }

.st-icon-btn {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 11px;
    background: transparent;
    color: rgba(247, 241, 228, 0.85);
    cursor: pointer;
}
.st-icon-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.st-main { padding: 26px 0 44px; }
.st-tabbar { display: none; }
.st-badge[hidden] { display: none !important; }
/* "Install the app" card on the dashboard (student.js) */
.st-install { position: relative; display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 14px 16px; padding-left: 46px; border: 1px solid var(--accent-2); border-radius: var(--radius); background: linear-gradient(120deg, var(--accent-soft), transparent 70%), var(--surface); box-shadow: var(--shadow); }
.st-install[hidden] { display: none; }
.st-install-ico img { display: block; width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 6px 14px rgba(21, 34, 56, 0.25); }
.st-install .st-mini-body { flex: 1; min-width: 0; margin: 0; }
.st-install .st-mini-body b { color: var(--heading); }
.st-install p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.9; }
.st-install [hidden] { display: none !important; }
.st-install-alt { display: block; margin-top: 4px; color: var(--muted); font-size: 12.5px; }
@media (max-width: 560px) {
    .st-install { flex-wrap: wrap; position: relative; padding-inline-end: 40px; }
    .st-install .st-mini-body { flex: 1 1 200px; }
    .st-install [data-install-btn] { flex: 1 1 100%; justify-content: center; }
    .st-install .st-x { position: absolute; top: 10px; inset-inline-end: 10px; }
}
.st-install .fa-share-square-o { color: var(--accent); }
.st-install-ico.is-bell { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--primary-bg); color: var(--primary-ico); font-size: 19px; box-shadow: 0 6px 14px rgba(21, 34, 56, 0.25); }
.st-push-panel [hidden] { display: none !important; }
.st-push-panel .st-help { margin: 0 0 12px; font-size: 13px; line-height: 1.9; }
.st-push-panel .st-help.is-ok { color: var(--ok); }
/* installed app on iPhone: the status bar sits over the page, keep the header clear of it */
.st-top { padding-top: env(safe-area-inset-top); }
.st-auth-panel { padding-top: max(22px, env(safe-area-inset-top)); }
/* chat shortcut with its unread count in the header: phones only (the desktop menu shows it) */
.st-me-chat { position: relative; display: none !important; }
.st-me-tickets { position: relative; }
.st-me-chat .st-badge, .st-me-tickets .st-badge { position: absolute; top: -6px; left: -6px; box-shadow: 0 0 0 2px var(--top-bg, #152238); }
@keyframes st-badge-pop { 0% { transform: scale(0.4); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
.st-badge.is-new { animation: st-badge-pop 0.5s var(--ease) both; }

/* ---------- Toast ---------- */
.st-toast {
    position: fixed;
    top: 76px;
    left: 50%;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    background: var(--ok-bg);
    border: 1px solid var(--ok-line);
    color: var(--ok-ink);
    font-weight: 600;
    box-shadow: var(--shadow-lift);
    transform: translateX(-50%);
    animation: st-toast 4.6s ease forwards;
}
[data-theme="dark"] .st-toast { background: #12261f; }
.st-toast.is-warn, .st-toast.is-error { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger-ink); }
[data-theme="dark"] .st-toast.is-warn, [data-theme="dark"] .st-toast.is-error { background: #2a1517; }

@keyframes st-toast {
    0% { opacity: 0; transform: translate(-50%, -10px); }
    6%, 88% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -10px); visibility: hidden; }
}

/* ---------- Page head & cards ---------- */
.st-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.st-head h1 { margin: 0; font-size: 22px; color: var(--heading); }
.st-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

.st-card {
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}
.st-card > h2, .st-card-title, .st-card-head h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 16.5px; color: var(--heading); }
.st-card > h2 .fa, .st-card-title .fa, .st-card-head h2 .fa { color: var(--accent); }
.st-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.st-card-head h2 { margin: 0; }
.st .st-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.st-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.st-grid.is-main { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.st-grid > * { min-width: 0; } /* long one-line texts must not widen the column on phones */

/* ---------- Dashboard ---------- */
.st-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 18px;
    padding: 24px;
    border-radius: 20px;
    background:
        radial-gradient(circle at 12% 0%, rgba(226, 194, 122, 0.22), transparent 45%),
        radial-gradient(circle at 100% 100%, rgba(90, 140, 230, 0.22), transparent 50%),
        linear-gradient(125deg, #12203a, #1d3459 60%, #23406b);
    color: #f7f1e4;
    box-shadow: var(--shadow-lift);
}
[data-theme="dark"] .st-hero { border: 1px solid var(--line); background: radial-gradient(circle at 12% 0%, rgba(226, 194, 122, 0.16), transparent 45%), radial-gradient(circle at 100% 100%, rgba(90, 140, 230, 0.16), transparent 50%), linear-gradient(125deg, #0d182c, #15264a 60%, #1a2f57); }
.st-hero::before {
    /* faint network texture */
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1.2px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%);
    mask-image: linear-gradient(90deg, transparent, #000 70%);
    opacity: 0.5;
    pointer-events: none;
}
.st-hero > * { position: relative; }
.st-hero-top { display: flex; align-items: center; gap: 16px; }
.st-hero-copy { min-width: 0; flex: 1; }
.st-hero h1 { margin: 0; font-size: 22px; line-height: 1.5; }
.st-hero p { margin: 0; color: rgba(247, 241, 228, 0.78); font-size: 14px; }
.st .st-hero p.st-hero-date { color: #e2c27a; font-size: 12.5px; font-weight: 700; }
.st-avatar-lg { width: 64px; height: 64px; flex: 0 0 auto; font-size: 24px; box-shadow: 0 0 0 3px rgba(226, 194, 122, 0.8); }

.st-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.st .st-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    color: #f7f1e4;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: transform 0.25s var(--ease), background 0.2s ease, border-color 0.2s ease;
}
.st .st-action:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.1); border-color: rgba(226, 194, 122, 0.45); color: #fff; }
.st-action-ico { position: relative; width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; font-size: 19px; }
.st-action.is-courses .st-action-ico { background: linear-gradient(135deg, #f0d48f, #b08d3e); color: #152238; }
.st-action.is-send .st-action-ico { background: linear-gradient(135deg, #5fd3c0, #1f9e90); color: #06231f; }
.st-action.is-chat .st-action-ico { background: linear-gradient(135deg, #8fb8ff, #3d74d6); color: #0b1c3d; }
.st-action-ico .st-badge { position: absolute; top: -6px; left: -6px; box-shadow: 0 0 0 2px #1d3459; }
.st-action-main { flex: 1; min-width: 0; }
.st-action-main b { display: block; font-size: 15px; }
.st-action-main small { display: block; overflow: hidden; color: rgba(247, 241, 228, 0.72); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.st-action-go { color: rgba(247, 241, 228, 0.5); font-size: 20px; transition: transform 0.25s var(--ease); }
.st-action:hover .st-action-go { transform: translateX(-4px); color: #e2c27a; }

.st .st-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px 16px;
    border: 1px solid var(--warn-line);
    border-radius: 14px;
    background: var(--warn-bg);
    color: var(--warn-ink);
    font-size: 14px;
}
.st .st-notice:hover { color: var(--warn-ink); border-color: var(--warn); }
.st-notice .fa-bell { color: var(--warn); animation: st-ring 2.4s ease-in-out 1s 2; }
.st-notice-go { margin-inline-start: auto; font-weight: 700; white-space: nowrap; }
@keyframes st-ring { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-14deg); } }

.st-course-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.st .st-course-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-2);
    color: var(--ink);
    transition: border-color 0.2s ease, transform 0.2s var(--ease), box-shadow 0.2s ease;
}
.st .st-course-tile:hover { border-color: var(--accent-2); color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow); }
.st-course-tile-main { flex: 1; min-width: 0; }
.st-course-tile-main b { display: block; overflow: hidden; color: var(--heading); font-size: 14.5px; text-overflow: ellipsis; white-space: nowrap; }
.st-course-tile-main small { display: block; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.st-course-ico {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #1e3354, #152238);
    color: #e2c27a;
    font-size: 18px;
}

[data-theme="dark"] .st-course-ico { background: rgba(226, 194, 122, 0.1); box-shadow: inset 0 0 0 1px rgba(226, 194, 122, 0.22); }

.st-meter { height: 8px; margin: 4px 0 10px; overflow: hidden; border-radius: 99px; background: var(--surface-3); }
.st-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #b08d3e, #e2c27a); }
.st-profile-card .st-help { margin: 0 0 12px; }

/* ---------- Courses ---------- */
.st-search { position: relative; display: block; width: min(320px, 100%); }
.st-search .fa { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); color: var(--muted); }
.st .st-search input { padding-right: 40px; border-radius: 999px; }

.st-ready {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding: 16px 18px;
    border: 1px solid var(--accent-2);
    border-radius: var(--radius);
    background: linear-gradient(120deg, var(--accent-soft), transparent 70%), var(--surface);
    box-shadow: var(--shadow);
    animation: st-rise 0.5s var(--ease) both;
}
.st-ready > div { flex: 1; min-width: 0; }
.st-ready b { display: block; color: var(--heading); }
.st-ready p { margin: 0; color: var(--muted); font-size: 14px; }
.st-ready small { color: var(--muted); font-size: 12px; }
.st-ready-ico { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, #f0d48f, #b08d3e); color: #152238; font-size: 20px; }
@keyframes st-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.st-jump { display: flex; gap: 8px; margin-bottom: 18px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.st .st-jump a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 13.5px; font-weight: 600; }
.st .st-jump a:hover { border-color: var(--accent-2); color: var(--heading); }
.st-jump .fa { color: var(--accent); }

.st-course { padding: 0; overflow: hidden; scroll-margin-top: 80px; }
.st-course > h2, .st-course > .st-help, .st-course > .st-mini-grid { margin-inline: 20px; }
.st-course > h2 { margin-top: 18px; }
.st-course > .st-mini-grid { margin-bottom: 20px; }
.st-course-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.st-course-head .st-course-ico { width: 50px; height: 50px; font-size: 21px; border-radius: 14px; }
.st-course-copy h2 { margin: 0; color: var(--heading); font-size: 18px; line-height: 1.6; }
.st-course-copy p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.st-course-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

/* «استاد آنلاین است» — dashboard card, floating pill, menu dot, chat header */
.st-live { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; padding: 16px 18px; border: 1px solid rgba(47, 191, 113, 0.4); border-radius: var(--radius); background: linear-gradient(120deg, rgba(47, 191, 113, 0.13), rgba(47, 191, 113, 0.03) 60%, var(--surface)); box-shadow: var(--shadow); animation: st-rise 0.5s var(--ease) both; }
.st-live[hidden], .st-live-pill[hidden], .st-live-dot[hidden] { display: none !important; }
.st-live-face { position: relative; flex: none; width: 38px; height: 38px; }
.st-live-face img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #2fbf71; animation: st-live-ring 2.2s ease-out infinite; }
.st-live-face.is-lg { width: 58px; height: 58px; }
.st-live-face i { position: absolute; bottom: 0; inset-inline-end: 0; width: 12px; height: 12px; border: 2px solid var(--surface); border-radius: 50%; background: #2fbf71; }
.st-live-face.is-lg i { width: 15px; height: 15px; }
@keyframes st-live-ring { 0% { box-shadow: 0 0 0 2px #2fbf71, 0 0 0 2px rgba(47, 191, 113, 0.45); } 70% { box-shadow: 0 0 0 2px #2fbf71, 0 0 0 12px rgba(47, 191, 113, 0); } 100% { box-shadow: 0 0 0 2px #2fbf71, 0 0 0 2px rgba(47, 191, 113, 0); } }
.st-live-main { flex: 1 1 260px; min-width: 0; }
.st-live-main b { display: flex; align-items: center; gap: 8px; color: var(--heading); font-size: 15.5px; }
.st-live-main p { margin: 2px 0 8px; color: var(--muted); font-size: 13px; }
.st-live-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.st .st-live-chips a { padding: 4px 12px; border: 1px solid rgba(47, 191, 113, 0.35); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 12.5px; font-weight: 600; transition: background 0.15s ease, border-color 0.15s ease; }
.st .st-live-chips a:hover { border-color: #2fbf71; background: rgba(47, 191, 113, 0.12); color: var(--heading); }
.st-live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #2fbf71; box-shadow: 0 0 0 3px rgba(47, 191, 113, 0.22); }
.st-nav a .st-live-dot { width: 7px; height: 7px; margin-inline-start: 2px; }
.st .st-live-pill { position: fixed; z-index: 30; bottom: 20px; inset-inline-start: 20px; display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border: 1px solid rgba(47, 191, 113, 0.45); border-radius: 999px; background: var(--surface); color: var(--ink); box-shadow: 0 10px 30px rgba(10, 17, 31, 0.22); animation: st-rise 0.5s var(--ease) both; }
.st .st-live-pill:hover { border-color: #2fbf71; color: var(--ink); }
.st-live-pill b { display: block; color: var(--heading); font-size: 13px; }
.st-live-pill small { display: block; color: var(--muted); font-size: 11.5px; }
.st-live-x { width: 22px; height: 22px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--surface-3); color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; }
.st-teacher-state { display: block; color: rgba(247, 241, 228, 0.75); font-size: 12px; }
.st-teacher-state.is-on { color: #6ee7a8; }
.st-teacher-state.is-on::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-inline-end: 6px; border-radius: 50%; background: #2fbf71; vertical-align: middle; }
@media (max-width: 960px) { .st .st-live-pill { bottom: calc(76px + env(safe-area-inset-bottom)); inset-inline-start: 12px; } }
@media (prefers-reduced-motion: reduce) { .st-live-face img { animation: none; } }

/* Birthday greeting on the student's own day */
.st-bday { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding: 14px 18px; border: 1px solid rgba(242, 120, 154, 0.4); border-radius: var(--radius); background: linear-gradient(120deg, rgba(242, 120, 154, 0.16), rgba(226, 194, 122, 0.14) 60%, var(--surface)); box-shadow: var(--shadow); animation: st-rise 0.6s var(--ease) both; }
.st-bday-cake { font-size: 34px; animation: st-bday-bounce 1.6s ease-in-out 3; }
.st-bday b { display: block; color: var(--heading); font-size: 16px; }
.st-bday p { margin: 2px 0 0; color: var(--ink); font-size: 13.5px; line-height: 1.9; }
.st-bday-confetti { margin-inline-start: auto; font-size: 26px; }
@keyframes st-bday-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px) rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .st-bday-cake { animation: none; } }

/* Profile checklist on the dashboard: progress ring, photo call-to-action, what is still missing */
.st-pro { padding: 18px; }
.st-pro-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.st-pro-ring { flex: none; width: 72px; height: 72px; transform: rotate(-90deg); }
.st-pro-track { fill: none; stroke: var(--surface-3); stroke-width: 7; }
.st-pro-fill { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; transition: stroke-dasharray 0.8s var(--ease); }
.st-pro-ring text { transform: rotate(90deg); transform-origin: 36px 36px; fill: var(--heading); font-family: inherit; font-size: 15px; font-weight: 800; }
.st-pro-head h2 { margin: 0 0 2px; color: var(--heading); font-size: 15.5px; }
.st-pro-head p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.9; }
.st .st-pro-photo { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 12px; border: 1px dashed var(--accent-2); border-radius: 14px; background: linear-gradient(120deg, var(--accent-soft), transparent 80%); color: var(--ink); transition: border-color 0.2s ease, transform 0.2s var(--ease); }
.st .st-pro-photo:hover { border-style: solid; transform: translateY(-1px); color: var(--ink); }
.st-pro-photo-ico { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--primary-bg); color: var(--primary-ico); font-size: 18px; box-shadow: 0 0 0 4px var(--accent-ring); }
.st-pro-photo b { display: block; color: var(--heading); font-size: 14px; }
.st-pro-photo small { display: block; color: var(--muted); font-size: 12px; line-height: 1.8; }
.st-pro-photo > .fa-angle-left { margin-inline-start: auto; color: var(--accent); font-size: 20px; }
.st-pro-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.st-pro-steps li > * { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; }
.st .st-pro-steps li a { border: 1px solid var(--line-strong); color: var(--ink); font-weight: 600; }
.st .st-pro-steps li a:hover { border-color: var(--accent); color: var(--heading); }
.st-pro-steps li a .fa { color: var(--accent); }
.st-pro-steps li a em { color: var(--accent); font-size: 11px; font-style: normal; }
.st-pro-steps li.is-done > span { background: var(--ok-bg); color: var(--ok); }

/* Notice board on the dashboard (Pages/Student/Index.cshtml) */
.st-board { margin-bottom: 18px; padding: 16px 18px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.st-board-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.st-board-head h2 { margin: 0; color: var(--heading); font-size: 17px; }
.st-board-head h2 .fa { margin-inline-end: 4px; color: var(--accent); }
.st-anns { margin: 0; padding: 0; list-style: none; }
.st-anns > li + li { border-top: 1px solid var(--line); }
.st-anns > li { scroll-margin-top: 96px; }
.st-ann > summary { display: flex; align-items: flex-start; gap: 12px; padding: 12px 2px; list-style: none; }
.st-ann > summary { cursor: pointer; border-radius: 12px; transition: background 0.15s ease; }
.st-ann > summary::-webkit-details-marker { display: none; }
.st-ann > summary:hover { background: var(--surface-2); }
.st-ann > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.st-ann-mark { flex: none; width: 4px; align-self: stretch; min-height: 34px; border-radius: 4px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); }
.st-ann-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.st-ann-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.9; white-space: pre-line; }
.st-ann-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--muted); font-size: 12px; }
.st-ann-meta .fa { margin-inline-end: 3px; color: var(--accent); }
.st-ann-new { padding: 0 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-style: normal; font-weight: 800; }
/* the notice's state for this student */
.st-ann-state { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-style: normal; font-weight: 800; transition: background 0.3s ease, color 0.3s ease; }
.st-ann-state.is-new { background: var(--info); color: #fff; }
.st-ann-state.is-new::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.st-ann-state.is-seen { background: var(--surface-3); color: var(--muted); }
.st-ann-state.is-read { background: var(--ok-bg); color: var(--ok); }
.st-ann.is-unseen .st-ann-text { color: var(--heading); font-weight: 800; }
.st-ann-go { flex: none; margin-top: 6px; color: var(--muted); transition: transform 0.2s ease; }
.st-ann[open] .st-ann-go { transform: rotate(180deg); }
.st-ann[open] .st-ann-text { display: block; overflow: visible; font-weight: 500; font-size: 14.5px; line-height: 2.05; }
.st-ann[open] > summary { background: var(--surface-2); }
.st-ann-body { margin: 8px 0 12px; padding: 0 18px 4px; }
.st-ann-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.st-ann-foot .st-btn small { opacity: 0.75; }
.st-ann-exp { color: var(--muted); font-size: 12px; }

/* "My courses": the courses a student takes with the teacher (Pages/Student/Courses.cshtml) */
.st-mine { padding: 18px 20px; }
.st-mine.is-empty { border-color: var(--accent-2); box-shadow: 0 0 0 4px var(--accent-ring), var(--shadow); }
.st-mine .st-card-head { margin-bottom: 6px; }
.st-mine .st-help { margin: 0 0 12px; font-size: 13px; line-height: 1.9; }
.st-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.st-pick-item { position: relative; cursor: pointer; }
.st-pick-item input { position: absolute; opacity: 0; pointer-events: none; }
.st-pick-item span {
    display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px;
    border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface);
    color: var(--ink); font-size: 13.5px; font-weight: 600; transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.st-pick-item span::before { content: "\f096"; font-family: FontAwesome; color: var(--muted); }
.st-pick-item:hover span { border-color: var(--accent-2); }
.st-pick-item input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--heading); }
.st-pick-item input:checked + span::before { content: "\f14a"; color: var(--accent); }
.st-pick-item input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-ring); }
.st-mine-foot { display: flex; justify-content: flex-end; margin-top: 14px; }
.st-pick-note { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 4px 2px; }
.st-pick-note > .fa { font-size: 22px; color: var(--accent); }
.st-pick-note p { flex: 1 1 220px; margin: 0; color: var(--ink); font-size: 14px; line-height: 1.9; }
.st-ready.is-locked { flex-wrap: wrap; }
.st-ready.is-locked > div { flex: 1 1 240px; }
.st-ready.is-locked .st-ready-ico { background: var(--surface-3); color: var(--accent); }
.st-ready form { margin: 0; flex: none; }
.st-mine { scroll-margin-top: 96px; }
@media (max-width: 640px) {
    .st-ready.is-locked form { flex: 1 1 100%; }
    .st-ready.is-locked form .st-btn { width: 100%; justify-content: center; }
}
.st-course-meta form { margin: 0; display: inline; }
.st .st-chip.is-add { border: 1px dashed var(--accent-2); background: var(--accent-soft); color: var(--accent); cursor: pointer; font-family: inherit; }
.st .st-chip.is-add:hover { border-style: solid; }

.st-mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.st-mini { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--ink); font-size: 14px; }
.st-mini .fa { color: var(--accent); }

/* ---------- Lists ---------- */
.st-list { list-style: none; margin: 0; padding: 0; }
.st-list > li { border-bottom: 1px solid var(--line); }
.st-list > li:last-child { border-bottom: 0; }
.st .st-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-radius: 10px; color: var(--ink); }
.st .st-row:hover { color: var(--ink); background: var(--hover); }
.st-row-ico { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.st-row-main { flex: 1; min-width: 0; }
.st-row-main b { display: block; overflow: hidden; color: var(--heading); font-size: 14.5px; text-overflow: ellipsis; white-space: nowrap; }
.st-row-main small { display: block; color: var(--muted); font-size: 12.5px; }
.st-row.is-unread .st-row-main b::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-inline-start: 8px; border-radius: 50%; background: #e05a47; vertical-align: middle; }
.st-empty { padding: 26px 10px; color: var(--muted); text-align: center; }
.st-empty .fa { display: block; margin-bottom: 6px; font-size: 30px; color: var(--accent-2); }

.st-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 1px 10px;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.st-chip.is-ok { background: var(--ok-bg); color: var(--ok); }
.st-chip.is-warn { background: var(--warn-bg); color: var(--warn); }
.st-chip.is-info { background: var(--info-bg); color: var(--info); }
.st-chip.is-danger { background: var(--danger-bg); color: var(--danger); }
.st a.st-chip:hover { filter: brightness(1.05); }

/* ---------- Buttons & forms ---------- */
.st .st-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--heading);
    font: inherit;
    font-weight: 700;
    font-size: 14.5px;
    line-height: 1.5;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.2s ease, border-color 0.15s ease, filter 0.15s ease;
}
.st .st-btn:hover { background: var(--surface-2); border-color: var(--line-strong); color: var(--heading); }
.st .st-btn:active { transform: translateY(1px); }
.st .st-btn.is-primary { border-color: transparent; background: var(--primary-bg); color: var(--primary-ink); box-shadow: var(--primary-shadow); }
.st .st-btn.is-primary .fa { color: var(--primary-ico); }
.st .st-btn.is-primary:hover { color: var(--primary-ink); filter: brightness(1.08); }
.st .st-btn.is-gold { border-color: transparent; background: linear-gradient(135deg, #f0d48f, #b08d3e); color: #152238; }
.st .st-btn.is-gold:hover { color: #152238; filter: brightness(1.05); }
.st .st-btn.is-outline { background: transparent; border-color: var(--line-strong); }
.st .st-btn.is-outline:hover { border-color: var(--accent); background: var(--accent-soft); }
.st .st-btn.is-ghost { background: transparent; border-color: transparent; color: var(--link); }
.st .st-btn.is-ghost:hover { background: var(--hover); }
.st .st-btn.is-danger { color: var(--danger); border-color: var(--danger-line); }
.st .st-btn.is-block { width: 100%; }
.st .st-btn.is-sm { padding: 6px 14px; font-size: 13px; border-radius: 10px; }
.st .st-btn.is-lg { padding: 12px 22px; font-size: 15.5px; border-radius: 14px; }
.st .st-btn[disabled] { opacity: 0.6; cursor: default; }

.st-form { display: grid; gap: 14px; }
.st-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.st-form-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.st-field { display: grid; gap: 6px; }
.st-field label, .st-label { font-weight: 700; font-size: 13.5px; color: var(--heading); }
.st-field label small, .st-label small { color: var(--muted); font-weight: 400; }
.st-req { color: var(--danger); }

.st input[type="text"], .st input[type="tel"], .st input[type="email"], .st input[type="password"], .st input[type="search"],
.st input:not([type]), .st textarea, .st select {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--field);
    color: var(--ink);
    font: inherit;
    font-size: 16px; /* no zoom on iOS */
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.st input::placeholder, .st textarea::placeholder { color: var(--muted); opacity: 0.7; }
.st textarea { resize: vertical; min-height: 110px; }
.st input:focus, .st textarea:focus, .st select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.st input[dir="ltr"] { text-align: left; }
.st input::-ms-reveal, .st input::-ms-clear { display: none; } /* the page has its own eye button */

/* Inputs with a leading icon (the page is right-to-left, so the icon sits on the right) */
.st-input { position: relative; }
.st-other-box { margin-top: 8px; }
.st-fa-hint { color: var(--danger); font-size: 12.5px; font-weight: 600; }
.st .st-auth-card .st-fa-hint, .st .st-fa-hint { display: block; }
.st-fa-hint[hidden] { display: none !important; }
.st input.is-invalid, .st input.is-invalid:focus { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(208, 60, 60, 0.15); }
.st-other-box[hidden] { display: none; }
.st-other-box input::-webkit-calendar-picker-indicator { display: none !important; }
.st .st-input select { padding-right: 42px; }
.st-input > .fa { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); color: var(--muted); font-size: 16px; pointer-events: none; transition: color 0.15s ease; }
.st-input > .fa-mobile { font-size: 21px; }
.st .st-input input { padding-right: 42px; }
.st-input:focus-within > .fa { color: var(--accent); }

.st-alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font-size: 14px; }
.st-alert.is-error { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger-ink); }
.st-alert.is-ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-ink); }
.st-alert.is-info { background: var(--info-bg); border-color: var(--info-line); color: var(--info-ink); }
.st-alert.is-warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }
.st-alert .fa { margin-top: 5px; }
.st-alert a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.st-alert.is-action b { display: block; margin-bottom: 2px; }
.st-alert-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.st .st-alert-actions a { text-decoration: none; }
.st-alert-actions .fa { margin-top: 0; }
.st-help { color: var(--muted); font-size: 12.5px; }
.st-fine { margin: 0; color: var(--muted); font-size: 12px; text-align: center; }
.st-fine .fa { color: var(--ok); }

.st-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.st-check input { width: 18px; height: 18px; accent-color: var(--brand-2); }

/* Password reveal */
.st-pass { position: relative; }
.st .st-pass input { padding-left: 46px; }
.st-pass button { position: absolute; top: 50%; left: 6px; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 9px; background: none; color: var(--muted); cursor: pointer; }
.st-pass button:hover { background: var(--hover); color: var(--heading); }

/* Live password rules */
.st-rules { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 12.5px; }
.st-rules li { display: inline-flex; align-items: center; gap: 6px; transition: color 0.2s ease; }
.st-rules li::before { content: ""; width: 14px; height: 14px; border: 1.5px solid var(--line-strong); border-radius: 50%; transition: background 0.2s ease, border-color 0.2s ease; }
.st-rules li.is-ok { color: var(--ok); }
.st-rules li.is-ok::before { border-color: var(--ok); background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 7.2l2.3 2.3 4.7-5' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }

/* Password strength (soft colours, filled step by step) */
.st-strength { display: flex; align-items: center; gap: 10px; min-height: 18px; }
.st-strength-bar { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; max-width: 220px; }
.st-strength-bar i { height: 5px; border-radius: 99px; background: var(--surface-3); transition: background 0.35s ease; }
.st-strength small { color: var(--muted); font-size: 12px; white-space: nowrap; transition: color 0.3s ease; }
.st-strength[data-level="1"] .st-strength-bar i:nth-child(-n+1) { background: #e39a8c; }
.st-strength[data-level="2"] .st-strength-bar i:nth-child(-n+2) { background: #e6c07a; }
.st-strength[data-level="3"] .st-strength-bar i:nth-child(-n+3) { background: #8fcfa9; }
.st-strength[data-level="4"] .st-strength-bar i:nth-child(-n+4) { background: #4fb582; }
.st-strength[data-level="1"] small { color: #c0695a; }
.st-strength[data-level="2"] small { color: #b48a3a; }
.st-strength[data-level="3"] small, .st-strength[data-level="4"] small { color: var(--ok); }
.st-strength[data-level="0"] .st-strength-bar { opacity: 0.6; }

/* File drop */
.st-drop {
    position: relative;
    display: grid;
    place-items: center;
    gap: 2px;
    padding: 18px;
    border: 1.5px dashed var(--line-strong);
    border-radius: 14px;
    background: var(--surface-2);
    color: var(--muted);
    text-align: center;
    cursor: pointer;
    font-size: 14px;
}
.st-drop:hover, .st-drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.st-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.st-drop .fa { font-size: 24px; color: var(--accent); }
.st-drop small { font-size: 12px; }
.st-files-picked { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.st-files-picked span { padding: 2px 10px; border-radius: 999px; background: var(--surface-3); font-size: 12.5px; direction: ltr; }

/* Tags (interests / skills) */
.st-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--field); cursor: text; }
.st-tags:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.st-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px 3px 12px; border-radius: 999px; background: var(--tag-bg); color: var(--tag-ink); font-size: 13.5px; font-weight: 600; }
.st-tag button { width: 20px; height: 20px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(107, 84, 32, 0.14); color: var(--tag-ink); cursor: pointer; font-size: 11px; }
.st .st-tags input { flex: 1; min-width: 140px; border: 0; padding: 4px 6px; background: transparent; box-shadow: none; }
.st-tag-list { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Thread (submission conversation) ---------- */
.st-thread { display: grid; gap: 14px; }
.st-msg { display: flex; gap: 10px; align-items: flex-start; }
.st-msg-bubble { flex: 1; min-width: 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 4px 16px 16px 16px; background: var(--surface); }
.st-msg.is-teacher { flex-direction: row-reverse; }
.st-msg.is-teacher .st-msg-bubble { border-radius: 16px 4px 16px 16px; background: var(--teacher-bg); border-color: var(--teacher-line); }
.st-msg-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 4px; color: var(--muted); font-size: 12.5px; }
.st-msg-meta b { color: var(--heading); }
.st-msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.st-msg-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.st .st-file, .st .chat-file { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--heading); font-size: 13px; }
.st .st-file:hover, .st .chat-file:hover { border-color: var(--accent); }
.st-file .fa, .chat-file .fa { color: var(--accent); }
.st-file span, .chat-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; }
.st-file small, .chat-file small { color: var(--muted); }
.chat-more { align-self: center; margin-bottom: 6px; }

/* ---------- Chat ---------- */
.st-chat { display: flex; flex-direction: column; height: calc(100vh - 170px); min-height: 460px; padding: 0; overflow: hidden; }
.st-chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.st .st-chat-back { display: none; align-items: center; justify-content: center; gap: 6px; flex: 0 0 auto; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; }
.st .st-chat-back:hover, .st .st-chat-back:focus-visible { background: rgba(255, 255, 255, 0.28); color: #fff; }
@media (max-width: 960px) { .st .st-chat-back { display: inline-flex; } }
@media (max-width: 560px) { .st .st-chat-back { width: 40px; padding: 0; } .st .st-chat-back span { display: none; } }
.st-chat-head img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #d4bc7a; }
.st-chat-head b { display: block; color: var(--heading); }
.st-chat-head small { color: var(--muted); font-size: 12.5px; }
.st-chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; background: var(--chat-bg); }
.chat-bubble { max-width: min(78%, 560px); padding: 8px 14px 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); align-self: flex-start; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03); }
.chat-bubble.is-mine { align-self: flex-end; background: var(--mine-bg); color: var(--mine-ink); border-color: transparent; border-bottom-left-radius: 4px; }
.chat-bubble:not(.is-mine) { border-bottom-right-radius: 4px; }
.chat-bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-bubble time { display: block; margin-top: 2px; font-size: 11px; opacity: 0.65; text-align: left; direction: ltr; }
.chat-bubble.is-mine .fa-check, .chat-bubble.is-mine .fa-check-circle { margin-inline-start: 4px; }
.chat-bubble .chat-file { margin-top: 4px; }
.st .chat-bubble.is-mine .chat-file { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); color: var(--mine-ink); }
.chat-bubble img.chat-img { display: block; max-width: 100%; max-height: 260px; margin-top: 4px; border-radius: 10px; }
.chat-day { align-self: center; margin: 8px 0; padding: 2px 12px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: 12px; }
.chat-typing { min-height: 22px; padding: 0 18px; color: var(--muted); font-size: 12.5px; }
.st-chat-form { display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--surface); }
.st .st-chat-form textarea { min-height: 46px; max-height: 140px; resize: none; border-radius: 14px; }
.st-attach { position: relative; flex: 0 0 auto; width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 14px; color: var(--accent); cursor: pointer; }
.st-attach input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.st .st-send { flex: 0 0 auto; width: 46px; height: 46px; padding: 0; border-radius: 14px; }
.chat-state { font-size: 12px; color: var(--muted); }
.chat-state.is-on::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-inline-end: 6px; border-radius: 50%; background: #2fbf71; }

/* ---------- Sign-in / sign-up: form panel + neural-network scene ---------- */
.st-bare { background: var(--bg); }
/* --auth-w: one column for the brand bar, the form and the footer, so their edges line up */
.st-auth-shell { --auth-w: 480px; display: grid; grid-template-columns: clamp(500px, 42vw, 640px) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }

.st-auth-panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    padding: 22px clamp(24px, 3vw, 56px);
    background: var(--surface);
    box-shadow: 0 0 40px rgba(10, 17, 31, 0.12);
}
.st-auth-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(var(--auth-w), 100%); margin-inline: auto; }
.st .st-auth-brand { color: var(--heading); }
.st-auth-bar .mdy-theme-btn { border-color: var(--line); color: var(--muted); }
.st-auth-bar .mdy-theme-btn:hover { background: var(--surface-2); color: var(--heading); }
.st-auth-body { flex: 1; display: grid; align-content: center; width: min(var(--auth-w), 100%); margin: 0 auto; padding: 28px 0; }
.st-madeby { margin: 6px 0 0; color: var(--muted); font-size: 12px; text-align: center; opacity: 0.85; }
.st-madeby .fa { margin-inline-end: 4px; color: var(--accent); }
.st-madeby.is-page { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); }
.st-auth-card { animation: st-rise 0.6s var(--ease) both; }
.st-auth-card h1 { margin: 0 0 4px; color: var(--heading); font-size: 25px; line-height: 1.5; }
.st-auth-card > p.st-sub { margin: 0 0 22px; color: var(--muted); font-size: 14px; text-align: start; }
.st-auth-card .st-form { gap: 16px; }
.st-auth-card .st-form-row { column-gap: 16px; }
.st-auth-card .st-btn.is-lg { margin-top: 4px; }
/* the password meter spans its field, the rules sit on one line */
.st-auth-card .st-strength-bar { max-width: none; }
.st-auth-card > .st-alert { margin-bottom: 14px; }
.st-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 6px; color: var(--accent); font-size: 13px; font-weight: 800; }
.st-eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
.st-auth-ico { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); font-size: 23px; }
.st-auth-links { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; font-size: 14px; }
.st-auth-links form { margin: 0; }
.st-auth-foot { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 0; color: var(--muted); font-size: 13px; }
.st .st-auth-foot a { color: var(--muted); }
.st .st-auth-foot a:hover { color: var(--accent); }

.st-wait-note { margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-ink); font-size: 13px; line-height: 1.9; text-align: center; }
.st-switch { margin: 16px 0 0; color: var(--muted); font-size: 14px; text-align: center; }
.st .st-switch a { font-weight: 700; }
.st-pair { align-items: start; }
.st-or { display: flex; align-items: center; gap: 12px; margin: 20px 0 12px; color: var(--muted); font-size: 13px; }
.st-or::before, .st-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.st-steps { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.st-steps li { display: inline-flex; align-items: center; gap: 7px; }
.st-steps li + li::before { content: ""; width: 26px; height: 2px; margin-inline-end: 3px; border-radius: 2px; background: var(--line-strong); }
.st-steps span { width: 24px; height: 24px; display: inline-grid; place-items: center; border: 1.5px solid var(--line-strong); border-radius: 50%; font-size: 12px; }
.st-steps .is-on { color: var(--heading); }
.st-steps .is-on span { border-color: transparent; background: var(--primary-bg); color: var(--primary-ink); box-shadow: 0 0 0 4px var(--accent-ring); }
.st-steps .is-done { color: var(--ok); }
.st-steps .is-done span { border-color: var(--ok); background: var(--ok-bg); }
.st-steps .is-done + li::before, .st-steps .is-on + li::before { background: linear-gradient(90deg, var(--line-strong), var(--accent)); }

.st .st-code { direction: ltr; padding: 12px; text-align: center; font-size: 30px; font-weight: 800; letter-spacing: 0.45em; font-variant-numeric: tabular-nums; }
.st .st-code::placeholder { letter-spacing: 0.45em; opacity: 0.35; }

/* The scene (always dark navy, whatever the theme) */
.st-scene {
    position: relative;
    overflow: hidden;
    container-type: inline-size;
    background: linear-gradient(160deg, #0b1324 0%, #101c35 55%, #0c1427 100%);
    color: #f1ead9;
    isolation: isolate;
}
.st-scene-net { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
/* slow colour glows behind everything */
.st-scene-glow { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.st-scene-glow i { position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%; filter: blur(90px); opacity: 0.28; animation: st-glow 34s ease-in-out infinite alternate; }
.st-scene-glow i:nth-child(1) { top: -25vmax; right: -15vmax; background: #3a5fb8; }
.st-scene-glow i:nth-child(2) { bottom: -30vmax; left: -20vmax; background: #a8823a; opacity: 0.22; animation-delay: -12s; }
.st-scene-glow i:nth-child(3) { top: 35%; left: 30%; width: 32vmax; height: 32vmax; background: #1f8f84; opacity: 0.14; animation-delay: -22s; }
@keyframes st-glow { to { transform: translate3d(-5vmax, 4vmax, 0) scale(1.12); } }
.st-scene-in { position: relative; display: flex; flex-direction: column; justify-content: center; height: 100%; min-height: 100vh; min-height: 100dvh; padding: 56px clamp(32px, 5vw, 80px); pointer-events: none; }
.st-scene-copy { max-width: 470px; pointer-events: auto; }
.st-scene-kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 4px 14px 4px 12px; border: 1px solid rgba(226, 194, 122, 0.3); border-radius: 999px; background: rgba(226, 194, 122, 0.08); color: #e2c27a; font-size: 13px; font-weight: 700; }
.st-scene-kicker span { width: 7px; height: 7px; border-radius: 50%; background: #e2c27a; box-shadow: 0 0 0 0 rgba(226, 194, 122, 0.6); animation: st-beat 2.4s ease-out infinite; }
@keyframes st-beat { 0% { box-shadow: 0 0 0 0 rgba(226, 194, 122, 0.55); } 70%, 100% { box-shadow: 0 0 0 10px rgba(226, 194, 122, 0); } }
.st-scene h2 { margin: 0 0 12px; color: #fff; font-size: clamp(28px, 3vw, 38px); font-weight: 800; line-height: 1.45; }
.st-scene h2 em { font-style: normal; background: linear-gradient(90deg, #f3dc9a, #d4a94f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.st-scene-lead { margin: 0 0 26px; color: rgba(241, 234, 217, 0.75); font-size: 16px; }
.st-scene-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.st-scene-list li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 16px; background: rgba(255, 255, 255, 0.04); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: st-rise 0.7s var(--ease) both; }
.st-scene-list li:nth-child(2) { animation-delay: 0.1s; }
.st-scene-list li:nth-child(3) { animation-delay: 0.2s; }
.st-scene-list .fa { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(135deg, rgba(226, 194, 122, 0.25), rgba(226, 194, 122, 0.08)); color: #f0d48f; font-size: 17px; }
.st-scene-list b { display: block; color: #fff; font-size: 15px; }
.st-scene-list small { display: block; color: rgba(241, 234, 217, 0.65); font-size: 13px; }

.st-scene-floats { position: absolute; inset: 0; }
/* the floating cards and the code editor only where they cannot cover the text */
@container (max-width: 1000px) {
    .st-scene-floats, .st-editor { display: none; }
}
.st-float { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 14px; background: rgba(16, 27, 50, 0.7); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); color: #e6ebf6; font-size: 13px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: st-bob 7s ease-in-out infinite alternate; }
.st-float.is-a { top: 12%; left: 7%; }
.st-float.is-a .fa { color: #5fd39c; }
.st-float.is-b { top: 27%; left: 13%; animation-delay: -2.5s; }
.st-float.is-b .fa { color: #e2c27a; }
.st-float.is-c { top: 42%; left: 6%; animation-delay: -4.5s; }
.st-float.is-c .fa { color: #ff8a7d; }
@keyframes st-bob { from { transform: translateY(0); } to { transform: translateY(-12px); } }

/* a small editor that types code (auth-scene.js) */
.st-editor {
    position: absolute;
    bottom: 9%;
    left: 6%;
    width: min(380px, 34%);
    min-width: 300px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(9, 15, 30, 0.72);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    text-align: left;
    animation: st-bob 9s ease-in-out -3s infinite alternate;
}
.st-editor-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.st-editor-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff6b6b; opacity: 0.75; }
.st-editor-bar i:nth-child(2) { background: #f3b45a; }
.st-editor-bar i:nth-child(3) { background: #4ad295; }
.st-editor-bar span { margin-left: 8px; color: rgba(230, 235, 246, 0.55); font: 12px/1 Consolas, "Courier New", monospace; }
.st-editor pre { min-height: 108px; margin: 0; padding: 12px 16px 14px; color: #dfe6f3; font: 13px/1.7 Consolas, "Courier New", monospace; white-space: pre; transition: opacity 0.6s ease; }
.st-editor pre.is-fading { opacity: 0; }
.st-editor code { font: inherit; }
.st-editor .t-k { color: #9db8ff; }
.st-editor .t-f { color: #f0d48f; }
.st-editor .t-s { color: #7fe0b0; }
.st-editor .t-n { color: #ff9d7a; }
.st-editor .t-c { color: rgba(223, 230, 243, 0.45); font-style: italic; }
.st-caret { display: inline-block; width: 7px; height: 15px; margin-left: 1px; background: #e2c27a; vertical-align: -2px; animation: st-blink 1.1s steps(1) infinite; }
@keyframes st-blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    .st-float, .st-scene-kicker span, .st-notice .fa-bell { animation: none; }
    .st-scene-glow i, .st-editor, .st-caret { animation: none; }
    .st-auth-card, .st-scene-list li, .st-ready { animation: none; }
}

/* ---------- Responsive ---------- */
/* Sign-in / sign-up on desktop screens of ordinary height (1366×768, 1280×720…): the whole form fits without scrolling. */
@media (min-width: 961px) and (max-height: 940px) {
    .st-auth-panel { padding-top: 12px; padding-bottom: 10px; }
    .st-auth-body { padding: 6px 0; }
    .st-switch { margin-top: 10px; }
    .st-madeby { margin-top: 2px; }
    .st-steps { margin-bottom: 10px; }
    .st-eyebrow { margin-bottom: 2px; }
    .st-auth-card h1 { font-size: 22px; }
    .st-auth-card > p.st-sub { margin-bottom: 12px; font-size: 13.5px; }
    .st-auth-card > .st-alert { margin-bottom: 10px; padding-block: 6px; font-size: 12.5px; line-height: 1.75; }
    .st-auth-card:has(> .st-alert) > .st-steps { margin-bottom: 6px; }
    .st-auth-card .st-form { gap: 10px; }
    .st-auth-card .st-form-row { gap: 10px 16px; }
    .st-auth-card .st-btn.is-lg { margin-top: 2px; }
    .st-auth-card .st-field { gap: 4px; }
    .st-auth-card .st-field > .st-help { display: none; }
    .st-auth-card input[type="text"], .st-auth-card input[type="tel"], .st-auth-card input[type="password"],
    .st-auth-card input:not([type]), .st-auth-card select { padding-top: 8px; padding-bottom: 8px; }
    .st-auth-card .st-btn.is-lg { padding-top: 10px; padding-bottom: 10px; }
    .st-auth-card .st-or { margin: 12px 0 8px; }
    .st-auth-foot { font-size: 12.5px; }
    /* with a message box on top, the line under the title gives way */
    .st-auth-card:has(> .st-alert) > p.st-sub { display: none; }
    /* «سایر»: the university name goes next to the list instead of under it */
    .st-uni:has(.st-other-box:not([hidden])) { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; }
    .st-uni > label { grid-column: 1 / -1; }
    .st-uni .st-other-box { margin-top: 0; }
}

@media (max-width: 1240px) {
    .st-scene-floats { display: none; }
}

@media (max-width: 1080px) {
    .st .st-nav a { padding: 8px 10px; }
    .st .st-nav a .st-badge { margin-inline-start: -2px; }
}

@media (max-width: 960px) {
    .st-nav { display: none; }
    .st-me { margin-inline-start: auto; }
    .st-me-chat { display: inline-grid !important; }
    .st-tabbar {
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        z-index: 30;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
        background: var(--tabbar);
        border-top: 1px solid var(--line);
        box-shadow: 0 -6px 20px rgba(21, 34, 56, 0.08);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
    .st .st-tabbar a { position: relative; display: grid; justify-items: center; gap: 0; padding: 4px; border-radius: 10px; color: var(--muted); font-size: 11.5px; font-weight: 600; }
    .st-tabbar .fa { font-size: 19px; }
    .st .st-tabbar a.is-active { color: var(--heading); background: var(--accent-soft); }
    .st-tabbar .st-badge { position: absolute; top: 0; left: calc(50% - 22px); }
    .st-main { padding: 18px 0 92px; }
    .st-grid.is-main { grid-template-columns: 1fr; }
    .st-chat { height: calc(100vh - 160px); }

    /* Sign-in pages: the scene becomes the page background, the form floats on it as a card */
    .st-auth-shell { display: block; }
    .st-scene { position: fixed; inset: 0; z-index: 0; }
    .st-scene-in { min-height: 0; padding: 0; }
    .st-scene-copy { display: none; }
    .st-auth-panel { min-height: 100vh; min-height: 100dvh; padding: 16px 14px 20px; background: none; box-shadow: none; }
    .st .st-auth-brand { color: #f7f1e4; }
    .st-auth-bar .mdy-theme-btn { border-color: rgba(255, 255, 255, 0.18); color: rgba(247, 241, 228, 0.85); }
    .st-auth-bar .mdy-theme-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
    .st-auth-body { width: min(var(--auth-w), 100%); padding: 18px 0; }
    .st-auth-card { padding: 26px 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4); }
    .st .st-auth-foot a, .st-auth-foot { color: rgba(241, 234, 217, 0.7); }
    .st-auth-panel .st-madeby { color: rgba(241, 234, 217, 0.62); opacity: 1; }
}

@media (max-width: 760px) {
    .st-actions { grid-template-columns: 1fr; gap: 8px; }
    .st .st-action { padding: 12px; }
    .st-course-tiles { grid-template-columns: minmax(0, 1fr); }
    .st-course-head { grid-template-columns: auto minmax(0, 1fr); }
    .st-course-meta { grid-column: 1 / -1; justify-content: flex-start; }
    .st-ready { flex-wrap: wrap; }
    .st-ready .st-btn { width: 100%; }
}

@media (max-width: 560px) {
    .st-brand small { display: none; }
    .st-form-row { grid-template-columns: 1fr; }
    .st-card { padding: 16px 14px; }
    .st-hero { padding: 18px 16px; border-radius: 18px; }
    .st-hero h1 { font-size: 19px; }
    .st-avatar-lg { width: 54px; height: 54px; font-size: 20px; }
    .st-course > h2, .st-course > .st-help, .st-course > .st-mini-grid { margin-inline: 14px; }
    .st-course-head { padding: 14px; }
    .st-search { width: 100%; }
    .st-auth-card { padding: 22px 16px; }
    .st-auth-card h1 { font-size: 21px; }
    .chat-bubble { max-width: 88%; }
}

/* Blue tick (Pages/Shared/_VerifiedBadge) */
.mdy-verified { display: inline-block; flex: 0 0 auto; width: 1.05em; height: 1.05em; margin-inline-start: 5px; vertical-align: -0.16em; }

/* Identity check: friendly reminder (blue, calm) or confirmation */
.st-identity { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; padding: 14px 18px; border: 1px solid rgba(29, 155, 240, 0.3); border-radius: 16px; background: linear-gradient(120deg, rgba(29, 155, 240, 0.09), rgba(29, 155, 240, 0.02)); color: var(--ink); }
.st-identity b { display: block; color: var(--heading); font-size: 15px; }
.st-identity p { margin: 2px 0 0; color: var(--muted); font-size: 14px; line-height: 1.9; }
.st-identity-due { color: var(--warn); font-weight: 700; }
.st-identity-ico { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: rgba(29, 155, 240, 0.14); color: #1d9bf0; font-size: 19px; }
.st-identity.is-ok { align-items: center; gap: 8px; padding: 10px 16px; font-size: 14px; font-weight: 600; }
.st-identity.is-ok .mdy-verified { width: 20px; height: 20px; margin: 0; }
.st-hero h1 .mdy-verified { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3)); }

/* bot trap on the sign-up form */
.st-hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Running text is justified (Persian) */
.st-head p, .st-sub, .st-help, .st-identity p, .st-scene-lead, .st-ready p, .st-alert > div, .st-course-copy p { text-align: justify; text-justify: inter-word; }

/* ---------- Chat: navy-blue (not gold) with a faint Telegram-style study/AI/programming pattern ---------- */
.st-chat {
    --chat-blue: #24508f;
    --chat-blue-2: #1a3a6b;
    --chat-wall: linear-gradient(160deg, #dde7f3 0%, #e7edf6 55%, #dfe6f1 100%);
    --chat-doodle: url("chat-doodle-light.svg");
    --chat-other: #ffffff;
    --chat-other-ink: #1c2430;
    --chat-other-line: rgba(30, 58, 102, 0.1);
}
[data-theme="dark"] .st-chat {
    --chat-blue: #2f63b0;
    --chat-blue-2: #22488a;
    --chat-wall: linear-gradient(160deg, #0d1729 0%, #111f37 55%, #0e1a2f 100%);
    --chat-doodle: url("chat-doodle-dark.svg");
    --chat-other: #1a2740;
    --chat-other-ink: #e3e8f2;
    --chat-other-line: rgba(255, 255, 255, 0.06);
}

.st-chat-head { background: linear-gradient(120deg, #1f3f73, #152238); border-bottom: 0; color: #f2f5fb; }
.st-chat-head b { color: #fff; }
.st .st-chat-head small, .st-chat-head .chat-state { color: rgba(226, 234, 248, 0.75); }
.st-chat-head img { box-shadow: 0 0 0 2px rgba(143, 184, 255, 0.7); }
.chat-state.is-on::before { background: #5fd39c; }

.st-chat-log { background: var(--chat-doodle) 0 0 / 360px 360px repeat, var(--chat-wall); }
.chat-bubble { background: var(--chat-other); color: var(--chat-other-ink); border-color: var(--chat-other-line); box-shadow: 0 1px 1.5px rgba(16, 32, 64, 0.08); }
.chat-bubble.is-mine { background: linear-gradient(135deg, var(--chat-blue), var(--chat-blue-2)); color: #fff; }
.st .chat-bubble.is-mine .chat-file { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.22); color: #fff; }
.st .chat-bubble.is-mine .chat-file .fa, .chat-bubble.is-mine .chat-file small { color: #cfe0ff; }
.chat-day { background: rgba(30, 58, 102, 0.14); color: #2a3f63; backdrop-filter: blur(4px); }
[data-theme="dark"] .chat-day { background: rgba(255, 255, 255, 0.08); color: #c3cee3; }
.chat-typing { background: var(--surface); }

.st-chat-form { background: var(--surface); }
.st .st-chat-form textarea:focus { border-color: var(--chat-blue); box-shadow: 0 0 0 3px rgba(47, 99, 176, 0.18); }
.st-attach { color: var(--chat-blue); }
[data-theme="dark"] .st-attach { color: #8fb8ff; }
.st-attach:hover { background: rgba(47, 99, 176, 0.08); }
.st .st-chat .st-send { background: linear-gradient(135deg, var(--chat-blue), var(--chat-blue-2)); color: #fff; box-shadow: 0 6px 16px rgba(26, 58, 107, 0.3); }
.st .st-chat .st-send .fa { color: #fff; }
.st .st-chat .st-btn.chat-more { background: rgba(255, 255, 255, 0.85); border-color: var(--chat-other-line); color: var(--chat-blue); }
[data-theme="dark"] .st .st-chat .st-btn.chat-more { background: rgba(26, 39, 64, 0.9); color: #8fb8ff; }

/* ---------- Small closable cards under the welcome box: greeting (AI look) and identity reminder ---------- */
.st-mini-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 12px;
    padding: 10px 14px 10px 44px;
    border-radius: 14px;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.st-mini-card.is-closing { opacity: 0; transform: translateY(-4px); }
.st-mini-body { flex: 1; min-width: 0; margin: 0; }
.st-x {
    position: absolute;
    top: 50%;
    left: 10px;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    margin-top: -13px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.st-x:hover { background: var(--hover); color: var(--heading); }
.st-x svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.hide-ai .st-ai, .hide-identity .st-identity:not(.is-ok) { display: none; }

.st-ai {
    background:
        radial-gradient(circle at 100% 0%, rgba(124, 92, 255, 0.08), transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(32, 201, 191, 0.08), transparent 50%),
        var(--surface);
    box-shadow: 0 1px 2px rgba(21, 34, 56, 0.05);
    isolation: isolate;
}
.st-ai::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    padding: 1px;
    border-radius: inherit;
    background: conic-gradient(from var(--ai-angle, 0deg), #7c5cff, #3a8dff, #20c9bf, #f0c36a, #7c5cff);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    animation: st-ai-spin 10s linear infinite;
}
@property --ai-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes st-ai-spin { to { --ai-angle: 360deg; } }
.st-ai-orb {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #9b85ff, #3a6fe0 55%, #17a99f);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.12);
    animation: st-ai-pulse 3.2s ease-in-out infinite;
}
.st-ai-orb svg { width: 16px; height: 16px; fill: #fff; }
@keyframes st-ai-pulse { 50% { box-shadow: 0 0 0 6px rgba(124, 92, 255, 0.05); } }
.st-ai-greet { min-height: 1.7em; margin: 0; color: var(--heading); font-size: 14px; font-weight: 700; line-height: 1.7; }
.st-ai-greet.is-typing::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-inline-start: 2px; background: #6a4dff; vertical-align: -0.12em; animation: st-blink 0.9s steps(1) infinite; }
.st-ai-quote { margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.8; text-align: justify; }
.st-ai-quote cite { font-style: normal; white-space: nowrap; opacity: 0.85; }

.st-identity.st-mini-card { border-color: rgba(29, 155, 240, 0.25); }
.st-identity.st-mini-card .st-identity-ico { width: 30px; height: 30px; border-radius: 9px; font-size: 15px; }
.st-identity.st-mini-card p { color: var(--muted); font-size: 13px; line-height: 1.8; }
.st-identity.st-mini-card p b { display: inline; color: var(--heading); font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
    .st-ai::before, .st-ai-orb { animation: none; }
}

/* Smart captcha: "tap the robot" among six icons (only after unusual activity) */
.st-captcha { margin: 0; padding: 12px 12px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); animation: st-rise 0.4s var(--ease) both; }
.st-captcha legend { float: left; width: 100%; margin: 0 0 10px; padding: 0; color: var(--heading); font-size: 13.5px; font-weight: 600; }
.st-captcha legend .fa { color: var(--accent); }
.st-captcha legend b { color: var(--link); }
.st-captcha-grid { clear: both; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.st-captcha-tile { position: relative; display: grid; place-items: center; aspect-ratio: 1; border: 1.5px solid var(--line); border-radius: 12px; background: var(--field); cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease; }
.st-captcha-tile:hover { border-color: var(--accent-2); transform: translateY(-1px); }
.st-captcha-tile input { position: absolute; opacity: 0; pointer-events: none; }
.st-captcha-tile svg { width: 78%; height: 78%; }
.st-captcha-tile:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); background: var(--accent-soft); }
.st-captcha-tile:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
[data-theme="dark"] .st-captcha-tile svg { filter: invert(1) hue-rotate(180deg) brightness(1.15); }
.st-captcha small { display: block; margin-top: 8px; color: var(--muted); font-size: 11.5px; }
@media (max-width: 420px) { .st-captcha-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* spinner on buttons while the server works (sign-in, sign-up) */
.st-spin { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; vertical-align: -3px; opacity: 0.85; animation: st-spin 0.8s linear infinite; }
@keyframes st-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .st-spin { animation: none; } }

/* Blue tick on the photo of a student whose identity the teacher confirmed */
.has-tick { position: relative; overflow: visible !important; }
.has-tick > img { border-radius: 50%; }
.has-tick::before { content: ""; position: absolute; z-index: 2; bottom: -2px; inset-inline-start: -2px; width: 36%; height: 36%; min-width: 13px; min-height: 13px; max-width: 26px; max-height: 26px; border: 2px solid var(--tick-ring, var(--surface)); border-radius: 50%; background: #1d9bf0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.6 3.6 7.4-8' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 70% no-repeat; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }

/* ---------- Chat: delivery ticks, stickers (wwwroot/js/chat.js) ---------- */
.chat-ticks { display: inline-flex; margin-inline-start: 3px; vertical-align: -2px; }
.chat-ticks svg { width: 17px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.chat-bubble time .chat-ticks { opacity: 0.75; }
.chat-bubble time .chat-ticks.is-read { opacity: 1; color: #8fe0ff; filter: drop-shadow(0 0 2px rgba(143, 224, 255, 0.5)); }
.chat-bubble.is-mine time { opacity: 0.85; }

.st .chat-bubble.is-sticker { display: flex; flex-direction: column; align-items: center; padding: 2px 4px; border: 0; background: transparent; box-shadow: none; }
.chat-sticker { display: inline-grid; justify-items: center; gap: 4px; padding: 10px 14px 8px; border-radius: 20px; background: rgba(255, 255, 255, 0.95); box-shadow: 0 6px 16px rgba(10, 20, 40, 0.16); color: #1a2238; transform: rotate(-2deg); animation: chat-sticker-in 0.4s var(--ease) both; }
.chat-bubble.is-mine .chat-sticker { transform: rotate(2deg); }
.chat-sticker-emoji { font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; font-size: 52px; line-height: 1.1; }
.chat-sticker-cap { padding: 1px 10px; border-radius: 999px; background: #1a2238; color: #fff; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.chat-bubble.is-sticker time { display: inline-flex; align-items: center; margin: 5px 0 0; padding: 0 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.3); color: #fff; opacity: 1; }
@keyframes chat-sticker-in { from { opacity: 0; transform: scale(0.6) rotate(-8deg); } }
@media (prefers-reduced-motion: reduce) { .chat-sticker { animation: none; } }

.st-chat-form { position: relative; }
.chat-sticker-btn { flex: none; width: 46px; height: 46px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: transparent; color: var(--accent); font-size: 21px; cursor: pointer; }
.chat-sticker-btn:hover, .chat-sticker-btn.is-on { border-color: var(--accent); background: var(--accent-soft); }
.chat-sticker-panel { position: absolute; bottom: calc(100% + 8px); inset-inline-start: 12px; z-index: 5; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: min(360px, calc(100% - 24px)); padding: 10px; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--surface); box-shadow: 0 20px 50px rgba(10, 17, 31, 0.25); }
.chat-sticker-panel[hidden] { display: none; }
.chat-sticker-pick { display: grid; justify-items: center; gap: 2px; padding: 8px 4px 6px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--ink); font-family: inherit; cursor: pointer; transition: background 0.15s ease, transform 0.15s ease; }
.chat-sticker-pick:hover, .chat-sticker-pick:focus-visible { border-color: var(--line); background: var(--surface-2); outline: none; transform: translateY(-2px); }
.chat-sticker-pick .chat-sticker-emoji { font-size: 30px; }
.chat-sticker-pick small { overflow: hidden; max-width: 100%; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Submission: statuses and the closed notice ---------- */
.st-chip.is-muted { background: var(--surface-3); color: var(--muted); }
.st-status-legend { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.st-status-legend li { display: grid; gap: 3px; padding: 8px 10px; border-radius: 12px; opacity: 0.75; }
.st-status-legend li.is-on { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); opacity: 1; }
.st-status-legend .st-chip { justify-self: start; }
.st-status-legend small { color: var(--muted); font-size: 12.5px; line-height: 1.8; }
.st-closed { display: flex; align-items: flex-start; gap: 14px; border-style: dashed; }
.st-closed-ico { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-3); color: var(--muted); font-size: 18px; }
.st-closed b { display: block; color: var(--heading); font-size: 15px; }
.st-closed p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.9; }

/* A name written in English letters: a reminder on the dashboard */
.st .st-name-fix { align-items: center; margin-bottom: 16px; color: var(--warn-ink); }
.st .st-name-fix:hover { color: var(--warn-ink); filter: brightness(0.98); }
.st-name-fix > .fa-angle-left { margin-inline-start: auto; font-size: 20px; }

.st .chat-more[hidden] { display: none !important; }

/* full-window pages: no reserved scrollbar strip beside the scene */
html:has(> body.st-bare) { scrollbar-gutter: auto; }

/* ---------- Certificates (Pages/Student/Certificate.cshtml) ---------- */
.st-chip.is-gold { background: var(--tag-bg); color: var(--tag-ink); }
.st-head h1 .fa { color: var(--accent); }
.st-cert-intro { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: center; }
/* a small drawing of the certificate */
.st-cert-mock { position: relative; display: grid; justify-items: center; gap: 6px; aspect-ratio: 1.414; padding: 14px 16px 10px; border: 1px solid #d9be7c; border-radius: 6px; background: repeating-linear-gradient(45deg, rgba(185, 143, 60, 0.07) 0 2px, transparent 2px 5px), #fffdf6; box-shadow: inset 0 0 0 5px #fffdf6, inset 0 0 0 6px #c9a253, 0 10px 24px rgba(21, 34, 56, 0.14); color: #13294b; transform: rotate(-2deg); }
.st-cert-mock-logo img { display: block; border-radius: 6px; }
.st-cert-mock b { font-size: 15px; font-weight: 900; line-height: 1; }
.st-cert-mock-line { display: block; width: 70%; height: 4px; border-radius: 4px; background: #d6dbe6; }
.st-cert-mock-line.is-name { width: 52%; height: 7px; background: #13294b; }
.st-cert-mock-line.is-short { width: 40%; }
.st-cert-mock-foot { display: flex; align-items: flex-end; justify-content: space-between; width: 100%; margin-top: auto; }
.st-cert-mock-foot em { display: block; }
.st-cert-mock-foot .is-qr { width: 22px; height: 22px; background: repeating-linear-gradient(90deg, #13294b 0 2px, transparent 2px 4px), repeating-linear-gradient(0deg, #13294b 0 2px, #fff 2px 4px); background-blend-mode: multiply; }
.st-cert-mock-foot .is-holo { width: 24px; height: 24px; border-radius: 50%; background: conic-gradient(#f6cfff, #bfe3ff, #c9ffe0, #fff1b8, #ffc9d9, #cfc8ff, #f6cfff); box-shadow: 0 0 0 2px #c7cfdc; }
.st-cert-mock-foot .is-sign { width: 46px; height: 14px; border-bottom: 1px solid #c9a253; background: radial-gradient(ellipse at 50% 60%, rgba(43, 76, 150, 0.55) 0 40%, transparent 42%); }
.st-cert-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.st-cert-steps li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.st-cert-steps li > span { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border: 1.5px solid var(--line-strong); border-radius: 50%; color: var(--muted); font-size: 13px; font-weight: 800; }
.st-cert-steps li.is-done > span { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); }
.st-cert-steps b { display: block; color: var(--heading); font-size: 14px; }
.st-cert-steps small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.8; }
.st-cert-missing { margin: 4px 0 0; padding-inline-start: 18px; }
.st-cert-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.st-cert-course { position: relative; display: block; cursor: pointer; }
.st-cert-course input { position: absolute; opacity: 0; }
.st-cert-course > span { display: grid; gap: 1px; padding: 10px 40px 10px 12px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color 0.15s ease, background 0.15s ease; }
.st-cert-course b { color: var(--heading); font-size: 14px; }
.st-cert-course small { color: var(--muted); font-size: 12px; text-align: right; }
.st-cert-course em { color: var(--accent); font-size: 12px; font-style: normal; }
.st-cert-course > .fa { position: absolute; top: 12px; right: 12px; width: 20px; height: 20px; display: grid; place-items: center; border: 1.5px solid var(--line-strong); border-radius: 6px; color: transparent; font-size: 11px; }
.st-cert-course input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.st-cert-course input:checked ~ .fa { border-color: transparent; background: var(--accent); color: #fff; }
.st-cert-course input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-ring); }
.st-certs { display: grid; gap: 10px; }
.st-cert { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.st-cert.is-issued { border-color: var(--accent-2); background: linear-gradient(120deg, var(--accent-soft), transparent 70%), var(--surface); }
.st-cert.is-rejected, .st-cert.is-revoked { opacity: 0.8; }
.st-cert-head { display: flex; align-items: center; gap: 12px; }
.st-cert-ico { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-3); color: var(--muted); font-size: 18px; }
.st-cert.is-issued .st-cert-ico { background: var(--primary-bg); color: var(--primary-ico); }
.st-cert.is-requested .st-cert-ico { background: var(--warn-bg); color: var(--warn); }
.st-cert-head b { display: block; color: var(--heading); font-size: 15px; }
.st-cert-head small { color: var(--muted); font-size: 12.5px; }
.st-cert-courses { display: flex; flex-wrap: wrap; gap: 6px; }
.st-cert-note { margin: 0; color: var(--ink); font-size: 13.5px; }
.st-cert-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 760px) {
    .st-cert-intro { grid-template-columns: 1fr; }
    .st-cert-mock { width: 200px; justify-self: center; }
    .st-cert-steps { grid-template-columns: 1fr; }
    .st-cert-actions .st-btn { flex: 1 1 45%; justify-content: center; }
}

.st-pick-ok { margin-inline-start: 6px; color: var(--ok); font-size: 11.5px; font-style: normal; font-weight: 700; }
.st-mine-foot { gap: 8px; flex-wrap: wrap; }
.st .st-cert-strip { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 11px 14px; border: 1px solid var(--accent-2); border-radius: 14px; background: linear-gradient(110deg, var(--accent-soft), transparent 70%); color: var(--ink); }
.st .st-cert-strip:hover { border-color: var(--accent); color: var(--ink); }
.st-cert-strip > .fa-certificate { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--primary-bg); color: var(--primary-ico); font-size: 17px; }
.st-cert-strip b { display: block; color: var(--heading); font-size: 14.5px; }
.st-cert-strip small { display: block; color: var(--muted); font-size: 12.5px; }
.st-cert-strip > .fa-angle-left { margin-inline-start: auto; color: var(--accent); font-size: 20px; }
.st-cert-all { display: flex; align-items: center; gap: 8px; } .st-cert-all .fa { color: var(--ok); font-size: 16px; }

/* A chosen course whose files wait for the teacher's approval, and the one-click request to the teacher */
.st-await { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 18px 12px; padding: 8px 12px; border-radius: 12px; background: var(--warn-bg); color: var(--warn-ink); font-size: 13px; }
.st-await > .fa { color: var(--warn); }
.st-await > span { flex: 1 1 180px; min-width: 0; }
.st-await form, .st-ready form { margin: 0; }
.st .st-ask { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--link); font-size: 12.5px; font-weight: 700; white-space: nowrap; transition: border-color 0.2s ease, color 0.2s ease; }
.st .st-ask:hover { border-color: var(--accent-2); color: var(--accent); }
.st .st-ask.is-sent { padding-inline: 0; border-color: transparent; background: transparent; color: var(--ok); font-weight: 600; }
.st-ready.is-identity .st-ask { margin-top: 8px; }
@media (max-width: 560px) { .st-await { margin-inline: 14px; } }

/* a notice for another course or university: a quiet note under it */

.st [data-chat] { --q-accent: var(--chat-blue, #2f63b0); --q-tint: 120, 130, 150; --q-line: var(--line); --q-pill: var(--surface); --q-ink: var(--ink); }

/* chat: answering (quote above the message), edit within a minute, delete (teacher) */
.chat-bubble { position: relative; }
.chat-quote { display: flex; flex-direction: column; gap: 1px; width: 100%; min-width: 120px; margin: 2px 0 6px; padding: 4px 10px; border: 0; border-inline-start: 3px solid var(--q-accent); border-radius: 6px; background: rgba(var(--q-tint), 0.07); color: inherit; font: inherit; text-align: start; cursor: pointer; }
.chat-quote b { font-size: 12px; color: var(--q-accent); }
.chat-quote span { overflow: hidden; font-size: 12.5px; opacity: 0.8; white-space: nowrap; text-overflow: ellipsis; }
.chat-quote.is-deleted { cursor: default; }
.chat-quote.is-deleted span { font-style: italic; opacity: 0.6; }
.chat-bubble.is-mine .chat-quote { --q-accent: rgba(255, 255, 255, 0.9); background: rgba(255, 255, 255, 0.14); }
.chat-edited { margin-inline-end: 4px; font-style: normal; opacity: 0.85; }
/* beside the message, in the free space next to it (phones: above its corner) */
.chat-acts { position: absolute; top: 50%; inset-inline-start: calc(100% + 6px); z-index: 2; display: flex; gap: 2px; padding: 2px; border: 1px solid var(--q-line); border-radius: 999px; background: var(--q-pill); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16); opacity: 0; visibility: hidden; transform: translateY(-50%) scale(0.92); transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s; }
.chat-bubble.is-mine .chat-acts { inset-inline-start: auto; inset-inline-end: calc(100% + 6px); }
.chat-acts::before { content: ""; position: absolute; inset: -10px; } /* the mouse crosses the gap without losing it */
.chat-bubble:hover .chat-acts, .chat-bubble.is-act .chat-acts, .chat-acts:focus-within { opacity: 1; visibility: visible; transform: translateY(-50%); }
@media (max-width: 600px) {
    .chat-acts, .chat-bubble.is-mine .chat-acts { top: -16px; inset-inline-start: auto; inset-inline-end: 8px; transform: translateY(3px); }
    .chat-bubble:hover .chat-acts, .chat-bubble.is-act .chat-acts, .chat-acts:focus-within { transform: none; }
}
.chat-acts button { position: relative; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--q-ink); font-size: 13px; cursor: pointer; }
.chat-acts button:hover, .chat-acts button:focus-visible { background: rgba(var(--q-tint), 0.1); color: var(--q-accent); outline: none; }
.chat-acts button[data-act="delete"]:hover, .chat-acts button.is-confirm { background: #e5484d; color: #fff; }
.chat-bubble.is-flash { animation: chat-flash 1.2s ease; }
@keyframes chat-flash { 0%, 40% { box-shadow: 0 0 0 4px rgba(58, 120, 214, 0.45); } 100% { box-shadow: 0 0 0 4px rgba(58, 120, 214, 0); } }
.chat-bubble.is-gone { opacity: 0; transform: scale(0.96); transition: opacity 0.25s ease, transform 0.25s ease; }
.chat-compose-bar { display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-top: 1px solid var(--q-line); background: var(--q-pill); }
.chat-compose-bar[hidden] { display: none; }
.chat-compose-bar > .fa { color: var(--q-accent); font-size: 16px; }
.chat-compose-bar > span { display: flex; flex: 1; flex-direction: column; min-width: 0; padding-inline-start: 10px; border-inline-start: 2px solid var(--q-accent); }
.chat-compose-bar b { color: var(--q-accent); font-size: 12.5px; }
.chat-compose-bar small { overflow: hidden; color: var(--q-ink); font-size: 12.5px; opacity: 0.75; white-space: nowrap; text-overflow: ellipsis; }
.chat-compose-bar button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--q-ink); opacity: 0.7; cursor: pointer; }
.chat-compose-bar button:hover { background: rgba(var(--q-tint), 0.08); opacity: 1; }
@media (hover: none) { .chat-bubble:hover:not(.is-act) .chat-acts { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .chat-acts, .chat-bubble.is-gone { transition: none; } .chat-bubble.is-flash { animation: none; } }

/* a file on its way: the bubble appears at once with its progress; the paperclip waits until it has arrived */
.chat-bubble.is-pending { opacity: 0.92; }
.chat-bubble.is-pending .chat-file { pointer-events: none; }
.chat-progress { display: block; height: 4px; margin: 6px 0 2px; overflow: hidden; border-radius: 999px; background: rgba(var(--q-tint), 0.16); }
.chat-bubble.is-mine .chat-progress { background: rgba(255, 255, 255, 0.25); }
.chat-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: currentColor; transition: width 0.2s ease; }
.is-busy { opacity: 0.45; cursor: progress !important; }
.is-busy input { pointer-events: none; }

/* ---------- Header: notifications bell (student.js) ---------- */
.st-push-head { position: relative; display: inline-flex; }
.st-push-head .st-icon-btn { position: relative; }
.st-push-dot { position: absolute; top: 7px; inset-inline-end: 7px; width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.st-push-head[data-push-state="off"] .st-push-dot, .st-push-head[data-push-state="ios-install"] .st-push-dot { background: #f0b545; box-shadow: 0 0 0 2px var(--top-bg, #152238); animation: st-push-pulse 2.4s ease-in-out infinite; }
.st-push-head[data-push-state="on"] .fa-bell-o::before { content: "\f0f3"; } /* fa-bell: filled when on */
.st-push-head[data-push-state="on"] .st-push-dot { background: #4ad295; box-shadow: 0 0 0 2px var(--top-bg, #152238); }
.st-push-head[data-push-state="denied"] .fa-bell-o::before { content: "\f1f7"; } /* fa-bell-slash-o */
.st-push-head[data-push-state="denied"] .st-icon-btn { opacity: 0.7; }
.st-push-head[data-push-state="unsupported"] { display: none; }
@keyframes st-push-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }
.st-push-tip {
    position: absolute; top: calc(100% + 10px); inset-inline-end: -8px; z-index: 60; width: max-content; max-width: min(300px, calc(100vw - 24px));
    padding: 10px 14px; border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 12px 30px rgba(12, 22, 40, 0.22);
    border: 1px solid var(--line); font-size: 13px; line-height: 1.8; cursor: pointer;
    opacity: 0; transform: translateY(-4px); transition: opacity 0.2s ease, transform 0.2s ease;
}
.st-push-tip::before { content: ""; position: absolute; top: -6px; inset-inline-end: 20px; width: 10px; height: 10px; background: inherit; border-top: 1px solid var(--line); border-inline-start: 1px solid var(--line); transform: rotate(45deg); }
.st-push-tip.is-in { opacity: 1; transform: none; }
.st-push-tip[hidden] { display: none; }

/* ---------- «پرونده من» (Pages/Student/_RecordCard) ---------- */
.st-rec-dialog { width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 40px); padding: 0; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgba(12, 22, 40, 0.35); }
.st-rec-dialog::backdrop { background: rgba(12, 20, 36, 0.55); backdrop-filter: blur(3px); }
.st-rec-dialog[open] { animation: st-rec-in 0.2s ease; }
@keyframes st-rec-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
.st .st-rec-close { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2; border-color: var(--line); color: var(--muted); background: var(--surface); }
.st .st-rec-close:hover { background: var(--hover); color: var(--ink); }
.st-rec-loading { margin: 0; padding: 60px 20px; color: var(--muted); text-align: center; }
.st-rec { padding: 22px; }
.st-rec-page .st-rec { padding: 0; }
.st-rec-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding-inline-end: 44px; margin-bottom: 18px; }
.st-rec-page .st-rec-head { padding-inline-end: 0; }
.st-rec-avatar { width: 58px; height: 58px; flex: none; font-size: 22px; }
.st-rec-avatar.has-tick { position: relative; overflow: visible; }
.st-rec-avatar.has-tick > img, .st-rec-avatar.has-tick > span { border-radius: 50%; overflow: hidden; }
.st-rec-who { flex: 1; min-width: 180px; }
.st-rec-who h2 { margin: 0 0 2px; font-size: 18px; color: var(--heading); }
.st-rec-who p { margin: 0; color: var(--muted); font-size: 13px; }
.st-rec-since { font-size: 12px !important; }
.st-rec-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.st .st-rec-stats a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 9%, transparent), transparent 70%), var(--surface); color: var(--ink); transition: border-color 0.2s ease, transform 0.2s ease; }
.st .st-rec-stats a:hover { border-color: color-mix(in srgb, var(--c) 55%, transparent); transform: translateY(-1px); color: var(--ink); }
.st-rec-stats a > .fa { grid-row: 1 / 3; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); font-size: 17px; }
.st-rec-stats b { font-size: 20px; line-height: 1.25; color: var(--heading); }
.st-rec-stats b small { font-size: 12px; font-weight: 600; color: var(--muted); }
.st-rec-stats b.is-text { font-size: 13.5px; }
.st-rec-stats span { overflow: hidden; color: var(--muted); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.st-rec-storage { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin: 14px 0 4px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 14px; font-size: 13px; }
.st-rec-storage .fa { color: var(--accent); }
.st-rec-storage small { color: var(--muted); }
.st-rec-bar { height: 7px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.st-rec-bar i { display: block; height: 100%; min-width: 4px; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.st-rec-sec { margin-top: 18px; }
.st-rec-sec h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14.5px; color: var(--heading); }
.st-rec-sec h3 .fa { color: var(--accent); }
.st-rec-courses { display: flex; flex-wrap: wrap; gap: 8px; }
.st-rec-courses .st-chip small { margin-inline-start: 4px; opacity: 0.75; font-size: 11px; }
.st-rec-more { margin-top: 10px; }
.st-timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.st-timeline::before { content: ""; position: absolute; top: 6px; bottom: 6px; inset-inline-start: 13px; width: 2px; border-radius: 2px; background: var(--line); }
.st-timeline li { position: relative; display: flex; align-items: baseline; gap: 10px; padding: 6px 0 6px 0; padding-inline-start: 38px; font-size: 13.5px; }
.st-timeline-dot { position: absolute; top: 4px; inset-inline-start: 0; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: var(--c); font-size: 12.5px; }
.st-timeline li > a, .st-timeline li > span:not(.st-timeline-dot) { flex: 1; color: var(--ink); }
.st .st-timeline li > a:hover { color: var(--accent); }
.st-timeline time { flex: none; color: var(--muted); font-size: 12px; }
.st-timeline .st-timeline-day { padding: 12px 0 4px; padding-inline-start: 38px; color: var(--muted); font-size: 12px; font-weight: 700; }
@media (max-width: 640px) {
    .st-rec { padding: 18px 14px; }
    .st-rec-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .st-rec-dialog { box-sizing: border-box; inset: auto 0 0 0; width: auto; max-width: none; max-height: 92vh; margin: 0; border-radius: 22px 22px 0 0; }
}
/* phones: room for the header's icons (the logo stays, its words go) */
@media (max-width: 560px) {
    .st-brand > span { display: none; }
    .st-top-in { gap: 10px; }
    .st-me { gap: 6px; }
    .st-me .st-icon-btn, .st-me .st-avatar { width: 36px; height: 36px; }
    /* the bell's words: a strip under the header, never past the screen's edge */
    .st-push-head { position: static; }
    .st-push-tip { position: fixed; top: 66px; inset-inline: 12px; width: auto; max-width: none; }
    .st-push-tip::before { display: none; }
}

/* ---------- Page loader (student.js): the logo while a slow page opens ---------- */
.st-loader { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: color-mix(in srgb, var(--bg, #f6f2ea) 55%, transparent); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.25s ease; }
.st-loader[hidden] { display: none; }
.st-loader.is-on { opacity: 1; }
.st-loader > * { grid-area: 1 / 1; }
.st-loader img { width: 104px; height: 104px; border-radius: 50%; box-shadow: 0 14px 40px rgba(21, 34, 56, 0.28); animation: st-loader-breathe 1.6s ease-in-out infinite; }
.st-loader-ring { width: 128px; height: 128px; border: 3px solid transparent; border-top-color: #e7b955; border-inline-start-color: rgba(231, 185, 85, 0.35); border-radius: 50%; animation: st-loader-spin 1s linear infinite; }
@keyframes st-loader-breathe { 0%, 100% { transform: scale(0.96); } 50% { transform: scale(1); } }
@keyframes st-loader-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .st-loader img, .st-loader-ring { animation: none; } }

/* emoji inside the text (chat.js): a compact grid next to the stickers' panel */
.chat-emoji-panel { grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 260px; overflow-y: auto; overscroll-behavior: contain; }
.chat-emoji-title { grid-column: 1 / -1; padding: 4px 4px 2px; opacity: 0.6; font-size: 11px; }
.chat-emoji-pick { display: grid; place-items: center; aspect-ratio: 1; padding: 0; border: 0; border-radius: 10px; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; transition: background 0.12s ease, transform 0.12s ease; }
.chat-emoji-pick:hover, .chat-emoji-pick:focus-visible { background: rgba(127, 127, 127, 0.14); transform: scale(1.12); outline: none; }

/* the same quiet line above the courses (identity, a requested file waiting for approval) */
.st-await.is-top { margin: 0 0 16px; }
/* phones: a slimmer composer, so the text box keeps its room next to the buttons */
@media (max-width: 560px) {
    .st-chat-form { gap: 4px; padding: 10px 8px; }
    .st-attach, .st-chat-form .chat-sticker-btn { width: 36px; height: 44px; border-color: transparent; }
    .st .st-send { width: 44px; height: 44px; }
}

.chat-emoji-tostickers { grid-column: 1 / -1; justify-self: start; display: inline-flex; align-items: center; gap: 6px; margin: 2px 2px 4px; padding: 4px 12px; border: 1px solid rgba(127, 127, 127, 0.3); border-radius: 999px; background: transparent; color: inherit; font: inherit; font-size: 12px; cursor: pointer; }
@media (max-width: 560px) { [data-chat] form [data-sticker-toggle] { display: none; } }

/* certificate request: a grade beside each course, the grades' screenshot */
.st-cert-row { display: flex; align-items: stretch; gap: 8px; }
.st-cert-row .st-cert-course { flex: 1; min-width: 0; }
.st .st-cert-grade { flex: none; width: 84px; text-align: center; font-weight: 700; }
.st-cert-shot { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 14px; background: var(--surface-2); color: var(--muted); font-size: 13px; cursor: pointer; }
.st-cert-shot:hover { border-color: var(--accent-2); }
.st-cert-shot .fa { color: var(--accent); font-size: 20px; }
.st-cert-shot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.st-cert-shot.has-file { border-style: solid; border-color: var(--ok-line); background: var(--ok-bg); color: var(--ok-ink); }
.st-cert-pick:has(.st-cert-row) { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* course card: the certificate is possible (after the grade is out), or already issued */
.st .st-chip.is-cert { background: var(--accent-soft); color: var(--accent); }
.st .st-chip.is-cert:hover { background: var(--accent-ring); color: var(--accent); }
.st .st-chip.is-cert.is-done { background: var(--ok-bg); color: var(--ok); }

/* the greeting card's line and the hadith of the day share one place: the taller sets the height, nothing jumps */
.st-rotate { display: grid; }
.st-rotate > span { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity 0.6s ease, visibility 0.6s; }
.st-rotate > span.is-on { opacity: 1; visibility: visible; }
.st-rotate-tag { margin-inline-end: 4px; padding: 0 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .st-rotate > span { transition: none; } }

.st-brand > a, .st-auth-brand > a { color: inherit; }
.st-brand .st-mark, .st-auth-brand .st-mark { width: 44px; height: 44px; border-radius: 50%; }

/* certificate request, each course: the card, then its term and grade (the inputs keep their own width) */
.st-cert-pick:has(.st-cert-row) { grid-template-columns: 1fr; }
.st-cert-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; }
.st-cert-row .st-cert-course { flex: 1 1 220px; min-width: 0; }
.st-cert-inputs { display: flex; flex: 0 1 auto; gap: 8px; }
.st .st-cert-row .st-cert-term { flex: 0 0 auto; width: 190px; }
.st .st-cert-row .st-cert-grade { flex: 0 0 auto; width: 86px; text-align: center; font-weight: 700; }
@media (max-width: 560px) {
    .st-cert-inputs { flex: 1 1 100%; }
    .st .st-cert-row .st-cert-term { flex: 1; width: auto; }
}
@media (max-width: 560px) { .st-brand > a { display: none; } } /* phones: the logo alone (the tab bar has «پیشخوان») */

/* dashboard: the certificate — a quiet line under «دروس من», and once a term at the end, a short reminder */
.st .st-cert-hint { display: flex; align-items: center; gap: 6px; margin-top: 12px; color: var(--muted); font-size: 12.5px; }
.st .st-cert-hint .fa { color: var(--accent); }
.st .st-cert-hint:hover { color: var(--accent); }
.st-cert-remind { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 16px; padding: 10px 14px; border: 1px solid var(--accent-2); border-radius: 14px; background: var(--accent-soft); font-size: 13.5px; }
.st-cert-remind > .fa { color: var(--accent); font-size: 18px; }
.st-cert-remind > span { flex: 1 1 220px; }
.st-cert-remind b { margin-inline-end: 4px; color: var(--heading); }
.st-birth-date { max-width: 260px; }

/* messages to the teacher (tickets) */
.st-ticket { display: grid; gap: 18px; max-width: 860px; }
.st-ticket-guide { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.st-ticket-guide li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.st-ticket-guide .fa { margin-top: 3px; color: var(--accent); }
.st-ticket-guide b { display: block; color: var(--heading); font-size: 13.5px; }
.st-empty small { display: block; margin-top: 6px; font-size: 12.5px; }

/* the header between tablet and wide screens: one line (shorter menu items, then text-only, then the logo alone) */
.st-brand b, .st-brand small { white-space: nowrap; }
@media (max-width: 1400px) and (min-width: 961px) { .st .st-nav a { padding: 8px 10px; gap: 6px; } }
@media (max-width: 1280px) and (min-width: 961px) { .st .st-nav a > .fa { display: none; } }
@media (max-width: 1140px) and (min-width: 961px) { .st-brand > a > span { display: none; } }

/* after scanning the roll-call QR */
.st-attend { max-width: 460px; margin: 30px auto; padding: 34px 26px; text-align: center; display: grid; justify-items: center; gap: 10px; }
.st-attend h1 { margin: 6px 0 0; font-size: 21px; color: var(--heading); }
.st-attend p { margin: 0 0 10px; color: var(--muted); line-height: 1.9; }
.st-attend-ico { width: 76px; height: 76px; display: grid; place-items: center; border-radius: 50%; font-size: 34px; }
.st-attend.is-ok .st-attend-ico { background: var(--ok-bg); color: var(--ok); box-shadow: 0 0 0 8px rgba(47, 138, 91, 0.08); }
.st-attend.is-no .st-attend-ico { background: var(--warn-bg); color: var(--warn); }

/* frequent questions */
.st-faq { display: grid; gap: 8px; }
.st .st-faq-search { margin-bottom: 6px; }
.st-faq-group { margin: 12px 0 2px; font-size: 14px; color: var(--accent); }
.st-faq-item { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.st-faq-item > summary { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; cursor: pointer; list-style: none; color: var(--heading); font-weight: 700; }
.st-faq-item > summary::-webkit-details-marker { display: none; }
.st-faq-item > summary .fa { margin-top: 4px; color: var(--accent); }
.st-faq-item[open] > summary { border-bottom: 1px solid var(--line); }
.st-faq-answer { padding: 12px 16px 14px; white-space: pre-wrap; line-height: 1.95; color: var(--ink); }
.st-faq-hint { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.st-faq-hint a { display: block; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); color: var(--ink); font-size: 13px; line-height: 1.7; }

/* anonymous evaluation */
.st-eval { display: grid; gap: 16px; max-width: 860px; }
.st-eval-q { margin: 0; padding: 0; border: 0; display: grid; gap: 10px; }
.st-eval-q legend { margin-bottom: 8px; color: var(--heading); font-weight: 700; line-height: 1.8; }
.st-eval-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.st-eval-scale label { position: relative; cursor: pointer; }
.st-eval-scale input { position: absolute; opacity: 0; pointer-events: none; }
.st-eval-scale span { display: grid; justify-items: center; gap: 2px; padding: 9px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: center; transition: border-color 0.15s ease, background 0.15s ease; }
.st-eval-scale span b { color: var(--heading); font-size: 16px; }
.st-eval-scale span small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.st-eval-scale input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.st-eval-scale input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.st-eval-card { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 14px 16px; border: 1px solid var(--accent-ring); border-radius: var(--radius); background: var(--accent-soft); color: var(--ink); }
.st-eval-card .fa-star-half-o { font-size: 22px; color: var(--accent); }
.st-eval-card span { flex: 1; line-height: 1.8; }
@media (max-width: 560px) { .st-eval-scale span small { display: none; } }

/* delivery line of a message (Pages/Shared/_Delivery.cshtml): sent time, ticks, seen time */
.msg-delivery { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 11.5px; opacity: 0.85; }
.msg-delivery .chat-ticks { color: #8a96a8; }
.msg-delivery.is-seen .chat-ticks { color: #1a8fd6; }
.msg-delivery .msg-seen { color: var(--muted); }
.msg-delivery.is-seen .msg-seen { color: #1a7fbf; font-weight: 600; }

/* project / internship page (Pages/Student/Work.cshtml): stages and the steps checklist */
.st-flow { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: flow; }
.st-flow li { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 13px; }
.st-flow li.is-done { border-color: var(--ok); background: rgba(46, 158, 106, 0.1); color: var(--ok); font-weight: 600; }
.st-flow li.is-now { border-color: #d4a72c; background: rgba(212, 167, 44, 0.12); color: var(--warn); font-weight: 700; }
.st-flow-note { margin: 12px 0 0; padding: 8px 12px; border-radius: 10px; font-size: 13.5px; }
.st-flow-note.is-ok { background: rgba(46, 158, 106, 0.1); color: var(--ok); }
.st-card-title small { color: var(--muted); font-weight: 500; font-size: 0.8em; }
.st-checklist { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.st-checklist li { display: grid; grid-template-columns: 38px 1fr; gap: 8px; align-items: start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; line-height: 1.9; }
.st-checklist li.is-done { border-color: rgba(46, 158, 106, 0.45); background: rgba(46, 158, 106, 0.06); }
.st-checklist li.is-done span { color: var(--muted); }
.st-checklist form { margin: 0; }
.st-check-btn { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--ok); font-size: 22px; cursor: pointer; }
.st-check-btn:hover, .st-check-btn:focus-visible { background: rgba(46, 158, 106, 0.12); }
.st-checklist li:not(.is-done) .st-check-btn { color: var(--muted); }

/* «دروس من», minimal (Pages/Student/Courses.cshtml): the picker folds away, own courses as quiet file lists, the rest one list */
details.st-mine { padding: 12px 16px; }
details.st-mine > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; color: var(--heading); font-weight: 700; font-size: 14px; }
details.st-mine > summary::-webkit-details-marker { display: none; }
details.st-mine > summary::after { content: "\f107"; font-family: FontAwesome; color: var(--muted); transition: transform 0.2s ease; }
details.st-mine[open] > summary::after { transform: rotate(180deg); }
details.st-mine > summary small { margin-inline-start: auto; color: var(--muted); font-weight: 500; }
details.st-mine > summary .fa { color: var(--accent); margin-inline-end: 6px; }
details.st-mine[open] > form { margin-top: 12px; }
/* «دروس من»: each course a card, its files as small cover cards (the cover image, or a tinted panel with the file type) */
.st-course.is-tiles { padding: 0; }
.st-course.is-tiles .st-course-head { align-items: center; padding: 14px 18px; }
.st-course.is-tiles .st-course-head .st-course-ico { width: 42px; height: 42px; font-size: 18px; border-radius: 12px; }
.st-course.is-tiles .st-course-copy h2 { font-size: 16.5px; }
.st-course.is-tiles .st-course-copy p { font-size: 13px; line-height: 1.8; text-align: start; }
.st-course.is-tiles .st-course-meta { align-items: center; gap: 12px; }
.st-course.is-tiles > .st-await { margin: 12px 18px 0; }
.st-course-state { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; text-decoration: none; white-space: nowrap; }
.st-course-state.is-ok { color: var(--ok); }
.st-course-state.is-wait { color: var(--warn); }
.st-course-state.is-task { color: var(--accent); font-weight: 700; }
.st-course-none { margin: 0; padding: 14px 18px; font-size: 13px; }

/* projects and internships: read the course's files first */
.st-readfirst { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 12px 14px; border: 1px solid var(--accent-2); border-radius: 14px; background: var(--accent-soft); }
.st-readfirst-ico { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: var(--surface); color: var(--accent); font-size: 17px; }
.st-readfirst > div { flex: 1; min-width: 0; }
.st-readfirst b { color: var(--heading); font-size: 14.5px; }
.st-readfirst p { margin: 2px 0 0; color: var(--ink); font-size: 13px; line-height: 1.9; }
.st-readfirst-line { margin: 0 0 8px; }
@media (max-width: 560px) { .st-readfirst { flex-wrap: wrap; } .st-readfirst .st-btn { width: 100%; justify-content: center; } }

.st-rtiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px; margin: 0; padding: 16px 18px 18px; list-style: none; }
.st .st-rtile { display: flex; flex-direction: column; gap: 3px; height: 100%; color: var(--ink); text-decoration: none; }
.st-rtile-cover {
    --tint: var(--accent);
    position: relative;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 6px;
    aspect-ratio: 92 / 118;
    margin-bottom: 5px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: linear-gradient(160deg, color-mix(in srgb, var(--tint) 16%, var(--surface)), color-mix(in srgb, var(--tint) 5%, var(--surface)));
    color: var(--tint);
    box-shadow: 0 1px 2px rgba(21, 34, 56, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.st-rtile-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-rtile-cover > .fa { font-size: 34px; }
.st-rtile-cover em { padding: 1px 8px; border-radius: 6px; background: color-mix(in srgb, var(--tint) 14%, transparent); font-style: normal; font-weight: 700; font-size: 11px; letter-spacing: 0.04em; direction: ltr; }
.st-rtile-act { position: absolute; bottom: 8px; inset-inline-start: 8px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); color: var(--accent); font-size: 13px; box-shadow: 0 2px 8px rgba(21, 34, 56, 0.18); transition: background 0.2s ease, color 0.2s ease; }
.st-rtile:hover .st-rtile-cover, .st-rtile:focus-visible .st-rtile-cover { transform: translateY(-2px); border-color: var(--accent-2); box-shadow: var(--shadow); }
.st-rtile:hover .st-rtile-act { background: var(--primary-bg); color: var(--primary-ico); }
.st-rtile-name { display: -webkit-box; overflow: hidden; color: var(--heading); font-size: 13.5px; font-weight: 600; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.st-rtile small { color: var(--muted); font-size: 11.5px; direction: ltr; text-align: end; unicode-bidi: isolate; }
.st-rtile.is-ready .st-rtile-cover { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.st-rtile.is-locked .st-rtile-cover img, .st-rtile.is-locked .st-rtile-cover > .fa { opacity: 0.55; filter: grayscale(0.4); }
.st-rtile.is-locked .st-rtile-act { color: var(--muted); }
.st-rtile.is-pdf .st-rtile-cover { --tint: #d2453b; }
.st-rtile.is-ppt .st-rtile-cover { --tint: #e0672f; }
.st-rtile.is-doc .st-rtile-cover { --tint: #3f7ddc; }
.st-rtile.is-xls .st-rtile-cover { --tint: #2f9e5b; }
.st-rtile.is-zip .st-rtile-cover { --tint: #b98a2c; }
.st-rtile.is-img .st-rtile-cover { --tint: #8b5fd6; }
.st-rtile.is-video .st-rtile-cover { --tint: #d2457b; }
.st-rtile.is-audio .st-rtile-cover { --tint: #1d9aa3; }
.st-rtile.is-code .st-rtile-cover, .st-rtile.is-text .st-rtile-cover, .st-rtile.is-file .st-rtile-cover { --tint: #64748b; }
.st-rtile.is-link .st-rtile-cover { --tint: #1f7a72; }
@media (prefers-reduced-motion: reduce) { .st-rtile-cover { transition: none; } .st-rtile:hover .st-rtile-cover { transform: none; } }
@media (max-width: 560px) {
    .st-rtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px 14px 14px; }
    .st-course.is-tiles .st-course-head { padding: 12px 14px; }
}
.st-others { padding: 14px 16px; }
.st-others ul { margin: 0; padding: 0; list-style: none; }
.st-others li { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-top: 1px solid var(--line); font-size: 14px; }
.st-others li:first-child { border-top: 0; }
.st-others li > span { flex: 1 1 auto; }
.st-others li > .fa { width: 20px; text-align: center; color: var(--muted); }
.st-others li small { color: var(--muted); font-size: 12px; }
.st-others form { margin: 0; }

/* Firefox flickers with frosted glass (backdrop-filter) over moving, blurred backgrounds: no glass there, and the
   sign-in scene's glows and floating cards stand still */
@supports (-moz-appearance: none) {
    *, *::before, *::after, ::backdrop { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
    .st-scene-glow i, .st-float { animation: none !important; }
}

.st-late-note { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--warn); border-radius: 12px; color: var(--warn); font-weight: 700; font-size: 13.5px; }
