/* ===== افزودنی‌های اختصاصی سایت ترم تابستان (بر پایه‌ی style.css قالب) ===== */

/* رنگ اصلی سایت را سبز دانشگاهی می‌کنیم */
:root, :root[data-theme="dark"] {
  --accent: #16a34a;
  --accent-2: #f59e0b;
  --accent-3: #0ea5e9;
  --bg-glow-1: #123524;
  --bg-glow-2: #1e3a2f;
}
:root[data-theme="light"] {
  --accent: #15803d;
  --accent-2: #b45309;
  --accent-3: #0369a1;
  --bg-glow-1: #d7f0e0;
  --bg-glow-2: #e6f6ec;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) { --accent: #15803d; --accent-2: #b45309; --accent-3: #0369a1; --bg-glow-1:#d7f0e0; --bg-glow-2:#e6f6ec; }
}

/* لوگوی دانشگاه */
.brand-logo { border-style: solid; }
.brand-logo svg { width: 100%; height: 100%; }

/* نوار ناوبری چسبان */
.site-nav {
  position: sticky; top: 8px; z-index: 40;
  margin-top: 16px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px; display: flex; gap: 6px; overflow-x: auto;
}
.site-nav a {
  flex: 0 0 auto; padding: 9px 14px; border-radius: 10px;
  color: var(--muted); font-size: 13.5px; font-weight: 600;
  white-space: nowrap; transition: all .15s; border: 1px solid transparent;
}
.site-nav a:hover { color: var(--text); background: var(--chip-bg); }
.site-nav a.is-active {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

/* عنوان بخش بزرگ */
.section {
  margin-top: 34px; scroll-margin-top: 72px;
}
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.section-head .s-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font-size: 22px; flex: 0 0 auto;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
}
.section-head .s-title { font-size: 19px; font-weight: 700; }
.section-head .s-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* کارت عمومی */
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 14px; }
@media (max-width: 720px){ .grid-2 { grid-template-columns: 1fr; } }

/* ===== زمان‌شمار ===== */
.countdown-wrap {
  margin-top: 18px; padding: 22px;
  background: var(--panel);
  background-image: linear-gradient(120deg, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: var(--radius); box-shadow: var(--shadow); text-align: center;
}
.countdown-label { font-size: 14px; color: var(--muted); font-weight: 600; }
.countdown-timer { display: flex; justify-content: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.cd-box {
  min-width: 82px; padding: 12px 10px; border-radius: 14px;
  background: var(--bg-soft); border: 1px solid var(--border);
}
.cd-num { font-size: 30px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.1; }
.cd-unit { font-size: 12px; color: var(--muted); margin-top: 4px; }
.countdown-done { font-size: 16px; font-weight: 700; color: var(--accent); margin-top: 10px; }
.countdown-sub { font-size: 12.5px; color: var(--muted); margin-top: 12px; }

/* ===== تایم‌لاین تقویم ===== */
.timeline { position: relative; margin-top: 8px; padding-right: 26px; }
.timeline::before {
  content: ""; position: absolute; right: 9px; top: 6px; bottom: 6px; width: 2px;
  background: var(--border);
}
.tl-item { position: relative; padding: 4px 0 20px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; right: -21px; top: 6px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg-soft); border: 2px solid var(--border);
  display: grid; place-items: center; font-size: 10px;
}
.tl-item.is-active .tl-dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.tl-item.is-done .tl-dot { border-color: var(--accent); }
.tl-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 16px; display: flex; align-items: center; gap: 12px;
}
.tl-item.is-active .tl-card { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background-image: linear-gradient(120deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 60%); }
.tl-emoji { font-size: 22px; }
.tl-title { font-weight: 700; font-size: 14.5px; }
.tl-date { color: var(--muted); font-size: 13px; margin-top: 2px; }
.tl-badge {
  margin-right: auto; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.tl-badge.done { background: var(--chip-bg); color: var(--muted); border-color: var(--border); }

/* ===== آکوردئون (اطلاعیه‌ها / راهنماها) ===== */
.acc { display: flex; flex-direction: column; gap: 12px; }
.acc-item { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.acc-head {
  display: flex; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer;
  user-select: none; transition: background .15s;
}
.acc-head:hover { background: var(--chip-bg); }
.acc-ic {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 20px; flex: 0 0 auto;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
}
.acc-tt { flex: 1 1 auto; min-width: 0; }
.acc-badge { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--accent-2) 16%, transparent); color: var(--accent-2); border: 1px solid color-mix(in srgb, var(--accent-2) 32%, transparent); }
.acc-title { font-weight: 700; font-size: 15.5px; margin-top: 4px; }
.acc-summary { color: var(--muted); font-size: 13px; margin-top: 3px; }
.acc-arrow { flex: 0 0 auto; color: var(--muted); transition: transform .2s; }
.acc-item.open .acc-arrow { transform: rotate(180deg); }
.acc-body { display: none; padding: 0 18px 18px; }
.acc-item.open .acc-body { display: block; }
.acc-body p { white-space: pre-wrap; line-height: 2; margin: 0 0 8px; }
.acc-source { display: inline-block; margin-top: 8px; font-size: 12.5px; font-weight: 700; color: var(--accent); direction: ltr; }
.acc-steps { margin: 8px 0 0; padding: 0; list-style: none; counter-reset: st; }
.acc-steps li { position: relative; padding: 8px 40px 8px 8px; border-bottom: 1px dashed var(--border); line-height: 1.9; }
.acc-steps li:last-child { border-bottom: none; }
.acc-steps li::before {
  counter-increment: st; content: counter(st);
  position: absolute; right: 0; top: 8px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
}

/* دکمه لینک */
.btn-link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px;
  padding: 9px 16px; border-radius: 10px; background: var(--accent); color: var(--on-accent);
  font-size: 13.5px; font-weight: 700; border: 1px solid var(--accent); transition: filter .15s;
}
.btn-link:hover { filter: brightness(.92); color: var(--on-accent); }

/* ===== جدول برنامه هفتگی ===== */
.sched-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.sched-table { border-collapse: collapse; width: 100%; min-width: 760px; background: var(--panel); font-size: 12.5px; }
.sched-table th, .sched-table td { border: 1px solid var(--border); padding: 8px 6px; text-align: center; vertical-align: middle; }
.sched-table thead th { background: color-mix(in srgb, var(--accent) 88%, #000); color: #fff; font-weight: 700; font-size: 13px; }
.sched-table thead th:first-child { background: color-mix(in srgb, var(--accent) 70%, #000); }
.sched-table tbody th { background: var(--panel-2); color: var(--text); font-weight: 700; font-size: 13px; width: 90px; }
.sched-table td .cell-item { display: block; padding: 2px 0; line-height: 1.7; }
.sched-table td .cell-item + .cell-item { border-top: 1px dashed var(--border); }
.sched-table td.empty { color: var(--muted); opacity: .4; }
.sched-table tbody tr.today-row th { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); }
.sched-table tbody tr.today-row td { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.sched-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 13px; color: var(--muted); }
.sched-note b { color: var(--accent-2); }
.week-badge {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px;
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

/* ===== دروس ===== */
.course-cat { margin-bottom: 14px; }
.course-cat-title {
  display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px;
  padding: 10px 14px; border-radius: 10px 10px 0 0;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-bottom: none;
}
.course-cat-title .cc-count { margin-right: auto; font-size: 12px; opacity: .8; }
.course-list {
  border: 1px solid var(--border); border-radius: 0 0 10px 10px; overflow: hidden;
  background: var(--panel);
}
.course-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px; font-size: 13.5px;
  border-bottom: 1px solid var(--border);
}
.course-row:last-child { border-bottom: none; }
.course-row:nth-child(even) { background: color-mix(in srgb, var(--panel-2) 55%, transparent); }
.course-row .c-name { flex: 1 1 auto; }
.course-row .c-units {
  flex: 0 0 auto; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px;
  background: var(--chip-bg); color: var(--muted); border: 1px solid var(--border);
}

/* ===== جدول شهریه ===== */
.fees-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.fees-table { border-collapse: collapse; width: 100%; min-width: 640px; background: var(--panel); font-size: 12.5px; }
.fees-table th, .fees-table td { border: 1px solid var(--border); padding: 9px 8px; text-align: center; font-variant-numeric: tabular-nums; }
.fees-table thead th { background: color-mix(in srgb, var(--accent) 88%, #000); color:#fff; font-weight: 700; }
.fees-table tbody th { background: var(--panel-2); font-weight: 700; text-align: right; }
.fees-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--panel-2) 45%, transparent); }

/* ===== اساتید ===== */
.prof-empty {
  padding: 34px 20px; text-align: center; color: var(--muted);
  background: var(--panel); border: 1px dashed var(--border); border-radius: var(--radius);
}
.prof-empty .pe-ic { font-size: 40px; opacity: .5; }
.prof-card { display: flex; gap: 12px; align-items: center; }
.prof-avatar {
  width: 48px; height: 48px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center;
  font-size: 20px; font-weight: 800; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent);
}
.prof-name { font-weight: 700; font-size: 15px; }
.prof-meta { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ===== لینک‌ها و تماس ===== */
.link-card { display: flex; gap: 12px; align-items: center; transition: transform .15s, border-color .15s; }
.link-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.link-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; flex: 0 0 auto; background: color-mix(in srgb, var(--accent) 16%, transparent); }
.link-tt { flex: 1 1 auto; min-width: 0; }
.link-title { font-weight: 700; font-size: 14.5px; }
.link-desc { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.link-url { color: var(--accent); font-size: 12px; direction: ltr; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.callout {
  display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; margin-top: 14px;
  background: color-mix(in srgb, var(--accent-2) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-2) 32%, transparent);
}
.callout .co-ic { font-size: 20px; flex: 0 0 auto; }
.callout .co-tx { font-size: 13.5px; line-height: 1.9; }
.callout.danger { background: color-mix(in srgb, var(--danger) 12%, transparent); border-color: color-mix(in srgb, var(--danger) 32%, transparent); }
.callout.info { background: color-mix(in srgb, var(--accent-3) 12%, transparent); border-color: color-mix(in srgb, var(--accent-3) 32%, transparent); }

.pill-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pill-list .pill {
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--chip-bg); border: 1px solid var(--border); color: var(--text);
}

/* مسیر تأیید (فلو) */
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.flow .step {
  padding: 8px 14px; border-radius: 10px; font-size: 13px; font-weight: 700;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.flow .arrow { color: var(--muted); font-weight: 800; }

/* دکمه ورود به پنل مدیریت در فوتر */
.admin-entry { margin-top: 10px; }
.admin-entry a { font-size: 12px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 5px 14px; transition: all .15s; }
.admin-entry a:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 640px) {
  .section-head .s-title { font-size: 17px; }
  .cd-box { min-width: 68px; }
  .cd-num { font-size: 24px; }
}

/* ===== نکات مهم ===== */
.rules-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media(max-width:680px){.rules-grid{grid-template-columns:1fr}}
.rule-item{display:flex;gap:12px;align-items:flex-start;background:var(--panel);border:1px solid var(--border);border-right:4px solid var(--accent-3,#16a34a);border-radius:12px;padding:14px 16px;box-shadow:var(--shadow)}
.rule-num{flex:0 0 auto;width:26px;height:26px;border-radius:50%;background:color-mix(in srgb,var(--accent-3,#16a34a) 16%,transparent);color:var(--accent-3,#16a34a);font-weight:800;font-size:13px;display:flex;align-items:center;justify-content:center;margin-top:2px}
.rule-tx{line-height:1.95;font-size:14px}
/* دکمه‌های لینک/فایل */
.acc-links{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.btn-link.file{background:color-mix(in srgb,var(--accent-3,#16a34a) 14%,transparent);border-color:color-mix(in srgb,var(--accent-3,#16a34a) 42%,transparent);color:var(--accent-3,#16a34a)}
.btn-link.file:hover{background:color-mix(in srgb,var(--accent-3,#16a34a) 22%,transparent)}

/* ===== بخش‌های جدید: گروه‌های درسی و برنامه امتحانات ===== */
.g-list { display: flex; flex-direction: column; gap: 8px; }
.g-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-soft); }
.g-row .g-title { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.g-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.g-chip { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--chip-bg);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; }
.g-links { display: flex; gap: 6px; flex-wrap: wrap; }
.g-nolink { font-size: 12px; color: var(--muted); }
.exam-table .ex-time { font-weight: 700; white-space: nowrap; }
.exam-table .ex-date { font-size: 11.5px; font-weight: 600; color: var(--muted); margin-top: 3px; }
.exam-table .ex-course { text-align: right; }
