/* Sanal Dersim QR Çözüm: öğrenci görüntüleyicisi (mobil öncelikli) */
:root {
  --sd-ana: #23265a;
  --sd-vurgu: #1f7aa8;
  --sd-masa: #e7eaf1;
  --sd-kagit: #ffffff;
  --sd-murekkep: #1b1d33;
  --sd-soluk: #5d6182;
  --sd-cizgi: #d3d7e3;
  --sd-panel: #ffffff;
  --sd-ust-y: 52px;
}
@media (prefers-color-scheme: dark) {
  :root { --sd-masa: #101226; --sd-murekkep: #eceef8; --sd-soluk: #a3a8c9; --sd-cizgi: #2e325a; --sd-panel: #1a1d3a; }
}
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body.sd-govde {
  margin: 0; min-height: 100%; background: var(--sd-masa); color: var(--sd-murekkep);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding-top: calc(var(--sd-ust-y) + env(safe-area-inset-top, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overscroll-behavior-y: contain;
}
.sd-gizli { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sd-tuzak { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Üst çubuk */
.sd-ust {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  height: calc(var(--sd-ust-y) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) max(10px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px));
  display: flex; align-items: center; gap: 10px;
  background: var(--sd-ana); color: #fff;
}
.sd-marka { display: flex; align-items: center; flex: none; color: #fff; text-decoration: none; font-weight: 700; font-size: 14px; max-width: 34vw; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sd-marka img { height: 26px; width: auto; max-width: 30vw; display: block; }
.sd-baslik { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 14px; font-weight: 500; opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.28); }
.sd-araclar { display: flex; gap: 6px; flex: none; }
.sd-dugme {
  min-width: 40px; height: 40px; padding: 0 10px; border: 0; border-radius: 8px;
  background: rgba(255,255,255,.14); color: #fff; font: inherit; font-size: 20px; line-height: 1; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.sd-dugme-yazi { font-size: 14px; font-weight: 600; padding: 0 12px; }
.sd-dugme:active { background: rgba(255,255,255,.3); }
.sd-dugme-koyu { background: transparent; color: var(--sd-murekkep); font-size: 26px; }
:focus-visible { outline: 3px solid #ffd166; outline-offset: 2px; }

/* Sayfalar */
.sd-sahne { outline: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sd-sayfalar { margin: 0 auto; padding: 10px 0 90px; display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 100%; width: max-content; }
.sd-sayfa { position: relative; background: var(--sd-kagit); box-shadow: 0 1px 2px rgba(16,18,38,.18), 0 6px 18px rgba(16,18,38,.10); flex: none; }
.sd-sayfa canvas { display: block; width: 100%; height: 100%; }
.sd-sayfa::after { content: attr(data-no); position: absolute; inset: 0; display: grid; place-items: center; color: #b9bdd2; font-size: 15px; pointer-events: none; }
.sd-sayfa.sd-cizildi::after { content: none; }

/* Yükleme */
.sd-yukleniyor { padding: 22vh 24px 0; text-align: center; color: var(--sd-soluk); }
.sd-cubuk { width: min(260px, 70vw); height: 6px; margin: 0 auto 14px; border-radius: 3px; background: var(--sd-cizgi); overflow: hidden; }
.sd-cubuk i { display: block; height: 100%; width: 4%; background: var(--sd-vurgu); transition: width .2s; }

/* Sayfa sayacı */
.sd-sayac {
  position: fixed; z-index: 25; left: 50%; transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 22px;
  background: var(--sd-ana); color: #fff; font: inherit; font-size: 15px; font-variant-numeric: tabular-nums; cursor: pointer;
  box-shadow: 0 4px 14px rgba(16,18,38,.35); touch-action: manipulation;
}
.sd-sayac b { font-weight: 700; }

/* Bildirim */
.sd-bildirim {
  position: fixed; z-index: 26; left: 12px; right: 12px; bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  max-width: 460px; margin: 0 auto; padding: 12px 14px; border-radius: 10px;
  background: #14162b; color: #fff; font-size: 14px; display: flex; align-items: center; gap: 12px; justify-content: space-between;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.sd-bildirim button { flex: none; border: 0; border-radius: 6px; padding: 8px 10px; background: #fff; color: #14162b; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }

/* Panel: telefonda alttan açılır, geniş ekranda sağdan */
.sd-perde { position: fixed; inset: 0; z-index: 40; background: rgba(10,12,30,.5); }
.sd-panel {
  position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; max-height: 86vh; max-height: 86dvh;
  display: flex; flex-direction: column; background: var(--sd-panel); color: var(--sd-murekkep);
  border-radius: 16px 16px 0 0; padding: 0 16px calc(14px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; overscroll-behavior: contain;
}
.sd-panel[hidden], .sd-perde[hidden], .sd-bildirim[hidden], .sd-sayac[hidden] { display: none; }
.sd-panel-ust { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 12px 0 6px; background: var(--sd-panel); font-size: 17px; z-index: 1; }
.sd-git { display: flex; align-items: center; gap: 8px; padding: 6px 0 12px; }
.sd-git label { font-size: 14px; color: var(--sd-soluk); flex: none; }
.sd-git input, .sd-ara, .sd-hata textarea, .sd-kod-form input {
  width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--sd-cizgi); border-radius: 8px;
  background: transparent; color: inherit; font: inherit; font-size: 16px;
}
.sd-git input { flex: 1 1 auto; min-width: 0; }
.sd-kucuk-dugme {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; flex: none;
  border: 0; border-radius: 8px; background: var(--sd-vurgu); color: #fff; font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.sd-ara { margin-bottom: 8px; }
.sd-bolumler { list-style: none; margin: 0; padding: 0; }
.sd-bolumler li { border-top: 1px solid var(--sd-cizgi); }
.sd-bolumler li[hidden] { display: none; }
.sd-bolumler button {
  width: 100%; min-height: 48px; padding: 10px 2px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 0; background: transparent; color: inherit; font: inherit; font-size: 15px; text-align: left; cursor: pointer;
}
.sd-bolumler button.sd-etkin span { font-weight: 700; color: var(--sd-vurgu); }
.sd-bolumler em { flex: none; font-style: normal; font-size: 13px; color: var(--sd-soluk); font-variant-numeric: tabular-nums; }
.sd-panel-alt { margin-top: 14px; padding-top: 4px; border-top: 1px solid var(--sd-cizgi); }
.sd-not { font-size: 13px; color: var(--sd-soluk); margin: 10px 0; }
.sd-hata summary { cursor: pointer; padding: 10px 0; font-size: 15px; font-weight: 600; }
.sd-hata textarea { resize: vertical; margin-bottom: 8px; }
.sd-tanitim { font-size: 13px; margin: 14px 0 0; }

/* Durum kutuları (kod, üyelik, boş) */
.sd-kutu { max-width: 420px; margin: 12vh auto 0; padding: 0 22px; text-align: center; }
.sd-kutu h2 { font-size: 22px; line-height: 1.25; margin: 0 0 10px; }
.sd-kutu p { color: var(--sd-soluk); margin: 0 0 16px; }
.sd-kod-form { display: grid; gap: 10px; }
.sd-kod-form input { text-align: center; letter-spacing: .08em; font-size: 18px; }
.sd-buyuk-dugme { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 0; border-radius: 10px; background: var(--sd-vurgu); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.sd-uyari { color: #b3261e !important; font-weight: 600; }

@media (max-width: 520px) {
  .sd-marka-yazi { display: none; }
  .sd-marka-yazi + .sd-baslik { border-left: 0; padding-left: 0; }
  .sd-marka img { height: 22px; max-width: 24vw; }
}
@media (min-width: 760px) {
  .sd-baslik { font-size: 15px; }
  .sd-sayfalar { gap: 16px; padding-top: 18px; }
  .sd-panel { left: auto; top: 0; bottom: 0; width: 360px; max-height: none; border-radius: 0; padding-top: env(safe-area-inset-top, 0px); }
  .sd-sayac { left: auto; right: 22px; transform: none; }
}
.sd-gomulu .sd-marka { display: none; }
.sd-gomulu .sd-baslik { border-left: 0; padding-left: 0; }
@media (prefers-reduced-motion: reduce) { .sd-cubuk i { transition: none; } }
@media print { .sd-ust, .sd-sayac, .sd-panel, .sd-perde, .sd-bildirim { display: none !important; } body.sd-govde { padding: 0; } }
