/* ===== شاوین — قالب صورتی پاستلی، راست‌چین و ریسپانسیو ===== */

/* اگر فایل فونت وزیرمتن را در static/fonts قرار دهید، به‌صورت خودکار استفاده می‌شود. */
@font-face {
  font-family: 'Vazirmatn';
  src: local('Vazirmatn'), url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: local('Vazirmatn Bold'), url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #fff6f9;
  --surface: #ffffff;
  --pink-50: #fff0f5;
  --pink-100: #ffe3ec;
  --pink-200: #ffd0e0;
  --pink-300: #ffb3cd;
  --primary: #c64d78;
  --primary-dark: #a93b62;
  --ink: #4a2f3c;
  --muted: #8c6f7c;
  --line: #f6d9e4;
  --lavender: #ece3fb;
  --mint: #dcf5ea;
  --peach: #ffe7d6;
  --sky: #dfeefc;
  --ok: #2b7f5c;
  --ok-bg: #dcf5ea;
  --warn: #9a6512;
  --warn-bg: #fff1cc;
  --danger: #b83a3a;
  --danger-bg: #fde4e4;
  --radius: 18px;
  --shadow: 0 8px 24px rgba(198, 77, 120, .10);
  --font: 'Vazirmatn', 'Vazir', 'IRANSans', 'Samim', Tahoma, 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(160deg, #fff6f9 0%, #fdeaf2 55%, #f6ecff 100%) fixed;
  line-height: 1.85;
  font-size: 16px;
  min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
h1, h2, h3 { line-height: 1.5; margin: 0; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
p { margin: 0 0 .6rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }

/* ---------- دکمه‌ها ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: var(--primary); color: #fff; border: 0; cursor: pointer;
  padding: .6rem 1.2rem; border-radius: 999px; font: inherit; font-weight: 700;
  box-shadow: 0 4px 12px rgba(198, 77, 120, .25);
  transition: transform .12s, background .12s;
  text-decoration: none; line-height: 1.6;
}
.btn:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-soft { background: var(--pink-100); color: var(--primary-dark); box-shadow: none; }
.btn-soft:hover { background: var(--pink-200); color: var(--primary-dark); }
.btn-danger { background: var(--danger-bg); color: var(--danger); box-shadow: none; }
.btn-danger:hover { background: #f9cccc; color: var(--danger); }
.btn-ok { background: var(--ok-bg); color: var(--ok); box-shadow: none; }
.btn-ok:hover { background: #c6edda; color: var(--ok); }
.btn-sm { padding: .3rem .85rem; font-size: .875rem; }
.btn-block { width: 100%; }
.inline-form { display: inline; margin: 0; }

/* ---------- فرم‌ها ---------- */
.field { margin-bottom: 1.1rem; }
.field > label { display: block; font-weight: 700; margin-bottom: .3rem; font-size: .95rem; }
.req { color: var(--primary); margin-inline-start: .2rem; }
input[type=text], input[type=password], input[type=url], input[type=number], input[type=search],
input[type=date], input[type=datetime-local], input[type=file], select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: .65rem .9rem; border: 2px solid var(--line); border-radius: 14px;
  background: #fffafc; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--pink-300); box-shadow: 0 0 0 4px rgba(255, 179, 205, .35);
}
input[type=password], input[dir=ltr] { direction: ltr; text-align: right; }
input[type=file] { padding: .5rem; background: var(--pink-50); border-style: dashed; }
textarea { resize: vertical; }
.help { display: block; color: var(--muted); margin-top: .25rem; font-size: .85rem; }
.err { display: block; color: var(--danger); margin-top: .25rem; font-size: .875rem; font-weight: 700; }
.has-error input, .has-error select, .has-error textarea { border-color: #f0a0a0; }
.field ul, .field > div[id] { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.field ul li label, .field > div[id] > div > label, .field > div[id] label {
  display: flex; align-items: center; gap: .6rem; font-weight: 400;
  padding: .45rem .8rem; border-radius: 12px; background: var(--pink-50); cursor: pointer;
}
.field input[type=checkbox], .field input[type=radio] { width: 1.15rem; height: 1.15rem; accent-color: var(--primary); flex: none; }
.field > div[id] { max-height: 320px; overflow-y: auto; padding: .2rem; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.4rem; }
.filters { display: flex; gap: .6rem; flex-wrap: wrap; align-items: end; }
.filters .field { margin: 0; flex: 1 1 150px; }

/* ---------- کارت و چیدمان ---------- */
.card {
  background: var(--surface); border-radius: var(--radius); padding: 1.25rem;
  box-shadow: var(--shadow); border: 1px solid var(--line); margin-bottom: 1.2rem;
}
.card.form { max-width: 720px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.head-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: .9rem; flex-wrap: wrap; }
.grid { display: grid; gap: 1rem; }
.stats { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 1.2rem; }
.list { display: grid; gap: .9rem; }
.item {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 1rem 1.1rem; border-radius: 16px; background: var(--pink-50); border: 1px solid var(--line);
}
.item .info { flex: 1 1 260px; min-width: 0; }
.item h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.item .meta { color: var(--muted); font-size: .875rem; display: flex; gap: .4rem .9rem; flex-wrap: wrap; }
.item .btns { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; }
.item .desc { margin: .4rem 0 0; font-size: .95rem; white-space: pre-line; }
.empty { text-align: center; color: var(--muted); padding: 1.6rem 1rem; background: var(--pink-50); border-radius: 16px; border: 2px dashed var(--pink-200); }

.stat {
  display: flex; flex-direction: column; gap: .1rem; padding: 1.1rem 1.2rem; border-radius: var(--radius);
  color: var(--ink); box-shadow: var(--shadow); transition: transform .15s;
}
.stat:hover { transform: translateY(-3px); color: var(--ink); }
.stat-num { font-size: 2rem; font-weight: 700; line-height: 1.3; }
.tone-pink { background: var(--pink-200); }
.tone-lavender { background: var(--lavender); }
.tone-mint { background: var(--mint); }
.tone-peach { background: var(--peach); }
.tone-sky { background: var(--sky); }

.badge { display: inline-block; white-space: nowrap; padding: .05rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--pink-100); color: var(--primary-dark); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.off { background: #eee6ea; color: #7a6670; }
.badge.bad { background: var(--danger-bg); color: var(--danger); }

.alert { padding: .8rem 1rem; border-radius: 14px; margin-bottom: 1rem; font-weight: 700; }
.alert-success { background: var(--ok-bg); color: var(--ok); }
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-warn, .alert-warning { background: var(--warn-bg); color: var(--warn); }
.alert-info { background: var(--sky); color: #2c557f; }

/* ---------- جدول ---------- */
.table-wrap { overflow-x: auto; border-radius: 14px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .7rem .9rem; text-align: right; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: var(--pink-100); font-size: .9rem; white-space: nowrap; }
tbody tr:hover { background: var(--pink-50); }
.row-actions { display: flex; gap: .4rem; flex-wrap: wrap; }

.pager { display: flex; justify-content: center; gap: .6rem; align-items: center; margin-top: 1rem; }

/* ---------- حضور و غیاب ---------- */
.att-list { display: grid; gap: .6rem; }
.att-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; background: var(--pink-50); border-radius: 14px; border: 1px solid var(--line); }
.att-name { font-weight: 700; }
.att-toggle { display: inline-flex; gap: .4rem; }
.att-toggle label { cursor: pointer; margin: 0; }
.att-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.att-toggle span {
  display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem;
  border-radius: 50%; font-size: 1.25rem; font-weight: 700; background: #fff; border: 2px solid var(--line); color: var(--muted);
  transition: all .12s;
}
.att-toggle input[value=p]:checked + span { background: var(--ok-bg); border-color: #6cc7a1; color: var(--ok); }
.att-toggle input[value=a]:checked + span { background: var(--danger-bg); border-color: #ef9a9a; color: var(--danger); }
.att-toggle input:focus-visible + span { box-shadow: 0 0 0 4px rgba(255, 179, 205, .5); }

/* ---------- صفحهٔ ورود ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 1.2rem; position: relative; overflow: hidden; }
.auth::before, .auth::after { content: ''; position: absolute; border-radius: 50%; z-index: 0; }
.auth::before { width: 380px; height: 380px; background: #ffd0e0; top: -120px; right: -100px; opacity: .6; }
.auth::after { width: 320px; height: 320px; background: #e6d9fb; bottom: -110px; left: -90px; opacity: .7; }
.auth-card {
  position: relative; z-index: 1; width: 100%; max-width: 420px; background: rgba(255, 255, 255, .92);
  border-radius: 28px; padding: 2rem 1.6rem; box-shadow: 0 20px 50px rgba(198, 77, 120, .18); border: 1px solid var(--line);
  text-align: center;
}
.auth-card .form { text-align: right; margin-top: 1.4rem; }
.auth-card h1 { font-size: 1.9rem; color: var(--primary); }
.auth-card .sub { color: var(--muted); margin-bottom: 0; }
.auth-card .hint { color: var(--muted); font-size: .85rem; margin: 1.2rem 0 0; }
.logo {
  width: 78px; height: 78px; margin: 0 auto .6rem; border-radius: 26px; display: grid; place-items: center;
  font-size: 2.6rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, #f58fb2, #c64d78);
  box-shadow: 0 10px 24px rgba(198, 77, 120, .35); transform: rotate(-6deg);
}
.logo.sm { width: 44px; height: 44px; font-size: 1.5rem; border-radius: 15px; margin: 0; transform: none; box-shadow: 0 4px 10px rgba(198, 77, 120, .3); }

/* ---------- قاب پنل ---------- */
.app { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow: hidden; background: #fff;
  border-inline-end: 1px solid var(--line); padding: 1.2rem .9rem; display: flex; flex-direction: column; gap: 1rem;
  box-shadow: 4px 0 24px rgba(198, 77, 120, .06);
}
.brand { display: flex; align-items: center; gap: .7rem; padding: .3rem .5rem 1rem; border-bottom: 1px dashed var(--pink-200); }
.brand strong { display: block; font-size: 1.2rem; color: var(--primary); line-height: 1.3; }
.brand small { color: var(--muted); }
/* فقط لیست لینک‌ها اسکرول می‌خورد؛ «تغییر رمز» و «خروج» همیشه ته منو ثابت می‌مانند */
.sidebar nav { display: grid; gap: .25rem; align-content: start; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.nav-link {
  display: flex; align-items: center; gap: .65rem; padding: .6rem .85rem; border-radius: 14px;
  color: var(--ink); font-weight: 700; font-size: .95rem; background: none; border: 0; font-family: inherit;
  cursor: pointer; width: 100%; text-align: right;
}
.nav-link:hover { background: var(--pink-50); color: var(--primary-dark); }
.nav-link.active { background: var(--pink-200); color: var(--primary-dark); }
.nav-link .ico { font-size: 1.15rem; width: 1.5rem; text-align: center; }
.side-foot { flex: none; margin-top: 0; border-top: 1px dashed var(--pink-200); padding-top: .8rem; display: grid; gap: .2rem; background: #fff; }
.who { padding: 0 .85rem .4rem; color: var(--muted); font-size: .875rem; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; align-items: center; gap: .8rem; padding: .7rem 1rem; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; font-weight: 700; }
.icon-btn { background: var(--pink-100); border: 0; border-radius: 12px; width: 42px; height: 42px; font-size: 1.3rem; cursor: pointer; color: var(--primary-dark); }
.content { padding: 1.6rem; max-width: 1100px; width: 100%; }
.overlay { display: none; }

.announce { padding: 1rem 1.1rem; border-radius: 16px; background: var(--pink-50); border-inline-start: 5px solid var(--pink-300); }
.announce h3 { font-size: 1.05rem; }
.announce p { margin: .35rem 0; white-space: pre-line; }

/* ---------- ریسپانسیو ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .topbar { display: flex; }
  .sidebar {
    position: fixed; top: 0; right: 0; bottom: 0; width: 280px; max-width: 85vw; z-index: 40;
    height: auto;                       /* قبلاً 100vh بود و در موبایل از صفحه بیرون می‌زد */
    padding-bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px));
    overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    transform: translateX(105%); transition: transform .22s ease, visibility 0s linear .22s; visibility: hidden;
  }
  body.sidebar-open { overflow: hidden; }
  body.sidebar-open .sidebar { transform: none; visibility: visible; transition: transform .22s ease, visibility 0s; }
  body.sidebar-open .overlay { display: block; position: fixed; inset: 0; background: rgba(74, 47, 60, .4); z-index: 30; }
  .content { padding: 1rem; }
}
@media (max-width: 700px) {
  body { font-size: 15px; }
  h1 { font-size: 1.3rem; }
  .card { padding: 1rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat-num { font-size: 1.6rem; }
  .item { align-items: stretch; }
  .item .btns { width: 100%; }
  .item .btns .btn, .item .btns .inline-form { flex: 1 1 auto; }
  .item .btns .inline-form .btn { width: 100%; }
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { margin-bottom: .8rem; border: 1px solid var(--line); border-radius: 14px; padding: .4rem .2rem; background: #fffafc; }
  table.stack td { display: flex; justify-content: space-between; gap: 1rem; border: 0; padding: .35rem .8rem; text-align: left; }
  table.stack td::before { content: attr(data-label); font-weight: 700; color: var(--muted); text-align: right; flex: none; }
  .att-row { padding: .6rem .8rem; }
}
@media (max-width: 380px) {
  .stats { grid-template-columns: 1fr; }
}
/* گوشی‌های کوتاه یا حالت افقی: منو فشرده‌تر شود تا همهٔ گزینه‌ها و خروج جا شوند */
@media (max-height: 700px) {
  .sidebar { padding-top: .7rem; gap: .5rem; }
  .brand { padding-bottom: .5rem; }
  .nav-link { padding: .45rem .8rem; }
  .side-foot { padding-top: .5rem; }
  .who { padding-bottom: .1rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}


/* ================= لوگو ================= */
.logo-img { display: block; margin: 0 auto .6rem; max-width: 120px; max-height: 120px; width: auto; height: auto; object-fit: contain; }
.logo-img.sm { width: 44px; height: 44px; max-width: none; max-height: none; margin: 0; flex: none; }

/* ================= صفحهٔ اصلی ================= */
.home { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.home::before, .home::after { content: ''; position: absolute; border-radius: 50%; z-index: 0; pointer-events: none; }
.home::before { width: 380px; height: 380px; background: #ffd0e0; top: -120px; right: -100px; opacity: .6; }
.home::after { width: 320px; height: 320px; background: #e6d9fb; top: 560px; left: -120px; opacity: .65; }
.home-main { position: relative; z-index: 1; flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 2.2rem 1.2rem 1rem; }
.home .auth-card { margin: 0 auto; }
.features { margin-top: 2.6rem; }
.features h2 { text-align: center; font-size: 1.4rem; color: var(--primary); margin-bottom: 1.2rem; }
.feature-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.feature { border-radius: var(--radius); padding: 1.2rem 1.2rem 1.1rem; box-shadow: var(--shadow); transition: transform .15s; }
.feature:hover { transform: translateY(-3px); }
.feature .f-ico { display: block; font-size: 2rem; line-height: 1.4; margin-bottom: .2rem; }
.feature h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.feature p { margin: 0; font-size: .92rem; color: #5f4452; }

.site-footer { position: relative; z-index: 1; margin-top: 2.6rem; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(198, 77, 120, .08); }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 1.6rem 1.2rem; display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem 2rem; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: .7rem; color: var(--primary); }
.footer-brand strong { font-size: 1.05rem; line-height: 1.5; }
.footer-info { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; font-size: .92rem; }
.footer-info a { font-weight: 700; }
.footer-info .sep { color: var(--muted); }
.footer-social { display: flex; gap: .6rem; flex-wrap: wrap; }
.social { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem 1.1rem; border-radius: 999px; background: var(--pink-100); color: var(--primary-dark); font-weight: 700; }
.social:hover { background: var(--pink-200); color: var(--primary-dark); }
@media (max-width: 860px) {
  .footer-inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .footer-info li { display: block; }
  .footer-social { justify-content: center; }
}

/* ================= انتخاب فایل (صورتی) ================= */
input[type=file]::file-selector-button {
  font: inherit; font-weight: 700; border: 0; border-radius: 999px; cursor: pointer;
  padding: .45rem 1.1rem; margin-inline-end: .8rem; background: var(--primary); color: #fff;
}
input[type=file]::file-selector-button:hover { background: var(--primary-dark); }
.fp {
  position: relative; text-align: center; padding: 1.1rem 1rem; border-radius: 18px;
  border: 2px dashed var(--pink-300); background: var(--pink-50); transition: background .15s, border-color .15s;
}
.fp.drag { background: var(--pink-100); border-color: var(--primary); }
.fp input.fp-native { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; padding: 0; border: 0; pointer-events: none; }
.fp-btn {
  display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; background: var(--primary); color: #fff;
  padding: .6rem 1.4rem; border-radius: 999px; font-weight: 700; box-shadow: 0 4px 12px rgba(198, 77, 120, .25);
  transition: background .12s, transform .12s;
}
.fp-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.fp .fp-native:focus-visible + .fp-btn { outline: 3px solid var(--pink-300); outline-offset: 2px; }
.fp-hint { display: block; margin-top: .5rem; color: var(--muted); font-size: .85rem; }
.fp-msg { margin: .7rem 0 0; color: var(--danger); font-weight: 700; font-size: .875rem; }
.fp-list { list-style: none; margin: .9rem 0 0; padding: 0; display: grid; gap: .4rem; text-align: right; }
.fp-list:empty { display: none; }
.fp-list li { display: flex; align-items: center; gap: .6rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .4rem .5rem .4rem .8rem; }
.fp-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.fp-size { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.fp-remove { flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 0; background: var(--danger-bg); color: var(--danger); font-weight: 700; cursor: pointer; }
.fp-remove:hover { background: #f9cccc; }
.fp.has-files .fp-hint { display: none; }

/* ================= فایل‌های پیوست ================= */
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .45rem; }
.chips:not(:has(.file-chip)) { display: none; }
.file-chip {
  display: inline-flex; align-items: center; gap: .3rem; max-width: 100%; padding: .25rem .85rem; border-radius: 999px;
  background: #fff; border: 1px solid var(--pink-200); color: var(--primary-dark); font-size: .85rem; font-weight: 700;
}
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.file-chip:hover { background: var(--pink-100); color: var(--primary-dark); }
.file-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.file-list li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; padding: .5rem .8rem; border-radius: 14px; background: var(--pink-50); border: 1px solid var(--line); }
.sub-head { margin: 1.8rem 0 .8rem; font-size: 1.1rem; }

/* ================= ارزشیابی و بازخورد ================= */
.badge.g-excellent { background: #d9f5e7; color: #1f7a53; }
.badge.g-good { background: #dfeefc; color: #2a5f93; }
.badge.g-acceptable { background: #fff1cc; color: #8a5b0c; }
.badge.g-effort { background: #ffe3ec; color: #b03a63; }
.grade-card { text-align: center; }
.grade-card.g-excellent { background: #eafaf2; border-color: #bfe9d3; }
.grade-card.g-good { background: #eef6fe; border-color: #c4dcf3; }
.grade-card.g-acceptable { background: #fff8e1; border-color: #f2e0a6; }
.grade-card.g-effort { background: #fff0f5; border-color: #f6cfdd; }
.grade-big { font-size: 1.7rem; font-weight: 700; margin: .3rem 0; }
.feedback-card { background: #fffbea; border-color: #f6e3a1; }
.feedback-preview { margin: 0 0 .4rem; color: var(--muted); }
.grade-form { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.grade-form select { width: auto; min-width: 11rem; padding: .4rem .7rem; }

/* ================= گالری ================= */
.segmented { display: inline-flex; background: var(--pink-100); border-radius: 999px; padding: .25rem; }
.segmented a { padding: .35rem 1.1rem; border-radius: 999px; font-weight: 700; color: var(--primary-dark); font-size: .9rem; }
.segmented a.on { background: #fff; box-shadow: 0 2px 8px rgba(198, 77, 120, .2); }
.album-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.album-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: var(--ink); transition: transform .15s; }
.album-card:hover { transform: translateY(-3px); color: var(--ink); }
.album-cover { aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--pink-100), var(--lavender)); display: grid; place-items: center; font-size: 2.4rem; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-info { padding: .8rem 1rem; display: grid; gap: .1rem; }
.photo-grid { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.photo { position: relative; margin: 0; border-radius: 14px; overflow: hidden; background: var(--pink-100); aspect-ratio: 1 / 1; box-shadow: var(--shadow); }
.photo a { display: block; width: 100%; height: 100%; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.photo:hover img { transform: scale(1.04); }
.photo-del { position: absolute; top: .4rem; left: .4rem; margin: 0; }
.photo-del button { width: 2rem; height: 2rem; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: var(--danger); font-weight: 700; cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.mini-thumb { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; overflow: hidden; background: var(--pink-100); flex: none; }
.mini-thumb.lg { width: 72px; height: 72px; }
.mini-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.row-album { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); }
.lb { position: fixed; inset: 0; z-index: 300; background: rgba(40, 20, 30, .9); display: grid; place-items: center; padding: 1rem; }
.lb[hidden] { display: none; }
.lb img { max-width: 100%; max-height: 82vh; max-height: 82dvh; border-radius: 12px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lb-btn { position: absolute; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: var(--primary-dark); font-size: 1.5rem; font-weight: 700; cursor: pointer; display: grid; place-items: center; }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { right: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 1rem; color: #fff; font-weight: 700; }
body.lb-open { overflow: hidden; }

/* ================= تقویم شمسی ================= */
.jd-display { cursor: pointer; padding-inline-start: 2.6rem !important;
  background: #fffafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c64d78' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M16 3v4M8 3v4M3 11h18'/%3E%3C/svg%3E") no-repeat left .8rem center / 1.2rem; }
.jd-overlay { position: fixed; inset: 0; z-index: 400; background: rgba(74, 47, 60, .45); display: grid; place-items: center; padding: 1rem; }
.jd-overlay[hidden] { display: none; }
body.jd-open { overflow: hidden; }
.jd-dialog { background: #fff; border-radius: 22px; padding: 1rem; width: 100%; max-width: 340px; box-shadow: 0 20px 60px rgba(74, 47, 60, .35); border: 1px solid var(--line); }
.jd-head { display: flex; align-items: center; justify-content: space-between; gap: .4rem; margin-bottom: .7rem; }
.jd-nav { width: 2.4rem; height: 2.4rem; border: 0; border-radius: 50%; background: var(--pink-100); color: var(--primary-dark); font-size: 1.4rem; font-weight: 700; cursor: pointer; flex: none; line-height: 1; }
.jd-nav:hover { background: var(--pink-200); }
.jd-selects { display: flex; gap: .4rem; flex: 1; }
.jd-selects select, .jd-time select { width: auto; flex: 1; padding: .35rem .5rem; border-radius: 10px; }
.jd-week, .jd-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: .2rem; text-align: center; }
.jd-week span { font-size: .8rem; font-weight: 700; color: var(--muted); padding: .2rem 0; }
.jd-days button { height: 2.5rem; border: 0; background: none; border-radius: 12px; font: inherit; cursor: pointer; color: var(--ink); }
.jd-days button:hover:not(:disabled) { background: var(--pink-100); }
.jd-days button.today { outline: 2px solid var(--pink-300); outline-offset: -2px; }
.jd-days button.sel { background: var(--primary); color: #fff; font-weight: 700; }
.jd-week .fri, .jd-days button.fri:not(.sel) { color: #c0392b; }
.jd-days button:disabled { opacity: .3; cursor: not-allowed; }
.jd-time { display: flex; align-items: center; gap: .5rem; margin-top: .8rem; padding-top: .8rem; border-top: 1px dashed var(--pink-200); direction: rtl; }
.jd-foot { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .8rem; }
.jd-btn { flex: 1; border: 0; border-radius: 999px; padding: .45rem .8rem; background: var(--pink-100); color: var(--primary-dark); font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; }
.jd-btn:hover { background: var(--pink-200); }
.jd-btn.primary { background: var(--primary); color: #fff; }
.jd-btn.primary:hover { background: var(--primary-dark); }
