/* =====================================================================
   مدرسه‌یار | Madreseh-Yar — طراحی راست‌به‌چپ (بدون هیچ وابستگی بیرونی)
   ===================================================================== */

/* ---------- فونت وزیرمتن (میزبانی محلی) ---------- */
@font-face {
  font-family: Vazirmatn; font-style: normal; font-weight: 400; font-display: swap;
  src: url(https://atarbaji.ir/index.php?r=asset&f=fonts%2Fvazirmatn-arabic-400-normal.woff2&v=1789349262) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: Vazirmatn; font-style: normal; font-weight: 500; font-display: swap;
  src: url(https://atarbaji.ir/index.php?r=asset&f=fonts%2Fvazirmatn-arabic-500-normal.woff2&v=1789349262) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: Vazirmatn; font-style: normal; font-weight: 700; font-display: swap;
  src: url(https://atarbaji.ir/index.php?r=asset&f=fonts%2Fvazirmatn-arabic-700-normal.woff2&v=1789349262) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: Vazirmatn; font-style: normal; font-weight: 400; font-display: swap;
  src: url(https://atarbaji.ir/index.php?r=asset&f=fonts%2Fvazirmatn-latin-400-normal.woff2&v=1789349262) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Vazirmatn; font-style: normal; font-weight: 500; font-display: swap;
  src: url(https://atarbaji.ir/index.php?r=asset&f=fonts%2Fvazirmatn-latin-500-normal.woff2&v=1789349262) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Vazirmatn; font-style: normal; font-weight: 700; font-display: swap;
  src: url(https://atarbaji.ir/index.php?r=asset&f=fonts%2Fvazirmatn-latin-700-normal.woff2&v=1789349262) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --brand: #2563eb; --brand-2: #7c3aed; --bg: #f5f7fb; --panel: #fff;
  --ink: #0f172a; --ink-2: #475569; --ink-3: #94a3b8; --line: #e5e9f2;
  --ok: #10b981; --warn: #f59e0b; --bad: #ef4444; --info: #3b82f6;
  --radius: 16px; --shadow: 0 6px 24px rgba(15,23,42,.06); --shadow-lg: 0 18px 50px rgba(15,23,42,.12);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: Vazirmatn, 'Segoe UI', Tahoma, sans-serif; font-size: 15px; line-height: 1.85;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }

/* ---------- چیدمان ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 256px; flex: 0 0 256px; background: linear-gradient(180deg,#0f172a,#1e293b); color: #e2e8f0; padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 8px 8px 16px; border-bottom: 1px solid #334155; }
.brand-logo { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.brand b { display: block; font-size: 17px; }
.brand span { font-size: 11.5px; color: #94a3b8; }
.nav { margin-top: 14px; display: grid; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 11px; color: #cbd5e1; font-size: 14px; }
.nav a:hover { background: #26334a; color: #fff; }
.nav a.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 6px 18px rgba(37,99,235,.35); }
.nav .section { font-size: 11px; color: #64748b; padding: 14px 12px 4px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 22px; background: rgba(255,255,255,.86); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar h1 { font-size: 16px; margin: 0; font-weight: 600; }
.topbar .spacer { flex: 1; }
.content { padding: 22px; max-width: 1280px; width: 100%; }

/* ---------- کارت و شبکه ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card h3 { margin: 0 0 12px; font-size: 15px; }
.grid { display: grid; gap: 14px; }
.grid.k2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.k3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.k4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.muted { color: var(--ink-2); font-size: 13px; }
.tiny { font-size: 12px; color: var(--ink-3); }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px; box-shadow: var(--shadow); }
.kpi .v { font-size: 26px; font-weight: 700; line-height: 1.3; }
.kpi .l { font-size: 12.5px; color: var(--ink-2); }
.kpi .ic { font-size: 20px; }

/* ---------- دکمه‌ها و برچسب‌ها ---------- */
.btn { display: inline-block; border: 0; border-radius: 11px; padding: 9px 16px; font-size: 14px; font-weight: 600; background: var(--brand); color: #fff; transition: .18s; text-align: center; }
.btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn.ghost { background: #eef2ff; color: #3730a3; }
.btn.gray { background: #f1f5f9; color: var(--ink-2); }
.btn.ok { background: var(--ok); } .btn.bad { background: var(--bad); }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.high { background: #fee2e2; color: #b91c1c; }
.badge.medium { background: #ffedd5; color: #c2410c; }
.badge.low { background: #fef9c3; color: #a16207; }
.badge.info { background: #dbeafe; color: #1d4ed8; }
.badge.ok { background: #dcfce7; color: #15803d; }
.badge.gray { background: #f1f5f9; color: #475569; }
.chip { padding: 4px 11px; border-radius: 999px; background: #f1f5f9; color: var(--ink-2); font-size: 12.5px; border: 1px solid var(--line); display: inline-block; }

/* ---------- فرم‌ها ---------- */
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; color: var(--ink-2); }
.field input, .field select, .field textarea { padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; font-size: 14px; color: var(--ink); width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid #bfdbfe; border-color: var(--brand); }

/* ---------- نوار پیشرفت ---------- */
.bar { height: 9px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.bar.ok > i { background: linear-gradient(90deg,#10b981,#34d399); }
.bar.warn > i { background: linear-gradient(90deg,#f59e0b,#fbbf24); }
.bar.bad > i { background: linear-gradient(90deg,#ef4444,#f87171); }

/* ---------- جدول ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 9px 10px; text-align: right; border-bottom: 1px solid var(--line); }
th { color: var(--ink-2); font-weight: 600; font-size: 12.5px; background: #f8fafc; }
tbody tr:hover { background: #f8fafc; }

/* ---------- صفحهٔ ورود ---------- */
/* ---------- صفحهٔ ورود (طراحی حرفه‌ای، دو ستونه) ---------- */
.auth-body { background: #eef2f9; }
.auth-split { min-height: 100vh; display: grid; grid-template-columns: 1.02fr 1fr; }

.auth-aside { position: relative; overflow: hidden; padding: 46px 42px; color: #eaf0ff;
  background: linear-gradient(155deg, #0b1220 0%, #17235a 46%, #3b1d6e 100%);
  display: flex; flex-direction: column; gap: 24px; }
.auth-aside::before, .auth-aside::after { content: ''; position: absolute; border-radius: 50%; filter: blur(10px); opacity: .5; }
.auth-aside::before { width: 420px; height: 420px; top: -160px; left: -120px; background: radial-gradient(circle, rgba(37,99,235,.55), transparent 62%); }
.auth-aside::after { width: 460px; height: 460px; bottom: -190px; right: -140px; background: radial-gradient(circle, rgba(124,58,237,.5), transparent 62%); }
.auth-aside > * { position: relative; z-index: 1; }

.auth-brand { display: flex; align-items: center; gap: 14px; }
.auth-logo { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 19px; display: grid; place-items: center; font-size: 32px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 14px 34px rgba(37,99,235,.45); }
.auth-brand h1 { margin: 0; font-size: 27px; letter-spacing: .2px; }
.auth-brand p { margin: 3px 0 0; color: #a9b6d6; font-size: 13.5px; }

.auth-features { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 13px; }
.auth-features li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.11); }
.auth-features li span { font-size: 22px; line-height: 1.4; }
.auth-features b { display: block; font-size: 14.5px; color: #f4f7ff; }
.auth-features small { display: block; color: #a9b6d6; font-size: 12.5px; line-height: 1.9; }
.auth-aside-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.13); color: #8fa0c7; font-size: 12px; }

.auth-main { display: grid; place-items: center; padding: 34px 22px;
  background: radial-gradient(1100px 520px at 88% -8%, #dbeafe 0, transparent 58%), radial-gradient(900px 480px at 6% 108%, #ede9fe 0, transparent 55%), #f5f7fb; }
.auth-card { width: 100%; max-width: 448px; background: #fff; border: 1px solid var(--line); border-radius: 24px;
  box-shadow: var(--shadow-lg); padding: 30px; }
.auth-card-head h2 { margin: 0 0 5px; font-size: 21px; }
.auth-card-head p { margin: 0 0 18px; font-size: 13px; }
.auth-error { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; line-height: 1.9; }

.btn-lg { padding: 13px 20px; font-size: 15.5px; border-radius: 13px; }
.btn-block { display: block; width: 100%; }

.auth-divider { position: relative; text-align: center; margin: 22px 0 14px; color: var(--ink-3); font-size: 12px; }
.auth-divider::before { content: ''; position: absolute; inset-inline: 0; top: 52%; height: 1px; background: var(--line); }
.auth-divider span { position: relative; z-index: 1; background: #fff; padding: 0 10px; }

.auth-demo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.auth-demo button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; text-align: start; transition: .16s; }
.auth-demo button:hover { border-color: var(--brand); background: #eff6ff; transform: translateY(-1px); }
.auth-demo button b { font-size: 13px; color: var(--ink); }
.auth-demo button small { font-size: 11.5px; color: var(--ink-3); direction: ltr; }

@media (max-width: 980px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-main { padding: 22px 14px; }
  .auth-card { max-width: 100%; padding: 22px; }
}

/* ---------- یارکو ---------- */
.yarco-fab { position: fixed; bottom: 22px; left: 22px; z-index: 60; width: 60px; height: 60px; border-radius: 50%; border: 0; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-size: 26px; box-shadow: 0 14px 34px rgba(37,99,235,.45); display: grid; place-items: center; }
.yarco-fab .dot { position: absolute; top: 6px; right: 8px; width: 11px; height: 11px; border-radius: 50%; background: #34d399; border: 2px solid #fff; }
.yarco-panel { position: fixed; bottom: 22px; left: 22px; z-index: 61; width: 400px; max-width: calc(100vw - 32px); height: 580px; max-height: calc(100vh - 60px); background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; }
.yarco-head { padding: 13px 16px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; display: flex; align-items: center; gap: 10px; }
.yarco-head .av { width: 38px; height: 38px; border-radius: 12px; background: rgba(255,255,255,.22); display: grid; place-items: center; font-size: 20px; }
.yarco-body { flex: 1; overflow-y: auto; padding: 14px; background: #f8fafc; display: grid; gap: 10px; align-content: start; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 15px; font-size: 13.5px; white-space: pre-wrap; line-height: 1.9; }
.msg.user { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; margin-right: auto; border-bottom-right-radius: 5px; }
.msg.bot { background: #fff; border: 1px solid var(--line); margin-left: auto; border-bottom-left-radius: 5px; }
.yarco-foot { padding: 11px; border-top: 1px solid var(--line); background: #fff; }
.yarco-foot input { flex: 1; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; font-size: 13.5px; }
.quick { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.quick button { border: 1px solid #dbeafe; background: #eff6ff; color: #1d4ed8; border-radius: 999px; padding: 4px 11px; font-size: 11.5px; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; animation: blink 1.2s infinite; display: block; }
.typing i:nth-child(2) { animation-delay: .2s } .typing i:nth-child(3) { animation-delay: .4s }
@keyframes blink { 0%,80%,100% { opacity: .3 } 40% { opacity: 1 } }

/* ---------- آزمون ---------- */
.opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: right; padding: 13px 15px; margin-bottom: 9px; border: 1.5px solid var(--line); border-radius: 13px; background: #fff; font-size: 14.5px; transition: .15s; }
.opt:hover { border-color: #bfdbfe; background: #f8fbff; }
.opt.sel { border-color: var(--brand); background: #eff6ff; }
.opt .k { width: 27px; height: 27px; border-radius: 8px; background: #f1f5f9; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; }
.progress-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.progress-dots i { width: 26px; height: 6px; border-radius: 999px; background: #e2e8f0; display: block; }
.progress-dots i.done { background: var(--ok); } .progress-dots i.now { background: var(--brand); }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink-2); }

/* ---------- پیام‌ها ---------- */
.notice { padding: 12px 14px; border-radius: 12px; font-size: 13.5px; border: 1px solid; }
.notice.ok { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.notice.bad { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.notice.info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.notice.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.empty { text-align: center; padding: 34px 12px; color: var(--ink-3); }
.empty .big { font-size: 40px; margin-bottom: 8px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { border: 1px solid var(--line); background: #fff; border-radius: 11px; padding: 8px 14px; font-size: 13.5px; color: var(--ink-2); }
.tabs a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.list-item { display: flex; gap: 12px; align-items: center; padding: 11px 12px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.list-item + .list-item { margin-top: 8px; }
.avatar { width: 38px; height: 38px; border-radius: 11px; background: #f1f5f9; display: grid; place-items: center; font-size: 19px; flex: 0 0 auto; }
.module-card { border-right: 4px solid var(--brand); }
.module-card.done { border-right-color: var(--ok); }
.center { display: grid; place-items: center; padding: 40px; }
details summary { cursor: pointer; font-weight: 600; }
.chat-page .bubble { max-width: 78%; padding: 11px 14px; border-radius: 15px; white-space: pre-wrap; line-height: 1.95; font-size: 14px; }
.chat-page .bubble.user { background: linear-gradient(135deg,var(--brand),var(--brand-2)); color: #fff; margin-right: auto; }
.chat-page .bubble.bot { background: #fff; border: 1px solid var(--line); margin-left: auto; }

@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; flex: none; height: auto; position: relative; }
  .nav { grid-auto-flow: column; overflow-x: auto; }
  .nav .section { display: none; }
  .grid.k2, .grid.k3, .grid.k4 { grid-template-columns: 1fr; }
  .content { padding: 14px; }
  .yarco-panel { width: calc(100vw - 24px); left: 12px; height: 70vh; }
}

/* =====================================================================
   نسخهٔ ۱.۱ — ارتقای طراحی: فازهای ۲ تا ۵ (روان‌شناختی، استعدادیابی،
   تلویزیون آموزشی و کلاس آنلاین تعاملی)
   ===================================================================== */

:root {
  --radius-sm: 12px; --radius-lg: 22px;
  --brand-soft: #eef2ff; --glass: rgba(255,255,255,.72);
  --ok-soft: #ecfdf5; --warn-soft: #fffbeb; --bad-soft: #fef2f2;
}

/* ---------- نوار کناری: گروه‌بندی و پاورقی ---------- */
.sidebar { display: flex; flex-direction: column; }
.nav { flex: 1; }
.nav a .ni { width: 20px; text-align: center; font-size: 15px; }
.nav a .count { font-style: normal; margin-inline-start: auto; background: var(--bad); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.nav .section:first-child { padding-top: 6px; }
.sidebar-foot { margin-top: 14px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.sidebar-foot .sf-name { font-size: 13.5px; color: #e2e8f0; font-weight: 600; }
.sidebar-foot .sf-role { font-size: 11.5px; color: #94a3b8; }

/* ---------- نوار بالا ---------- */
.topbar { min-height: 66px; }
.tb-title h1 { font-size: 17px; }
.tb-title p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-3); }
.tb-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stat-chip { display: flex; flex-direction: column; align-items: center; padding: 4px 12px; border-radius: 12px; background: var(--brand-soft); border: 1px solid #e0e7ff; line-height: 1.35; }
.stat-chip b { font-size: 14px; color: #3730a3; }
.stat-chip small { font-size: 10.5px; color: #6366f1; }
.chip.user { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--line); }
.chip .av { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-soft); }

.content { padding: 24px; max-width: 1320px; }
.app-foot { padding: 16px 24px 30px; color: var(--ink-3); font-size: 12px; border-top: 1px solid var(--line); margin-top: 10px; }

/* ---------- سرصفحهٔ صفحه و کارت‌های بخش ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h2 { margin: 0; font-size: 20px; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); font-size: 13px; max-width: 720px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h3 { margin: 0; }
.card-head p { margin: 3px 0 0; font-size: 12.5px; color: var(--ink-3); }
.card.soft { background: linear-gradient(180deg, #fbfdff, #f6f8fe); }
.card.tinted { background: linear-gradient(135deg, #0f172a, #1e293b); color: #e2e8f0; border: 0; }
.card.tinted h3 { color: #fff; }

/* ---------- کاشی‌های KPI تازه ---------- */
.kpi.pro { position: relative; overflow: hidden; }
.kpi.pro::after { content: ''; position: absolute; inset-inline-start: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(37,99,235,.12), transparent 70%); }
.kpi .trend { font-size: 12px; font-weight: 600; }
.kpi .trend.up { color: #15803d; } .kpi .trend.down { color: #b91c1c; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }

/* ---------- زبانه‌ها ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a { padding: 9px 14px; border-radius: 11px 11px 0 0; font-size: 13.5px; color: var(--ink-2); border: 1px solid transparent; border-bottom: 0; }
.tabs a:hover { background: #f8fafc; color: var(--ink); }
.tabs a.active { background: #fff; border-color: var(--line); color: var(--brand); font-weight: 700; box-shadow: 0 -3px 0 var(--brand) inset; }

/* ---------- جدول‌ها ---------- */
table thead th { background: #f8fafc; font-weight: 600; color: var(--ink-2); }
table tbody tr:hover { background: #fbfdff; }
table td, table th { padding: 10px 12px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.table-wrap table { min-width: 640px; }
.bar { background: #eef2f7; border-radius: 999px; height: 9px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.bar.ok i { background: linear-gradient(90deg, #10b981, #34d399); }
.bar.warn i { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.bar.bad i { background: linear-gradient(90deg, #ef4444, #f87171); }

/* ---------- پرسش‌نامهٔ لیکرت ---------- */
.likert { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 8px; }
.likert label { position: relative; display: grid; place-items: center; gap: 4px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe; cursor: pointer; font-size: 12px; color: var(--ink-2); text-align: center; transition: .15s; }
.likert label:hover { border-color: var(--brand); background: var(--brand-soft); }
.likert input { position: absolute; opacity: 0; }
.likert input:checked + .dot { border-color: var(--brand); background: var(--brand); }
.likert input:checked ~ .lb { color: var(--brand); font-weight: 700; }
.likert label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(37,99,235,.10); }
.likert .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #cbd5e1; background: #fff; }
.q-item { padding: 15px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.q-item + .q-item { margin-top: 10px; }
.q-item .q-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); font-size: 12.5px; font-weight: 700; margin-inline-end: 8px; }
.q-item .q-text { font-size: 14px; }

/* ---------- تلویزیون مدرسه ---------- */
.tv-hero { position: relative; border-radius: var(--radius-lg); overflow: hidden; min-height: 260px; display: flex; align-items: flex-end; color: #fff; background: linear-gradient(135deg, #0b1220, #17235a 60%, #3b1d6e); }
.tv-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.tv-hero .inner { position: relative; z-index: 1; padding: 24px; width: 100%; background: linear-gradient(180deg, transparent, rgba(2,6,23,.82)); }
.tv-hero h2 { margin: 6px 0 6px; font-size: 22px; }
.channels { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.channels a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; white-space: nowrap; }
.channels a.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.v-card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; transition: .18s; box-shadow: var(--shadow); }
.v-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.v-thumb { position: relative; aspect-ratio: 16/9; background: linear-gradient(135deg, #1e293b, #334155); display: grid; place-items: center; font-size: 34px; color: #cbd5e1; }
.v-thumb img { width: 100%; height: 100%; object-fit: cover; }
.v-thumb .dur { position: absolute; bottom: 8px; inset-inline-end: 8px; background: rgba(2,6,23,.78); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 7px; }
.v-body { padding: 12px 13px; }
.v-body b { display: block; font-size: 13.5px; line-height: 1.7; }
.v-meta { display: flex; gap: 10px; margin-top: 6px; font-size: 11.5px; color: var(--ink-3); flex-wrap: wrap; }
.tv-player { width: 100%; aspect-ratio: 16/9; border-radius: 16px; background: #0b1220; border: 1px solid var(--line); }
.announce-strip { display: flex; gap: 10px; overflow-x: auto; padding: 10px 0; }
.announce-strip a { min-width: 260px; padding: 12px 14px; border-radius: 14px; background: var(--warn-soft); border: 1px solid #fde68a; font-size: 13px; }

/* ---------- کلاس آنلاین ---------- */
.room { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.board-wrap { border: 1px solid var(--line); border-radius: 18px; background: #fff; overflow: hidden; box-shadow: var(--shadow); }
.board-tools { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #f8fafc; flex-wrap: wrap; }
.board-tools .swatch { width: 24px; height: 24px; border-radius: 8px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.board-tools .swatch.active { box-shadow: 0 0 0 2px var(--brand); }
#board { display: block; width: 100%; height: auto; aspect-ratio: 16/10; background: #fff; touch-action: none; cursor: crosshair; }
.room-side { display: grid; gap: 14px; }
.chat-box { display: flex; flex-direction: column; height: 420px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #fff; }
.chat-head { padding: 10px 14px; border-bottom: 1px solid var(--line); background: #f8fafc; display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.chat-body { flex: 1; overflow-y: auto; padding: 12px; display: grid; gap: 9px; align-content: start; background: #fbfdff; }
.chat-line { font-size: 13px; line-height: 1.8; }
.chat-line .who { font-weight: 700; font-size: 12.5px; }
.chat-line.system { color: var(--ink-3); font-style: normal; font-size: 12px; background: #f1f5f9; border-radius: 10px; padding: 6px 10px; }
.chat-line.hand { background: var(--warn-soft); border: 1px solid #fde68a; border-radius: 10px; padding: 6px 10px; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: #fff; }
.chat-form input { flex: 1; }
.participants { display: grid; gap: 7px; max-height: 240px; overflow-y: auto; }
.p-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; }
.p-item .av { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); }
.p-item .hand-flag { margin-inline-start: auto; font-size: 14px; }
.p-item.offline { opacity: .55; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; color: #b91c1c; font-weight: 700; font-size: 12.5px; }
.live-dot i { width: 9px; height: 9px; border-radius: 50%; background: #ef4444; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(1.25); } }

/* ---------- رادار و نمودارهای تحلیلی ---------- */
.radar-wrap { display: grid; place-items: center; }
.dim-list { display: grid; gap: 9px; }
.dim-row { display: grid; grid-template-columns: 130px 1fr 46px; gap: 10px; align-items: center; font-size: 13px; }
.dim-row b { font-weight: 600; }

/* ---------- ریسک و وضعیت ---------- */
.risk { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.risk.urgent { background: #7f1d1d; color: #fff; }
.risk.high { background: #fee2e2; color: #b91c1c; }
.risk.medium { background: #ffedd5; color: #c2410c; }
.risk.low { background: #dcfce7; color: #15803d; }
.ring-sm { display: grid; place-items: center; }

/* ---------- خالی‌بودن و راهنما ---------- */
.empty { text-align: center; padding: 26px 16px; color: var(--ink-3); font-size: 13.5px; }
.empty .big { font-size: 34px; margin-bottom: 6px; }
.hint { display: flex; gap: 9px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--brand-soft); border: 1px solid #e0e7ff; font-size: 13px; color: #3730a3; }
.hint.warn { background: var(--warn-soft); border-color: #fde68a; color: #92400e; }
.hint.bad { background: var(--bad-soft); border-color: #fecaca; color: #991b1b; }

/* ---------- ستون‌های برنامه (timeline) ---------- */
.timeline { position: relative; padding-inline-start: 22px; }
.timeline::before { content: ''; position: absolute; inset-inline-start: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 14px; }
.tl-item::before { content: ''; position: absolute; inset-inline-start: -20px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); }
.tl-item.ok::before { border-color: #10b981; } .tl-item.bad::before { border-color: #ef4444; }
.tl-item .t { font-size: 12.5px; color: var(--ink-3); }

/* ---------- واکنش‌گرایی ---------- */
@media (max-width: 1180px) { .room { grid-template-columns: 1fr; } .chat-box { height: 340px; } }
@media (max-width: 980px) {
  .grid.k2, .grid.k3, .grid.k4 { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 40; transform: translateX(100%); transition: .2s; }
  body.nav-open .sidebar { transform: none; }
  .content { padding: 16px; }
  .dim-row { grid-template-columns: 100px 1fr 44px; }
}
@media (max-width: 560px) { .likert { grid-template-columns: repeat(5, 1fr); gap: 5px; } .likert label { padding: 8px 2px; font-size: 10.5px; } }

/* ---------- چاپ کارنامه ---------- */
@media print {
  .sidebar, .topbar, .app-foot, .yarco-fab, .yarco-panel, .no-print { display: none !important; }
  .content { max-width: 100%; padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* ---------- بررسی سلامت نصب (صفحهٔ مستقل) ---------- */
.health-wrap { max-width: 920px; margin: 0 auto; padding: 40px 20px 60px; }
.health-head { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.health-head h1 { margin: 0 0 4px; font-size: 22px; }
.health-head p { margin: 0; color: var(--ink-3); font-size: 13.5px; }
.health-head .auth-logo { width: 58px; height: 58px; font-size: 28px; border-radius: 16px; }
.health-table { width: 100%; border-collapse: collapse; }
.health-table tr { border-bottom: 1px solid var(--line); }
.health-table tr:last-child { border-bottom: 0; }
.health-table td { padding: 12px 8px; font-size: 13.5px; vertical-align: middle; }
.health-table tr.bad { background: #fef2f2; }
.h-icon { width: 34px; text-align: center; font-size: 16px; }
.h-label { font-weight: 700; width: 30%; }
.h-value { color: var(--ink-2); width: 26%; }
.h-hint { color: var(--ink-3); font-size: 12.5px; }
.stat { text-align: center; background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; padding: 12px 8px; }
.stat b { display: block; font-size: 20px; color: var(--brand); }
.stat span { font-size: 12.5px; color: var(--ink-3); }
@media (max-width: 720px) { .h-hint { display: none; } }

/* =====================================================================
   طراحی نسخهٔ ۱.۲ — لایهٔ «صیقل حرفه‌ای» (Professional Polish Layer)
   این بخش روی قواعد قبلی سوار می‌شود: رنگ‌بندی آبی–نیلی، کارت‌های نرم،
   آیکون‌های برداری، منوی کناری شیک، جدول‌ها و فرم‌های خواناتر.
   ===================================================================== */

:root {
  --brand: #3b5bfd; --brand-2: #7c3aed; --brand-3: #0ea5e9;
  --brand-soft: #eef2ff; --brand-soft-2: #f5f3ff;
  --bg: #f4f6fb; --panel: #ffffff;
  --ink: #0d1526; --ink-2: #4a5876; --ink-3: #8b96ad;
  --line: #e6ebf5; --line-2: #eff3f9;
  --ok: #0ea472; --ok-soft: #e7f8f1; --warn: #e08c07; --warn-soft: #fff7e6;
  --bad: #e5484d; --bad-soft: #feecec; --info: #2f6fed; --info-soft: #eaf1ff;
  --sidebar-1: #0a1020; --sidebar-2: #101b34;
  --radius: 18px; --radius-sm: 12px; --radius-lg: 24px;
  --shadow-xs: 0 1px 2px rgba(13,21,38,.05);
  --shadow: 0 6px 20px -6px rgba(13,21,38,.10), 0 2px 6px rgba(13,21,38,.04);
  --shadow-lg: 0 24px 60px -20px rgba(13,21,38,.22), 0 8px 20px -8px rgba(13,21,38,.10);
  --ring: 0 0 0 4px rgba(59,91,253,.14);
}

/* ---------- آیکون‌های برداری ---------- */
.ic { width: 20px; height: 20px; flex: 0 0 auto; display: block; }
.ic.xs { width: 15px; height: 15px; }
.ic.sm { width: 17px; height: 17px; }
.ic.lg { width: 26px; height: 26px; }
.ic.xl { width: 34px; height: 34px; }
.emoji { font-size: 15px; line-height: 1; }

/* ---------- پایه ---------- */
body { background:
  radial-gradient(1200px 600px at 100% -10%, #e9efff 0%, rgba(233,239,255,0) 60%),
  radial-gradient(900px 500px at 0% 0%, #f3ecff 0%, rgba(243,236,255,0) 55%),
  var(--bg);
  line-height: 1.8; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { letter-spacing: -.2px; line-height: 1.6; }
h2 { font-size: 21px; margin: 0 0 6px; font-weight: 700; }
a { transition: color .16s ease, opacity .16s ease; }

/* ---------- منوی کناری ---------- */
.sidebar {
  background: linear-gradient(178deg, var(--sidebar-1) 0%, var(--sidebar-2) 60%, #0d1a33 100%);
  border-inline-end: 1px solid rgba(255,255,255,.06);
  box-shadow: -18px 0 45px -30px rgba(9,15,30,.9);
  padding: 16px 13px 12px; display: flex; flex-direction: column; gap: 2px;
}
.brand { border-bottom: 1px solid rgba(255,255,255,.08); padding: 6px 6px 15px; gap: 11px; }
.brand-logo {
  width: 44px; height: 44px; border-radius: 14px; color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  box-shadow: 0 10px 24px -8px rgba(90,80,255,.75), inset 0 1px 0 rgba(255,255,255,.35);
}
.brand-logo .ic { width: 24px; height: 24px; }
.brand b { font-size: 17.5px; letter-spacing: -.3px; }
.brand span { font-size: 11.5px; color: #8ea0c4; }

.nav { margin-top: 12px; gap: 3px; }
.nav .section {
  font-size: 10.5px; color: #66799f; padding: 15px 11px 5px; font-weight: 700;
  letter-spacing: .4px; text-transform: uppercase;
}
.nav a {
  padding: 10px 11px; border-radius: 12px; font-size: 14px; color: #c3cee4;
  position: relative; transition: background .16s ease, color .16s ease, transform .12s ease;
}
.nav a .ni { display: grid; place-items: center; width: 26px; height: 26px; }
.nav a .ni .ic { width: 19px; height: 19px; opacity: .92; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; transform: translateX(-2px); }
.nav a.active {
  background: linear-gradient(135deg, rgba(59,91,253,.95), rgba(124,58,237,.92));
  color: #fff; box-shadow: 0 12px 28px -12px rgba(59,91,253,.95), inset 0 1px 0 rgba(255,255,255,.25);
}
.nav a.active::after {
  content: ''; position: absolute; inset-inline-start: -13px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 22px; border-radius: 0 6px 6px 0; background: #8ea6ff;
  box-shadow: 0 0 14px 2px rgba(142,166,255,.8);
}
.nav a.active .ni .ic { opacity: 1; }
.nav a .count {
  margin-inline-start: auto; background: #e5484d; color: #fff; font-style: normal;
  font-size: 11px; padding: 1px 7px; border-radius: 999px; box-shadow: 0 4px 12px -4px rgba(229,72,77,.9);
}
.sidebar-foot {
  margin-top: auto; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px; padding: 11px 13px; backdrop-filter: blur(6px);
}
.sf-name { font-size: 13.5px; color: #fff; font-weight: 600; }
.sf-role { font-size: 11.5px; color: #8ea0c4; }

/* ---------- نوار بالا ---------- */
.topbar {
  padding: 11px 22px; background: rgba(255,255,255,.82); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line); gap: 14px;
}
.topbar h1 { font-size: 17px; font-weight: 700; }
.tb-title p { margin: 1px 0 0; font-size: 12.5px; color: var(--ink-3); }
.burger { display: none; background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 7px 9px; color: var(--ink-2); }
.tb-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.stat-chip {
  display: inline-flex; align-items: baseline; gap: 6px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; box-shadow: var(--shadow-xs);
}
.stat-chip b { font-size: 14px; color: var(--brand); }
.stat-chip small { font-size: 11.5px; color: var(--ink-3); }
.chip {
  display: inline-flex; align-items: center; gap: 7px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 12.5px;
  color: var(--ink-2); box-shadow: var(--shadow-xs);
}
.chip.school span { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.user { padding: 4px 12px 4px 6px; gap: 9px; }
.chip.user .av {
  width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center;
  background: var(--brand-soft); font-size: 17px; box-shadow: inset 0 0 0 1px rgba(59,91,253,.14);
}
.cu-meta { display: grid; line-height: 1.45; text-align: start; }
.cu-meta b { font-size: 12.8px; color: var(--ink); }
.cu-meta small { font-size: 11px; color: var(--ink-3); }

/* ---------- محتوا و کارت‌ها ---------- */
.content { padding: 24px; max-width: 1320px; }
.card {
  border-radius: var(--radius); border: 1px solid var(--line); padding: 20px;
  box-shadow: var(--shadow); background: var(--panel);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card:hover { box-shadow: var(--shadow-lg); }
.card h3 { font-size: 15.5px; font-weight: 700; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h3 { margin: 0; }
.card-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-3); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { font-size: 23px; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); font-size: 13.5px; }
.grid { gap: 16px; }
.grid.k3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.k4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

/* کارت‌های آماری */
.stat, .stat-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); display: grid; gap: 2px;
}
.stat b, .stat-card b { font-size: 24px; font-weight: 800; color: var(--ink); letter-spacing: -.5px; }
.stat span, .stat-card span { font-size: 12.5px; color: var(--ink-3); }
.stat .ic, .stat-card .ic { color: var(--brand); }

/* ---------- دکمه‌ها ---------- */
.btn {
  border-radius: 12px; padding: 10px 17px; font-size: 13.8px; font-weight: 600;
  background: linear-gradient(135deg, var(--brand) 0%, #5b46f0 100%); color: #fff;
  border: 1px solid transparent; box-shadow: 0 10px 22px -10px rgba(59,91,253,.85);
  transition: transform .14s ease, box-shadow .18s ease, filter .18s ease;
  display: inline-flex; align-items: center; gap: 8px; line-height: 1.7;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 16px 30px -12px rgba(59,91,253,.95); filter: saturate(1.05); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: var(--panel); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-xs); }
.btn.ghost:hover { background: #f8faff; border-color: #d7e0f4; }
.btn.gray { background: #eef1f8; color: var(--ink-2); box-shadow: none; border-color: #e4e9f4; }
.btn.soft { background: var(--brand-soft); color: var(--brand); box-shadow: none; }
.btn.bad { background: linear-gradient(135deg, #f2555a, #dc2626); box-shadow: 0 10px 22px -12px rgba(220,38,38,.85); }
.btn.sm { padding: 7px 12px; font-size: 12.8px; border-radius: 10px; }
.btn.block { width: 100%; justify-content: center; }
.btn[disabled], .btn.disabled { opacity: .6; pointer-events: none; }

/* ---------- نشان‌ها ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 11px;
  font-size: 12px; font-weight: 600; background: #eef1f8; color: var(--ink-2); border: 1px solid transparent;
}
.badge.ok { background: var(--ok-soft); color: #0a7d57; }
.badge.bad { background: var(--bad-soft); color: #b42318; }
.badge.medium, .badge.warn { background: var(--warn-soft); color: #96620a; }
.badge.gray { background: #eef1f8; color: var(--ink-2); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }

/* ---------- پیام‌ها و راهنماها ---------- */
.notice { border-radius: 14px; padding: 13px 16px; display: flex; gap: 10px; align-items: flex-start; font-size: 13.6px; border: 1px solid; }
.notice.info { background: var(--info-soft); border-color: #d3e2ff; color: #1b4bb8; }
.notice.ok { background: var(--ok-soft); border-color: #c3eddc; color: #08674a; }
.notice.bad { background: var(--bad-soft); border-color: #f8d2d3; color: #a41f24; }
.notice.medium, .notice.warn { background: var(--warn-soft); border-color: #f7e0b5; color: #8a5a06; }
.hint {
  display: flex; gap: 9px; align-items: flex-start; background: #f7f9ff; border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; font-size: 13.2px; color: var(--ink-2);
}
.hint > span:first-child, .hint .ic { color: var(--brand); }
.empty { text-align: center; color: var(--ink-3); padding: 26px 12px; font-size: 13.5px; }
.empty .big { font-size: 34px; margin-bottom: 6px; }
.muted { color: var(--ink-2); }
.tiny { font-size: 12px; color: var(--ink-3); }

/* ---------- جدول‌ها ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: 13.6px; }
thead th {
  background: #f8faff; color: var(--ink-2); font-size: 12.4px; font-weight: 700; text-align: start;
  padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0;
}
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafcff; }
.table-wrap .num, td.num { font-variant-numeric: tabular-nums; }

/* ---------- فرم‌ها ---------- */
label { font-size: 12.8px; font-weight: 600; color: var(--ink-2); }
input[type=text], input[type=password], input[type=number], input[type=email], input[type=tel],
input[type=date], input[type=search], input[type=url], select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px;
  background: #fbfcff; font-size: 13.8px; color: var(--ink); transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input:hover, select:hover, textarea:hover { border-color: #d9e2f3; }
input:focus, select:focus, textarea:focus { outline: 0; background: #fff; border-color: #b9c8f5; box-shadow: var(--ring); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8b96ad 50%), linear-gradient(135deg, #8b96ad 50%, transparent 50%); background-position: calc(0% + 14px) 50%, calc(0% + 19px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; accent-color: var(--brand); vertical-align: -3px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------- نوارهای پیشرفت ---------- */
.bar { background: #eef2fa; border-radius: 999px; height: 9px; overflow: hidden; }
.bar > i, .bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.bar.ok > i, .bar.ok > span { background: linear-gradient(90deg, #12b886, #0ea472); }
.bar.warn > i, .bar.warn > span { background: linear-gradient(90deg, #f7b955, #e08c07); }
.bar.bad > i, .bar.bad > span { background: linear-gradient(90deg, #f87171, #dc2626); }

/* ---------- فهرست‌ها و آواتار ---------- */
.list-item {
  display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--panel); transition: border-color .16s ease, box-shadow .16s ease;
}
.list-item:hover { border-color: #d7e0f4; box-shadow: var(--shadow-xs); }
.avatar {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--brand-soft), var(--brand-soft-2)); font-size: 19px;
  box-shadow: inset 0 0 0 1px rgba(59,91,253,.1);
}

/* ---------- کلاس آنلاین / تخته ---------- */
.room { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 16px; }
.room-side { display: grid; gap: 14px; align-content: start; }
.board-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.board-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 11px 14px; border-bottom: 1px solid var(--line); background: #fbfcff; }
canvas#board { display: block; width: 100%; height: auto; background: #fff; touch-action: none; cursor: crosshair; }
.swatch { width: 24px; height: 24px; border-radius: 9px; display: inline-block; cursor: pointer; box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px var(--line); transition: transform .12s ease; }
.swatch:hover { transform: scale(1.08); }
.swatch.active { box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--brand); }
.participants { display: grid; gap: 7px; max-height: 340px; overflow-y: auto; }
.p-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 12px; background: #f8faff; border: 1px solid var(--line-2); font-size: 13.2px; }
.p-item .av { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: #fff; }
.p-item .hand-flag { margin-inline-start: auto; }
.p-item.offline { opacity: .55; }
.chat-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.chat-head { padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 14px; background: #fbfcff; }
.chat-body { padding: 12px; display: grid; gap: 8px; max-height: 380px; overflow-y: auto; }
.chat-line { font-size: 13.3px; padding: 8px 11px; border-radius: 12px; background: #f6f8fd; line-height: 1.85; }
.chat-line .who { font-weight: 700; color: var(--brand); }
.chat-line.system { background: var(--brand-soft); color: #37479b; text-align: center; font-size: 12.4px; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; }
.live-dot { display: inline-flex; align-items: center; gap: 7px; background: var(--bad-soft); color: #b42318; border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 600; }
.live-dot i { width: 8px; height: 8px; border-radius: 50%; background: #e5484d; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }

/* ---------- صفحهٔ ورود و بررسی سلامت ---------- */
.auth-body { display: grid; place-items: center; padding: 26px; min-height: 100vh; }
.auth-card { width: 100%; max-width: 430px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 30px 28px; }
.auth-logo { width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center; font-size: 30px; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 16px 34px -14px rgba(74,74,255,.85); }
.auth-logo .ic { width: 32px; height: 32px; }
.health-table tr.ok td:first-child { color: var(--ok); }

/* ---------- جزئیات ریز طراحی ---------- */
.auth-aside-foot, .app-foot { font-size: 12px; color: var(--ink-3); }
.health-wrap .card + .card { margin-top: 16px; }
.health-wrap .stat b { font-size: 22px; }
.table-wrap + .table-wrap { margin-top: 14px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.cu-meta { max-width: 150px; }

/* ---------- واکنش‌گرایی ---------- */
@media (max-width: 1180px) {
  .grid.k4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .room { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 980px) {
  .grid.k3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  aside.sidebar {
    position: fixed; inset-block: 0; inset-inline-end: 0; width: 274px; z-index: 60;
    transform: translateX(105%); transition: transform .26s cubic-bezier(.4,0,.2,1); height: 100vh;
  }
  body.nav-open aside.sidebar { transform: none; }
  body.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(9,15,30,.45); z-index: 55; backdrop-filter: blur(2px); }
  .burger { display: inline-flex; }
  .content { padding: 18px; }
  .chip.school { display: none; }
}
@media (max-width: 700px) {
  .grid.k2, .grid.k3, .grid.k4 { grid-template-columns: minmax(0,1fr); }
  .page-head { align-items: flex-start; }
  .tb-actions .stat-chip small { display: none; }
  .cu-meta { display: none; }
  .chip.user { padding: 4px; }
  .topbar { padding: 10px 14px; }
  .content { padding: 14px; }
  .card { padding: 16px; border-radius: 16px; }
}
@media print {
  .sidebar, .topbar, .app-foot, .yarco-fab, .chat-box { display: none !important; }
  .content { max-width: 100%; padding: 0; }
  .card { box-shadow: none; border-color: #ddd; }
}

/* ==========================================================================
   یارکو — عروسک همراه (آواتار متحرک)، پنل گفتگو، صدا و انتخاب کاراکتر
   ========================================================================== */
.yarco-dock {
  position: fixed; z-index: 70; width: 96px; height: 96px; touch-action: none;
  transition: width .2s ease, height .2s ease;
}
.yarco-dock.size-sm { width: 72px;  height: 72px; }
.yarco-dock.size-lg { width: 124px; height: 124px; }
.yarco-dock.size-xl { width: 156px; height: 156px; }

.yarco-fab {
  position: relative; width: 100%; height: 100%; border: 0; padding: 0; background: transparent;
  cursor: grab; display: block; filter: drop-shadow(0 14px 22px rgba(15,23,42,.28));
}
.yarco-dock.dragging .yarco-fab { cursor: grabbing; filter: drop-shadow(0 20px 26px rgba(15,23,42,.34)); }
.mascot-wrap { display: block; width: 100%; height: 100%; }
.mascot-svg { width: 100%; height: 100%; overflow: visible; }

/* سایهٔ زیر عروسک */
.mascot-shadow {
  position: absolute; left: 50%; bottom: -4px; width: 52%; height: 9px; transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(15,23,42,.22), transparent 70%); pointer-events: none;
}

/* ---- جان بخشیدن به عروسک‌ها ---- */
.m-float { animation: mFloat 3.6s ease-in-out infinite; transform-origin: 60px 96px; }
@keyframes mFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.m-eye { animation: mBlink 4.4s infinite; transform-origin: center; }
@keyframes mBlink { 0%,92%,100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
.m-lids { opacity: 0; animation: mLids 4.4s infinite; }
@keyframes mLids { 0%,92%,100% { opacity: 0; } 95%,97% { opacity: 1; } }
.m-mouth-b { display: none; }
.mascot-svg .m-arm-a { transform-origin: 30px 70px; animation: mArmA 3s ease-in-out infinite; }
.mascot-svg .m-arm-b { transform-origin: 90px 70px; animation: mArmB 3.4s ease-in-out infinite; }
@keyframes mArmA { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-7deg); } }
@keyframes mArmB { 0%,100% { transform: rotate(0); } 50% { transform: rotate(7deg); } }
.m-gear { animation: mSpin 6s linear infinite; transform-origin: center; }
@keyframes mSpin { to { transform: rotate(360deg); } }

/* حالت‌ها */
.yarco-fab.is-talking .m-mouth-a { display: none; }
.yarco-fab.is-talking .m-mouth-b { display: block; animation: mTalk .28s infinite alternate; transform-origin: 60px 70px; }
@keyframes mTalk { from { transform: scaleY(.5); } to { transform: scaleY(1.25); } }
.yarco-fab.is-talking .m-float { animation: mTalkFloat 1.1s ease-in-out infinite; }
@keyframes mTalkFloat { 0%,100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-5px) rotate(1.5deg); } }
.yarco-fab.is-thinking .m-gear { animation-duration: .9s; }
.yarco-fab.is-thinking .m-eye { animation: mLookUp 1.2s ease-in-out infinite; }
@keyframes mLookUp { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }
.yarco-fab.is-listening .m-ear-a { animation: mWiggle .5s infinite alternate; }
.yarco-fab.is-listening .m-ear-b { animation: mWiggleR .5s infinite alternate; }
@keyframes mWiggle { to { transform: translateX(-2px) rotate(-8deg); } }
@keyframes mWiggleR { to { transform: translateX(2px) rotate(8deg); } }

/* حلقهٔ احاطه‌کننده + وضعیت */
.mascot-ring {
  position: absolute; inset: 6%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(59,91,253,.20), transparent 68%);
  animation: mRing 5s ease-in-out infinite; opacity: .9;
}
@keyframes mRing { 0%,100% { transform: scale(1); opacity: .55; } 50% { transform: scale(1.1); opacity: 1; } }
.mascot-status { position: absolute; inset-inline-end: 4px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(255,255,255,.85); }
.mascot-status.is-thinking { background: #f59e0b; animation: mPulse 1s infinite; }
.mascot-status.is-talking { background: #3b5bfd; animation: mPulse .7s infinite; }
.mascot-status.is-listening { background: #ef4444; animation: mPulse .5s infinite; }
@keyframes mPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.35); } }
.yarco-fab.busy .mascot-ring { animation-duration: 1.2s; }

/* حباب پیام خوش‌آمد */
.yarco-bubble {
  position: absolute; bottom: calc(100% + 8px); inset-inline-end: 4px; width: max-content; max-width: 250px;
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 16px 16px 4px 16px;
  padding: 11px 13px; font-size: 12.8px; line-height: 1.9; box-shadow: 0 18px 40px -18px rgba(15,23,42,.45);
  opacity: 0; transform: translateY(8px) scale(.96); transition: .25s; pointer-events: none; cursor: pointer;
}
.yarco-bubble.show { opacity: 1; transform: none; pointer-events: auto; }
.yarco-bubble .yb-close { position: absolute; top: 4px; inset-inline-start: 6px; font-style: normal; color: var(--ink-3); font-size: 15px; }

/* دکمه‌های شناور اطراف عروسک */
.yarco-actions {
  position: absolute; inset-block-start: 50%; inset-inline-end: calc(100% + 8px); transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 6px; opacity: 0; pointer-events: none; transition: .2s;
}
.yarco-dock:hover .yarco-actions, .yarco-dock.panel-open .yarco-actions { opacity: 1; pointer-events: auto; }
.ya-btn {
  width: 34px; height: 34px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.96);
  color: var(--ink-2); display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 18px -10px rgba(15,23,42,.5);
}
.ya-btn:hover { background: var(--brand); color: #fff; border-color: transparent; }
@media (max-width: 700px) { .yarco-actions { inset-inline-end: auto; inset-inline-start: calc(100% + 6px); } }

/* ---- پنل گفتگو ---- */
.yarco-panel {
  position: fixed; z-index: 90; width: 372px; max-width: calc(100vw - 24px);
  height: min(500px, calc(100vh - 150px)); max-height: calc(100vh - 30px);
  background: #fff; border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 30px 70px -26px rgba(15,23,42,.55);
}
.yarco-panel.pop { animation: yPop .24s ease; }
@keyframes yPop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.yarco-panel.sheet { width: calc(100vw - 16px); height: min(72vh, 560px); }
.yarco-head {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px; color: #fff;
  background: linear-gradient(120deg, #0a1020, #101b34 55%, #2b3d92);
}
.yarco-head .av { width: 40px; height: 40px; border-radius: 14px; background: rgba(255,255,255,.14); padding: 3px; }
.yarco-head b { font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.yarco-body { flex: 1; overflow-y: auto; padding: 14px; background: linear-gradient(180deg, #f7f9ff, #fff 40%); display: flex; flex-direction: column; gap: 10px; }
.yarco-body .msg { display: flex; flex-direction: column; max-width: 92%; }
.yarco-body .msg.bot { align-self: flex-start; align-items: flex-start; }
.yarco-body .msg.me { align-self: flex-end; align-items: flex-end; }
.yarco-body .bubble {
  padding: 10px 13px; border-radius: 16px 16px 16px 5px; font-size: 13.4px; line-height: 2; white-space: pre-wrap;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 20px -16px rgba(15,23,42,.4);
}
.yarco-body .msg.me .bubble { background: linear-gradient(120deg, var(--brand), #6d7dff); color: #fff; border: 0; border-radius: 16px 16px 5px 16px; }
.msg-tools { display: flex; gap: 6px; margin-top: 5px; opacity: 0; transition: .2s; }
.yarco-body .msg:hover .msg-tools { opacity: 1; }
.mini-btn { font-family: inherit; font-size: 11px; border: 1px solid var(--line); background: #fff; color: var(--ink-3); border-radius: 9px; padding: 3px 7px; cursor: pointer; }
.mini-btn:hover { color: var(--brand); border-color: var(--brand); }
.bubble.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.bubble.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: tBounce 1s infinite; }
.bubble.typing i:nth-child(2) { animation-delay: .15s; }
.bubble.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tBounce { 0%,60%,100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.practice-cta { align-self: flex-start; margin-top: 2px; text-decoration: none; }

.yarco-foot { border-top: 1px solid var(--line); padding: 9px 11px 11px; background: #fff; }
.yr-tools { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.yr-tools .spacer { flex: 1; }
.tool-btn {
  display: inline-flex; align-items: center; gap: 5px; font-family: inherit; font-size: 11.6px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 11px; padding: 5px 9px;
}
.tool-btn:hover { border-color: var(--brand); color: var(--brand); }
.tool-btn.active { background: rgba(59,91,253,.1); border-color: var(--brand); color: var(--brand); }
.yr-form { display: flex; align-items: center; gap: 7px; }
.yr-form input#yarcoInput {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 14px; padding: 10px 13px; font-family: inherit;
  font-size: 13.4px; background: #f8faff;
}
.yr-form input#yarcoInput:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); background: #fff; }
.mic-fab, .send-fab {
  width: 40px; height: 40px; border-radius: 14px; border: 0; cursor: pointer; display: grid; place-items: center; flex: none;
}
.mic-fab { background: #eef2ff; color: var(--brand); }
.mic-fab:hover { background: #e0e7ff; }
.send-fab { background: linear-gradient(120deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 10px 20px -12px rgba(59,91,253,.9); }
.send-fab:hover { filter: brightness(1.06); }
.yr-rec { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--danger, #ef4444); }
.yr-rec i { width: 9px; height: 9px; border-radius: 50%; background: #ef4444; animation: mPulse .8s infinite; }
.yr-rec b { font-weight: 700; }
.yr-rec span { color: var(--ink-3); }

/* پیشنهادهای سریع */
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip-btn {
  font-family: inherit; font-size: 11.8px; border: 1px dashed rgba(59,91,253,.45); color: var(--brand);
  background: rgba(59,91,253,.06); border-radius: 20px; padding: 5px 11px; cursor: pointer;
}
.chip-btn:hover { background: rgba(59,91,253,.14); }

/* ---- کارت انتخاب عروسک ---- */
.yarco-picker {
  position: fixed; z-index: 92; width: 380px; max-width: calc(100vw - 24px); background: #fff;
  border: 1px solid var(--line); border-radius: 20px; padding: 14px; box-shadow: 0 30px 70px -26px rgba(15,23,42,.5);
}
.yp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.yp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.yp-item {
  border: 1px solid var(--line); background: #fbfcff; border-radius: 15px; padding: 9px 6px 7px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px; font-family: inherit; transition: .18s;
}
.yp-item:hover { border-color: var(--brand); transform: translateY(-2px); }
.yp-item.active { border-color: var(--brand); background: rgba(59,91,253,.08); box-shadow: 0 0 0 3px var(--ring); }
.yp-item .yp-av { width: 54px; height: 54px; display: block; }
.yp-item b { font-size: 12px; color: var(--ink); }
.yp-item small { font-size: 10.4px; color: var(--ink-3); }
@media (max-width: 700px) {
  .yp-grid { grid-template-columns: repeat(2, 1fr); }
  .yarco-panel { width: calc(100vw - 16px); }
}
@media print { .yarco-dock, .yarco-panel, .yarco-picker { display: none !important; } }

/* ---- صفحهٔ گفتگوی تمام‌صفحهٔ یارکو ---- */
.yc-side .yc-me { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.yc-side .yc-me-av { width: 62px; height: 62px; flex: none; display: block; }
.yc-main { display: flex; flex-direction: column; min-height: 560px; }
.yc-area { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 12px;
  background: linear-gradient(180deg, #f7f9ff, #fff 45%); border-radius: 14px; max-height: 60vh; }
.yc-area .msg { display: flex; flex-direction: column; max-width: 84%; }
.yc-area .msg.bot { align-self: flex-start; }
.yc-area .msg.me { align-self: flex-end; align-items: flex-end; }
.yc-area .bubble { padding: 10px 13px; border-radius: 16px 16px 16px 5px; font-size: 13.4px; line-height: 2;
  background: #fff; border: 1px solid var(--line); white-space: pre-wrap; }
.yc-area .msg.me .bubble { background: linear-gradient(120deg, var(--brand), #6d7dff); color: #fff; border: 0;
  border-radius: 16px 16px 5px 16px; }
@media (max-width: 980px) { #ycMain { grid-template-columns: minmax(0,1fr) !important; } }

/* وقتی عروسک در نیمهٔ چپ صفحه است، حباب و دکمه‌ها به سمت راست باز می‌شوند (و برعکس) */
.yarco-dock.dock-left .yarco-bubble { inset-inline-start: 4px; inset-inline-end: auto; border-radius: 16px 16px 16px 4px; }
.yarco-dock.dock-left .yarco-actions { inset-inline-start: calc(100% + 8px); inset-inline-end: auto; }
.yarco-dock.dock-left .mascot-shadow { transform: translateX(-50%); }

/* ══════════ نسخهٔ ۱.۴ — فازهای ۶ تا ۸: زنگ اعلان، پیام‌ها، کارنامه، مشاوره ══════════ */
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 12px; background: #f1f5f9; color: #334155; text-decoration: none; border: 1px solid var(--line); transition: .18s; }
.bell:hover { background: #e2e8f0; color: var(--brand); }
.bell svg { width: 19px; height: 19px; }
.bell-count { position: absolute; top: -6px; inset-inline-end: -6px; min-width: 19px; height: 19px; padding: 0 4px;
  border-radius: 999px; background: #ef4444; color: #fff; font-size: 11px; font-style: normal; font-weight: 700;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(239,68,68,.5); }
.bell-count.hide { display: none; }
.bell-drop { position: absolute; top: 46px; inset-inline-end: 0; width: 340px; max-width: 84vw; background: #fff;
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgba(15,23,42,.18); padding: 10px; z-index: 95; text-align: start; }
.bell-drop .bd-item { display: block; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: inherit; }
.bell-drop .bd-item:hover { background: #f8fafc; }
.bell-drop .bd-item b { font-size: 13px; display: block; }
.bell-drop .bd-item span { font-size: 11.5px; color: var(--muted); }
.bell-drop .bd-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.bell-drop .bd-empty { padding: 14px; text-align: center; color: var(--muted); font-size: 12.5px; }

/* کارنامه و گزارش‌ها */
.report-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.rep-sec { border-inline-start: 4px solid var(--brand); padding-inline-start: 12px; margin: 18px 0 8px; }
.timeline-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.risk-high { color: #b91c1c; }
.risk-medium { color: #b45309; }
.risk-low { color: #047857; }

/* پیام‌ها */
.thread-list a { display: block; text-decoration: none; color: inherit; }
.tmsg-note { font-size: 11.5px; color: var(--muted); }

/* نوبت‌دهی */
.slot-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fff; }
.slot-card.busy { background: #fff7ed; border-color: #fed7aa; }
.slot-time { font-weight: 700; font-size: 14px; }

/* چاپ: پنهان‌کردن عناصر رابط در نسخهٔ چاپی صفحه‌های داخلی */
@media print {
  .sidebar, .topbar, .app-foot, .yarco-dock, .yarco-panel, .bell, .btn { display: none !important; }
  .main, .content { padding: 0 !important; margin: 0 !important; }
  .card { box-shadow: none !important; border: 1px solid #e5e7eb !important; break-inside: avoid; }
}

/* کارت‌های شاخص (kpi) — عدد درشت بالا و برچسب زیر آن (اصلاح چسبندگی متن) */
.kpi > b { display: block; font-size: 23px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.kpi > span { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }
.kpi > b + span { margin-top: 2px; }

/* ── پنل «صدای یارکو» (نسخهٔ ۱.۴.۲): آزمون موتور صدا + انتخاب صدای مرورگر ── */
.yv-box { margin: 6px 8px 2px; padding: 10px 11px; border-radius: 12px; background: #f6f8ff; border: 1px solid #dbe3ff; }
.yv-box .yv-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.yv-box .yv-head b { font-size: 13px; color: #1f2a63; }
.yv-box .yv-row { display: flex; align-items: center; gap: 8px; margin-top: 7px; flex-wrap: wrap; }
.yv-box select { padding: 6px 8px; border-radius: 9px; border: 1px solid #cfd8f5; background: #fff; font-family: inherit; font-size: 12.5px; min-width: 0; }
.yv-box #yvResult { font-size: 11.5px; }
@media (max-width: 700px) { .yv-box { margin: 6px 6px 2px; } .yv-box .yv-row { gap: 6px; } }
