/* ================================================================
   SCREENS.CSS — Ekranlar
   İçindəkilər:
   - Ana səhifə (hero, funksiya kartları, statistika, yeniliklər)
   - Axtarış nəticələri
   - Kurslar / Materiallar siyahısı + MaterialCard
   - Material detalı
   - Fənn səhifəsi (hero + kartlar)
   - GPA kalkulyator
   - Daha çox / hesab
   ================================================================ */

/* ═════════════════════════════════════════════════════════════
   ANA SƏHİFƏ
   ═════════════════════════════════════════════════════════════ */
.hero-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 8px;
  padding: 22px 18px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background:
    radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 62%),
    radial-gradient(70% 90% at 0% 110%, color-mix(in srgb, var(--color-accent) 16%, transparent), transparent 60%),
    linear-gradient(165deg, var(--color-surface), var(--color-background-alt));
  box-shadow: var(--shadow-card);
}
.hero-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  color: var(--accent2);
  opacity: 0.38;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(100deg, transparent 18%, #000 78%);
  mask-image: linear-gradient(100deg, transparent 18%, #000 78%);
}
.hero-art svg { position: absolute; right: -24px; bottom: -6px; width: 300px; height: auto; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.hero-title {
  max-width: 14ch;
  margin: 18px 0 8px;
  font-size: 1.625rem;
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero-title em { font-style: normal; color: var(--accent2); }
.hero-sub { max-width: 28ch; margin: 0 0 22px; color: var(--color-text-secondary); font-size: var(--fs-base); line-height: 1.45; }
.hero-search { margin-top: 6px; background: color-mix(in srgb, var(--color-background-alt) 78%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* Axtarış nəticələri (ana səhifə) */
.search-results { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.search-results[hidden] { display: none; }
.sr-group { margin: 10px 2px 2px; font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-muted); }
.sr-item {
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--color-surface); color: var(--color-text-primary);
  text-decoration: none;
}
.sr-item:hover { border-color: var(--color-border-strong); }
.sr-item .sr-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: color-mix(in srgb, var(--fc, var(--accent)) 22%, transparent); color: var(--fc, var(--accent2)); flex-shrink: 0; font-size: 1.15rem; }
.sr-item b { display: block; font-size: var(--fs-base); font-weight: 600; line-height: 1.3; }
.sr-item small { display: block; color: var(--color-text-secondary); font-size: var(--fs-xs); }
.sr-item .grow { flex: 1; min-width: 0; }
.sr-item .chev { color: var(--color-text-muted); }

/* Funksiya kartları */
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.feature-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--fc) 42%, var(--border));
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, color-mix(in srgb, var(--fc) 30%, var(--color-surface)) 0%, var(--color-surface) 78%);
  color: var(--color-text-primary);
  text-decoration: none;
  overflow: hidden;
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}
.feature-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--fc) 75%, var(--border)); box-shadow: 0 12px 28px color-mix(in srgb, var(--fc) 22%, transparent); }
.feature-card:active { transform: scale(0.985); }
.feature-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 14px;
  color: #fff;
  font-size: 1.45rem;
  background: linear-gradient(150deg, color-mix(in srgb, var(--fc) 82%, white), var(--fc) 52%, color-mix(in srgb, var(--fc) 72%, black));
  box-shadow: 0 6px 16px color-mix(in srgb, var(--fc) 42%, transparent);
}
.feature-text { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.feature-text b { font-size: var(--fs-base); font-weight: 700; line-height: 1.2; overflow-wrap: break-word; }
.feature-text small { display: none; color: var(--color-text-secondary); font-size: var(--fs-xs); line-height: 1.35; }
@media (min-width: 560px) {
  .feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .feature-card { padding: 16px; align-items: flex-start; min-height: 104px; }
  .feature-text small { display: block; }
}
@media (min-width: 1024px) {
  .feature-card { padding: 18px; }
}

/* Statistika */
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.stat-tile {
  padding: 14px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--color-surface-elevated);
  text-align: center;
}
.stat-tile b { display: block; font-size: 1.375rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; color: var(--color-text-primary); font-variant-numeric: tabular-nums; }
.stat-tile span { display: block; margin-top: 4px; font-size: var(--fs-xs); font-weight: 600; color: var(--color-text-secondary); }

/* Yeniliklər */
.news-list { display: flex; flex-direction: column; gap: 10px; }
.news-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--color-surface);
  color: var(--color-text-primary);
  text-decoration: none;
  font: inherit;
  text-align: left;
  width: 100%;
  cursor: pointer;
}
.news-item .ic { font-size: 1.5rem; color: var(--accent2); }
.news-item .news-text { flex: 1; min-width: 0; }
.news-item b { display: block; font-size: var(--fs-base); font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.news-item small { color: var(--color-text-muted); font-size: var(--fs-xs); font-weight: 500; }
.news-item .chev { color: var(--color-text-muted); font-size: 1.1rem; }
.news-item:hover { border-color: var(--color-border-strong); }

/* Footer bloku (ana səhifə) */
.home-footer-block { margin-top: 28px; padding: 18px 4px 0; border-top: 1px solid var(--border); text-align: center; }
.home-footer-note { max-width: 56ch; margin: 0 auto 12px; color: var(--color-text-muted); font-size: var(--fs-xs); line-height: 1.6; }
.home-footer-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 16px; }
.home-footer-copy { color: var(--color-text-muted); font-size: var(--fs-xs); font-weight: 600; }
.home-footer-link {
  min-height: 32px; display: inline-flex; align-items: center;
  color: var(--accent2); font-size: var(--fs-xs); font-weight: 600; text-decoration: none; cursor: pointer;
  background: none; border: 0; padding: 0;
}
.home-footer-link:hover { text-decoration: underline; }

/* ═════════════════════════════════════════════════════════════
   KURSLAR — MATERİAL SİYAHISI
   ═════════════════════════════════════════════════════════════ */
.search-row { display: flex; gap: 10px; margin-top: 12px; }
.search-row .field-search { flex: 1; min-width: 0; }
.search-row .icon-btn--filled { width: 52px; height: 52px; position: relative; font-size: 1.3rem; }
.search-row .icon-btn--filled.has-filter::after {
  content: ''; position: absolute; top: 9px; right: 9px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--accent); border: 2px solid var(--color-surface-elevated);
}
.mode-switch { margin-top: 10px; }
.chips-row { margin-top: 14px; }
.result-count { margin: 6px 2px 10px; color: var(--color-text-muted); font-size: var(--fs-sm); font-weight: 600; }
.mat-list { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 768px) { .mat-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }

/* ── MaterialCard ─────────────────────────────────────────────── */
.mat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--tc, var(--accent)) 12%, transparent), transparent 55%),
    linear-gradient(180deg, var(--color-surface), color-mix(in srgb, var(--color-surface) 82%, var(--bg)));
  box-shadow: var(--shadow-card);
  transition: border-color var(--t-base), transform var(--t-base);
}
.mat-card:hover { border-color: var(--color-border-strong); }
.mat-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 14px 12px 14px 14px;
  color: inherit;
  text-decoration: none;
  border-radius: var(--r-lg);
}
.mat-icon {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(150deg, color-mix(in srgb, var(--tc, #ef4444) 82%, white), var(--tc, #ef4444) 50%, color-mix(in srgb, var(--tc, #ef4444) 74%, black));
  box-shadow: 0 6px 16px color-mix(in srgb, var(--tc, #ef4444) 36%, transparent);
}
.mat-icon .ic { width: 22px; height: 22px; stroke-width: 1.8; }
.mat-icon b { font-size: 0.5625rem; font-weight: 800; letter-spacing: 0.08em; line-height: 1; }
.mat-body { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 4px; }
.mat-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--fs-md);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.005em;
  overflow-wrap: anywhere;
}
.mat-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; color: var(--color-text-secondary); font-size: var(--fs-sm); font-weight: 500; min-width: 0; }
.mat-meta .ic { font-size: 0.95rem; color: var(--color-text-muted); }
.mat-meta .fname { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat-meta .sep { color: var(--color-text-muted); }
.mat-rate { display: inline-flex; align-items: center; gap: 5px; color: var(--color-text-primary); font-size: var(--fs-sm); font-weight: 700; }
.mat-rate .ic { width: 15px; height: 15px; color: #FFB547; fill: #FFB547; stroke: #FFB547; }
.mat-rate.is-empty { color: var(--color-text-muted); font-weight: 500; }
.mat-rate.is-empty .ic { fill: none; stroke: var(--color-text-muted); }
.mat-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 10px; align-self: stretch; color: var(--color-text-muted); }
.mat-side .chev { margin: auto 0; font-size: 1.3rem; }
.mat-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }

/* Zəngin variant (fənn səhifəsi, sevimlilər): düymələr kartın içində */
.mat-card--rich { padding: 16px; gap: 12px; }
.mat-card--rich .mat-main { padding: 0; align-items: flex-start; }
.mat-card--rich .mat-icon { width: 60px; height: 60px; border-radius: 16px; }
.mat-card--rich .mat-icon .ic { width: 26px; height: 26px; }
.mat-card--rich .mat-title { font-size: 1.0625rem; -webkit-line-clamp: 3; }
.mat-card--rich .mat-side { display: none; }
.mat-desc { margin: 0; color: var(--color-text-secondary); font-size: var(--fs-sm); line-height: 1.55; }
.mat-actions { display: flex; gap: 10px; align-items: stretch; margin-top: 2px; }
.mat-actions .btn { flex: 1; min-height: 46px; min-width: 0; padding: 0 12px; }
.fav-btn {
  display: inline-grid;
  place-items: center;
  width: 48px; min-height: 46px;
  flex: 0 0 48px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--color-surface-elevated);
  color: var(--color-text-secondary);
  font-size: 1.15rem;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.fav-btn:hover { border-color: var(--color-border-strong); color: var(--color-text-primary); }
.fav-btn.active { color: #FFB547; border-color: color-mix(in srgb, #FFB547 50%, transparent); background: color-mix(in srgb, #FFB547 12%, transparent); }
.fav-btn.active .ic { fill: #FFB547; }
.mat-card .pdf-rating { margin-top: 2px; }
/* Row varianti: sürətli əməliyyatlar yalnız geniş ekranda */
.mat-card--row .mat-actions { display: none; padding: 0 14px 14px; }
@media (min-width: 768px) {
  .mat-card--row .mat-actions { display: flex; }
  .mat-card--row .mat-main { padding-bottom: 8px; }
}

/* Köhnə reytinq vidgeti (ratings.js markup-u) — yeni görünüş */
.pdf-rating { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; min-height: 28px; }
.rating-view { display: inline-flex; align-items: center; gap: 8px; }
.rating-view-stars { display: inline-flex; gap: 2px; }
.rating-view-stars span { color: color-mix(in srgb, var(--color-text-muted) 55%, transparent); font-size: 1rem; line-height: 1; }
.rating-view-stars span.filled { color: #FFB547; }
.rating-view-count { color: var(--color-text-secondary); font-size: var(--fs-sm); font-weight: 600; }
.rating-toggle-btn {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 32px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--r-pill);
  background: transparent; color: var(--accent2);
  font-size: var(--fs-xs); font-weight: 700; cursor: pointer;
}
.rating-toggle-btn:hover { background: var(--color-primary-soft); }
.rating-input { display: inline-flex; align-items: center; gap: 8px; }
.pdf-stars { display: inline-flex; gap: 2px; }
.pdf-star { width: 40px; height: 40px; border: 0; background: transparent; color: color-mix(in srgb, var(--color-text-muted) 60%, transparent); font-size: 1.7rem; line-height: 1; cursor: pointer; }
.pdf-star.filled, .pdf-star:hover { color: #FFB547; }
.rating-back-btn { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--color-text-secondary); cursor: pointer; }

/* Köhnə PDF tip nişanı / şifr nişanı */
.code-badge, .pdf-type-badge, .exam-type-badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  border: 1px solid var(--border);
}
.code-badge { color: var(--accent2); background: color-mix(in srgb, var(--accent) 14%, transparent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); letter-spacing: 0.06em; }
.exam-type-badge { color: var(--color-text-secondary); background: var(--color-surface-inner); }
.exam-type-test { color: #6fe0c0; background: color-mix(in srgb, var(--color-success) 12%, transparent); border-color: color-mix(in srgb, var(--color-success) 45%, transparent); }
.exam-type-yazili { color: #ffc980; background: color-mix(in srgb, var(--color-warning) 12%, transparent); border-color: color-mix(in srgb, var(--color-warning) 45%, transparent); }
.exam-type-badge .msi { display: none; }

/* ═════════════════════════════════════════════════════════════
   MATERİAL DETALI
   ═════════════════════════════════════════════════════════════ */
.md-top { display: flex; align-items: flex-start; gap: 16px; margin-top: 14px; }
.md-icon {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  width: 92px; height: 92px; flex-shrink: 0;
  border-radius: 22px; color: #fff;
  background: linear-gradient(150deg, color-mix(in srgb, var(--tc, #ef4444) 82%, white), var(--tc, #ef4444) 50%, color-mix(in srgb, var(--tc, #ef4444) 74%, black));
  box-shadow: 0 14px 30px color-mix(in srgb, var(--tc, #ef4444) 34%, transparent);
}
.md-icon .ic { width: 38px; height: 38px; stroke-width: 1.6; }
.md-icon b { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; }
.md-top-text { flex: 1; min-width: 0; }
.md-top-text h2 { margin: 0 0 8px; font-size: 1.3rem; line-height: 1.22; font-weight: 800; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.md-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 8px; color: var(--color-text-secondary); font-size: var(--fs-sm); font-weight: 500; }
.md-sub .ic { font-size: 1rem; color: var(--color-text-muted); }
.md-sub .fname { overflow-wrap: anywhere; }
.md-section { margin-top: 22px; }
.md-section h3 { margin: 0 0 8px; font-size: 1.0625rem; font-weight: 700; }
.md-section p { margin: 0; color: var(--color-text-secondary); font-size: var(--fs-base); line-height: 1.6; }
.md-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 0;
}
.md-fact {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--color-surface-elevated);
  min-width: 0;
}
.md-fact dt { color: var(--color-text-muted); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.md-fact dd { margin: 0; color: var(--color-text-primary); font-size: var(--fs-base); font-weight: 600; overflow-wrap: anywhere; }
.md-actions { display: grid; grid-template-columns: 1fr 52px; gap: 10px; margin-top: 22px; }
.md-actions .btn--primary { grid-column: 1 / -1; min-height: 54px; font-size: 1.0625rem; }
.md-actions .btn--secondary { min-height: 52px; }
.md-actions .fav-btn { width: 52px; min-height: 52px; flex: none; }
.md-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; }
.md-links .btn { min-height: 40px; }
@media (min-width: 768px) {
  .md-actions { grid-template-columns: 1fr 1fr 52px; }
  .md-actions .btn--primary { grid-column: auto; }
  .md-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px; align-items: start; }
}
.md-similar { display: grid; gap: 12px; }

/* ═════════════════════════════════════════════════════════════
   KURSLAR (köhnə iyerarxiya: kurs → fənn → PDF)
   ═════════════════════════════════════════════════════════════ */
.back-btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; margin: 4px 0 8px; padding: 0 14px 0 10px;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--color-surface-elevated); color: var(--color-text-primary);
  font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
}
.back-btn:hover { transform: none; background: var(--color-surface-inner); }
.breadcrumb { margin-bottom: 16px; font-size: var(--fs-sm); gap: 6px; }
.breadcrumb-item { color: var(--accent2); }
.courses-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.course-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; text-align: left;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--color-surface)), var(--color-surface) 80%);
  transition: border-color var(--t-base), transform var(--t-base);
}
.course-card::before { display: none; }
.course-card:hover { transform: translateY(-2px); border-color: var(--color-border-strong); }
.course-card .course-icon {
  display: grid; place-items: center; width: 52px; height: 52px; margin: 0; flex-shrink: 0;
  font-size: 1.6rem; color: #fff; border-radius: 15px;
  background: linear-gradient(150deg, var(--color-primary-hover), var(--accent3));
}
.course-card h3 { margin: 0 0 3px; font-size: var(--fs-lg); font-weight: 800; }
.course-card .sub-count { font-size: var(--fs-sm); color: var(--color-text-secondary); }
.course-card .tag { display: none; }
.section-label {
  margin: 0 0 12px; padding-left: 10px;
  font-size: var(--fs-xs); letter-spacing: 0.14em;
}

.subjects-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.subject-card {
  padding: 14px; border-radius: var(--r-lg); min-height: 76px;
  background: linear-gradient(180deg, var(--color-surface), color-mix(in srgb, var(--color-surface) 84%, var(--bg)));
}
.subject-card::after { content: ''; display: none; }
.subject-card:hover { transform: none; border-color: var(--color-border-strong); background: var(--color-surface); }
.subject-icon { width: 46px; height: 46px; border-radius: 14px; font-size: 1.25rem; color: #fff; }
.subject-info { padding-right: 0; }
.subject-info h4 { font-size: var(--fs-base); font-weight: 700; margin-bottom: 6px; }
.subject-info .pdf-count { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pdf-badge { height: 24px; padding: 0 10px; font-size: 0.6875rem; letter-spacing: 0.04em; border-radius: var(--r-pill); color: var(--accent2); background: color-mix(in srgb, var(--accent) 12%, transparent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.semester-header { padding: 18px 2px 8px; font-size: var(--fs-xs); letter-spacing: 0.14em; border-bottom: 1px solid var(--border); }

.tab-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: var(--r-md); background: var(--color-surface-elevated); flex-wrap: nowrap; }
.tab-btn { min-width: 0; min-height: 42px; padding: 0 8px; border-radius: calc(var(--r-md) - 4px); font-size: var(--fs-sm); }
.tab-btn.active { background: var(--accent); box-shadow: var(--shadow-glow); }
.tab-btn .material-symbols-outlined { font-size: 1.15rem; }

.major-filter { margin: 4px 0 16px; }
.major-filter-label { margin-bottom: 8px; font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-muted); }
.major-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.major-chips::-webkit-scrollbar { display: none; }
.major-chip {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  height: 38px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: var(--r-pill);
  background: var(--color-surface-elevated); color: var(--color-text-secondary);
  font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; cursor: pointer;
}
.major-chip .material-symbols-outlined { font-size: 1.05rem; }
.major-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: var(--shadow-glow); }

/* Axtarış (fənn səhifələri) */
.search-bar-container { margin: 0 0 14px; }
.search-bar-wrapper { position: relative; display: flex; align-items: center; height: 50px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--color-surface-elevated); }
.search-bar-wrapper .search-icon { display: grid; place-items: center; width: 46px; color: var(--color-text-muted); }
.search-bar-wrapper input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--color-text-primary); font-size: var(--fs-md); }
.search-bar-wrapper:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent); }
.search-clear { display: none; width: 40px; height: 40px; margin-right: 4px; border: 0; border-radius: 50%; background: transparent; color: var(--color-text-secondary); cursor: pointer; }
.search-clear.visible { display: block; }
.search-results-info { margin: 8px 2px 0; color: var(--color-text-muted); font-size: var(--fs-sm); }

/* Fənn səhifəsi başlığı (hero) */
.subject-hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 20px 18px 18px; margin: 4px 0 18px;
  border: 1px solid var(--border); border-radius: var(--r-xl);
  background:
    radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 62%),
    linear-gradient(165deg, var(--color-surface), var(--color-background-alt));
}
.subject-hero .badge { margin-bottom: 10px; }
.subject-hero h1 { margin: 0 0 8px; font-size: 1.5rem; line-height: 1.16; }
.subject-hero h1 em { font-style: normal; color: var(--accent2); }
.subject-hero p { margin: 0 0 16px; max-width: 52ch; color: var(--color-text-secondary); font-size: var(--fs-base); line-height: 1.5; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.hero-stat { display: flex; align-items: center; gap: 10px; }
.hero-stat > .ic { display: grid; place-items: center; box-sizing: content-box; width: 22px; height: 22px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--color-surface-elevated); color: var(--color-text-primary); }
.hero-stat b { display: block; font-size: 1.125rem; font-weight: 800; line-height: 1.1; }
.hero-stat small { display: block; color: var(--color-text-secondary); font-size: var(--fs-xs); }
.pdf-section-header { margin: 0 0 12px; }
.pdf-subject-title { display: none; }
.pdf-items { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 768px) { .pdf-items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } .pdf-items > .report-error-btn, .pdf-items > .empty-favs { grid-column: 1 / -1; } }
.empty-favs { padding: 28px 16px; text-align: center; color: var(--color-text-secondary); border: 1px dashed var(--border); border-radius: var(--r-lg); font-size: var(--fs-sm); }
.report-error-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; margin-top: 4px;
  border: 1px dashed var(--color-border-strong); border-radius: var(--r-md);
  background: transparent; color: var(--color-text-secondary); font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
}
.report-error-btn:hover { color: var(--color-text-primary); background: var(--color-primary-soft); }
.info-btn { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); background: var(--color-surface-elevated); color: var(--accent2); font-weight: 800; cursor: pointer; }

/* ═════════════════════════════════════════════════════════════
   GPA KALKULYATOR
   ═════════════════════════════════════════════════════════════ */
#main-gpa .gpa-hero, #main-gpa .gpa-footer { display: none; }
.count-stepper {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 60px; padding: 8px 8px 8px 18px; margin-top: 14px;
  border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--color-surface-elevated);
}
.count-stepper > span { font-size: var(--fs-md); font-weight: 600; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--color-surface); color: var(--color-text-primary); font-size: 1.2rem; cursor: pointer;
}
.stepper button:disabled { opacity: 0.4; cursor: not-allowed; }
.stepper output { min-width: 44px; text-align: center; font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }

#main-gpa .gpa-mode-toggle { margin: 14px 0 0; }
.gpa-mode-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--color-surface-elevated); }
.gpa-mode-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; border: 0; border-radius: calc(var(--r-md) - 4px); background: transparent; color: var(--color-text-secondary); font-weight: 700; font-size: var(--fs-sm); cursor: pointer; }
.gpa-mode-btn.active { background: var(--accent); color: #fff; box-shadow: var(--shadow-glow); }

/* Nəticə kartı */
.gpa-result-card {
  position: relative; overflow: hidden; isolation: isolate;
  margin: 16px 0 12px; padding: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: var(--r-xl);
  background: linear-gradient(150deg, var(--color-primary-hover) 0%, var(--accent) 45%, color-mix(in srgb, var(--accent) 60%, #021b4a) 100%);
  color: #fff;
  box-shadow: 0 16px 36px color-mix(in srgb, var(--accent) 34%, transparent);
  display: block;
}
.gpa-result-card::after { content: ''; position: absolute; z-index: -1; right: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,0.22), transparent 70%); }
.gpa-result-top { display: flex; align-items: center; gap: 16px; }
.gpa-result-icon { display: grid; place-items: center; width: 64px; height: 64px; flex-shrink: 0; border-radius: 18px; background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.28); font-size: 1.9rem; }
.gpa-result-label { margin: 0 0 2px; font-size: var(--fs-base); font-weight: 600; color: rgba(255,255,255,0.88); }
.gpa-result-value { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.gpa-result-value #gpa-current { font-size: 2.75rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: #fff !important; text-shadow: none !important; }
.gpa-result-value small { font-size: 1.1rem; font-weight: 500; color: rgba(255,255,255,0.8); }
.gpa-result-card #gpa-grade-label { display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: var(--r-pill); background: rgba(255,255,255,0.18); font-size: var(--fs-xs); font-weight: 700; color: #fff !important; }
.gpa-result-card .gpa-ring-wrap, .gpa-result-card > svg { display: none; }
.gpa-stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 14px; }
.gpa-stat-cell { padding: 10px 6px; border-radius: 12px; background: rgba(2, 18, 48, 0.28); text-align: center; display: flex; flex-direction: column; gap: 2px; }
.gpa-stat-val { font-size: 1.125rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.gpa-stat-lbl { font-size: 0.6875rem; font-weight: 600; color: rgba(255,255,255,0.8); }
.gpa-result-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.gpa-recalc-btn, .gpa-share-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 16px;
  border: 1px solid rgba(255,255,255,0.22); border-radius: var(--r-md);
  background: rgba(2, 18, 48, 0.32); color: #fff;
  font-size: var(--fs-md); font-weight: 700; cursor: pointer;
}
.gpa-share-btn { margin: 0; width: auto; font-size: var(--fs-sm); }
.gpa-recalc-btn:hover, .gpa-share-btn:hover { background: rgba(2, 18, 48, 0.5); }

.gpa-section-header { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 10px; }
.gpa-section-title { margin: 0; padding: 0; border: 0; font-size: 1.0625rem; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--color-text-primary); }
.gpa-subject-count-badge { padding: 4px 12px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--color-surface-elevated); color: var(--color-text-secondary); font-size: var(--fs-xs); font-weight: 700; }

/* Fənn sətri: 1) ad  2) kredit | bal | çəki  3) status ... sil */
.gpa-subject-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas: "name name name" "credit score weight" "status status remove";
  align-items: end;
  gap: 10px;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--color-surface);
}
.gpa-subject-row .gpa-row-top, .gpa-subject-row .gpa-row-bottom { display: contents; }
.gpa-row-num { display: none; }
.gpa-subject-name {
  grid-area: name; min-width: 0; width: 100%; height: 48px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--color-surface-elevated); color: var(--color-text-primary);
  font-size: var(--fs-md); font-weight: 600;
}
.gpa-input-group { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.gpa-input-group--credit { grid-area: credit; }
.gpa-input-group--score  { grid-area: score; }
.gpa-input-group--weight { grid-area: weight; }
.gpa-input-group label { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; color: var(--color-text-muted); text-transform: uppercase; }
.gpa-num-input {
  width: 100%; height: 48px; padding: 0 8px; text-align: center;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--color-surface-elevated); color: var(--color-text-primary);
  font-size: 1.0625rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.gpa-subject-name:focus, .gpa-num-input:focus { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent); }
.gpa-weight-val {
  display: grid; place-items: center; height: 48px;
  border: 1px dashed var(--border); border-radius: 12px;
  color: var(--color-text-secondary); font-size: 1.0625rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.gpa-remove-btn {
  grid-area: remove; justify-self: end; display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent;
  color: var(--color-text-muted); font-size: var(--fs-sm); font-weight: 700; cursor: pointer;
}
.gpa-remove-btn:hover { color: var(--color-danger); background: color-mix(in srgb, var(--color-danger) 12%, transparent); }
.gpa-remove-placeholder { grid-area: remove; }
.gpa-status-badge { grid-area: status; justify-self: start; align-self: center; display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: var(--r-pill); font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.gpa-status-badge.passed { color: var(--color-success); background: color-mix(in srgb, var(--color-success) 14%, transparent); }
.gpa-status-badge.failed { color: var(--color-danger); background: color-mix(in srgb, var(--color-danger) 14%, transparent); }
.gpa-risk-dot { display: none; }
.gpa-add-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 52px; margin-top: 4px;
  border: 1px dashed var(--color-border-strong); border-radius: var(--r-md);
  background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent2);
  font-size: var(--fs-md); font-weight: 700; cursor: pointer;
}
.gpa-add-btn:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
@media (max-width: 359px) { .gpa-subject-row { padding: 12px; gap: 8px; } }

/* ═════════════════════════════════════════════════════════════
   DAHA ÇOX
   ═════════════════════════════════════════════════════════════ */
.page-title { margin: 12px 0 14px; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.account-card {
  display: flex; align-items: center; gap: 14px;
  min-height: 78px; padding: 14px 14px 14px 16px;
  border: 1px solid var(--border); border-radius: var(--r-lg);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, var(--color-surface)), var(--color-surface) 75%);
  color: var(--color-text-primary); text-decoration: none; width: 100%; font: inherit; text-align: left; cursor: pointer;
}
.account-card .avatar { width: 52px; height: 52px; font-size: 1.4rem; }
.account-card .grow { flex: 1; min-width: 0; }
.account-card b { display: block; font-size: 1.0625rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-card small { display: block; color: var(--color-text-secondary); font-size: var(--fs-sm); }
.account-card .chev { color: var(--color-text-muted); }
.menu-group { margin-top: 14px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--color-surface); overflow: hidden; }
.menu-group + .menu-group { margin-top: 14px; }
.menu-row {
  display: flex; align-items: center; gap: 14px;
  min-height: 56px; padding: 0 16px;
  width: 100%; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: transparent; color: var(--color-text-primary);
  font: inherit; font-size: var(--fs-md); font-weight: 600; text-align: left; text-decoration: none; cursor: pointer;
}
.menu-row:last-child { border-bottom: 0; }
.menu-row:hover { background: var(--color-primary-soft); }
.menu-row > .ic:first-child { font-size: 1.35rem; color: var(--accent2); }
.menu-row .grow { flex: 1; min-width: 0; }
.menu-row .chev { color: var(--color-text-muted); font-size: 1.15rem; }
.menu-row .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--color-danger); }
.menu-row .dot[hidden] { display: none; }
.menu-row small { color: var(--color-text-muted); font-size: var(--fs-sm); font-weight: 500; margin-right: 4px; }
.menu-row--danger { color: var(--color-danger); }
.menu-row--danger > .ic:first-child { color: var(--color-danger); }
.logout-row { margin-top: 14px; }
.more-version { margin: 22px 0 0; text-align: center; color: var(--color-text-muted); font-size: var(--fs-xs); }

/* Tema / dil seçimi (sheet daxilində) */
.theme-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sidebar-theme-opt {
  display: flex; align-items: center; gap: 6px;
  min-height: 48px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--color-surface-elevated); color: var(--color-text-primary);
  cursor: pointer; text-align: left;
}
.sidebar-theme-opt.active { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.theme-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25); flex-shrink: 0; }
.sidebar-theme-name { margin-left: 4px; font-size: var(--fs-sm); font-weight: 600; }
.theme-extra { display: none; }
.theme-extra.theme-extra-visible { display: flex; }
.theme-expand-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; min-height: 40px; padding: 0 4px; border: 0; background: none; color: var(--accent2); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.theme-expand-btn svg.rotated { transform: rotate(180deg); }

/* ── Düzəlişlər (v2.1): GPA sətir sahələri, stretched-link kartlar ──────────── */
.gpa-input-group--credit { grid-area: credit; }
.gpa-input-group--score  { grid-area: score; }

/* Kart başlığı = bütün karta uzanan link (düymələr üstdə qalır) */
.mat-title a { color: inherit; text-decoration: none; }
.mat-title a::after { content: ''; position: absolute; inset: 0; border-radius: var(--r-lg); z-index: 1; }
.mat-title a:focus-visible { outline: none; }
.mat-title a:focus-visible::after { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.mat-card .fav-btn, .mat-card .mat-actions, .mat-card .pdf-rating { position: relative; z-index: 2; }
.mat-card--row .fav-btn { width: 44px; min-height: 44px; flex-basis: 44px; }
.mat-rate-slot:empty { display: none; }
.mat-rate .cnt { margin-left: 2px; color: var(--color-text-muted); font-weight: 500; }
.mat-card--rich .mat-actions .fav-btn { min-height: 46px; }
.subject-card, .course-card { text-decoration: none; color: inherit; }
.subject-card > .ic:last-child { margin-left: auto; color: var(--color-text-muted); font-size: 1.3rem; }
.account-card--guest b { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; }

/* ── Toxunma hədəfləri (mobil): kiçik köməkçi keçidlər ən azı 44px hündürlükdə ── */
@media (max-width: 1023px) {
  .link-more,
  .home-footer-link { display: inline-flex; align-items: center; min-height: 44px; }
  .home-footer-link { padding-inline: 6px; }
  .rating-toggle-btn,
  .qr-pay-btn,
  .ssb-m10-btn { min-height: 44px; }
}

/* ── Dar ekranlar (≤389px): xüsusiyyət kartları sözü ortadan bölməsin ── */
@media (max-width: 389px) {
  .feature-grid { gap: 10px; }
  .feature-card { padding: 10px; gap: 10px; }
  .feature-icon { width: 40px; height: 40px; border-radius: 12px; }
  .feature-text b { font-size: 0.875rem; }
}
@media (max-width: 359px) {
  .feature-card { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .feature-text b { font-size: 0.9375rem; }
}

/* Hero başlığı: sətir sonunda tək söz qalmasın */
.hero-title { text-wrap: balance; }
@media (min-width: 768px) {
  .hero-title { max-width: 22ch; font-size: 2rem; }
  .hero-sub { max-width: 44ch; }
}

/* Yeniliklər: Teleqram postları */
.news-group { margin: 6px 2px 0; font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-muted); }
.news-group:first-child { margin-top: 0; }
.news-item--tg { align-items: flex-start; }
.news-item--tg > .ic:first-child { margin-top: 2px; }
.news-item--tg .chev { margin-top: 3px; }
.news-item--tg .tg-head,
.news-item--tg .tg-body { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.news-item--tg .tg-head { -webkit-line-clamp: 2; line-clamp: 2; }
.news-item--tg .tg-body { -webkit-line-clamp: 2; line-clamp: 2; margin-top: 2px; color: var(--color-text-secondary); font-size: var(--fs-sm); line-height: 1.4; overflow-wrap: anywhere; }
.news-item--tg small { display: block; margin-top: 4px; }
