/* C# Form Stüdyosu — uygulama arayüzü */

:root {
  --bg: #f4f6fa;
  --panel: #ffffff;
  --panel-2: #f7f8fb;
  --border: #dde2ea;
  --border-strong: #c7cfdb;
  --text: #1d2433;
  --muted: #687389;
  --primary: #512bd4;
  --primary-2: #6b46e5;
  --primary-soft: #efeafd;
  --accent: #0e7cd6;
  --danger: #d92d20;
  --success: #12a150;
  --warning: #c27803;
  --radius: 8px;
  --shadow: 0 4px 18px rgba(20, 30, 60, 0.08);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: "Cascadia Code", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 14px/1.45 var(--font); color: var(--text); background: var(--bg); }
#app { height: 100%; display: flex; flex-direction: column; }
a { color: var(--primary); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hidden { display: none !important; }
.spacer { flex: 1; }

/* ------------------------------------------------------------------ açılış */
.boot { margin: auto; text-align: center; color: var(--muted); }
.boot-logo, .brand-logo { display: inline-block; object-fit: contain; flex: none; }
.boot-logo { width: 96px; height: 96px; margin-bottom: 12px; }

/* ------------------------------------------------------------------ düğmeler / girişler */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 6px;
  background: #fff; color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: #f1f3f7; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #b42318; }
.btn-danger-ghost { color: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: rgba(0, 0, 0, 0.05); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn-lg { height: 40px; padding: 0 20px; font-size: 15px; }
.btn-run { background: #12a150; border-color: #0f8a44; color: #fff; font-weight: 600; }
.btn-run:hover { background: #0f8a44; }
.btn-stop { background: #d92d20; border-color: #b42318; color: #fff; }
.btn-stop:hover { background: #b42318; }

.input {
  height: 32px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 6px; font: inherit; background: #fff; color: var(--text);
  outline: none;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(81, 43, 212, 0.12); }
textarea.input { height: auto; padding: 8px 10px; resize: vertical; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 13px; }
.field-error { color: var(--danger); font-size: 12.5px; min-height: 0; }
.check { display: inline-flex; align-items: center; gap: 6px; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; background: #e8edf5; color: #42506a; font-size: 11.5px; font-weight: 600; margin-left: 6px; }
.badge-teacher { background: #fff1d6; color: #8a5a00; }

.alert { padding: 12px 14px; border-radius: 8px; background: #eef4ff; }
.alert-error { background: #fdecea; color: #8c1d18; }

/* ------------------------------------------------------------------ üst çubuk */
.topbar {
  display: flex; align-items: center; gap: 18px; height: 56px; padding: 0 20px; background: #fff; border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--text); text-decoration: none; }
.brand-logo { width: 32px; height: 32px; font-size: 13px; }
.brand.big { font-size: 22px; margin-bottom: 8px; }
.brand.big .brand-logo { width: 44px; height: 44px; font-size: 17px; border-radius: 10px; }
.topnav { display: flex; gap: 4px; }
.topnav a { padding: 6px 12px; border-radius: 6px; color: var(--muted); text-decoration: none; font-weight: 600; }
.topnav a:hover { background: #f1f3f7; color: var(--text); }
.topnav a.active { background: var(--primary-soft); color: var(--primary); }
.user-chip { display: flex; align-items: center; gap: 8px; }
.user-name { font-weight: 600; }
.avatar {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%;
  background: #dfe6f3; color: #334; font-weight: 700; font-size: 12px; flex: 0 0 auto;
}
.avatar.sm { width: 24px; height: 24px; font-size: 10px; vertical-align: middle; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }

/* ------------------------------------------------------------------ sayfalar */
.page { flex: 1; overflow: auto; padding: 28px 32px 40px; max-width: 1280px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-head h1 { margin: 0 0 4px; font-size: 26px; }
.page-head p { margin: 0; }
.center-page { margin: auto; padding: 16px; }
.card { background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 28px 32px; }
.login-card { max-width: 460px; }
.back-link { display: inline-block; margin-bottom: 14px; text-decoration: none; font-weight: 600; }
.student-head { display: flex; align-items: center; gap: 16px; }
.toolbar-row { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar-row .input { min-width: 220px; }

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.project-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.project-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.project-thumb { height: 120px; background: linear-gradient(135deg, #e9ecff, #f5f0ff); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.mini-window { width: 120px; height: 80px; background: #f0f0f0; border: 1px solid #9aa6bb; box-shadow: 0 3px 10px rgba(0,0,0,.12); }
.mini-title { height: 12px; background: #fff; border-bottom: 1px solid #dde; }
.mini-body { padding: 8px; display: grid; gap: 6px; }
.mini-body i { display: block; height: 8px; width: 70%; background: #fff; border: 1px solid #bbb; }
.mini-body b { display: block; height: 10px; width: 40%; background: #e1e1e1; border: 1px solid #adadad; }
.project-info { padding: 12px 14px 4px; flex: 1; }
.project-name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.note-badge { margin-top: 6px; font-size: 12.5px; color: #8a5a00; background: #fff6e0; display: inline-block; padding: 2px 8px; border-radius: 6px; }
.project-actions { display: flex; gap: 6px; padding: 10px 14px 14px; flex-wrap: wrap; }

.empty { text-align: center; padding: 50px 20px; background: #fff; border: 1px dashed var(--border-strong); border-radius: 12px; grid-column: 1 / -1; }
.empty.small { padding: 24px; }
.empty-icon { font-size: 40px; }

.templates { display: grid; gap: 8px; }
.template { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.template.selected { border-color: var(--primary); background: var(--primary-soft); }
.template input { margin-top: 4px; }

.table-wrap { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: auto; padding: 4px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #eef1f5; white-space: nowrap; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.table td.num, .table th.num { text-align: right; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: #f7f5ff; }
.table-wrap > .small { padding: 8px 12px; }

/* ------------------------------------------------------------------ modal / bildirim */
.modal-shade { position: fixed; inset: 0; background: rgba(15, 20, 35, 0.4); display: flex; align-items: center; justify-content: center; z-index: 1000000; padding: 16px; }
.modal { background: #fff; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.25); width: 440px; max-width: 100%; max-height: 90vh; display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 8px; font-weight: 700; font-size: 16px; }
.modal-x { border: 0; background: transparent; font-size: 15px; cursor: pointer; color: var(--muted); width: 30px; height: 30px; border-radius: 6px; }
.modal-x:hover { background: #f1f3f7; }
.modal-body { padding: 8px 20px 12px; overflow: auto; }
.modal-text { white-space: pre-wrap; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 18px; }

.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 2000000; }
.toast { background: #1d2433; color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow); max-width: 380px; transition: opacity .3s, transform .3s; }
.toast-success { background: #0f7b3e; }
.toast-error { background: #b42318; }
.toast-warning { background: #a15c00; }
.toast.hide { opacity: 0; transform: translateY(8px); }

/* ------------------------------------------------------------------ IDE */
.ide { flex: 1; display: flex; flex-direction: column; min-height: 0; background: #eef0f4; }
.ide-top {
  display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 12px; background: #fff; border-bottom: 1px solid var(--border); flex: 0 0 auto;
}
.ide-top .brand-logo { width: 28px; height: 28px; font-size: 12px; }
.ide-project { display: flex; flex-direction: column; line-height: 1.3; margin: 0 6px; min-width: 0; }
.ide-project-name { font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.ide-project-name:hover { text-decoration: underline dotted; }
.ide-save { font-size: 12px; color: var(--muted); }
.ide-save.error { color: var(--danger); font-weight: 600; }
.ide-sep { width: 1px; height: 26px; background: var(--border); margin: 0 4px; }
.ide-banner { padding: 8px 14px; font-size: 13.5px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ide-banner.readonly { background: #fff6e0; border-bottom: 1px solid #f0dca8; }
.ide-banner.note { background: #eef6ff; border-bottom: 1px solid #cfe2fb; }
.ide-banner .note-text { white-space: pre-wrap; }

.ide-main { flex: 1; display: flex; min-height: 0; }
.ide-panel { background: #fff; display: flex; flex-direction: column; min-height: 0; }
.ide-panel-title {
  height: 30px; flex: 0 0 30px; display: flex; align-items: center; gap: 6px; padding: 0 10px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; color: #556; background: var(--panel-2); border-bottom: 1px solid var(--border);
}
.ide-left { width: 190px; flex: 0 0 190px; border-right: 1px solid var(--border); }
.ide-right { width: 310px; flex: 0 0 310px; border-left: 1px solid var(--border); }
.ide-center { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.splitter, .splitter-h { position: relative; z-index: 5; background: transparent; touch-action: none; transition: background .12s; }
.splitter { flex: 0 0 5px; width: 5px; margin: 0 -2px; cursor: col-resize; }
.splitter-h { flex: 0 0 5px; height: 5px; margin: -2px 0; cursor: row-resize; }
.splitter:hover, .splitter-h:hover, .splitter.dragging, .splitter-h.dragging { background: rgba(81, 43, 212, 0.35); }
body.resizing-col, body.resizing-col * { cursor: col-resize !important; user-select: none !important; }
body.resizing-row, body.resizing-row * { cursor: row-resize !important; user-select: none !important; }
body.resizing-col iframe, body.resizing-row iframe, body.resizing-col .monaco-editor, body.resizing-row .monaco-editor { pointer-events: none; }
.ide-panel { min-width: 0; overflow: hidden; }
/* daraltılmış kenar paneli: dikey başlık şeridi (tıklayınca açılır) */
.ide-panel.panel-hidden { cursor: pointer; align-items: center; background: var(--panel-2); }
.ide-panel.panel-hidden > * { display: none !important; }
.ide-panel.panel-hidden::before {
  content: attr(data-title); writing-mode: vertical-rl; padding: 12px 0; font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.ide-panel.panel-hidden:hover::before { color: var(--primary); }
.ide-left.panel-hidden { border-right: 1px solid var(--border); }
.ide-right.panel-hidden { border-left: 1px solid var(--border); }
.ide-right .solution + .splitter-h { margin: -3px 0 -2px; }

/* araç kutusu */
.toolbox { overflow: auto; flex: 1; padding: 4px 0 10px; }
.toolbox.disabled { opacity: 0.45; pointer-events: none; }
.toolbox-group { font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 8px 10px 3px; }
.tool {
  display: flex; align-items: center; gap: 8px; padding: 4px 10px; margin: 0 4px; cursor: grab; border-radius: 5px; font-size: 13px; user-select: none;
}
.tool:hover { background: #f0edff; }
.tool.active { background: var(--primary-soft); outline: 1px solid var(--primary); }
.tool-icon { width: 20px; text-align: center; font-size: 14px; color: #4b3aa8; }
.toolbox-hint { padding: 10px; font-size: 12px; color: var(--muted); }

/* sekmeler */
.tabs { display: flex; height: 34px; flex: 0 0 34px; background: #e6e9ef; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.tab {
  display: flex; align-items: center; gap: 6px; padding: 0 8px 0 12px; font-size: 13px; color: #445; border-right: 1px solid #d7dbe3; cursor: pointer;
  white-space: nowrap; background: #e6e9ef;
}
.tab:hover { background: #eef0f5; }
.tab.active { background: #fff; color: #000; box-shadow: inset 0 2px 0 var(--primary); }
.tab.dirty .tab-label::after { content: " •"; color: var(--primary); }
.tab-x { border: 0; background: transparent; width: 20px; height: 20px; border-radius: 4px; cursor: pointer; color: #667; font-size: 11px; }
.tab-x:hover { background: #d9dce5; }
.tab-kind { font-size: 11px; color: var(--muted); }
.docs { flex: 1; position: relative; min-height: 0; background: #fff; }
.doc { position: absolute; inset: 0; }
.doc-empty { display: flex; align-items: center; justify-content: center; color: var(--muted); }

/* çözüm gezgini */
.solution { flex: 0 0 auto; max-height: 38%; overflow: auto; border-bottom: 1px solid var(--border); }
.tree { padding: 4px 0; font-size: 13px; }
.tree-item { display: flex; align-items: center; gap: 6px; padding: 3px 8px; cursor: pointer; user-select: none; white-space: nowrap; }
.tree-item:hover { background: #f2f4f8; }
.tree-item.active { background: var(--primary-soft); }
.tree-item .ti-icon { width: 16px; text-align: center; font-size: 12px; }
.tree-item .ti-actions { margin-left: auto; display: none; gap: 2px; }
.tree-item:hover .ti-actions { display: flex; }
.ti-btn { border: 0; background: transparent; cursor: pointer; width: 22px; height: 20px; border-radius: 4px; color: #667; font-size: 12px; }
.ti-btn:hover { background: #e3e6ee; }
.tree-root { font-weight: 700; }
.tree-child { padding-left: 28px; }
.tree-child2 { padding-left: 46px; color: #556; }

/* özellikler */
.props { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.props-head { padding: 6px 8px; display: flex; gap: 6px; border-bottom: 1px solid var(--border); }
.props-head select { flex: 1; min-width: 0; height: 28px; font-size: 12.5px; }
.props-mode { display: flex; }
.props-mode button { height: 28px; padding: 0 8px; border: 1px solid var(--border-strong); background: #fff; cursor: pointer; font-size: 12.5px; }
.props-mode button:first-child { border-radius: 5px 0 0 5px; }
.props-mode button:last-child { border-radius: 0 5px 5px 0; border-left: 0; }
.props-mode button.active { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
.props-grid { flex: 1; overflow: auto; font-size: 12.5px; min-height: 90px; }
.props-cat { padding: 4px 8px; font-weight: 700; background: #f2f4f8; color: #445; font-size: 12px; position: sticky; top: 0; z-index: 1; }
.prop-row { display: grid; grid-template-columns: 44% 56%; border-bottom: 1px solid #eef0f4; min-height: 24px; }
.prop-row.selected { background: #f0edff; }
.prop-name { padding: 3px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-right: 1px solid #eef0f4; }
.prop-row.changed .prop-name { font-weight: 700; }
.prop-value { display: flex; align-items: center; min-width: 0; position: relative; }
.prop-value input, .prop-value select {
  width: 100%; height: 23px; border: 0; padding: 0 6px; font: inherit; background: transparent; outline: none; min-width: 0;
}
.prop-value input:focus, .prop-value select:focus { background: #fff; box-shadow: inset 0 0 0 1px var(--primary); }
.prop-value input:read-only { color: #555; }
.prop-value .more { flex: 0 0 22px; height: 21px; margin-right: 1px; border: 1px solid #ccd; background: #f6f6f9; border-radius: 3px; cursor: pointer; font-size: 11px; padding: 0; }
.swatch { width: 14px; height: 12px; border: 1px solid #889; flex: 0 0 14px; margin-left: 6px; }
.props-desc { flex: 0 1 64px; min-height: 0; border-top: 1px solid var(--border); padding: 6px 10px; font-size: 12px; overflow: auto; background: var(--panel-2); }
.props-desc b { display: block; }
.props-empty { padding: 16px; color: var(--muted); font-size: 13px; }

.color-pop {
  position: fixed; z-index: 1000001; background: #fff; border: 1px solid var(--border-strong); border-radius: 8px; box-shadow: var(--shadow);
  width: 250px; padding: 8px; font-size: 12.5px;
}
.color-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin: 6px 0; }
.color-cell { height: 22px; border: 1px solid #889; border-radius: 3px; cursor: pointer; }
.color-cell:hover { outline: 2px solid var(--primary); }
.color-sys { max-height: 140px; overflow: auto; border: 1px solid var(--border); border-radius: 4px; }
.color-sys div { display: flex; align-items: center; gap: 6px; padding: 2px 6px; cursor: pointer; }
.color-sys div:hover { background: #f0edff; }

/* alt panel */
.ide-bottom { height: 180px; flex: 0 0 auto; background: #fff; border-top: 1px solid var(--border); display: flex; flex-direction: column; }
.ide-bottom.collapsed { height: 31px !important; }
.bottom-tabs { display: flex; align-items: center; height: 30px; flex: 0 0 30px; background: var(--panel-2); border-bottom: 1px solid var(--border); }
.bottom-tab { height: 100%; padding: 0 14px; border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.bottom-tab.active { color: var(--text); box-shadow: inset 0 -2px 0 var(--primary); }
.bottom-body { flex: 1; overflow: auto; min-height: 0; }
.count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #e3e6ee; font-size: 11px; text-align: center; margin-left: 4px; }
.count.err { background: #fdecea; color: #b42318; }
.count.warn { background: #fff4e0; color: #a15c00; }
.errors { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.errors td, .errors th { padding: 4px 8px; border-bottom: 1px solid #f0f2f6; text-align: left; vertical-align: top; }
.errors th { position: sticky; top: 0; background: #fff; color: var(--muted); font-weight: 600; font-size: 11.5px; }
.errors tr { cursor: pointer; }
.errors tr:hover td { background: #f7f5ff; }
.sev { font-size: 13px; }
.sev-error { color: var(--danger); }
.sev-warning { color: var(--warning); }
.err-code { color: var(--muted); font-family: var(--mono); font-size: 11.5px; }
.output { margin: 0; padding: 8px 10px; font: 12.5px/1.45 var(--mono); white-space: pre-wrap; word-break: break-word; }
.output .o-err { color: var(--danger); }
.output .o-info { color: #555; }
.output .o-ok { color: var(--success); }
.output a { cursor: pointer; text-decoration: underline; }
.no-errors { padding: 12px; color: var(--success); font-size: 13px; }

.ide-status {
  height: 24px; flex: 0 0 24px; display: flex; align-items: center; gap: 14px; padding: 0 12px; font-size: 12px; color: #fff;
  background: var(--primary);
}
.ide-status.running { background: #c2410c; }
.ide-status .progress { width: 120px; height: 6px; background: rgba(255,255,255,.3); border-radius: 3px; overflow: hidden; }
.ide-status .progress > div { height: 100%; background: #fff; width: 0; transition: width .2s; }

/* ------------------------------------------------------------------ tasarımcı */
.designer { position: absolute; inset: 0; display: flex; flex-direction: column; background: #fafafa; }
.dsurface-wrap { flex: 1; overflow: auto; position: relative; outline: none; background:
  linear-gradient(90deg, rgba(0,0,0,.025) 1px, transparent 1px) 0 0 / 16px 16px,
  linear-gradient(rgba(0,0,0,.025) 1px, transparent 1px) 0 0 / 16px 16px, #fafbfc; }
.dsurface { position: relative; padding: 18px; min-width: 100%; min-height: 100%; width: max-content; }
.dsurface .wf-window { position: relative; box-shadow: 0 4px 16px rgba(0,0,0,.18); }
.dsurface .wf-window .wf-cap { pointer-events: none; }
.dsurface .wf-ctl > :not(.wf-ctl) { pointer-events: none; }
.dsurface .wf-ctl { cursor: default; }
.dsurface .wf-hidden-design { opacity: 0.55; }
.dsurface .wf-titlebar { cursor: default; }
.dsurface.drop-target-form .wf-client { outline: 2px dashed rgba(81,43,212,.5); outline-offset: -2px; }
.dsurface .drop-target { outline: 2px dashed var(--primary) !important; outline-offset: -2px; }
.dlayer { position: absolute; left: 0; top: 0; pointer-events: none; }
.dsel { position: absolute; border: 1px dashed #333; pointer-events: none; }
.dsel.primary { border: 1px solid #1e1e1e; }
.dhandle {
  position: absolute; width: 7px; height: 7px; background: #fff; border: 1px solid #1e1e1e; pointer-events: auto; margin: -4px 0 0 -4px;
}
.dhandle.nw, .dhandle.se { cursor: nwse-resize; }
.dhandle.ne, .dhandle.sw { cursor: nesw-resize; }
.dhandle.n, .dhandle.s { cursor: ns-resize; }
.dhandle.e, .dhandle.w { cursor: ew-resize; }
.dhandle.disabled { background: #ddd; cursor: default; }
.drubber { position: absolute; border: 1px dotted #333; background: rgba(0,120,215,.08); pointer-events: none; }
.dguide { position: absolute; background: #4a90e2; pointer-events: none; }
.dtray { flex: 0 0 auto; min-height: 40px; border-top: 1px solid var(--border); background: #fff; display: flex; align-items: center; gap: 8px; padding: 6px 10px; flex-wrap: wrap; }
.dtray:empty { display: none; }
.dtray-item { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid transparent; border-radius: 4px; cursor: default; font-size: 13px; }
.dtray-item:hover { background: #f0edff; }
.dtray-item.selected { border-color: #333; border-style: dashed; background: #f0edff; }
.dinfo { position: absolute; right: 12px; bottom: 8px; font-size: 11.5px; color: var(--muted); background: rgba(255,255,255,.85); padding: 2px 6px; border-radius: 4px; pointer-events: none; }

/* ------------------------------------------------------------------ çalıştırma */
.run-overlay { position: fixed; inset: 0; z-index: 500000; display: flex; flex-direction: column; background: #111; }
.run-bar { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px; background: #1b1f2a; color: #fff; flex: 0 0 auto; }
.run-bar .run-title { font-weight: 600; }
.run-bar .run-state { font-size: 12.5px; color: #9ad1a8; }
.run-bar .run-state.ended { color: #f3b6a0; }
.run-bar .btn { height: 30px; }
.run-desktop { flex: 1; min-height: 0; }
.run-output { height: 150px; flex: 0 0 auto; background: #10131a; color: #d7dde8; border-top: 1px solid #2b3140; display: flex; flex-direction: column; }
.run-output.collapsed { height: 28px; }
.run-output-head { height: 28px; flex: 0 0 28px; display: flex; align-items: center; gap: 10px; padding: 0 10px; font-size: 12px; color: #9aa4b8; cursor: pointer; }
.run-output pre { flex: 1; overflow: auto; margin: 0; padding: 6px 10px; font: 12.5px/1.4 var(--mono); white-space: pre-wrap; }
.run-output .o-err { color: #ff8a80; }
.run-output .o-info { color: #9aa4b8; }
.run-error {
  position: absolute; left: 50%; top: 18%; transform: translateX(-50%); z-index: 200000; width: 520px; max-width: calc(100% - 32px);
  background: #fff; border: 1px solid #c42b1c; box-shadow: 0 16px 50px rgba(0,0,0,.4); font-size: 13px; color: #000;
}
.run-error-head { background: #c42b1c; color: #fff; padding: 8px 12px; font-weight: 600; }
.run-error-body { padding: 14px 16px; }
.run-error-body .msg { font-weight: 600; margin: 6px 0 10px; white-space: pre-wrap; }
.run-error-body .where { background: #fdf3f2; border-left: 3px solid #c42b1c; padding: 6px 10px; margin-bottom: 8px; }
.run-error-body details { font-size: 12px; color: #555; }
.run-error-body pre { max-height: 140px; overflow: auto; font-size: 11px; }
.run-error-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 14px; background: #f3f3f3; }

/* ------------------------------------------------------------------ yazı tipi iletişim kutusu */
.font-dialog { display: grid; grid-template-columns: 1fr 90px; gap: 10px; }
.font-dialog select[size] { height: 180px; }
.font-styles { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.font-sample { grid-column: 1 / -1; border: 1px solid var(--border); border-radius: 6px; height: 64px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #f0f0f0; }

@media (max-width: 900px) {
  .ide-left { width: 150px; flex-basis: 150px; }
  .ide-right { width: 250px; flex-basis: 250px; }
  .page { padding: 18px 16px; }
  .user-name { display: none; }
}

/* tasarımcı yardımcı çizgileri ve çalışma zamanı hata satırı */
.dsurface .d-outline { outline: 1px dashed #9a9a9a; outline-offset: -1px; }
.runtime-error-line { background: rgba(255, 60, 60, 0.16); }
.runtime-error-glyph { background: #d92d20; }

/* DataGridView sütun düzenleyicisi */
.col-editor .col-list { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow: auto; }
.col-editor .col-row { display: grid; grid-template-columns: 1.2fr 1.4fr 1.3fr 80px 70px 70px; gap: 6px; align-items: center; }
.col-editor .col-head { font-weight: 600; font-size: 12px; color: var(--muted, #666); }
.col-editor .col-center { text-align: center; }
.col-editor .btn-small { padding: 2px 7px; margin-right: 3px; }
.col-editor .col-list > .btn { align-self: flex-start; margin-top: 6px; }

/* Tasarımcı: menü / araç çubuğu öğeleri ve sekmeler */
.dsurface .wf-tsitem, .dsurface .wf-tab, .dsurface .wf-tabhdr, .dsurface .wf-tsdrop, .dsurface .d-typehere, .dsurface .d-ctxedit { pointer-events: auto !important; }
.dsurface .wf-tsitem input, .dsurface .wf-tsitem select { pointer-events: none; }
.dsurface .wf-tsmenu.open > .wf-tsdrop { display: flex; }
.d-typehere { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; margin: 1px 2px; border: 1px dashed #8fa3b8; color: #5f7287;
  font-style: italic; background: rgba(255,255,255,.75); min-width: 84px; cursor: text; font-size: 9pt; box-sizing: border-box; white-space: nowrap; }
.wf-tsdrop > .d-typehere { margin: 2px 2px 1px 26px; }
.d-typehere.editing { cursor: text; border-style: solid; border-color: #0078d7; background: #fff; }
.d-typehere-more { margin-left: auto; font-style: normal; cursor: pointer; padding: 0 2px; }
.d-typehere-input { border: none; outline: none; font: 9pt "Segoe UI", sans-serif; width: 130px; background: #fff; padding: 1px 0; }
.d-addmenu { position: fixed; z-index: 10000; background: #fff; border: 1px solid #c8c8c8; box-shadow: 0 6px 16px rgba(0,0,0,.18); padding: 3px 0; font-size: 12px; border-radius: 4px; }
.d-addmenu-item { padding: 5px 14px; cursor: pointer; white-space: nowrap; }
.d-addmenu-item:hover { background: #e8f1fb; }
.d-ctxedit { position: absolute; left: 10px; top: 6px; z-index: 1000; font-size: 9pt; }
.d-ctxedit-title { display: inline-block; background: #e8e8e8; border: 1px solid #b8b8b8; border-bottom: none; padding: 1px 8px; color: #333; }
.d-ctxedit .d-ctxdrop { display: flex !important; position: static; }
.dsurface .wf-tabcontrol.d-outline { outline: 1px dashed #999; }
.col-editor .tsi-row { grid-template-columns: 1.3fr 1fr 1.4fr 70px; }
.col-editor .tsi-add { display: flex; gap: 6px; margin-top: 6px; }
.col-editor .tsi-add select { width: auto; }
.mask-editor .mask-list { border: 1px solid var(--border, #ddd); border-radius: 6px; max-height: 260px; overflow: auto; margin-bottom: 10px; }
.mask-editor .mask-row { display: grid; grid-template-columns: 1.3fr 1.4fr 1.4fr; gap: 8px; padding: 5px 10px; cursor: pointer; font-size: 13px; }
.mask-editor .mask-row:hover { background: #f1f4fb; }
.mask-editor .mask-row.selected { background: #e2e9fb; }
.mask-editor label { display: flex; gap: 8px; align-items: center; }
.mask-editor .mask-preview { margin-top: 8px; font-family: Consolas, monospace; }

/* Veritabanı penceresi (okul.mdf) */
.dataed { display: flex; flex-direction: column; height: 100%; background: var(--panel, #fff); }
.dataed-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border, #e3e3e8); flex-wrap: wrap; }
.dataed-title { font-weight: 600; }
.dataed-table { width: auto; }
.dataed-tabs { display: flex; gap: 4px; }
.dataed-tab { border: 1px solid var(--border, #d8d8e0); background: transparent; padding: 4px 10px; border-radius: 6px; cursor: pointer; font: inherit; font-size: 13px; }
.dataed-tab.active { background: var(--primary-soft, #ece8fb); border-color: var(--primary, #512bd4); color: var(--primary, #512bd4); }
.dataed-info { font-size: 12px; }
.dataed-body { flex: 1; overflow: auto; padding: 10px 12px; }
.dataed-sql { font-family: Consolas, monospace; font-size: 13px; background: #f7f7fa; padding: 12px; border-radius: 6px; border: 1px solid var(--border, #e3e3e8); }
.dataed-design { display: flex; flex-direction: column; gap: 4px; max-width: 980px; }
.dataed-crow { display: grid; grid-template-columns: 1.4fr 1fr 80px 50px 64px 74px 60px 60px 40px; gap: 6px; align-items: center; }
.dataed-chead { font-weight: 600; font-size: 12px; color: var(--muted, #666); }
.dataed-center { text-align: center; }
.dataed-design > .btn { align-self: flex-start; margin-top: 6px; }
.dataed-note { font-size: 12px; margin-top: 10px; }
.dataed-grid { overflow: auto; border: 1px solid var(--border, #e3e3e8); border-radius: 6px; max-height: calc(100% - 50px); }
.dataed-grid table { border-collapse: collapse; font-size: 13px; min-width: 100%; }
.dataed-grid th { position: sticky; top: 0; background: #f2f2f6; text-align: left; padding: 5px 6px; border-bottom: 1px solid var(--border, #ddd); z-index: 1; white-space: nowrap; }
.dataed-grid td { border-bottom: 1px solid #f0f0f3; padding: 1px 3px; }
.dataed-grid .dataed-rh { color: var(--muted, #888); text-align: right; width: 32px; font-size: 11px; }
.dataed-cell { border: 1px solid transparent; background: transparent; font: inherit; padding: 3px 4px; width: 100%; min-width: 70px; box-sizing: border-box; }
.dataed-cell:focus { border-color: var(--primary, #512bd4); outline: none; background: #fff; }
.dataed-cell.null::placeholder { color: #b5b5c0; font-style: italic; }
.dataed-foot { margin-top: 8px; display: flex; gap: 10px; align-items: center; }
.bind-editor .bind-row { display: grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: center; margin-bottom: 6px; }
.prop-value select + select { margin-top: 2px; }

/* Sınıfa gönder penceresi */
.dist-editor .dist-list { max-height: 220px; overflow: auto; border: 1px solid var(--border, #e3e3e8); border-radius: 6px; padding: 6px 10px; margin: 6px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.dist-editor .dist-item { font-size: 13px; }
.dist-editor textarea { width: 100%; box-sizing: border-box; }

/* ------------------------------------------------------------------ Reference Manager / NuGet */
.refm { display: flex; flex-direction: column; gap: 8px; min-height: 380px; }
.refm-head { display: flex; align-items: center; gap: 8px; }
.refm-head .input { width: 240px; }
.refm-main { display: grid; grid-template-columns: 130px 1fr 200px; gap: 8px; height: 360px; }
.refm-cats { border: 1px solid var(--border); border-radius: 6px; padding: 4px; }
.refm-cat { padding: 4px 8px; border-radius: 4px; cursor: pointer; }
.refm-cat.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.refm-list { border: 1px solid var(--border); border-radius: 6px; overflow: auto; }
.refm-row { display: flex; align-items: center; gap: 8px; padding: 3px 8px; cursor: pointer; }
.refm-row:hover { background: #f1f4fa; }
.refm-name { flex: 1; }
.refm-ver { color: var(--muted); font-size: 12px; }
.refm-empty { padding: 12px; white-space: normal; }
.refm-info { border: 1px solid var(--border); border-radius: 6px; padding: 8px; white-space: pre-wrap; font-size: 12px; color: var(--muted); }
.nu { display: flex; flex-direction: column; gap: 8px; }
.nu-head { display: flex; align-items: center; gap: 10px; }
.nu-head .input { width: 260px; }
.nu-tabs { display: flex; gap: 14px; }
.nu-tab { border: 0; background: transparent; font: inherit; font-size: 15px; cursor: pointer; padding: 4px 0; color: var(--muted); border-bottom: 2px solid transparent; }
.nu-tab.active { color: var(--text); font-weight: 600; border-bottom-color: var(--primary); }
.nu-main { display: grid; grid-template-columns: 1fr 360px; gap: 10px; height: 420px; }
.nu-left { border: 1px solid var(--border); border-radius: 6px; overflow: auto; }
.nu-item { display: flex; gap: 10px; padding: 8px 10px; cursor: pointer; border-bottom: 1px solid #f0f2f6; }
.nu-item:hover { background: #f5f7fb; }
.nu-item.active { background: var(--primary-soft); }
.nu-ico { width: 32px; height: 32px; border-radius: 6px; background: #004880; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex: 0 0 auto; }
.nu-ico.big { width: 40px; height: 40px; font-size: 18px; }
.nu-text { flex: 1; min-width: 0; }
.nu-ver { color: var(--muted); font-size: 12px; white-space: nowrap; }
.nu-check { color: var(--success); font-weight: 600; }
.nu-right { border: 1px solid var(--border); border-radius: 6px; padding: 12px; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.nu-title { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.nu-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nu-desc p { margin: 4px 0; }
.nu-warn { color: var(--danger); margin-top: 6px; }
.nu-preview, .nu-lic { margin-top: 8px; padding: 8px; background: var(--panel-2); border-radius: 6px; }
.ide-dropdown { position: fixed; z-index: 100000; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); padding: 4px; display: flex; flex-direction: column; min-width: 230px; }
.ide-dd-item { border: 0; background: transparent; text-align: left; padding: 7px 12px; border-radius: 5px; cursor: pointer; font: inherit; }
.ide-dd-item:hover { background: var(--primary-soft); }
.ide-dd-sep { height: 1px; background: var(--border); margin: 3px 6px; }

/* ------------------------------------------------------------------ Entity Data Model sihirbazı */
.efw, .efw-page, .efw-col { display: flex; flex-direction: column; gap: 8px; }
.efw-title { font-size: 17px; font-weight: 600; color: #1e4e8c; }
.efw-items { border: 1px solid var(--border); border-radius: 6px; max-height: 260px; overflow: auto; }
.efw-item { padding: 6px 10px; cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; border-bottom: 1px solid #f0f2f6; }
.efw-item:hover { background: #f5f7fb; }
.efw-item.sel { background: var(--primary-soft); }
.efw-item.dis { opacity: .5; cursor: default; }
.efw-item > div { flex-basis: 100%; }
.efw-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.efw-card { border: 1px solid var(--border); border-radius: 6px; padding: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.efw-card.sel { border-color: var(--primary); background: var(--primary-soft); }
.efw-card-ico { font-size: 26px; color: #1e4e8c; }
.efw-radio { display: flex; align-items: flex-start; gap: 6px; }
.efw-radio.dis { opacity: .55; }
.efw-cs { background: var(--panel-2); border: 1px solid var(--border); padding: 8px; white-space: pre-wrap; word-break: break-all; font-size: 12px; margin: 0; min-height: 40px; }
.efw-warn { background: #fff6e0; border: 1px solid #f0c36d; padding: 8px 10px; border-radius: 6px; font-size: 12px; }
.efw-tree { border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; max-height: 220px; overflow: auto; }
.efw-node { display: flex; align-items: center; gap: 4px; padding: 2px 0; }
.efw-node.l1 { padding-left: 18px; color: var(--muted); }
.efw-node.l2 { padding-left: 36px; }
.edmx-bar { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-bottom: 1px solid var(--border); background: var(--panel-2); }
.edmx-canvas { position: relative; flex: 1; overflow: auto; min-height: 400px; background: #f6f7fb repeating-linear-gradient(0deg, transparent 0 19px, #eceff5 19px 20px), repeating-linear-gradient(90deg, transparent 0 19px, #eceff5 19px 20px); }
.edmx-ent { position: absolute; width: 190px; background: #fff; border: 1px solid #7a93c4; border-radius: 6px; box-shadow: 0 2px 6px rgba(0,0,0,.12); font-size: 12px; overflow: hidden; }
.edmx-head { background: #dbe6f7; padding: 5px 8px; font-weight: 700; color: #1e4e8c; }
.edmx-sec { padding: 3px 8px; color: var(--muted); font-size: 11px; background: #f3f5fa; }
.edmx-prop { padding: 1px 10px; }
.edmx-foot { padding: 6px 10px; border-top: 1px solid var(--border); }

/* ------------------------------------------------------------------ Setup projesi */
.su { display: grid; grid-template-columns: 230px 1fr 300px; flex: 1; min-height: 360px; border-bottom: 1px solid var(--border); }
.su-tree { border-right: 1px solid var(--border); padding: 6px; background: var(--panel-2); }
.su-node { padding: 4px 8px 4px 22px; border-radius: 4px; cursor: pointer; border: 1px dashed transparent; }
.su-node.root { padding-left: 4px; cursor: default; font-weight: 600; }
.su-node.sel { background: var(--primary-soft); color: var(--primary); }
.su-node.drop { border-color: var(--primary); background: #eef4ff; }
.su-list { overflow: auto; }
.su-row { display: grid; grid-template-columns: 1fr 100px; padding: 4px 10px; border-bottom: 1px solid #f0f2f6; cursor: default; }
.su-row.head { color: var(--muted); font-size: 12px; background: var(--panel-2); }
.su-row:not(.head):hover { background: #f5f7fb; }
.su-row.sel { background: var(--primary-soft); }
.su-empty { padding: 14px; }
.su-props { border-left: 1px solid var(--border); overflow: auto; padding: 6px 8px; display: flex; flex-direction: column; gap: 4px; }
.su-ph { font-weight: 700; color: #1e4e8c; margin-bottom: 4px; }
.su-prop { display: grid; grid-template-columns: 130px 1fr; gap: 6px; align-items: center; font-size: 12px; }
.su-prop .input { height: 26px; padding: 2px 6px; font-size: 12px; }
.su-icon-prev { width: 48px; height: 48px; object-fit: contain; margin-top: 6px; }
.progress { height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; margin: 8px 0; }
.progress-fill { height: 100%; background: var(--success); }
.zip-opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.zip-opt:hover { background: var(--panel-2); }
.page-head-btns { display: flex; gap: 10px; flex-wrap: wrap; }
