:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --line: #d9e2ec;
  --text: #102a43;
  --muted: #486581;
  --primary: #1d4ed8;
  --primary-contrast: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

header { padding: 2rem 0 1rem; }
header h1 { margin-bottom: 0.4rem; }
header p { margin-top: 0; color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 1rem;
  align-items: start;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 8px 24px rgba(16, 42, 67, 0.06);
}

.card-lite {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.8rem;
  margin-bottom: 0.8rem;
  background: #fbfdff;
}

.controls { position: sticky; top: 1rem; }

label,
.kazanım-header {
  display: block;
  margin-top: 0.8rem;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.kazanım-header { display:flex; justify-content:space-between; align-items:center; }

select,input,button {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 0.6rem;
  font-size: 0.95rem;
}

button {
  margin-top: 1rem;
  cursor: pointer;
  background: var(--primary);
  color: var(--primary-contrast);
  border: none;
}

button.secondary { background:#e6eefc; color:#10316b; }
#toggleAll { width:auto; margin:0; padding:0.35rem 0.55rem; font-size:0.82rem; }

.kazanımlar {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem;
  background: #fbfdff;
}

.kazanım-item {
  display:grid;
  grid-template-columns:auto 1fr 86px;
  gap:0.5rem;
  align-items:center;
  margin:0.45rem 0;
  cursor:pointer;
}

.kazanım-item input[type='checkbox'] { width:auto; margin:0; }
.kazanım-count { width:100%; padding:0.35rem; font-size:0.85rem; }
.kazanım-code { font-weight:700; }

.manual-questions {
  max-height: 260px;
  overflow: auto;
  border:1px solid var(--line);
  border-radius:8px;
  padding:0.5rem;
  background:#fff;
}
.manual-question-item {
  display:flex;
  gap:0.5rem;
  align-items:flex-start;
  margin:0.4rem 0;
}
.manual-question-item input { width:auto; margin-top:0.2rem; }

#emptyState { color: var(--muted); text-align: center; padding: 1rem; }
#examPaper { border:1px dashed var(--line); border-radius:8px; padding:1rem; }
.exam-title { text-align:center; margin-top:0; }
.meta-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:0.4rem; margin-bottom:1rem; }
.questions { padding-left:1.1rem; }
.questions li { margin-bottom:1rem; line-height:1.45; }
.question-figure { margin:0.6rem 0; }
.question-figure img { max-width:220px; width:100%; height:auto; border:1px solid #111; }
.answer-space { margin-top:0.4rem; border-top:1px dotted #9fb3c8; min-height:52px; }

.actions { display:flex; gap:0.6rem; flex-wrap:wrap; }
.actions button { margin-top:0.8rem; width:auto; padding:0.55rem 0.8rem; }
.hidden { display:none; }
footer { padding:1rem 0 2rem; color:var(--muted); }

@media (max-width: 920px) {
  .grid { grid-template-columns:1fr; }
  .controls { position:static; }
}

@media print {
  body { background:#fff; }
  .controls, footer, #actions, .question-browser, header p { display:none !important; }
  .grid, .card { display:block; border:none; box-shadow:none; padding:0; }
  #examPaper { border:none; padding:0; }
}
