/* =====================================================================
   İstifadəçi səhifəsi: şəkil (3x4), xülasə, valideyn əlavəsi
   (app.css böyük olduğu üçün yeni stillər bu kiçik faylda saxlanılır)
   ===================================================================== */
.user-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem; align-items: start; margin-bottom: 1.2rem; }
.user-photo-box { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.user-photo { position: relative; width: 120px; height: 160px; border-radius: 12px; overflow: hidden; cursor: pointer;
  background: var(--surface-2); border: 2px dashed var(--border-strong); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; }
.user-photo span { font: 800 2rem var(--font-head); color: var(--muted); }
.user-photo small { font-size: .7rem; color: var(--muted); font-weight: 700; letter-spacing: .08em; }
.user-photo.has-photo { border: 2px solid var(--gold); }
.user-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.user-photo-edit { position: absolute; right: 6px; bottom: 6px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy); color: #fff; font-style: normal; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.user-photo:hover .user-photo-edit { background: var(--gold); color: var(--navy); }
.user-hero-main { min-width: 0; }
.user-hero-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.user-hero-head h2 { font: 800 1.35rem var(--font-head); margin: 0; }
.user-hero-main > p { margin: .3rem 0 .9rem; }
.user-stats { display: flex; flex-wrap: wrap; gap: .6rem; }
.user-stat { --tone: var(--primary); display: flex; flex-direction: column; min-width: 104px; padding: .6rem .8rem; border-radius: 12px;
  background: color-mix(in srgb, var(--tone) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--tone) 18%, transparent); }
.user-stat.tone-teal { --tone: #0f766e; } .user-stat.tone-blue { --tone: #2563eb; } .user-stat.tone-rose { --tone: #e11d48; } .user-stat.tone-amber { --tone: #d97706; }
.user-stat-icon { color: var(--tone); line-height: 0; margin-bottom: .2rem; }
.user-stat b { font: 800 1.15rem var(--font-head); color: var(--text); white-space: nowrap; }
.user-stat small { color: var(--muted); font-size: .74rem; }
.user-hero-actions { display: flex; flex-direction: column; gap: .5rem; }
.avatar.has-photo { padding: 0; overflow: hidden; background: var(--surface-2); }
.avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Şagird → valideynlər */
.linked-row { display: flex; align-items: center; gap: .4rem; }
.linked-row .linked-item { flex: 1; min-width: 0; }
.parent-add { margin-top: .9rem; border: 1px dashed var(--border-strong); border-radius: 12px; padding: .2rem .9rem; }
.parent-add[open] { padding-bottom: .9rem; }
.parent-add summary { cursor: pointer; font-weight: 700; color: var(--primary); padding: .55rem 0; list-style: none; display: flex; align-items: center; gap: .4rem; }
.parent-add summary::-webkit-details-marker { display: none; }
[data-theme="dark"] .parent-add summary { color: var(--gold); }
.parent-add-body { display: flex; flex-direction: column; gap: .7rem; }
.parent-add-body .btn { align-self: flex-start; }
.parent-or { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .8rem; }
.parent-or::before, .parent-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.parent-link { display: flex; gap: .5rem; align-items: center; }
.parent-link .input-icon { flex: 1; }

/* Valideyn → övlad seçimi: sinif süzgəci */
.class-filter { display: flex; flex-wrap: wrap; gap: .35rem; margin: .6rem 0; }
.class-filter .chip { cursor: pointer; border: 1px solid var(--border); background: var(--surface); }
.class-filter .chip.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.class-filter .chip b { margin-left: .2rem; }
.pick-item.is-filtered { display: none !important; }

/* Giriş kartı: paylaşma */
.cred-share { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .7rem; }

/* Tabel və arayışda şəkil */
.rc-info.has-photo { grid-template-columns: 22mm 1.6fr .6fr 1.2fr .8fr; }
.rc-info.has-photo .rc-photo { grid-row: span 1; width: 22mm; height: 29mm; object-fit: cover; border-radius: 4px; border: 1px solid #dfe2ee; }
.cert-page.has-photo { position: relative; }
.cert-photo { position: absolute; right: 14mm; top: 48mm; width: 30mm; height: 40mm; object-fit: cover; border: 1px solid #ccd1e3; border-radius: 3px; }
.cert-page.has-photo .cert-text:first-of-type { padding-right: 36mm; }

@media (max-width: 820px) {
  .user-hero { grid-template-columns: auto 1fr; }
  .user-hero-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .rc-info.has-photo { grid-template-columns: 22mm 1fr 1fr; }
}
@media (max-width: 560px) {
  .user-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .user-hero-head, .user-stats { justify-content: center; }
  .user-hero-actions { justify-content: center; }
  .parent-link { flex-direction: column; align-items: stretch; }
}
@media print {
  .cred-share { display: none !important; }
}

[hidden] { display: none !important; }

/* =====================================================================
   Kömək (FAQ)
   ===================================================================== */
.faq-hero { display: grid; gap: 1.1rem; padding: 1.8rem 1.6rem; margin-bottom: 1.1rem; border-radius: 18px; color: #fff;
  background: radial-gradient(circle at 85% 0%, #1a2275 0%, #0e1559 45%, #080d3d 100%); border-bottom: 3px solid var(--gold); }
.faq-hero h1 { font: 800 1.6rem var(--font-head); margin: 0 0 .3rem; color: #fff; }
.faq-hero p { margin: 0; color: rgba(255,255,255,.75); }
.faq-search { display: flex; align-items: center; gap: .6rem; background: #fff; border-radius: 14px; padding: 0 1rem; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.faq-search .icon { color: #6c7294; flex-shrink: 0; }
.faq-search input { flex: 1; border: 0 !important; outline: 0; height: 52px; font-size: 1rem; background: transparent !important; color: #11163d; box-shadow: none !important; padding: 0; }
.faq-cats { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.faq-cat { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .8rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-weight: 600; font-size: .86rem; text-decoration: none; }
.faq-cat:hover { border-color: var(--gold); }
.faq-cat b { font-size: .72rem; background: var(--surface-3); color: var(--muted); border-radius: 999px; padding: .05rem .45rem; }
.faq-list { display: flex; flex-direction: column; gap: 1.4rem; }
.faq-section { scroll-margin-top: 80px; }
.faq-section h2 { display: flex; align-items: center; gap: .6rem; font: 800 1.1rem var(--font-head); margin: 0 0 .7rem; }
.faq-section h2 .tag { margin-left: 0; }
.faq-sec-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--warn); }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; margin-bottom: .5rem; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.faq-item[open] { border-color: color-mix(in srgb, var(--gold) 60%, var(--border)); box-shadow: var(--shadow-sm); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .8rem; padding: .95rem 1.1rem; font-weight: 600; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary span { flex: 1; }
.faq-item summary i { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-3); color: var(--muted); font-style: normal; transition: transform .2s, background .2s; flex-shrink: 0; }
.faq-item[open] summary i { transform: rotate(45deg); background: var(--gold); color: var(--navy); }
.faq-answer { padding: 0 1.1rem 1.05rem 1.1rem; color: var(--text-2); line-height: 1.65; font-size: .94rem; }
.faq-answer ol, .faq-answer ul { margin: .4rem 0; padding-left: 1.3rem; }
.faq-answer li { margin: .2rem 0; }
.faq-answer b { color: var(--text); }
.faq-contact { display: flex; align-items: center; gap: 1rem; margin-top: 1.6rem; }
.faq-contact > .icon { width: 30px; height: 30px; color: var(--gold); flex-shrink: 0; }
.faq-contact > div { flex: 1; }
.faq-contact p { margin: .15rem 0 0; }
@media (max-width: 560px) {
  .faq-hero { padding: 1.3rem 1.1rem; }
  .faq-hero h1 { font-size: 1.3rem; }
  .faq-contact { flex-direction: column; text-align: center; }
}

/* =====================================================================
   İdarə paneli: canlı saat və «Kim onlayndır»
   ===================================================================== */
.live-clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; margin-left: auto; position: relative; z-index: 1; }
.live-clock b { font: 800 2rem var(--font-head); letter-spacing: .04em; color: #fff; font-variant-numeric: tabular-nums; }
.live-clock small { color: var(--gold-2); font-weight: 600; font-size: .8rem; margin-top: .2rem; }
.welcome:has(.live-clock) { flex-wrap: wrap; }
.online-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin-bottom: .7rem; }
.online-big { display: inline-flex; align-items: center; gap: .45rem; font-size: .95rem; }
.online-big b { font: 800 1.6rem var(--font-head); }
.online-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.18); animation: onl 2s infinite; }
@keyframes onl { 50% { box-shadow: 0 0 0 6px rgba(22,163,74,.05); } }
.online-roles { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .8rem; }
.online-roles .chip b { margin-left: .25rem; }
.online-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.online-list li { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .6rem; align-items: center; padding: .45rem 0; border-top: 1px solid var(--border); }
.online-list li:first-child { border-top: 0; }
.online-av { position: relative; grid-row: span 2; line-height: 0; }
.online-av .online-dot { position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border: 2px solid var(--surface); box-shadow: none; animation: none; }
.online-list a { font-weight: 600; color: var(--text); text-decoration: none; font-size: .9rem; }
.online-list small { font-size: .75rem; }
.online-empty { margin: .2rem 0; }
@media (max-width: 720px) {
  .live-clock { align-items: flex-start; margin-left: 0; width: 100%; order: 2; }
  .live-clock b { font-size: 1.7rem; }
}

/* =====================================================================
   Təhlükəsizlik mərkəzi
   ===================================================================== */
.sec-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1.25rem; margin-bottom: 1.25rem; align-items: stretch; }
.sec-top .sec-stats { margin: 0; }
.sec-score { display: flex; align-items: center; gap: 1.2rem; margin: 0; }
.sec-score h3 { margin: 0 0 .3rem; font: 800 1.1rem var(--font-head); }
.sec-score p { margin: 0; font-size: .86rem; }
.sec-ring { --c: var(--success); flex-shrink: 0; width: 96px; height: 96px; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(closest-side, var(--surface) 78%, transparent 80% 100%), conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-3) 0); }
.sec-ring b { font: 800 1.7rem/1 var(--font-head); color: var(--text); }
.sec-ring small { color: var(--muted); font-size: .72rem; }
.sec-score.is-mid .sec-ring { --c: var(--gold); }
.sec-score.is-low .sec-ring { --c: var(--danger); }
.sec-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.sec-checks li { display: flex; gap: .7rem; align-items: flex-start; padding: .65rem .75rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.sec-checks li div { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.sec-checks li b { font-size: .92rem; }
.sec-checks li small { color: var(--muted); font-size: .8rem; line-height: 1.45; }
.sec-mark { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.sec-mark .icon { width: 16px; height: 16px; }
.sec-checks .is-ok .sec-mark { background: var(--success-soft); color: var(--success); }
.sec-checks .is-bad { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); background: color-mix(in srgb, var(--danger) 5%, var(--surface)); }
.sec-checks .is-bad .sec-mark { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.sec-checks .is-warn { border-color: color-mix(in srgb, var(--gold) 45%, var(--border)); }
.sec-checks .is-warn .sec-mark { background: var(--accent-soft); color: var(--warn); }
.sec-checks .is-info .sec-mark { background: var(--surface-3); color: var(--muted); }
.sec-note { padding: .7rem 1.1rem 1rem; margin: 0; }
.sec-danger { border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); }
.sec-danger p { margin: 0 0 .8rem; }
.sec-admins, .sec-fails { list-style: none; margin: 0; padding: 0 1.1rem .4rem; }
.sec-admins li, .sec-fails li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .55rem 0; border-top: 1px solid var(--border); }
.sec-admins li:first-child, .sec-fails li:first-child { border-top: 0; }
.sec-admins li > div { display: flex; flex-direction: column; min-width: 0; }
.sec-admins a { color: var(--text); text-decoration: none; }
.sec-admins small { font-size: .76rem; overflow-wrap: anywhere; }
.sec-admins li.is-muted { opacity: .55; }
.sec-fails li b { font-size: .86rem; overflow-wrap: anywhere; }
.sec-fails li small { font-size: .75rem; white-space: nowrap; }
.tag.tag-ok { background: var(--success-soft); color: var(--success); }
@media (max-width: 900px) { .sec-top { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .sec-score { flex-direction: column; text-align: center; } }

/* =====================================================================
   Jurnal nəzarəti: həftəlik monitorinq, kilid müraciətləri
   ===================================================================== */
.tab-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: .3rem; border-radius: 999px; background: var(--danger); color: #fff; font-size: .7rem; }
.jc-weeknav { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin: .2rem 0 1rem; }
.jc-weeknav strong { font: 800 1.05rem var(--font-head); }
.jc-weeknav .jc-next .icon { transform: rotate(180deg); }
.jc-rule { margin-left: auto; display: inline-flex; align-items: center; gap: .3rem; }
.jc-stat.is-good { --tone: var(--success); } .jc-stat.is-mid { --tone: #d97706; } .jc-stat.is-low { --tone: var(--danger); }
.jc-list { list-style: none; margin: 0; padding: 0; }
.jc-list > li { --c: var(--muted); border-top: 1px solid var(--border); }
.jc-list > li:first-child { border-top: 0; }
.jc-list > li.is-good { --c: var(--success); } .jc-list > li.is-mid { --c: #d97706; } .jc-list > li.is-low { --c: var(--danger); }
.jc-list summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 28px minmax(0, 1fr) 140px 52px; align-items: center; gap: .7rem; padding: .7rem 1.1rem; }
.jc-list summary::-webkit-details-marker { display: none; }
.jc-list summary:hover { background: var(--surface-2); }
.jc-rank { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .78rem; background: var(--surface-3); color: var(--muted); }
.jc-who { display: flex; flex-direction: column; min-width: 0; }
.jc-who b { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jc-who small { font-size: .76rem; }
.jc-c-late, .jc-c-no_topic { color: #b45309; } .jc-c-missing { color: var(--danger); font-weight: 600; } .jc-c-pending { color: var(--info); }
.jc-bar { height: 8px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.jc-bar i { display: block; height: 100%; background: var(--c); border-radius: 6px; }
.jc-pct { font: 800 1rem var(--font-head); color: var(--c); text-align: right; }
.jc-items { list-style: none; margin: 0; padding: 0 1.1rem .8rem 3.3rem; display: flex; flex-direction: column; gap: .35rem; }
.jc-items li { display: flex; align-items: center; gap: .55rem; font-size: .85rem; }
.jc-items li > span:nth-child(2) { flex: 1; min-width: 0; }
.jc-st { display: inline-block; flex-shrink: 0; padding: .12rem .5rem; border-radius: 999px; font-size: .7rem; font-weight: 700; white-space: nowrap; }
.jc-st-ok { background: var(--success-soft); color: var(--success); }
.jc-st-late, .jc-st-no_topic { background: var(--accent-soft); color: var(--warn); }
.jc-st-missing { background: color-mix(in srgb, var(--danger) 13%, transparent); color: var(--danger); }
.jc-st-pending { background: color-mix(in srgb, var(--info) 13%, transparent); color: var(--info); }
.jc-perfect { display: flex; align-items: center; gap: .4rem; margin: 0; padding: 0 1.1rem .9rem 3.3rem; color: var(--success); font-size: .86rem; font-weight: 600; }
.jc-preview summary { cursor: pointer; font-size: .85rem; color: var(--primary); display: inline-flex; align-items: center; gap: .3rem; }
[data-theme="dark"] .jc-preview summary { color: var(--gold); }
.jc-preview pre { white-space: pre-wrap; font: .8rem/1.5 var(--font); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: .7rem .8rem; max-height: 320px; overflow: auto; margin: .5rem 0 0; }
.jc-how { list-style: none; margin: 0 0 .6rem; padding: 0; display: flex; flex-direction: column; gap: .45rem; font-size: .85rem; }
.jc-req { list-style: none; margin: 0; padding: 0; }
.jc-req li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1.1rem; border-top: 1px solid var(--border); flex-wrap: wrap; }
.jc-req li:first-child { border-top: 0; }
.jc-req li.is-pending { background: color-mix(in srgb, var(--gold) 7%, var(--surface)); }
.jc-req-main { display: flex; flex-direction: column; gap: .2rem; min-width: 0; flex: 1; }
.jc-req-main q { font-style: italic; color: var(--text-2); font-size: .88rem; }
.jc-req-main small { font-size: .76rem; }
.jc-req-actions { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.jc-locked { border-color: color-mix(in srgb, var(--gold) 50%, var(--border)); }
.jc-locked-head { display: flex; gap: .8rem; align-items: center; }
.jc-locked-head > div { display: flex; flex-direction: column; gap: .15rem; }
.jc-lock-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--warn); flex-shrink: 0; }
.jc-request { display: flex; gap: .5rem; margin-top: .9rem; }
.jc-request input { flex: 1; min-width: 0; }
.jc-wait { display: flex; align-items: center; gap: .4rem; margin: .8rem 0 0; color: var(--info); font-weight: 600; font-size: .88rem; }
.jc-widget { margin-bottom: 1.25rem; }
.jc-widget-head { display: flex; gap: 1rem; align-items: center; }
.jc-widget-head h3 { display: flex; align-items: center; gap: .4rem; margin: 0 0 .25rem; font: 800 1.05rem var(--font-head); }
.jc-widget-head p { margin: 0 0 .15rem; }
.jc-ring { width: 72px; height: 72px; }
.jc-ring b { font-size: 1.3rem; }
.jc-widget.is-mid .sec-ring { --c: var(--gold); } .jc-widget.is-low .sec-ring { --c: var(--danger); } .jc-widget.is-none .sec-ring { --c: var(--surface-3); }
.jc-todo { padding: .9rem 0 0; }
.jc-widget .jc-perfect { padding: .8rem 0 0; }
.bubble-from { display: block; font-size: .72rem; color: var(--primary); margin-bottom: .1rem; }
[data-theme="dark"] .bubble-from { color: var(--gold); }
@media (max-width: 640px) {
  .jc-list summary { grid-template-columns: 24px minmax(0, 1fr) 46px; }
  .jc-bar { grid-column: 2 / -1; grid-row: 2; }
  .jc-items, .jc-perfect { padding-left: 1.1rem; }
  .jc-items li { flex-wrap: wrap; }
  .jc-request { flex-direction: column; }
  .jc-rule { margin-left: 0; width: 100%; }
}
.jc-locked { margin-bottom: 1.25rem; }
.jc-req-actions select { width: auto; min-width: 96px; }

/* =====================================================================
   Rəhbərlik (direktor) rolu + analitika paneli
   ===================================================================== */
.avatar-director { background: linear-gradient(135deg, #b8860b, #fab416); color: #0e1559; }
.chip-director { background: color-mix(in srgb, #fab416 22%, transparent); color: #8a5a00; border-color: transparent; }
[data-theme="dark"] .chip-director { color: var(--gold); }
.role-picker:has(.role-director) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 640px) { .role-picker:has(.role-director) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.an-legend { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .3rem .5rem; font-size: .74rem; color: var(--muted); }
.an-legend .an-c { width: 11px; height: 11px; margin-left: .3rem; }
.an-table { --n: 5; }
.an-row { display: grid; grid-template-columns: minmax(150px, 1.1fr) 110px minmax(0, 1.6fr); gap: .9rem; align-items: center; padding: .6rem 1.1rem; }
.an-head { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; border-bottom: 1px solid var(--border); }
.an-row-wrap { --c: var(--muted); border-bottom: 1px solid var(--border); }
.an-row-wrap:last-child { border-bottom: 0; }
.an-row-wrap.is-good { --c: var(--success); } .an-row-wrap.is-mid { --c: #d97706; } .an-row-wrap.is-low { --c: var(--danger); }
.an-row-wrap.is-low > summary { background: color-mix(in srgb, var(--danger) 4%, transparent); }
.an-row-wrap > summary { list-style: none; cursor: pointer; }
.an-row-wrap > summary::-webkit-details-marker { display: none; }
.an-row-wrap > summary:hover { background: var(--surface-2); }
.an-name { display: flex; flex-direction: column; min-width: 0; }
.an-name b { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-name small { font-size: .74rem; color: var(--muted); }
.an-tw { color: #b45309; font-weight: 600; } .an-tm { color: var(--danger); font-weight: 600; }
.an-pctcol { display: flex; flex-direction: column; gap: .25rem; }
.an-pct { font: 800 1.05rem var(--font-head); color: var(--c); }
.an-head .an-pctcol { display: block; }
.an-days { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; }
.an-days b { text-align: center; font-weight: 700; font-size: .66rem; }
.an-c { display: block; height: 22px; border-radius: 4px; background: var(--surface-3); }
.an-c.an-ok { background: #22c55e; } .an-c.an-warn { background: #fbbf24; } .an-c.an-missing { background: #ef4444; }
.an-c.an-pending { background: repeating-linear-gradient(45deg, #93c5fd, #93c5fd 3px, #dbeafe 3px, #dbeafe 6px); }
.an-c.an-none { background: var(--surface-2); border: 1px dashed var(--border); }
.an-items { padding: .2rem 1.1rem .9rem 1.1rem; }
.an-trend { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; align-items: end; height: 150px; }
.an-tbar { --c: var(--surface-3); display: flex; flex-direction: column; align-items: center; gap: .25rem; height: 100%; }
.an-tbar.is-good { --c: #22c55e; } .an-tbar.is-mid { --c: #fbbf24; } .an-tbar.is-low { --c: #ef4444; }
.an-tbar b { font-size: .74rem; }
.an-tbar span { flex: 1; width: 100%; max-width: 34px; display: flex; align-items: flex-end; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.an-tbar i { display: block; width: 100%; background: var(--c); border-radius: 6px; }
.an-tbar small { font-size: .68rem; color: var(--muted); }
.an-issues { list-style: none; margin: 0; padding: 0 1.1rem .6rem; }
.an-issues li { display: flex; align-items: center; gap: .6rem; padding: .5rem 0 .5rem .6rem; border-top: 1px solid var(--border); border-left: 3px solid transparent; }
.an-issues li:first-child { border-top: 0; }
.an-issues li.an-is-red { border-left-color: #ef4444; } .an-issues li.an-is-yellow { border-left-color: #fbbf24; }
.an-issues li div { display: flex; flex-direction: column; min-width: 0; }
.an-issues b { font-size: .85rem; } .an-issues small { font-size: .75rem; color: var(--muted); }
.an-info p { margin: 0 0 .45rem; display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
@media (max-width: 720px) {
  .an-row { grid-template-columns: minmax(0, 1fr) 70px; gap: .4rem .8rem; }
  .an-row .an-days { grid-column: 1 / -1; }
  .an-head .an-days { display: none; }
  .an-c { height: 16px; }
}
.an-info p { display: block; }
.an-info p .icon { vertical-align: -2px; margin-right: .2rem; }
@media (max-width: 720px) {
  .card-head:has(.an-legend) { flex-wrap: wrap; }
  .an-legend { width: 100%; }
}

/* =====================================================================
   Giriş: «Məni xatırla»
   ===================================================================== */
.remember-row { display: flex; align-items: flex-start; gap: .65rem; cursor: pointer; user-select: none; margin: .1rem 0 .2rem; font-weight: 600; font-size: .92rem; }
.remember-row input { position: absolute; opacity: 0; width: 0; height: 0; }
.remember-row small { display: block; font-weight: 400; font-size: .76rem; color: var(--muted); margin-top: .1rem; }
.remember-box { flex-shrink: 0; width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--border-strong); display: grid; place-items: center; color: transparent; transition: background .15s, border-color .15s; margin-top: 1px; }
.remember-row input:checked + .remember-box { background: var(--navy); border-color: var(--navy); color: #fff; }
[data-theme="dark"] .remember-row input:checked + .remember-box { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.remember-row input:focus-visible + .remember-box { box-shadow: 0 0 0 3px var(--primary-soft); }
.device-list { list-style: none; margin: 0; padding: 0; }
.device-list li { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-top: 1px solid var(--border); }
.device-list li:first-child { border-top: 0; }
.device-list li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.device-list small { font-size: .76rem; }
.device-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); flex-shrink: 0; }
.device-list li.is-me .device-icon { background: var(--success-soft); color: var(--success); }
#devices { margin-top: 1.25rem; }

/* =====================================================================
   Açıq səhifələr: məxfilik siyasəti, hesabın silinməsi
   ===================================================================== */
.pub-body { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
.pub-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem clamp(1rem, 4vw, 2.5rem); background: #0e1559; border-bottom: 3px solid var(--gold); }
.pub-brand { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; }
.pub-brand img { width: 40px; height: 40px; border-radius: 10px; background: #fff; padding: 3px; }
.pub-brand strong { display: block; font: 800 1rem var(--font-head); }
.pub-brand small { color: var(--gold-2); font-size: .74rem; }
.pub-top .seg-lang a { color: rgba(255,255,255,.75); }
.pub-top .seg-lang a.is-active { color: #0e1559; }
.pub-main { flex: 1; padding: clamp(1.2rem, 4vw, 2.5rem) 1rem; }
.pub-doc { max-width: 820px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: clamp(1.3rem, 4vw, 2.6rem); box-shadow: var(--shadow-sm); }
.pub-narrow { max-width: 640px; }
.pub-doc h1 { font: 800 clamp(1.4rem, 3.5vw, 1.9rem) var(--font-head); margin: 0 0 .5rem; }
.pub-lead { color: var(--text-2); font-size: 1.02rem; line-height: 1.6; margin: 0 0 1.2rem; }
.pub-toc { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1.4rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--border); }
.pub-toc a { font-size: .8rem; padding: .3rem .65rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); text-decoration: none; }
.pub-toc a:hover { border-color: var(--gold); }
.pub-doc section { scroll-margin-top: 1rem; margin-bottom: 1.3rem; }
.pub-doc h2 { display: flex; align-items: center; gap: .55rem; font: 800 1.08rem var(--font-head); margin: 0 0 .5rem; }
.pub-doc h2 span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--accent-soft); color: var(--warn); font-size: .8rem; }
.pub-doc p, .pub-doc li { color: var(--text-2); line-height: 1.65; font-size: .94rem; }
.pub-doc ul { padding-left: 1.2rem; margin: .3rem 0; }
.pub-contact { background: var(--surface-2); border-radius: 14px; padding: 1rem 1.2rem; }
.pub-cols { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: 1rem 0; }
.pub-box { border-radius: 14px; padding: .9rem 1rem; border: 1px solid var(--border); }
.pub-box b { display: flex; align-items: center; gap: .35rem; margin-bottom: .3rem; }
.pub-box ul { margin: 0; }
.pub-box.is-del { background: color-mix(in srgb, var(--danger) 6%, var(--surface)); }
.pub-box.is-del b { color: var(--danger); }
.pub-box.is-keep { background: var(--surface-2); }
.pub-form { margin-top: 1rem; }
.pub-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.pub-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; padding: 1rem clamp(1rem, 4vw, 2.5rem); color: var(--muted); font-size: .82rem; border-top: 1px solid var(--border); }
.pub-foot a { color: var(--text-2); }
@media (max-width: 560px) { .pub-cols { grid-template-columns: 1fr; } .pub-brand small { display: none; } }

/* =====================================================================
   Proqram görünüşü: aşağı menyu, yüklənmə xətti, təhlükəsiz zonalar
   ===================================================================== */
.nav-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9999; pointer-events: none;
  background: linear-gradient(90deg, #fab416, #ffd36b); transform-origin: 0 50%; transform: scaleX(0); opacity: 0;
  transition: transform .25s ease, opacity .3s ease; box-shadow: 0 0 8px rgba(250,180,22,.6); }
.nav-progress.is-on { opacity: 1; }
.nav-progress.is-done { opacity: 0; transition: transform .2s ease, opacity .35s ease .15s; }
.bottom-nav { display: none; }
@media (max-width: 960px) {
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
    border-top: 1px solid var(--border); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(14,21,89,.06); }
  .bn-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; padding: 4px 2px;
    border: 0; background: none; color: var(--muted); text-decoration: none; font: 600 .66rem var(--font); border-radius: 12px; cursor: pointer;
    -webkit-tap-highlight-color: transparent; }
  .bn-icon { position: relative; display: grid; place-items: center; width: 46px; height: 28px; border-radius: 999px; transition: background .2s, color .2s; }
  .bn-icon .icon { width: 21px; height: 21px; }
  .bn-icon em { position: absolute; top: -3px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--danger); color: #fff;
    font: 700 .62rem/17px var(--font); font-style: normal; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
  .bn-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bn-item.is-active { color: var(--navy); }
  .bn-item.is-active .bn-icon { background: color-mix(in srgb, var(--gold) 28%, transparent); }
  [data-theme="dark"] .bn-item.is-active { color: var(--gold); }
  .bn-item:active .bn-icon { transform: scale(.92); }
  .app-main { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .topbar .menu-btn { display: none; }
  body.sidebar-open .bottom-nav { z-index: 30; }
  .lesson-form .save-bar, .save-bar { bottom: calc(62px + env(safe-area-inset-bottom)) !important; }
}
/* Proqram rejimi (APK / quraşdırılmış): kəsikli ekran və status zolağı */
html.is-app .topbar { padding-top: env(safe-area-inset-top); }
html.is-app body { overscroll-behavior-y: contain; }
html.is-app .app-footer { display: none; }
.profile-legal { margin: 1.4rem 0 0; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.pub-top .seg-lang { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.18); }
.pub-top .seg-lang a.is-active { background: #fff; }
.device-list .tag { align-self: flex-start; }
@media (max-width: 960px) { .topbar [data-msg-badge] { display: none; } }

/* Bildiriş ayarları */
#notify { margin-top: 1.25rem; }
.np-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1.2rem; margin: .3rem 0 1rem; }
.np-item { align-items: center; }
.np-quiet { display: flex; flex-direction: column; gap: .7rem; padding: .9rem 1rem; border-radius: 14px; background: var(--surface-2); margin-bottom: 1rem; }
.np-times { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; max-width: 320px; }
.np-times .field { margin: 0; }
@media (max-width: 640px) { .np-grid { grid-template-columns: 1fr; } }

/* Barmaq izi ilə giriş */
#passkeys { margin-top: 1.25rem; }
.device-icon.is-key { background: var(--accent-soft); color: var(--warn); }
.wa-login { margin-top: 1rem; display: flex; flex-direction: column; gap: .8rem; }
.wa-btn { gap: .6rem; border: 1.5px solid var(--border-strong); }
.wa-btn .icon { width: 24px; height: 24px; color: var(--gold); }
.wa-btn.is-busy { opacity: .6; pointer-events: none; }

/* Oflayn banner, gözləyən dərslər, bildiriş */
.offline-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 60; padding: calc(.45rem + env(safe-area-inset-top)) 1rem .45rem; background: #b45309; color: #fff; font-size: .8rem; font-weight: 600; text-align: center; }
.queue-chip { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 55; border: 0; border-radius: 999px; padding: .6rem 1rem; background: #0e1559; color: #fff; font: 600 .82rem var(--font); box-shadow: 0 8px 24px rgba(0,0,0,.25); cursor: pointer; white-space: nowrap; }
.app-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 70; background: #16a34a; color: #fff; padding: .65rem 1.1rem; border-radius: 12px; font-weight: 600; font-size: .86rem; box-shadow: 0 8px 24px rgba(0,0,0,.2); transition: opacity .5s, transform .5s; }
.app-toast.is-out { opacity: 0; transform: translate(-50%, 10px); }
@media (min-width: 961px) { .queue-chip, .app-toast { bottom: 1.5rem; } }

/* «Bu gün» kartı */
.today-card { margin-bottom: 1rem; }
.today-head { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin-bottom: .8rem; }
.today-head h3 { display: flex; align-items: center; gap: .4rem; margin: 0; font: 800 1.05rem var(--font-head); }
.today-head h3 .icon { color: var(--gold); }
.today-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.today-tile { display: flex; flex-direction: column; gap: .45rem; padding: .8rem .9rem; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); text-decoration: none; min-width: 0; transition: border-color .2s, transform .15s; }
.today-tile:hover { border-color: var(--gold); }
.today-tile:active { transform: scale(.98); }
.today-tile.is-ok { background: color-mix(in srgb, var(--success) 7%, var(--surface)); }
.today-tile.is-ok b { color: var(--success); }
.today-tile.is-warn { background: color-mix(in srgb, var(--danger) 7%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); }
.today-tile.is-warn b { color: var(--danger); }
.today-label { display: flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.today-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.today-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .5rem; border-radius: 8px; background: var(--surface); border-left: 3px solid var(--c, var(--primary)); font-size: .8rem; }
.today-chip b { font: 800 .9rem var(--font-head); }
.today-text { display: flex; flex-direction: column; gap: .15rem; font-size: .86rem; }
.today-text small { color: var(--muted); font-size: .76rem; }
.today-empty { color: var(--muted); font-size: .84rem; }
@media (max-width: 640px) { .today-grid { grid-template-columns: 1fr; } .today-tile { flex-direction: row; align-items: center; justify-content: space-between; } .today-label { flex-shrink: 0; } .today-chips, .today-text { justify-content: flex-end; text-align: right; } }
.rc-tools { display: inline-flex; gap: .5rem; flex-wrap: wrap; }

/* Telefonda üst panel sadələşir: dil və mövzu istifadəçi menyusuna keçir — başlıq tam görünür */
.dropdown-mobile { display: none; }
@media (max-width: 960px) {
  .topbar .lang-btn, .topbar .topbar-actions > .theme-btn { display: none; }
  .topbar .topbar-actions > .dropdown:first-child { display: none; }
  .dropdown-mobile { display: block; border-top: 1px solid var(--border); margin-top: .3rem; padding-top: .3rem; }
  .dropdown-mobile .dropdown-item { width: 100%; border: 0; background: none; cursor: pointer; font: inherit; text-align: left; }
  .dropdown-langs { display: flex; align-items: center; gap: .3rem; padding: .5rem .75rem; color: var(--muted); }
  .dropdown-langs a { padding: .25rem .55rem; border-radius: 8px; font-weight: 700; font-size: .8rem; color: var(--text-2); text-decoration: none; background: var(--surface-2); }
  .dropdown-langs a.is-active { background: var(--navy); color: #fff; }
  .topbar-title h1 { font-size: 1.12rem; }
}

/* =====================================================================
   PROQRAM REJİMİ (APK): yerli proqram hissi
   ===================================================================== */
/* Brend açılış ekranı — yalnız ilk açılışda */
.app-splash { display: none; }
html.show-splash .app-splash { display: flex; position: fixed; inset: 0; z-index: 10000; flex-direction: column; align-items: center; justify-content: center; gap: .7rem;
  background: #fff; color: #0e1559; animation: splashOut .45s ease .85s forwards; }
html.show-splash[data-theme="dark"] .app-splash { background: #0b1020; color: #fff; }
.app-splash-logo { width: 104px; height: 104px; border-radius: 30px; background: #fff; display: grid; place-items: center; box-shadow: 0 0 0 4px #fab416, 0 18px 40px rgba(14,21,89,.18);
  animation: splashPop .6s cubic-bezier(.2,.9,.3,1.3) both; }
.app-splash-logo img { width: 74px; height: 74px; }
.app-splash strong { font: 800 1.35rem var(--font-head); margin-top: .8rem; animation: splashUp .5s ease .15s both; }
.app-splash small { color: #b07a06; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: .72rem; animation: splashUp .5s ease .25s both; }
@keyframes splashPop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes splashUp { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes splashOut { to { opacity: 0; visibility: hidden; } }

/* Səhifələr arası yumşaq keçid (Chrome 126+) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vtOut .18s ease both; }
::view-transition-new(root) { animation: vtIn .22s ease both; }
@keyframes vtOut { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(8px); } }
.bottom-nav { view-transition-name: bottom-nav; }
.topbar { view-transition-name: top-bar; }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }

/* Brauzer əlamətləri gizlənir */
html.is-app { -webkit-tap-highlight-color: transparent; }
html.is-app .bottom-nav, html.is-app .topbar, html.is-app .btn, html.is-app .tab, html.is-app .nav-link, html.is-app .chip,
html.is-app .att-opt, html.is-app .switch, html.is-app .today-tile, html.is-app .login-link, html.is-app .remember-row { -webkit-user-select: none; user-select: none; }
html.is-app img, html.is-app a { -webkit-touch-callout: none; }
html.is-app .bn-item { min-height: 58px; }
html.is-app .bn-icon .icon { width: 23px; height: 23px; }
html.is-app .bn-label { font-size: .68rem; }

/* Giriş ekranı — proqram görünüşü */
body.login-app, html.is-app body.login-body { background: var(--surface); }
html.is-app .login-body .login-visual, html.is-app .login-body .login-footer { display: none; }
html.is-app .login-body .login-panel { min-height: 100vh; padding: calc(1rem + env(safe-area-inset-top)) 1.5rem calc(1rem + env(safe-area-inset-bottom)); }
html.is-app .login-body .login-toolbar { justify-content: flex-end; }
html.is-app .login-body .login-toolbar .seg-lang { transform: scale(.88); transform-origin: right center; opacity: .8; }
html.is-app .login-body .login-toolbar .theme-btn { display: none; }
html.is-app .login-body .login-form-wrap { justify-content: flex-start; padding-top: 1.2rem; max-width: 460px; }
html.is-app .login-body .login-mobile-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 1.1rem; margin-bottom: 1.6rem; }
html.is-app .login-body .login-mobile-brand .brand-mark { width: 78px; height: 78px; border-radius: 24px; }
html.is-app .login-body .login-mobile-brand .brand-mark img { width: 56px; height: 56px; }
html.is-app .login-body .login-mobile-brand strong { display: none; }
html.is-app .login-body .login-form-wrap h1 { font-size: 2.1rem; }
html.is-app .login-body .login-form-wrap > .muted { margin: .3rem 0 1.6rem; }
html.is-app .login-body .field-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
html.is-app .login-body .input-icon input { height: 56px; border-radius: 14px; font-size: 1rem; }
html.is-app .login-body .remember-row { display: none; }
html.is-app .login-body .btn-lg { height: 56px; border-radius: 14px; }
html.is-app .login-body .login-help { display: none; }
html.is-app .login-body .wa-login .parent-or { display: none; }

/* Giriş altında: QR və parol bərpası */
.login-links { display: flex; flex-direction: column; margin-top: 1.4rem; border-top: 1px solid var(--border); }
.login-link { display: flex; align-items: center; gap: .85rem; width: 100%; padding: 1rem .2rem; border: 0; border-bottom: 1px solid var(--border); background: none; color: var(--text);
  font: 600 .95rem var(--font); text-align: left; text-decoration: none; cursor: pointer; }
.login-link > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: .1rem; }
.login-link small { font-weight: 400; color: var(--muted); font-size: .78rem; }
.login-link-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex-shrink: 0; }
[data-theme="dark"] .login-link-icon { color: var(--gold); }
.login-link-go { transform: rotate(-90deg); color: var(--muted); }
.login-link:active { background: var(--surface-2); }

/* QR skaner */
.qr-modal { position: fixed; inset: 0; z-index: 9000; background: #000; display: flex; align-items: center; justify-content: center; }
.qr-modal[hidden] { display: none; }
.qr-modal video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.qr-frame { position: relative; width: min(70vw, 280px); aspect-ratio: 1; border-radius: 24px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.55); }
.qr-frame::before { content: ''; position: absolute; inset: 0; border-radius: 24px; border: 3px solid #fab416; }
.qr-frame span { position: absolute; left: 8%; right: 8%; height: 2px; top: 10%; background: #fab416; box-shadow: 0 0 12px #fab416; animation: qrScan 1.8s ease-in-out infinite alternate; }
@keyframes qrScan { to { top: 90%; } }
.qr-hint, .qr-err { position: absolute; left: 1.5rem; right: 1.5rem; bottom: calc(14% + env(safe-area-inset-bottom)); text-align: center; color: #fff; font-weight: 600; }
.qr-err { bottom: calc(7% + env(safe-area-inset-bottom)); color: #fca5a5; }
.qr-close { position: absolute; top: calc(1rem + env(safe-area-inset-top)); right: 1rem; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; display: grid; place-items: center; }
.qr-body { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: var(--surface); }
.qr-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
.qr-card h1 { font: 800 1.7rem var(--font-head); margin: .6rem 0 0; }
.qr-card form { width: 100%; }
.qr-who { display: flex; flex-direction: column; gap: .2rem; padding: 1rem; width: 100%; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); }
.qr-who b { font-size: 1.1rem; } .qr-who small { color: var(--muted); }
.cred-qr { display: flex; align-items: center; gap: .7rem; margin-top: .6rem; padding-top: .6rem; border-top: 1px dashed var(--border); }
.cred-qr svg { width: 92px; height: 92px; flex-shrink: 0; }
.cred-qr small { font-size: .72rem; color: var(--muted); line-height: 1.35; }
.cred-qr b { display: block; color: var(--text); font-size: .78rem; }
.fp-card { position: relative; text-align: left; align-items: stretch; }
.fp-card h1 { margin: 0; }
.fp-icon { width: 56px; height: 56px; border-radius: 16px; }
.fp-back { position: absolute; top: -2.5rem; left: 0; color: var(--text); }
.fp-form { gap: 1rem; }
.fp-form input { height: 56px; border-radius: 14px; }

/* ---------- Şifrələri toplu sıfırlama ---------- */
.bpr-step { display: flex; align-items: center; gap: .6rem; margin: 0 0 1rem; font-size: 1.05rem; }
.bpr-step span { width: 1.75rem; height: 1.75rem; border-radius: 50%; display: inline-grid; place-items: center; background: var(--navy); color: var(--gold); font-size: .85rem; font-weight: 800; flex: none; }
.bpr-form { display: grid; gap: .9rem; }
.bpr-form > .btn { justify-self: start; }
.bpr-roles { display: flex; flex-wrap: wrap; gap: .5rem; }
.bpr-chip { position: relative; cursor: pointer; }
.bpr-chip input { position: absolute; opacity: 0; pointer-events: none; }
.bpr-chip span { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1rem; border-radius: 999px; border: 1.5px solid var(--border-strong); background: var(--surface); font-weight: 600; transition: .15s; }
.bpr-chip span::before { content: ""; width: .95rem; height: .95rem; border-radius: 4px; border: 1.5px solid var(--border-strong); background: var(--surface); }
.bpr-chip input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.bpr-chip input:checked + span::before { background: var(--gold); border-color: var(--gold); box-shadow: inset 0 0 0 2px var(--navy); }
.bpr-chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.bpr-row { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: .6rem; }
.bpr-row.bpr-checks { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.bpr-pick { margin-top: 1rem; overflow: hidden; }
.bpr-pick-head { padding: 1.1rem 1.25rem .4rem; }
.bpr-pick-head .bpr-step { margin-bottom: .5rem; }
.bpr-summary { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; color: var(--muted); }
.bpr-summary b { color: var(--text); font-size: 1.15rem; }
.bpr-pick > .alert { margin: .6rem 1.25rem; }
.bpr-table { max-height: 60vh; overflow: auto; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.bpr-table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); }
.bpr-table tbody tr { cursor: pointer; }
.bpr-table tbody tr:has(input:not(:checked)) { opacity: .5; }
.th-check { width: 2.6rem; text-align: center; }
.th-check input { width: 1.15rem; height: 1.15rem; accent-color: var(--navy); cursor: pointer; }
.bpr-confirm { padding: 1.25rem; display: grid; gap: 1rem; }
.bpr-confirm .bpr-step { margin: 0; }
.bpr-styles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .6rem; }
.bpr-style { display: flex; gap: .7rem; align-items: center; padding: .8rem 1rem; border: 1.5px solid var(--border-strong); border-radius: 14px; cursor: pointer; background: var(--surface); }
.bpr-style:has(input:checked) { border-color: var(--navy); background: var(--primary-soft); }
.bpr-style input { accent-color: var(--navy); width: 1.1rem; height: 1.1rem; }
.bpr-style b { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.05rem; letter-spacing: .04em; }
.bpr-style small { color: var(--muted); }
.bpr-notes { margin: 0; padding: .9rem 1rem; list-style: none; display: grid; gap: .5rem; border-radius: 14px; background: var(--warn-soft); color: var(--text); font-size: .92rem; }
.bpr-notes li { display: flex; gap: .55rem; align-items: flex-start; }
.bpr-notes .icon { flex: none; margin-top: .15rem; color: var(--warn); }
.bpr-word { display: grid; gap: .4rem; max-width: 420px; }
.bpr-word b { color: var(--danger); letter-spacing: .08em; }
.bpr-word input { font-weight: 700; letter-spacing: .12em; }
.bpr-confirm > .btn { justify-self: start; }
.bpr-progress { display: grid; gap: .4rem; max-width: 520px; }
.bpr-bar { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bpr-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--navy), var(--gold)); border-radius: inherit; transition: width .3s ease; }
.bpr-error { margin: 0; font-weight: 600; }
@media (max-width: 640px) {
  .bpr-row { grid-template-columns: 1fr; }
  .bpr-confirm > .btn, .bpr-form > .btn { justify-self: stretch; justify-content: center; }
  .bpr-table { max-height: 55vh; }
}

/* ---------- Proqramlar səhifəsi (download/) ---------- */
.dl-page { max-width: 760px; }
.dl-card { border: 1px solid var(--border); border-radius: 18px; padding: 1.2rem 1.3rem; margin: 0 0 1rem; background: var(--surface); }
.dl-win { border-color: color-mix(in srgb, var(--gold) 55%, var(--border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 14%, transparent); }
.dl-head { display: grid; grid-template-columns: 52px 1fr auto; gap: .9rem; align-items: center; }
.dl-head h2 { margin: 0; font: 800 1.12rem var(--font-head); }
.dl-meta { margin: .1rem 0 0; color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; }
.dl-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: #0e1559; color: var(--gold); }
.dl-icon svg { width: 26px; height: 26px; }
.dl-icon-phone { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.dl-btn { white-space: nowrap; }
.dl-points { margin: 1rem 0 .4rem; padding-left: 1.15rem; display: grid; gap: .25rem; }
.dl-steps { margin: 1rem 0 0; padding-left: 1.2rem; display: grid; gap: .45rem; }
.dl-it { margin-top: .8rem; border-top: 1px dashed var(--border); padding-top: .7rem; }
.dl-it summary { cursor: pointer; font-weight: 600; color: var(--text-2); font-size: .92rem; }
.dl-it code { background: var(--surface-2); border: 1px solid var(--border); padding: .1rem .4rem; border-radius: 6px; font-size: .85rem; }
@media (max-width: 560px) {
  .dl-head { grid-template-columns: 44px 1fr; }
  .dl-icon { width: 44px; height: 44px; }
  .dl-btn { grid-column: 1 / -1; justify-content: center; }
}

/* ---------- Ekran rejimi (müəllimlər otağı televizoru: ?tv=1) ---------- */
html.tv-mode .sidebar, html.tv-mode .sidebar-backdrop, html.tv-mode .topbar, html.tv-mode .bottom-nav,
html.tv-mode .app-footer, html.tv-mode .page-actions, html.tv-mode .nav-progress { display: none !important; }
html.tv-mode .app-main { margin-left: 0 !important; }
html.tv-mode body { font-size: 1.12rem; cursor: none; }
.tv-bar { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; display: flex; align-items: center; gap: .6rem; padding: .45rem .9rem; border-radius: 999px; background: #0e1559; color: #fff; font-size: .85rem; box-shadow: 0 6px 20px rgba(0,0,0,.25); font-variant-numeric: tabular-nums; }
.tv-bar b { color: var(--gold); font-size: 1rem; }
.tv-bar i { width: 8px; height: 8px; border-radius: 50%; background: #35c77a; box-shadow: 0 0 0 3px rgba(53,199,122,.25); }

/* ---------- Dərs cədvəli: bir xanada bir neçə fənn (qruplar) ---------- */
.tt-cell { position: relative; display: flex; flex-direction: column; gap: 4px; }
.tt-cell:has(.tt-select + .tt-select) .tt-select { height: 34px !important; font-size: .76rem !important; }
.tt-add {
  position: absolute; top: -7px; right: -7px; z-index: 2;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; padding: 0;
  border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--text-2);
  font: 700 15px/1 var(--font-body, inherit); cursor: pointer;
  opacity: 0; transition: opacity .15s, background .15s;
}
.tt-cell:hover .tt-add, .tt-add:focus-visible { opacity: 1; }
.tt-add:hover { background: var(--gold); border-color: var(--gold); color: #0e1559; }
@media (hover: none) { .tt-add { opacity: .75; } }
/* Baxış cədvəllərində (müəllim, şagird) eyni saatda bir neçə dərs */
.tt-stack { display: flex; flex-direction: column; gap: 4px; }
.tt-stack .tt-lesson { min-height: 0; }
.tt-joint { font-size: .7rem; color: var(--muted); }

/* ---------- Jurnal: tam ad (soyad + ad) ---------- */
.j-name .j-fn { font-weight: 500; color: var(--text-2); }
@media (max-width: 640px) {
  .j-name { white-space: normal !important; min-width: 128px !important; max-width: 150px !important; line-height: 1.2; }
  .j-name .j-fn { display: block; font-size: .78em; margin-top: 1px; }
}
