/* Test ortamı paneli */
.test-banner {
  background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber);
  border-radius: 10px; padding: 12px 16px; font-size: 13.5px; margin-bottom: 18px;
}
.test-banner b { font-weight: 700; }

.gen-card { padding: 18px 20px; margin-bottom: 20px; }
.gen-card h3 { margin: 0 0 14px; font-size: 17px; }
.gen-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.gen-grid .field { margin: 0; }
.gen-result { margin-top: 12px; }
.gen-result .ok-line { background: var(--green-bg); color: var(--green); padding: 10px 14px; border-radius: 9px; font-size: 13.5px; }
.gen-result code, .lnk code, td code { background: var(--surface-2); padding: 1px 7px; border-radius: 6px; font-size: 12.5px; }

/* Chart ızgarası */
.charts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 8px; }
.chart-card { padding: 16px 18px; }
.chart-card h4 { margin: 0 0 10px; font-size: 14px; color: var(--muted); font-weight: 600; }
.chart { width: 100%; height: auto; display: block; }
.chart .cbase { stroke: var(--line); stroke-width: 1; }
.chart .cval { font-size: 9px; fill: var(--muted); text-anchor: middle; }
.chart .cax { font-size: 9px; fill: var(--muted); text-anchor: middle; }

.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--muted); justify-content: center; }
.legend.col { flex-direction: column; gap: 6px; align-items: flex-start; }
.legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.legend .lg i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; }
.donut { width: 150px; height: 150px; }
.donut .dcenter { text-anchor: middle; font-size: 26px; font-weight: 800; fill: var(--text); }

.lnk a { color: var(--brand); text-decoration: none; font-weight: 600; }
.lnk a:hover { text-decoration: underline; }

/* Kod konsolu */
.code-card { padding: 18px 20px; margin-bottom: 20px; }
.code-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.code-head h3 { margin: 0; font-size: 17px; }
.code-help summary { cursor: pointer; font-size: 13px; color: var(--brand); user-select: none; }
.code-help-body { font-size: 12.5px; line-height: 1.9; color: var(--muted); margin-top: 8px; padding: 12px; background: var(--surface-2); border-radius: 9px; }
.code-help-body code { background: var(--surface); padding: 1px 6px; border-radius: 5px; color: var(--brand-dark); font-size: 12px; }
:root[data-theme="dark"] .code-help-body code { color: var(--brand); }
.code-editor {
  width: 100%; box-sizing: border-box; min-height: 200px; resize: vertical;
  font-family: ui-monospace, "Cascadia Code", "Fira Code", Consolas, monospace; font-size: 13px; line-height: 1.5;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: #0d1117; color: #d9e0e8; tab-size: 2;
}
:root:not([data-theme="dark"]) .code-editor { background: #1b1f2a; color: #e6e9f0; }
.code-editor:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.code-out {
  margin-top: 12px; max-height: 260px; overflow: auto; white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; line-height: 1.6;
  padding: 12px 14px; border-radius: 9px; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); min-height: 20px;
}
.code-out:empty::before { content: "Çıktı burada görünür…"; color: var(--muted); }

@media (max-width: 720px) {
  .gen-grid { grid-template-columns: 1fr 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
}
