/* OnlineTest — yönetim paneli */

body.admin { background: #edf1ee; min-height: 100vh; }
body.admin .sheet { background: #fff; color: var(--ink); border-radius: 16px; box-shadow: 0 0 0 1px #dfe5e1, 0 1px 2px rgba(29, 43, 83, .05); }

.muted { color: var(--ink-3); }
.small { font-size: .875rem; margin-top: 12px; }
.ok-text { color: var(--ok); }
.bad-text { color: var(--bad); }
.danger-text { color: var(--bad); }
.nowrap { white-space: nowrap; }
.c { text-align: center; }

/* Üst şerit */
.a-top { background: var(--board); background-image: var(--chalk-dust); color: var(--chalk); --focus: var(--yellow); }
.a-top-in { max-width: 1120px; margin: 0 auto; padding: 0 20px; height: 64px; display: flex; align-items: center; gap: 28px; }
.a-brand { display: flex; align-items: center; gap: 10px; color: var(--chalk); text-decoration: none; font-weight: 700; font-size: 1.08rem; white-space: nowrap; letter-spacing: -.01em; }
.a-brand .bubble { --c: var(--yellow); font-size: .78rem; }
.a-brand .bubble.is-filled { color: var(--yellow-ink); }
.a-nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.a-nav a { color: var(--chalk-2); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-weight: 500; white-space: nowrap; }
.a-nav a:hover { color: var(--chalk); background: rgba(0, 0, 0, .14); }
.a-nav a[aria-current="page"] { color: var(--chalk); background: rgba(0, 0, 0, .2); box-shadow: inset 0 -3px 0 var(--yellow); }
.a-out { color: var(--chalk-2); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; font-weight: 500; padding: 8px 10px; border-radius: 10px; }
.a-out:hover { color: var(--chalk); background: rgba(0, 0, 0, .14); }

.a-main { max-width: 1120px; margin: 0 auto; padding: 34px 20px 72px; }

/* Sayfa başlığı */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.85rem; font-weight: 700; letter-spacing: -.02em; }
.page-title { min-width: 0; }
.page-title h1 { word-break: break-word; }
.page-title .muted { margin-top: 4px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .92rem; margin-bottom: 8px; }
.back:hover { color: var(--ink); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.section-title { font-size: 1.2rem; margin: 34px 0 12px; }

/* Açık oyunlar */
.live { margin-bottom: 26px; display: grid; gap: 10px; }
.live-row { background: var(--board); background-image: var(--chalk-dust); color: var(--chalk); border-radius: 14px; padding: 14px 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; --focus: var(--yellow); }
.live-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgba(255, 216, 77, .22); animation: pulse 1.8s infinite ease-in-out; flex: none; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(255, 216, 77, 0); } }
.live-txt { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.live-txt span { color: var(--chalk-2); font-size: .9rem; }

/* Liste */
.list .row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.list .row:first-child { border-top: 0; }
.row-main { flex: 1 1 300px; min-width: 0; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 4px; }
.row-main b { font-size: 1.06rem; word-break: break-word; }
.row-main:hover b { text-decoration: underline; text-underline-offset: .2em; }
.meta { display: flex; flex-wrap: wrap; gap: 2px 18px; color: var(--ink-3); font-size: .875rem; }
.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

/* Boş durum */
.empty { text-align: center; padding: 52px 24px; }
.empty > .bubble { font-size: 1.3rem; margin-bottom: 14px; }
.empty h2 { font-size: 1.3rem; margin-bottom: 8px; }
.empty p { color: var(--ink-2); max-width: 48ch; margin: 0 auto; }
.empty-actions { display: flex; gap: 10px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }

/* Araç çubuğu */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar-left, .toolbar-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Soru listesi: cevap anahtarı görünümü */
.qlist .q {
  display: grid;
  grid-template-columns: auto 72px minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border-top: 2px dashed var(--form-soft);
  cursor: pointer;
  transition: background-color .12s;
}
.qlist .q:first-child { border-top: 0; }
.qlist .q:hover { background: #f8faf8; }
.qlist .q:focus-visible { outline-offset: -3px; }
.qnum { font-size: .82rem; }
.thumb { width: 72px; height: 54px; border-radius: 9px; object-fit: contain; background: #fff; display: grid; place-items: center; color: #b3bac9; box-shadow: 0 0 0 1px var(--line); }
span.thumb { background: var(--paper-2); box-shadow: none; }
.thumb .ic { width: 22px; height: 22px; }
.qbody { min-width: 0; }
.qtext { font-weight: 600; line-height: 1.38; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.qopts { display: flex; gap: 6px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.qopts .bubble { font-size: .66rem; }
.bubble.is-off { border-color: #d6dbe4; color: #a2aabd; }
.qcorr { color: var(--ink-2); font-size: .85rem; margin-left: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 34ch; }
.qmeta { display: flex; gap: 6px; flex-direction: column; align-items: flex-end; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; font-weight: 500; color: var(--ink-2); background: var(--paper-2); border-radius: 99px; padding: .25em .7em; white-space: nowrap; }
.chip .ic { width: 1em; height: 1em; }
.chip.is-x2 { background: #fff1c2; color: #6b5300; }
.qact { display: flex; gap: 4px; }
.qact .btn-icon { padding: .45em; }

@media (max-width: 760px) {
  .qlist .q { grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; }
  .qlist .q .thumb { display: none; }
  .qmeta { flex-direction: row; grid-column: 2; justify-self: start; }
  .qact { grid-column: 1 / -1; justify-content: flex-end; }
  .qcorr { max-width: 100%; }
}

/* Düzenleme penceresi */
.modal {
  width: min(760px, 100%);
  background: #fff;
  color: var(--ink);
  border-radius: 22px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  animation: dlgIn .18s ease-out;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px 14px 24px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 1.2rem; }
.modal-body { padding: 20px 24px 8px; overflow-y: auto; }
.modal-foot { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.modal-foot .muted { font-size: .82rem; }

.dropzone { border: 2px dashed #cdd5dc; border-radius: 14px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; color: var(--ink-2); cursor: pointer; background: var(--paper-2); transition: border-color .15s, background-color .15s; }
.dropzone:hover { border-color: #aab4bf; }
.dropzone.is-over { border-color: var(--o1); background: var(--o1s); }
.dropzone .ic { width: 30px; height: 30px; color: var(--ink-3); flex: none; }
.dropzone b { color: var(--ink); }
.dropzone small { color: var(--ink-3); }
.dropzone.big { padding: 26px 22px; }
.dropzone.has-file { border-style: solid; border-color: var(--ok); background: var(--ok-soft); }
.dropzone.has-file .ic { color: var(--ok); }

.img-prev { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.img-prev img { max-height: 200px; max-width: min(100%, 420px); border-radius: 12px; display: block; box-shadow: 0 0 0 1px var(--line); background: var(--paper-2); }
.img-tools { display: flex; flex-direction: column; gap: 8px; }

.opt-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.opt-head .field-label { margin: 0; }
.opt-hint { font-size: .85rem; color: var(--ink-3); margin: 2px 0 12px; }
.opt-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.opt-row .mark { appearance: none; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; flex: none; font: inherit; }
.opt-row .mark .bubble { width: 2.5em; height: 2.5em; font-size: 1rem; transition: background-color .12s, transform .12s; }
.opt-row .mark:hover .bubble { transform: scale(1.06); }
.opt-row.is-correct .mark .bubble { background: var(--c); color: #fff; }
.opt-row.is-correct .input { border-color: var(--c); background: #fcfdff; }
.opt-row .input { flex: 1; min-width: 0; }
.opt-ok { font-size: .78rem; font-weight: 600; color: var(--ok); white-space: nowrap; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }
.form-error { color: var(--bad); font-weight: 500; min-height: 1.2em; margin: 4px 0 10px; }
.form-error:empty { margin: 0; min-height: 0; }

/* İçe aktarma */
.steps { margin: 0 0 18px; padding-left: 1.3em; color: var(--ink-2); }
.steps li { margin-bottom: 10px; padding-left: 4px; }
.steps b { color: var(--ink); }
.radios { border: 0; padding: 0; margin: 18px 0 6px; }
.radios .check { padding: 6px 0; }
.im-result { text-align: center; padding: 10px 0 6px; }
.im-result .bubble { font-size: 1.4rem; margin-bottom: 12px; --c: var(--ok); }
.im-result h3 { font-size: 1.35rem; margin-bottom: 6px; }
.im-result p { color: var(--ink-2); }
.warn { text-align: left; margin-top: 18px; background: #fff8e0; border-radius: 12px; padding: 14px 16px; color: #5a4600; font-size: .92rem; }
.warn b { display: block; margin-bottom: 6px; }
.warn ul { margin: 0; padding-left: 1.2em; max-height: 220px; overflow-y: auto; }
.warn li { margin-bottom: 4px; }


/* Tablolar */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl th { text-align: left; font-size: .8rem; color: var(--ink-3); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 16px; border-top: 1px solid #eef1f4; vertical-align: middle; }
.tbl tr:first-child td { border-top: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl th.c, .tbl td.c { text-align: center; }
.tbl .row-actions { justify-content: flex-end; flex-wrap: nowrap; }
.tbl .bubble.sm { font-size: .72rem; }
.matrix td, .matrix th { padding: 8px 6px; }
.matrix td:first-child, .matrix th:first-child { padding-left: 16px; position: sticky; left: 0; background: #fff; }
.cell { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 700; font-size: .8rem; }
.cell.right { background: var(--ok-soft); color: #137443; }
.cell.wrong { background: var(--bad-soft); color: #a32b2b; }
.cell.blank { color: #b5bccb; }

.tag { display: inline-block; padding: .22em .7em; border-radius: 99px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.tag.is-done { background: var(--ok-soft); color: #13643a; }
.tag.is-live { background: #fff1c2; color: #6b5300; }
.tag.is-wait { background: var(--o1s); color: var(--o1d); }
.tag.is-old { background: #eceef2; color: var(--ink-2); }

/* Rapor */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }
.stat { padding: 18px 20px; }
.stat b { display: block; font-size: 1.75rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink-2); font-size: .92rem; }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } }
.qreport .qr-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 130px; gap: 16px; padding: 18px 20px; border-top: 2px dashed var(--form-soft); align-items: start; }
.qreport .qr-row:first-child { border-top: 0; }
.qr-text { font-weight: 600; line-height: 1.4; }
.qr-opts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; }
.qr-opt { display: inline-flex; align-items: center; gap: 7px; font-size: .9rem; color: var(--ink-2); }
.qr-opt.is-right { color: var(--ink); font-weight: 600; }
.qr-opt .bubble { font-size: .66rem; }
.qr-otext { max-width: 24ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr-rate { text-align: right; }
.qr-rate b { font-size: 1.5rem; display: block; line-height: 1.1; }
.qr-rate span { color: var(--ink-2); font-size: .85rem; }
.qr-rate small { color: var(--ink-3); }
.meter { height: 7px; background: #edf0f3; border-radius: 99px; overflow: hidden; margin: 8px 0 6px; }
.meter i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
@media (max-width: 640px) {
  .qreport .qr-row { grid-template-columns: auto minmax(0, 1fr); }
  .qr-rate { grid-column: 2; text-align: left; }
}

/* Ayarlar */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.card-pad { padding: 22px 24px; }
.card-pad h2 { font-size: 1.15rem; margin-bottom: 4px; }
.card-pad > .muted { margin-bottom: 18px; }
.notice { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-weight: 500; }
.notice.is-ok { background: var(--ok-soft); color: #13643a; }
.notice.is-bad { background: var(--bad-soft); color: #8f2020; }

/* Giriş */
body.admin.auth { background: var(--board); background-image: var(--chalk-dust); }
.auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: min(430px, 100%); padding: 28px 28px 26px; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 22px; color: var(--ink-2); }
.auth-brand .bubble { font-size: .78rem; }
.auth-card h1 { font-size: 1.45rem; margin-bottom: 6px; }
.auth-card > .muted { margin-bottom: 20px; color: var(--ink-2); }
.auth-card form { margin-top: 18px; }
.auth-foot { margin-top: 18px; }
.auth-foot a { color: var(--chalk-2); font-size: .92rem; }

@media (max-width: 640px) {
  .a-top-in { gap: 10px; padding: 0 10px; }
  .a-brand { font-size: 1rem; }
  .a-brand-name { display: none; }
  .a-nav a { padding: 8px 9px; }
  .modal-foot > .muted { display: none; }
  .a-out span { display: none; }
  .a-main { padding: 24px 16px 60px; }
  .page-head h1 { font-size: 1.5rem; }
  .list .row { padding: 14px 16px; }
  .row-actions { justify-content: flex-start; }
}

/* OnlineSunum eklemeleri */
.tag.is-bad { background: var(--bad-soft); color: #8f2020; }
.eps details summary { cursor: pointer; color: var(--o1); font-size: .9rem; }
.eps ul { margin: 6px 0 0; padding-left: 1.1em; font-size: .85rem; color: var(--ink-2); }
.slist .q { grid-template-columns: auto 110px minmax(0, 1fr) auto auto; }
.slist .thumb { width: 110px; height: 62px; }
.slist .thumb.mini-slide { display: block; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--line); padding: 6px 7px; font-size: 6px; line-height: 1.3; color: var(--ink-2); text-align: left; }
.slist .thumb.mini-slide b { display: block; font-size: 7px; color: var(--ink); margin-bottom: 2px; }
.kind-tag { display: inline-block; font-size: .72rem; font-weight: 700; color: var(--yellow-ink); background: var(--yellow); border-radius: 6px; padding: .1em .45em; margin-right: 6px; vertical-align: 1px; }
.qbody .qsub { color: var(--ink-3); font-size: .85rem; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg { display: inline-flex; background: var(--paper-2); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 16px; }
.seg button { font: inherit; border: 0; background: none; padding: .5em 1em; border-radius: 9px; cursor: pointer; color: var(--ink-2); font-weight: 600; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.cls-card { margin-bottom: 16px; }
.cls-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.cls-head h2 { font-size: 1.15rem; }
.cls-head .muted { font-size: .9rem; margin-left: 8px; }
.cls-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 16px; padding: 12px 20px 16px; }
.cls-st { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.cls-st .no { color: var(--ink-3); min-width: 3.2em; font-variant-numeric: tabular-nums; }
.cls-st .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cls-st button { opacity: 0; }
.cls-st:hover button, .cls-st button:focus-visible { opacity: 1; }
.cls-empty { padding: 18px 20px; color: var(--ink-2); }
.progress { height: 10px; background: var(--paper-2); border-radius: 99px; overflow: hidden; margin: 14px 0 8px; }
.progress i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .2s; }
.preview-slide { margin-top: 6px; }
.preview-slide .slide { box-shadow: 0 0 0 1px var(--line); padding: 16px 18px; gap: 10px; }
.preview-slide .sl-title { font-size: 1.1rem; padding-bottom: 8px; }
.preview-slide .sl-body { font-size: .9rem; }
.preview-slide .sl-img img { max-height: 160px; }

/* Slayt önizlemesi (ders.css ile aynı) */
.slide {
  background: #fff;
  color: var(--ink);
  border-radius: var(--r-l);
  box-shadow: var(--shadow-paper);
  padding: 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  --focus: #2f5bea;
}
.sl-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: 1.2;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--form-soft);
  word-break: break-word;
}
.sl-cols { display: flex; gap: 26px; min-height: 0; flex: 1; }
.sl-body { flex: 1 1 56%; font-size: 1.1rem; line-height: 1.55; min-width: 0; word-break: break-word; }
.sl-body p { margin: 0 0 .7em; }
.sl-body ul { margin: 0 0 .7em; padding: 0; list-style: none; }
.sl-body li { position: relative; padding-left: 1.7em; margin-bottom: .55em; }
.sl-body li::before {
  content: '';
  position: absolute;
  left: .2em; top: .42em;
  width: .68em; height: .68em;
  border-radius: 50%;
  border: .14em solid var(--form);
}
.sl-img { flex: 1 1 44%; margin: 0; display: flex; align-items: center; justify-content: center; min-height: 0; min-width: 0; }
.sl-img img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; display: block; }
.slide.text-only .sl-body { flex-basis: 100%; }
.slide.img-only { padding: 10px; }
.slide.img-only .sl-cols { height: 100%; }
.slide.img-only .sl-img { flex-basis: 100%; }
.slide.img-only .sl-img img { border-radius: 10px; }
.slide.is-q .sl-title { border-bottom-color: var(--yellow); }
