/* کیوژن (QGene) — رابط کاربری */
@font-face {
  font-family: 'Vazirmatn';
  src: url('fonts/Vazirmatn[wght].woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --border: #e3e6eb;
  --text: #1c2430;
  --muted: #6b7482;
  --primary: #1f4e79;
  --primary-2: #2c6aa0;
  --primary-soft: #e8f0f8;
  --accent: #b8892c;
  --success: #1e7d4f;
  --success-soft: #e5f4ec;
  --warning: #a86500;
  --warning-soft: #fdf1dc;
  --danger: #b3261e;
  --danger-soft: #fbe9e7;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --sidebar: 240px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Vazirmatn', Tahoma, 'Segoe UI', sans-serif;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--primary-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.4; margin: 0 0 .6rem; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
.ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.right { text-align: left; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }

/* ---------- چیدمان ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar);
  flex-shrink: 0;
  background: #14324f;
  color: #dbe5ef;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 1rem .75rem;
}
.brand { display: flex; align-items: center; gap: .6rem; padding: .25rem .5rem 1rem; color: #fff; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 8px; background: var(--accent);
  display: grid; place-items: center; font-weight: 800; color: #14324f;
}
.brand b { display: block; font-size: 1rem; }
.brand span { font-size: .75rem; color: #9fb3c8; }
.nav a {
  display: flex; align-items: center; justify-content: space-between;
  color: #dbe5ef; padding: .5rem .75rem; border-radius: 8px; margin-bottom: 2px;
}
.nav a:hover { background: rgba(255, 255, 255, .07); text-decoration: none; }
.nav a.active { background: rgba(255, 255, 255, .14); color: #fff; font-weight: 600; }
.nav .sep { font-size: .75rem; color: #8aa1b8; padding: .9rem .75rem .25rem; }
.count {
  background: var(--accent); color: #14324f; border-radius: 99px; font-size: .72rem;
  min-width: 1.4rem; padding: 0 .4rem; text-align: center; font-weight: 700; line-height: 1.4rem;
}
.main { flex: 1; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: .6rem 1.5rem; position: sticky; top: 0; z-index: 5;
}
.topbar .who { color: var(--muted); font-size: .9rem; }
.topbar .actions { display: flex; align-items: center; gap: .5rem; }
.menu-toggle { display: none; }
.content { padding: 1.5rem; max-width: 1280px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }

/* ---------- کارت و گرید ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.1rem 1.25rem; margin-bottom: 1rem;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem 1rem; }
.stat .label { color: var(--muted); font-size: .82rem; }
.stat .value { font-size: 1.2rem; font-weight: 700; }
.stat .value small { font-size: .75rem; font-weight: 400; color: var(--muted); }
.stat.good .value { color: var(--success); }
.stat.bad .value { color: var(--danger); }
.stat.warn .value { color: var(--warning); }

/* ---------- جدول ---------- */
.table-wrap { overflow-x: auto; margin: 0 -1.25rem; padding: 0 1.25rem; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .55rem .6rem; text-align: right; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: .8rem; color: var(--muted); font-weight: 600; background: var(--surface-2); white-space: nowrap; }
tbody tr:hover { background: #fafbfc; }
tfoot td { font-weight: 700; background: var(--surface-2); }
td.actions { white-space: nowrap; }

/* ---------- نشان‌ها ---------- */
.badge { display: inline-block; padding: 0 .55rem; border-radius: 99px; font-size: .78rem; line-height: 1.6rem; white-space: nowrap; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.badge.pending, .badge.open, .badge.partial { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.badge.approved, .badge.paid, .badge.done, .badge.settled { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge.rejected, .badge.overdue, .badge.debt { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge.info { background: var(--primary-soft); color: var(--primary); border-color: transparent; }

/* ---------- دکمه ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  border: 1px solid var(--primary); background: var(--primary); color: #fff;
  font: inherit; font-size: .9rem; padding: .42rem .95rem; border-radius: 8px; cursor: pointer;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--primary-2); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--primary); }
.btn.ghost:hover { background: var(--primary-soft); }
.btn.success { background: var(--success); border-color: var(--success); }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn.danger.ghost { background: transparent; color: var(--danger); }
.btn.sm { padding: .15rem .6rem; font-size: .8rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.link-btn { background: none; border: 0; color: var(--primary-2); cursor: pointer; font: inherit; padding: 0; }
form.inline { display: inline; }

/* ---------- فرم ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .25rem 1rem; }
.field { margin-bottom: .8rem; }
.field.full { grid-column: 1 / -1; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .25rem; }
.input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: #fff;
  border: 1px solid #cdd3dc; border-radius: 8px; padding: .45rem .7rem;
}
.input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary-2); }
input[type=file].input { padding: .35rem; }
input[dir=ltr] { text-align: left; }
.help { font-size: .78rem; color: var(--muted); margin-top: .2rem; }
.errors, .errorlist { color: var(--danger); font-size: .82rem; margin: .2rem 0 0; padding: 0; list-style: none; }
.money-words { font-size: .78rem; color: var(--success); min-height: 1.2em; margin-top: .15rem; }
.checks ul, ul.checks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .25rem; }
.checks label, .check { font-weight: 400; display: flex; gap: .4rem; align-items: center; }
.search-filter { margin-bottom: .3rem; font-size: .85rem; }
.radios > div, .radios ul { display: flex; gap: .5rem; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.radios label { display: flex; align-items: center; gap: .4rem; font-weight: 600; border: 1px solid var(--border);
  border-radius: 8px; padding: .45rem .9rem; cursor: pointer; background: var(--surface); }
.radios label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.field[hidden] { display: none; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: end; margin-bottom: 1rem; }
.filters .input, .filters select { width: auto; min-width: 160px; }
.tabs { display: flex; gap: .25rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tabs a { padding: .3rem .8rem; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: .88rem; }
.tabs a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.tabs a:hover { text-decoration: none; }

/* ---------- پیام‌ها ---------- */
.alerts { margin-bottom: 1rem; }
.alert { padding: .65rem 1rem; border-radius: 8px; margin-bottom: .5rem; border: 1px solid transparent; }
.alert.success { background: var(--success-soft); color: var(--success); }
.alert.error { background: var(--danger-soft); color: var(--danger); }
.alert.warning { background: var(--warning-soft); color: var(--warning); }
.alert.info { background: var(--primary-soft); color: var(--primary); }

/* ---------- پیشرفت و مراحل ---------- */
.progress { height: 8px; background: #e7ebf0; border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary-2); border-radius: 99px; }
.progress.money > span { background: var(--success); }
.stepper { display: flex; gap: 0; margin: .5rem 0 1rem; overflow-x: auto; padding-bottom: .25rem; }
.step { flex: 1; min-width: 72px; text-align: center; position: relative; font-size: .8rem; color: var(--muted); }
.step::before { content: ''; position: absolute; top: 13px; left: 50%; width: 100%; height: 3px; background: #dfe4ea; z-index: 0; }
.step:first-child::before { display: none; }
.step .dot { width: 28px; height: 28px; border-radius: 50%; background: #dfe4ea; color: #fff; display: grid; place-items: center; margin: 0 auto .3rem; position: relative; z-index: 1; font-weight: 700; font-size: .8rem; }
.step.done .dot, .step.done::before, .step.current::before { background: var(--success); }
.step.current .dot { background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.step.current { color: var(--text); font-weight: 700; }
.step.done { color: var(--text); }

/* ---------- فایل‌ها و گفتگو ---------- */
.file-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .6rem 0; border-bottom: 1px dashed var(--border); flex-wrap: wrap; }
.file-row:last-child { border-bottom: 0; }
.file-name { font-weight: 600; word-break: break-all; }
.locked { display: inline-flex; gap: .35rem; align-items: center; color: var(--danger); font-size: .85rem; }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-2); display: grid; place-items: center; font-size: .7rem; color: var(--muted); }
.receipt-cell { display: flex; gap: .75rem; align-items: center; }
.thread { display: flex; flex-direction: column; gap: .6rem; max-height: 60vh; overflow-y: auto; padding: .25rem; }
.bubble { max-width: 80%; padding: .6rem .9rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); white-space: pre-line; }
.bubble.me { align-self: flex-start; background: var(--primary-soft); border-color: transparent; }
.bubble.them { align-self: flex-end; }
.bubble .meta { font-size: .72rem; color: var(--muted); margin-top: .25rem; }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: .5rem 0; border-bottom: 1px solid var(--border); }
.list-plain li:last-child { border-bottom: 0; }
.unread { background: var(--primary-soft); }
.empty { color: var(--muted); text-align: center; padding: 1.25rem; font-size: .9rem; }
.bar { height: 10px; border-radius: 4px; }
.bar.in { background: var(--success); }
.bar.out { background: #d9822b; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.pagination { display: flex; gap: .5rem; justify-content: center; margin-top: 1rem; align-items: center; }
.card-info { background: linear-gradient(135deg, #14324f, #1f4e79); color: #fff; border: 0; }
.card-info .big { font-size: 1.3rem; font-weight: 700; letter-spacing: 1px; direction: ltr; text-align: center; margin: .3rem 0; }

/* ---------- صفحات ورود ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: linear-gradient(160deg, #14324f 0%, #1f4e79 60%, #2c6aa0 100%); }
.auth-card { width: 100%; max-width: 440px; background: #fff; border-radius: 14px; padding: 1.75rem; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.auth-card .brand { color: var(--text); justify-content: center; padding-bottom: 1.25rem; }
.auth-card .brand span { color: var(--muted); }

/* ---------- موبایل ---------- */
@media (max-width: 1200px) {
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .sidebar { position: fixed; right: 0; top: 0; z-index: 30; transform: translateX(100%); transition: transform .2s; box-shadow: -4px 0 20px rgba(0, 0, 0, .2); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 20; }
  .menu-toggle { display: inline-flex; }
  .content { padding: 1rem; }
  .topbar { padding: .5rem 1rem; }
  .topbar .who { display: none; }
  .card { padding: 1rem; }
  .table-wrap { margin: 0 -1rem; padding: 0 1rem; }
  .bubble { max-width: 92%; }
}
@media print {
  .sidebar, .topbar, .btn, form { display: none !important; }
  .content { padding: 0; }
}

/* =================== نسخهٔ ۲: گرافیکی‌تر =================== */
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ic.lg { width: 26px; height: 26px; }
.ic.xl { width: 34px; height: 34px; stroke-width: 1.6; }

/* سایدبار */
.nav a { justify-content: flex-start; gap: .65rem; padding: .55rem .75rem; }
.nav a span:not(.count) { flex: 1; }
.nav a .ic { opacity: .75; }
.nav a.active .ic { opacity: 1; color: var(--accent); }

/* نوار بالا */
.topbar { padding: .55rem 1.5rem; }
.who { display: flex; align-items: center; gap: .6rem; color: var(--text) !important; }
.who b { display: block; font-size: .9rem; line-height: 1.3; }
.who small { color: var(--muted); font-size: .75rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; font-weight: 800; }
.icon-btn { position: relative; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); display: inline-grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); text-decoration: none; }
.dot-count { position: absolute; top: -6px; left: -6px; background: var(--danger); color: #fff; border-radius: 99px;
  font-size: .68rem; min-width: 18px; height: 18px; line-height: 18px; text-align: center; padding: 0 4px; }
.burger, .burger::before, .burger::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; }
.burger::before, .burger::after { content: ''; position: absolute; }
.burger::before { top: -6px; } .burger::after { top: 6px; }

/* سرتیتر خوشامد */
.hello { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.hello h1 { margin: 0; font-size: 1.4rem; }
.hello .sub { color: var(--muted); font-size: .9rem; }

/* کاشی‌های «کارهای امروز» */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
.tile { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px; color: var(--text); box-shadow: var(--shadow);
  transition: transform .12s, box-shadow .12s; }
.tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(16,24,40,.10); }
.tile .chip { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.tile .n { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.tile .t { font-size: .82rem; color: var(--muted); margin-top: .25rem; }
.tile.zero { opacity: .55; box-shadow: none; }
.tile.zero .n { font-size: 1.1rem; }
.chip.blue { background: #e8f0fb; color: #2a78d6; } .chip.green { background: var(--success-soft); color: var(--success); }
.chip.orange { background: #fdeee7; color: #c4501f; } .chip.red { background: var(--danger-soft); color: var(--danger); }
.chip.violet { background: #efedfb; color: #5847c9; } .chip.gold { background: #fbf3e2; color: #9a6b12; }
.chip.gray { background: var(--surface-2); color: var(--muted); }
.all-clear { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.25rem; border-radius: 14px;
  background: var(--success-soft); color: var(--success); margin-bottom: 1.25rem; font-weight: 600; }

/* کاشی‌های آماری با آیکون */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1rem; display: flex; gap: .8rem; align-items: flex-start; }
.kpi .chip { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.kpi .label { color: var(--muted); font-size: .8rem; }
.kpi .value { font-size: 1.25rem; font-weight: 800; }
.kpi .value small { font-size: .72rem; font-weight: 400; color: var(--muted); }

/* نمودار ستونی */
.chart-card .legend { display: flex; gap: 1rem; font-size: .8rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: .35rem; vertical-align: middle; }
.bars { --c-in: #2a78d6; --c-out: #eb6834; }
.bars svg { width: 100%; height: auto; display: block; overflow: visible; }
.bars .grid line { stroke: #e1e0d9; stroke-width: 1; }
.bars .bar-in { fill: var(--c-in); } .bars .bar-out { fill: var(--c-out); }
.bars .lbl { fill: #898781; font-size: 11px; font-family: inherit; }
.bars .val { fill: #52514e; font-size: 10.5px; font-family: inherit; }
.bars g.m:hover rect { opacity: .85; }
.bars .hit { fill: transparent; }

/* کارت قهرمان دانشجو */
.hero { position: relative; overflow: hidden; border-radius: 18px; padding: 1.4rem 1.5rem; margin-bottom: 1rem; color: #fff;
  background: linear-gradient(135deg, #14324f 0%, #1f4e79 55%, #2c6aa0 100%); box-shadow: 0 10px 30px rgba(20,50,79,.25); }
.hero::after { content: ''; position: absolute; left: -60px; bottom: -80px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.06); }
.hero .kicker { font-size: .82rem; opacity: .8; }
.hero h1 { color: #fff; margin: .2rem 0 .6rem; font-size: 1.35rem; }
.hero .stage-pill { display: inline-flex; align-items: center; gap: .4rem; background: rgba(255,255,255,.15); padding: .3rem .75rem; border-radius: 99px; font-size: .85rem; }
.hero .bar { height: 8px; background: rgba(255,255,255,.2); border-radius: 99px; margin-top: 1rem; overflow: hidden; }
.hero .bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.hero .meta { display: flex; justify-content: space-between; font-size: .8rem; opacity: .85; margin-top: .4rem; }

/* کارت «قدم بعدی» */
.next-step { display: flex; gap: 1rem; align-items: center; padding: 1.1rem 1.25rem; border-radius: 16px; margin-bottom: 1rem;
  border: 2px solid; background: var(--surface); flex-wrap: wrap; }
.next-step .chip { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; }
.next-step .txt { flex: 1; min-width: 200px; }
.next-step .txt b { display: block; font-size: 1.05rem; margin-bottom: .15rem; }
.next-step .txt span { color: var(--muted); font-size: .88rem; }
.next-step.pay { border-color: #f1c9b8; background: #fffaf7; }
.next-step.wait { border-color: var(--primary-soft); }
.next-step.ready { border-color: #bfe3cf; background: #f7fcf9; }
.btn.lg { padding: .65rem 1.4rem; font-size: 1rem; border-radius: 12px; }

/* خط زمانی مراحل */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; gap: 0; }
.timeline li { flex: 1; text-align: center; position: relative; font-size: .8rem; color: var(--muted); padding: 0 .2rem; }
.timeline li::before { content: ''; position: absolute; top: 19px; left: 50%; width: 100%; height: 3px; background: #e3e7ec; }
.timeline li:first-child::before { display: none; }
.timeline .node { width: 40px; height: 40px; border-radius: 50%; margin: 0 auto .45rem; display: grid; place-items: center;
  background: #eef1f5; color: #9aa3ad; position: relative; z-index: 1; border: 3px solid var(--surface); }
.timeline li.done { color: var(--text); }
.timeline li.done .node { background: var(--success); color: #fff; }
.timeline li.done::before, .timeline li.current::before { background: var(--success); }
.timeline li.current { color: var(--primary); font-weight: 700; }
.timeline li.current .node { background: var(--primary); color: #fff; box-shadow: 0 0 0 5px var(--primary-soft); }

/* سنجهٔ پرداخت */
.meter-hero { display: flex; align-items: baseline; gap: .5rem; }
.meter-hero .big { font-size: 2.2rem; font-weight: 800; color: var(--success); line-height: 1; }
.meter { height: 12px; background: #e7ebf0; border-radius: 99px; overflow: hidden; margin: .75rem 0 .5rem; position: relative; }
.meter > span { display: block; height: 100%; background: linear-gradient(90deg, #1e7d4f, #2fa36a); border-radius: 99px; }
.meter .mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #9aa3ad; }
.money-row { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; font-size: .85rem; }
.money-row b { font-size: 1rem; }

/* فهرست فایل با آیکون */
.files .row { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-bottom: 1px dashed var(--border); }
.files .row:last-child { border-bottom: 0; }
.files .row .chip { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.files .row .name { flex: 1; min-width: 0; }
.files .row .name b { display: block; }
.files .row .name span { font-size: .78rem; color: var(--muted); }

.course-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.course-chip { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--border); border-radius: 99px; padding: .3rem .8rem; font-size: .85rem; background: var(--surface); }
.course-chip.done { border-color: #bfe3cf; background: var(--success-soft); color: var(--success); }

.empty-state { text-align: center; padding: 2.25rem 1rem; color: var(--muted); }
.empty-state .ic { width: 48px; height: 48px; color: #b5bdc7; margin-bottom: .5rem; }
.empty-state b { display: block; color: var(--text); font-size: 1.05rem; margin-bottom: .3rem; }
.section-title { display: flex; align-items: center; gap: .5rem; margin: 0 0 .75rem; font-size: 1.05rem; }
.section-title .ic { color: var(--primary-2); }

/* نوار پایین موبایل */
.bottom-nav { display: none; }
@media (max-width: 900px) {
  .who b, .who small { display: none; }
  body.role-student .content, body.role-writer .content, body.role-expert .content { padding-bottom: 5.5rem; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 25; background: var(--surface);
    border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(0,0,0,.06); padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom)); }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .15rem; font-size: .72rem;
    color: var(--muted); padding: .35rem 0; position: relative; }
  .bottom-nav a.active { color: var(--primary); font-weight: 700; }
  .bottom-nav a:hover { text-decoration: none; }
  .bottom-nav .dot { position: absolute; top: 4px; left: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
  .timeline { flex-direction: column; gap: .2rem; }
  .timeline li { display: flex; align-items: center; gap: .75rem; text-align: right; padding: .15rem 0; }
  .timeline li::before { top: auto; bottom: 50%; left: auto; right: 18px; width: 3px; height: 100%; }
  .timeline .node { margin: 0; width: 38px; height: 38px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { flex-direction: column; align-items: flex-start; }
  .hello h1 { font-size: 1.2rem; }
}
.icon-btn.menu-toggle { display: none; }
@media (max-width: 900px) { .icon-btn.menu-toggle { display: inline-grid; } }

/* =================== نسخهٔ ۳: یکدست‌سازی همهٔ پنل‌ها =================== */
.page-head h1 { display: flex; align-items: center; gap: .5rem; }
.page-head h1 .ic { color: var(--primary-2); width: 26px; height: 26px; }
.alerts .alert { display: flex; align-items: center; gap: .5rem; animation: slidein .25s ease-out; }
@keyframes slidein { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.alert.fade { transition: opacity .6s; opacity: 0; }

/* زبانه‌های داخل صفحه */
.ptabs { display: flex; gap: .25rem; border-bottom: 2px solid var(--border); margin: 0 0 1rem; overflow-x: auto; position: sticky; top: 58px; background: var(--bg); z-index: 4; }
.ptabs button { background: none; border: 0; font: inherit; padding: .65rem 1rem; color: var(--muted); cursor: pointer; display: flex; gap: .4rem; align-items: center; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.ptabs button.active { color: var(--primary); border-color: var(--primary); font-weight: 700; }
.ptabs button .count { background: var(--primary-soft); color: var(--primary); }
.ptab-panel[hidden] { display: none; }

/* کارت کار در کارتابل */
.task-list { display: grid; gap: .75rem; }
.task-card { display: flex; align-items: center; gap: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.1rem; box-shadow: var(--shadow); flex-wrap: wrap; }
.task-card .chip { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.task-card .body { flex: 1; min-width: 200px; }
.task-card .body b { display: block; font-size: 1rem; }
.task-card .body .meta { font-size: .82rem; color: var(--muted); display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .2rem; }
.due { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .6rem; border-radius: 99px; font-size: .78rem; font-weight: 600; }
.due.ok { background: var(--primary-soft); color: var(--primary); }
.due.soon { background: var(--warning-soft); color: var(--warning); }
.due.late { background: var(--danger-soft); color: var(--danger); }
.due .ic { width: 14px; height: 14px; }

/* گام‌های شماره‌دار (صفحهٔ انجام کار) */
.steps2 { display: grid; gap: 1rem; counter-reset: st; }
.step2 { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.1rem 1.25rem 1.1rem 1.25rem; position: relative; padding-right: 4rem; }
.step2::before { counter-increment: st; content: counter(st, persian); position: absolute; right: 1.1rem; top: 1rem; width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 800; }
.step2.done::before { content: '✓'; background: var(--success); }
.step2 h3 { margin: .2rem 0 .6rem; }

/* مسیر سه‌مرحله‌ای گردش کار */
.pipeline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.pipe { background: var(--surface); border: 2px solid var(--border); border-radius: 16px; padding: 1rem; position: relative; }
.pipe .head { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.pipe .head .chip { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; }
.pipe .head b { font-size: 1rem; }
.pipe .state { font-size: .85rem; }
.pipe .gate { font-size: .78rem; color: var(--muted); margin-top: .4rem; }
.pipe.done { border-color: #bfe3cf; background: #f7fcf9; }
.pipe.open { border-color: #b9d3ee; background: #f6f9fd; }
.pipe.waiting { border-color: #f3d4a8; background: #fffbf3; }
.pipe.next { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.pipe .btn { margin-top: .75rem; }
details.action-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 1rem; }
details.action-panel > summary { list-style: none; cursor: pointer; padding: 1rem 1.25rem; display: flex; align-items: center; gap: .6rem; font-weight: 700; }
details.action-panel > summary::-webkit-details-marker { display: none; }
details.action-panel > summary::after { content: '▾'; margin-right: auto; color: var(--muted); }
details.action-panel[open] > summary::after { content: '▴'; }
details.action-panel > .inner { padding: 0 1.25rem 1.25rem; }

/* کارت شماره کارت با دکمهٔ کپی */
.bank-card { border-radius: 18px; padding: 1.3rem 1.4rem; color: #fff; background: linear-gradient(135deg, #1f4e79, #14324f 60%, #0e2439); box-shadow: 0 10px 28px rgba(20,50,79,.25); }
.bank-card .num { font-size: 1.35rem; letter-spacing: 2px; direction: ltr; text-align: center; margin: .6rem 0; font-weight: 700; }
.bank-card .row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .85rem; opacity: .9; flex-wrap: wrap; }
.copy-btn { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; padding: .25rem .7rem; font: inherit; font-size: .8rem; cursor: pointer; }
.copy-btn.done { background: var(--success); border-color: var(--success); }

/* ورود و ثبت‌نام */
.auth-wrap { background: radial-gradient(circle at 15% 20%, #2c6aa0 0, transparent 45%), radial-gradient(circle at 85% 80%, #b8892c33 0, transparent 40%), linear-gradient(160deg, #0e2439, #14324f 60%, #1f4e79); }
.auth-card { border-radius: 20px; }
.auth-card .brand-mark { width: 46px; height: 46px; font-size: 1.3rem; border-radius: 12px; }
.auth-card .brand b { font-size: 1.25rem; }
.auth-tagline { color: #cfdbe8; text-align: center; margin-top: 1rem; font-size: .85rem; }

/* اعلان‌ها */
.notif { display: flex; gap: .75rem; align-items: flex-start; padding: .75rem .5rem; border-bottom: 1px solid var(--border); }
.notif:last-child { border-bottom: 0; }
.notif .chip { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.notif.unread { background: var(--primary-soft); border-radius: 10px; }

@media (max-width: 900px) {
  .pipeline { grid-template-columns: 1fr; }
  .ptabs { top: 52px; }
  .step2 { padding-right: 3.6rem; }
}
.notif .body { flex: 1; min-width: 0; }
.notif .body a { font-weight: 600; }

@media (max-width: 600px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .kpi { padding: .7rem; gap: .5rem; }
  .kpi > .chip { display: none; }
  .kpi .value { font-size: 1.05rem; }
  .kpi .label { font-size: .75rem; }
  .ptabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .ptabs button { white-space: nowrap; flex-shrink: 0; }
}
.files .row .name span { display: block; }

