/* "BSQ" bölməsi (login.html#bsqBlock, js/bsq.js): yarımil/sinif seçimi, bölmə üzrə bal-qiymət cədvəli, sinif ayarları.
   Vərəqin özü PDF-dir (js/bsq-pdf.js) — burada yalnız ekran interfeysi var. */

.bsq-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin: 0 0 0.8rem; }
.bsq-year { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 600; }
.bsq-year select { padding: 0.35rem 0.6rem; border: 1px solid var(--cab-border, #cfd6e4); border-radius: 8px; background: #fff; font: inherit; }

.bsq-seg, .bsq-views, .bsq-sections { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; }
.bsq-seg button, .bsq-views button, .bsq-sections button {
  padding: 0.4rem 0.9rem; border: 1px solid var(--cab-border, #cfd6e4); border-radius: 999px; background: transparent; color: inherit;
  font: inherit; cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.bsq-seg button:hover, .bsq-views button:hover, .bsq-sections button:hover { border-color: var(--navy, #00223f); }
.bsq-seg button.is-active, .bsq-sections button.is-active { background: var(--navy, #00223f); border-color: var(--navy, #00223f); color: #fff; }
.bsq-views { margin: 0 0 0.8rem; padding: 0.25rem; border-radius: 12px; background: var(--surface-soft, #f2f5fa); }
.bsq-views button { border-color: transparent; border-radius: 9px; font-weight: 600; }
.bsq-views button.is-active { background: #fff; border-color: var(--cab-border, #cfd6e4); box-shadow: 0 1px 2px rgba(0, 34, 63, 0.08); }
.bsq-sections { margin: 0 0 0.7rem; }
.bsq-seg button:focus-visible, .bsq-views button:focus-visible, .bsq-sections button:focus-visible { outline: 2px solid var(--cab-accent-strong, #0a7ea4); outline-offset: 2px; }

.bsq-status { min-height: 1.4em; margin: 0 0 0.5rem; font-size: 0.92rem; color: var(--ink-soft, #4a5b70); }
.bsq-status.is-ok { color: #12794a; }
.bsq-status.is-error { color: var(--danger, #c03a2b); }
.bsq-note { margin: 0 0 0.6rem; padding: 0.55rem 0.8rem; border-radius: 10px; background: #fff8e6; color: #6b5200; font-size: 0.92rem; }
.bsq-note.is-error { background: #fbe5e2; color: #8f2318; }

.bsq-student-tools { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.7rem 1rem; margin-bottom: 0.8rem; }
.bsq-student-select, .bsq-manual-student { padding: 0.55rem 0.75rem; border: 1px solid var(--cab-border, #cfd6e4); border-radius: 10px; background: #f4f7fb; }
.bsq-student-select { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; min-width: 0; font-weight: 600; }
.bsq-student-select select { max-width: 100%; padding: 0.35rem 0.5rem; border: 1px solid var(--cab-border, #cfd6e4); border-radius: 8px; background: #fff; font: inherit; font-weight: 400; }
.bsq-manual-student { max-width: 100%; }
.bsq-manual-student summary { padding: 0.28rem 0; font-weight: 600; cursor: pointer; }
.bsq-manual-student .bsq-fields { grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr)); align-items: end; margin: 0.65rem 0 0; }
.bsq-manual-student input { width: 100%; }
.bsq-manual-student button { justify-self: start; }

.bsq-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 0.8rem; }

.bsq-table-wrap { overflow-x: auto; border: 1px solid var(--cab-border, #dde6f1); border-radius: 12px; background: #fff; }
.bsq-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.bsq-table th { padding: 0.45rem 0.5rem; background: #f4f7fb; border-bottom: 1px solid #e3eaf2; font-weight: 600; text-align: center; white-space: nowrap; }
.bsq-table th.bsq-subj { border-left: 1px solid #e3eaf2; }
.bsq-table th.bsq-sub { font-size: 0.8rem; font-weight: 500; color: var(--ink-soft, #4a5b70); }
.bsq-table td { padding: 0.35rem 0.45rem; border-bottom: 1px solid #eef2f8; vertical-align: top; text-align: center; }
.bsq-table tbody tr:last-child td { border-bottom: 0; }
.bsq-table tr.is-edited td { background: #fffbeb; }
.bsq-num { width: 2.2rem; color: var(--ink-soft, #4a5b70); text-align: center; }
.bsq-name-col { min-width: 15rem; text-align: left !important; }
.bsq-utis { color: var(--ink-soft, #4a5b70); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bsq-name, .bsq-bal, .bsq-q, .bsq-mini input, .bsq-mini select, .bsq-fields input {
  box-sizing: border-box; padding: 0.35rem 0.5rem; border: 1px solid var(--cab-border, #cfd6e4); border-radius: 8px; background: #fff;
  font: inherit; color: inherit;
}
.bsq-name { width: 100%; }
.bsq-bal { width: 4.4rem; text-align: center; font-variant-numeric: tabular-nums; }
.bsq-q { width: 3.6rem; }
.bsq-bal.is-invalid { border-color: var(--danger, #c03a2b); background: #fdecea; color: #8f2318; }
.bsq-name:focus, .bsq-bal:focus, .bsq-q:focus, .bsq-mini input:focus, .bsq-mini select:focus, .bsq-fields input:focus {
  outline: 2px solid var(--cab-accent-strong, #0a7ea4); outline-offset: 0; border-color: transparent;
}
.bsq-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; margin-top: 0.3rem; }
.bsq-badge { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px; background: #e4eefb; color: #1d4f8f; font-size: 0.78rem; }
.bsq-badge.is-warn { background: #fdf0d9; color: #8a5300; }
.bsq-link { padding: 0; border: 0; background: none; color: var(--cab-accent-strong, #0a7ea4); font: inherit; font-size: 0.82rem; text-decoration: underline; cursor: pointer; }
.bsq-link.is-danger { color: var(--danger, #c03a2b); }
.bsq-link:disabled { color: #9aa7b6; cursor: default; text-decoration: none; }
.bsq-sheet-btn { padding: 0.3rem 0.7rem; font-size: 0.85rem; }

.bsq-settings { max-width: 62rem; }
.bsq-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.7rem 1rem; margin: 0 0 1rem; }
.bsq-fields label { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 600; font-size: 0.9rem; }
.bsq-fields input { font-weight: 400; }
.bsq-h { margin: 1.1rem 0 0.5rem; font-size: 1rem; }
.bsq-mini { width: 100%; margin: 0 0 0.5rem; border-collapse: collapse; font-size: 0.92rem; }
.bsq-mini th { padding: 0.35rem 0.4rem; border-bottom: 1px solid #e3eaf2; font-weight: 600; text-align: left; }
.bsq-mini td { padding: 0.3rem 0.4rem; border-bottom: 1px solid #eef2f8; }
.bsq-mini input { width: 100%; }
.bsq-row-actions { white-space: nowrap; text-align: right; }
.bsq-icon-btn { width: 1.8rem; height: 1.8rem; border: 1px solid var(--cab-border, #cfd6e4); border-radius: 6px; background: #fff; cursor: pointer; }
.bsq-icon-btn:disabled { opacity: 0.4; cursor: default; }
.bsq-empty { color: var(--ink-soft, #4a5b70); text-align: center; }
.bsq-settings .bsq-actions { margin-top: 1rem; }

@media (max-width: 720px) {
  .bsq-bar { flex-direction: column; align-items: flex-start; }
  .bsq-name-col { min-width: 11rem; }
}

/* Sətrin sonu: "Vərəq" və saxlanmış nəticə üçün "Nəticəni sil" */
.bsq-row-end { white-space: nowrap; }
.bsq-row-end .bsq-link { display: block; margin: 0.35rem auto 0; }

/* Ayarlar → "Silinmiş fənlər": ballar itmir, "Geri qaytar" eyni açarla qaytarır */
.bsq-removed { margin: 0.8rem 0 0; padding: 0.7rem 0.9rem; border: 1px dashed var(--cab-border, #cfd6e4); border-radius: 10px; background: #fbfcfe; }
.bsq-removed h4 { margin: 0 0 0.3rem; font-size: 0.92rem; }
.bsq-removed .section-note { margin: 0 0 0.4rem; }
.bsq-removed ul { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 0; padding: 0; list-style: none; }
.bsq-removed li { display: inline-flex; align-items: center; gap: 0.5rem; }
.bsq-table input:disabled, .bsq-table select:disabled { background: #f3f5f8; color: #8a97a8; cursor: not-allowed; }

/* ---------------------------------------------------------------- ayrıca səhifə (js/pages/bsq.html, /bsq) — Yeməkxana səhifəsi kimi */
.bsqp-hero {
  position: relative; overflow: hidden; padding: 1.4rem 1.5rem 1.5rem; color: #fff;
  background: linear-gradient(120deg, var(--navy-deep, #061a33) 0%, var(--navy, #0b2a4a) 60%, #0a3a63 100%);
}
.bsqp-hero::after {
  content: ''; position: absolute; right: -6rem; top: -6rem; width: 22rem; height: 22rem; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(38, 210, 255, 0.22) 0%, rgba(38, 210, 255, 0) 70%);
}
.bsqp-hero-inner { position: relative; z-index: 1; max-width: 1760px; margin: 0 auto; }
.bsqp-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0 0 0.55rem; padding: 0; list-style: none; font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); }
.bsqp-breadcrumb li + li::before { content: '/'; margin-right: 0.4rem; color: rgba(255, 255, 255, 0.4); }
.bsqp-breadcrumb a { color: rgba(255, 255, 255, 0.85); }
.bsqp-breadcrumb a:hover { color: var(--cyan, #26d2ff); }
.bsqp-breadcrumb [aria-current] { color: #fff; font-weight: 600; }
.bsqp-hero-body { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1.5rem; }
.bsqp-hero-text { flex: 1 1 14rem; min-width: 0; }
.bsqp-hero h1 { margin: 0; font-family: var(--font-display, inherit); font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 700; line-height: 1.15; }
.bsqp-sub { margin: 0.45rem 0 0; color: rgba(255, 255, 255, 0.78); font-size: 0.95rem; }
.bsqp-user { display: inline-block; margin-top: 0.7rem; padding: 0.3rem 0.85rem; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 999px; background: rgba(255, 255, 255, 0.08); font-size: 0.85rem; color: rgba(255, 255, 255, 0.9); }
.bsqp-user:empty { display: none; }
.bsqp-hero-icon {
  --ico-acc: #5ee0a0;
  position: relative; flex: 0 0 auto; display: grid; place-items: center; width: 5.5rem; height: 5.5rem; border-radius: 1.4rem; color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
  box-shadow: 0 22px 44px -26px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.bsqp-hero-icon::before, .bsqp-hero-icon::after { content: ''; position: absolute; pointer-events: none; border: 1px solid rgba(255, 255, 255, 0.09); }
.bsqp-hero-icon::before { inset: -0.85rem; border-radius: 2.1rem; }
.bsqp-hero-icon::after { inset: -1.7rem; border-radius: 2.8rem; border-color: rgba(255, 255, 255, 0.05); }
.bsqp-hero-icon svg { width: 3.7rem; height: 3.7rem; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bsqp-hero-icon .ico-acc { stroke: var(--ico-acc); }
.bsqp-main { max-width: 1760px; margin: 0 auto; padding: 1.2rem 1.25rem 2.5rem; }
.bsqp-panel { padding: 1.1rem 1.25rem 1.4rem; border: 1px solid #e3eaf2; border-radius: 1rem; background: #fff; box-shadow: 0 18px 40px -30px rgba(10, 40, 80, 0.35); }
.bsqp-panel[hidden] { display: none; }
.bsqp-gate { max-width: 36rem; margin: 2rem auto; padding: 1.6rem 1.5rem; border: 1px solid #e3eaf2; border-radius: 1rem; background: #fff; text-align: center; }
.bsqp-gate[hidden] { display: none; }
.bsqp-gate h2 { margin: 0 0 0.6rem; }
.bsqp-gate-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin: 1.1rem 0 0; }
/* Geniş səhifədə cədvəl daha çox fənni sürüşdürmədən göstərir; ayarlar forması oxunaqlı endə qalır */
.bsqp-panel .bsq-settings { max-width: 72rem; }

@media (max-width: 700px) {
  .bsqp-hero { padding: 1.1rem 1rem 1.2rem; }
  .bsqp-hero-text { flex-basis: 8rem; }
  .bsqp-hero-icon { width: 3.75rem; height: 3.75rem; border-radius: 1rem; }
  .bsqp-hero-icon::before { inset: -0.55rem; border-radius: 1.5rem; }
  .bsqp-hero-icon::after { inset: -1.1rem; border-radius: 2rem; }
  .bsqp-hero-icon svg { width: 2.5rem; height: 2.5rem; }
  .bsqp-main { padding: 0.8rem 0.5rem 1.5rem; }
  .bsqp-panel { padding: 0.7rem 0.6rem 1rem; border-radius: 0.8rem; }
}

/* ---------------------------------------------------------------- ön baxış pəncərəsi (js/bsq.js#bsqShowPreview, <body>-də) */
.bsq-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(10, 22, 40, 0.62); }
.bsq-modal[hidden] { display: none; }
.bsq-modal-card { display: flex; flex-direction: column; width: min(880px, 100%); max-height: 94vh; overflow: hidden; border-radius: 1rem; background: #eef1f6; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.6); }
.bsq-modal-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; padding: 0.8rem 1rem; border-bottom: 1px solid #e3eaf2; background: #fff; }
.bsq-modal-title { display: flex; flex: 1 1 16rem; flex-direction: column; min-width: 0; }
.bsq-modal-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bsq-modal-title span { color: var(--ink-soft, #4a5b70); font-size: 0.85rem; }
.bsq-modal-body { display: flex; flex-direction: column; align-items: center; gap: 1rem; overflow: auto; padding: 1rem; }
.bsq-page { display: block; max-width: 100%; height: auto; border-radius: 4px; background: #fff; box-shadow: 0 8px 24px -14px rgba(10, 40, 80, 0.55); }

@media (max-width: 700px) {
  .bsq-modal { padding: 0; }
  .bsq-modal-card { width: 100%; max-height: 100vh; height: 100%; border-radius: 0; }
}

/* 9-cu sinfin vərəq növləri (Buraxılış fənləri / Blok fənlər 1 / Blok fənlər 2) — sinif seçiminin yanında */
.bsq-kinds { padding-left: 0.6rem; border-left: 2px solid var(--cab-border, #cfd6e4); }
@media (max-width: 720px) { .bsq-kinds { padding-left: 0; border-left: 0; } }
