/* ═══════════════════════════════════════════════════════
   uretim.css — SPK Sınav Sistemi
   Soru üretim paneline özel stiller
   ═══════════════════════════════════════════════════════ */

/* ── SAYFA ────────────────────────────────────────────── */
.uretim-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── LAYOUT ───────────────────────────────────────────── */
.uretim-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - 52px);
}

/* ── SOL PANEL ────────────────────────────────────────── */
.panel {
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* ── UPLOAD ZONE ──────────────────────────────────────── */
.upload-zone {
  position: relative;
  border: 1px dashed var(--border2);
  border-radius: var(--radius);
  padding: 1.75rem 1rem;
  text-align: center;
  cursor: pointer;
  background: var(--bg2);
  transition: border-color 0.2s, background 0.2s;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-icon {
  font-size: 1.75rem;
  margin-bottom: 0.4rem;
  opacity: 0.35;
}

.upload-hint {
  font-size: 12.5px;
  color: var(--text2);
  line-height: 1.55;
}

.upload-hint strong {
  color: var(--accent);
  font-weight: 500;
}

.upload-hint small {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text3);
  letter-spacing: 0.04em;
}

/* dosya kartı */
.file-card {
  display: none;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  align-items: center;
  gap: 10px;
}

.file-card.show { display: flex; }

.file-badge {
  width: 34px;
  height: 34px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-mid);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

.file-meta       { flex: 1; min-width: 0; }
.file-name       { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size       { font-size: 10.5px; color: var(--text3); font-family: var(--mono); margin-top: 1px; }

.btn-remove {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 2px 4px;
  transition: color 0.15s;
  flex-shrink: 0;
}

.btn-remove:hover { color: var(--red); }

/* hata */
.err-box {
  display: none;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--red);
  background: var(--red-dim);
  border: 1px solid rgba(248, 81, 73, 0.2);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-top: 8px;
}

.err-box.show { display: block; }

/* ── DAĞILIM GRID ─────────────────────────────────────── */
.dist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.dist-cell {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
}

.dist-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  padding: 2px 7px;
  border-radius: 3px;
  margin-bottom: 5px;
}

.badge-k { background: rgba(63,185,80,.12);  color: var(--green); }
.badge-o { background: rgba(227,179,65,.12); color: var(--amber); }
.badge-z { background: rgba(248,81,73,.12);  color: var(--red); }

.dist-pct {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text3);
  display: block;
  margin-bottom: 4px;
}

.dist-cell input[type="number"] {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 500;
  text-align: center;
  padding: 2px 0;
  -moz-appearance: textfield;
}

.dist-cell input::-webkit-outer-spin-button,
.dist-cell input::-webkit-inner-spin-button { -webkit-appearance: none; }

.total-line {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text3);
  text-align: right;
  margin-top: 6px;
}

.total-line span { color: var(--text2); font-weight: 500; }

/* ── ÜRET BUTONU ──────────────────────────────────────── */
.btn-uret {
  width: 100%;
  padding: 11px;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.btn-uret .spinner {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  display: none;
  flex-shrink: 0;
}

.btn-uret.loading .spinner { display: block; }
.btn-uret.loading .btn-label { opacity: 0.7; }

/* ── SAĞ MAIN ─────────────────────────────────────────── */
.main-area {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* progress */
.prog-wrap {
  height: 2px;
  background: var(--border);
  display: none;
  flex-shrink: 0;
}

.prog-wrap.on { display: block; }

.prog-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.35s ease;
}

/* ── BOŞ DURUM ────────────────────────────────────────── */
.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  color: var(--text3);
}

.empty-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  opacity: 0.35;
  margin-bottom: 0.5rem;
}

.empty-cell {
  background: var(--bg2);
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text3);
}

.empty-title { font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; }
.empty-sub   { font-size: 12px; text-align: center; max-width: 280px; line-height: 1.65; }

/* ── SONUÇLAR ─────────────────────────────────────────── */
.results-area {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.results-area.on { display: flex; }

/* toolbar */
.results-toolbar {
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.toolbar-stats  { display: flex; gap: 0.65rem; flex-wrap: wrap; }
.toolbar-actions { display: flex; gap: 6px; }

/* tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  flex-shrink: 0;
}

.tab {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text3);
  padding: 11px 14px 10px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.tab:hover  { color: var(--text2); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* tab içerik */
.tab-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
}

/* ── SORU KARTLARI ────────────────────────────────────── */
.q-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.15s;
}

.q-card:hover { border-color: var(--border2); }

.q-head {
  padding: 11px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.q-num  { font-family: var(--mono); font-size: 10px; color: var(--text3); min-width: 22px; padding-top: 2px; flex-shrink: 0; }
.q-text { font-size: 13px; flex: 1; line-height: 1.6; }
.q-meta { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

.q-chevron { font-size: 11px; color: var(--text3); transition: transform 0.2s; flex-shrink: 0; }
.q-card.open .q-chevron { transform: rotate(180deg); }

.q-body {
  display: none;
  border-top: 1px solid var(--border);
  padding: 12px 14px;
}

.q-card.open .q-body { display: block; }

.opts-list { list-style: none; margin-bottom: 10px; }

.opts-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  margin-bottom: 3px;
  border: 1px solid transparent;
}

.opts-list li.correct {
  background: var(--green-dim);
  border-color: rgba(63, 185, 80, 0.2);
}

.opt-ltr {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text3);
  min-width: 14px;
  padding-top: 2px;
  flex-shrink: 0;
}

.opts-list li.correct .opt-ltr { color: var(--green); }

.opt-chk {
  font-size: 11px;
  color: var(--green);
  margin-left: auto;
  padding-top: 2px;
  flex-shrink: 0;
}

.q-explain {
  font-size: 12px;
  color: var(--text2);
  background: var(--bg3);
  border-left: 2px solid var(--border2);
  padding: 9px 11px;
  border-radius: 0 4px 4px 0;
  line-height: 1.65;
  font-style: italic;
}

/* ── JSON VIEW ────────────────────────────────────────── */
.json-wrap {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.json-wrap pre {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
  padding: 1.25rem;
  overflow-x: auto;
  color: var(--text2);
}