/* Code2Fold Studio - dashboard
   Tasarım dili: marka paleti (#1E3A5F lacivert, #2F5B8C, #4F8CC9, #9CC0E6) - lacivert vurgu, açık gri zemin, yumuşak köşeler.
   Yerleşim (D-025): gruplu sol panel (Kütüphane / Görselleştir / Çalışma
   alanı / Yönetim), daraltılabilir; araç sayfalarında sağda bilgi paneli. */

/* BUG FIX (2026-10-24, laptop testinde bulundu): display:flex verilen
   element'lerde tarayıcının varsayılan `[hidden] { display: none }` kuralı
   aynı özgüllükte olduğu için kaybediyordu ve JS `el.hidden = true` yapsa
   bile element görünür kalıyordu. Bu genel kural her zaman kazanmalı. */
[hidden] {
  display: none !important;
}

:root {
  --bg: #F7F7F7;
  --surface: #FFFFFF;
  --surface-sunken: #F0F1F3;
  --sidebar: #F0F1F3;
  --hover: #E4E7EC;
  --border: #E1E4E9;
  --text: #13283F;
  --text-muted: #5D6878;
  --brand: #1E3A5F;
  --brand-2: #2F5B8C;
  --accent: #1E3A5F;
  --accent-hover: #2F5B8C;
  --accent-soft: #E4EEF8;
  --on-accent: #FFFFFF;
  --success: #3E7A4A;
  --success-soft: #E4F0E6;
  --danger: #B3432F;
  --danger-soft: #FBE7E2;
  --warning: #9A7B1F;
  --warning-soft: #F6EED8;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(19, 40, 63, 0.06);
  --shadow-md: 0 8px 24px rgba(19, 40, 63, 0.14);
  --mono: "SF Mono", Menlo, Consolas, monospace;
  --sidebar-w: 16rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1620;
    --surface: #16202D;
    --surface-sunken: #1C2735;
    --sidebar: #121B26;
    --hover: #22303F;
    --border: #2A3747;
    --text: #E8ECF2;
    --text-muted: #98A3B3;
    --brand: #E8ECF2;
    --brand-2: #9CC0E6;
    --accent: #9CC0E6;
    --accent-hover: #C3D9F0;
    --accent-soft: #1E3049;
    --on-accent: #0F1620;
    --success: #7DBE8A;
    --success-soft: #26362A;
    --danger: #E58C78;
    --danger-soft: #42291F;
    --warning: #D9B85C;
    --warning-soft: #3B3420;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

/* D-062: Ayarlar > Tema "Koyu" - sistem ayarından bağımsız */
:root[data-theme="dark"] {
  --bg: #0F1620;
  --surface: #16202D;
  --surface-sunken: #1C2735;
  --sidebar: #121B26;
  --hover: #22303F;
  --border: #2A3747;
  --text: #E8ECF2;
  --text-muted: #98A3B3;
  --brand: #E8ECF2;
  --brand-2: #9CC0E6;
  --accent: #9CC0E6;
  --accent-hover: #C3D9F0;
  --accent-soft: #1E3049;
  --on-accent: #0F1620;
  --success: #7DBE8A;
  --success-soft: #26362A;
  --danger: #E58C78;
  --danger-soft: #42291F;
  --warning: #D9B85C;
  --warning-soft: #3B3420;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

button, input, select, textarea { font-family: inherit; color: inherit; }
a { color: var(--accent-hover); }
code, .mono { font-family: var(--mono); font-size: 0.9em; }
hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.muted { color: var(--text-muted); font-weight: 400; }

.icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

input[type=text], input[type=search], input[type=number], input[type=password], select, textarea {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 7px 10px;
  font-size: 14px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }

/* ---------- Login screen ---------- */

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
}

.login-brand { text-align: center; margin-bottom: 28px; }

.login-mark { display: flex; justify-content: center; margin: 0 auto 18px; color: var(--brand); }
.login-mark .logo { height: 64px; }

.login-brand h1 { font-size: 20px; margin: 0 0 6px; font-weight: 600; }
.login-sub { color: var(--text-muted); font-size: 13.5px; margin: 0; }

#login-form label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
#login-form input { width: 100%; padding: 10px 12px; background: var(--surface-sunken); margin-bottom: 16px; }
.login-switch { text-align: center; font-size: 13px; margin: 12px 0 0; }
.me-line { font-size: 12px; color: var(--text-muted); padding: 2px 10px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-screen--collapsed .me-line { display: none; }

/* ---------- Buttons ---------- */

.btn-primary, .btn-secondary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius);
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s ease, transform 0.08s ease;
}
.btn-primary:active, .btn-secondary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-block { width: 100%; }

.btn-secondary { background: var(--surface-sunken); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--hover); }

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface-sunken); }
.btn-danger:hover { color: var(--danger); background: var(--danger-soft); }
.btn-sm { padding: 5px 10px; font-size: 13px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }

.error-text { color: var(--danger); font-size: 13px; margin: 8px 0 0; }

/* ---------- App shell ---------- */

.app-screen { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  height: 100vh;
  position: sticky;
  top: 0;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 12px 10px;
  transition: width 0.2s cubic-bezier(0.165, 0.85, 0.45, 1);
  overflow: hidden;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px 10px;
}

.brand-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}
.brand-mark { display: flex; align-items: center; color: var(--brand); flex-shrink: 0; }
.brand-mark img { height: 34px; width: auto; display: block; }
/* Yan yana "code2fold" yazısı (marka panosu): lacivert, "2" orta mavi */
.brand-name { font-weight: 700; font-size: 20px; line-height: 1; letter-spacing: -0.03em; color: var(--brand); white-space: nowrap; }
.brand-2 { color: var(--brand-2); }

.sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-muted);
}
.sidebar-search input {
  border: none;
  background: transparent;
  padding: 0;
  width: 100%;
  font-size: 13.5px;
  min-width: 0;
}

.sidebar-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; margin: 0 -4px; padding: 0 4px; min-height: 0; }
.nav { margin-bottom: 6px; }

.nav-item {
  display: flex;
  align-items: center;
  height: 32px;
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 10px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  padding: 0;
  margin-bottom: 1px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item--active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 500; }
.nav-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-chevron { margin-right: 8px; transition: transform 0.15s ease; opacity: 0.7; }
.nav-group--collapsed .nav-chevron { transform: rotate(-90deg); }
.nav-group--collapsed .nav-children { display: none; }
.nav-children { padding-left: 14px; margin-left: 15px; border-left: 1px solid var(--border); margin-bottom: 4px; }
.nav-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 0 7px;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.sidebar-foot { border-top: 1px solid var(--border); padding-top: 8px; margin-top: 8px; }
.sidebar-head-actions { display: flex; gap: 2px; }

.worker-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 6px 10px 8px;
  text-decoration: none;
  border-radius: 10px;
}
.worker-status:hover { background: var(--hover); }
.worker-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; margin: 0 2px 0 4px; }
.worker-status .worker-status-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.worker-status--online .dot { background: var(--success); }
.worker-status--offline .dot { background: var(--danger); }

/* Daraltılmış panel: sadece ikonlar */
.app-screen--collapsed .sidebar { width: 56px; }
.app-screen--collapsed .brand-name,
.app-screen--collapsed .nav-label,
.app-screen--collapsed .nav-chevron,
.app-screen--collapsed .nav-badge,
.app-screen--collapsed .sidebar-search,
.app-screen--collapsed .side-section,
.app-screen--collapsed .me-text,
.app-screen--collapsed #sidebar-search-btn,
.app-screen--collapsed .worker-status-text,
.app-screen--collapsed .brand-mini { display: none; }
.app-screen--collapsed .sidebar-head { justify-content: center; }
.app-screen--collapsed .nav-children { padding-left: 0; margin-left: 0; border-left: none; }
.app-screen--collapsed .nav-group--collapsed .nav-children { display: block; }
.app-screen--collapsed .nav-group-head { display: none; }

.mobile-topbar, .sidebar-backdrop { display: none; }

/* ---------- Main ---------- */

.main { flex: 1; min-width: 0; padding: 36px 48px 64px; }
.main:has(> .view[data-view="home"]:not([hidden])) { padding-top: 28px; padding-bottom: 28px; }
.view { max-width: 1120px; margin-left: auto; margin-right: auto; }

.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: 22px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.01em; }
.page-head--row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head-actions { display: flex; align-items: center; gap: 8px; }
.page-sub { color: var(--text-muted); font-size: 14px; margin: 0; max-width: 720px; }
.back-link { display: inline-block; font-size: 13px; color: var(--text-muted); text-decoration: none; margin-bottom: 14px; }
.back-link:hover { color: var(--text); }

.section-title { font-size: 15px; font-weight: 600; margin: 28px 0 12px; display: flex; align-items: baseline; gap: 10px; }
.section-link { font-size: 13px; font-weight: 400; text-decoration: none; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.card--flush { padding: 0; overflow: hidden; }
.card h3 { font-size: 15px; margin: 0 0 6px; }
.card p { margin: 0 0 10px; }
.card p:last-child { margin-bottom: 0; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, transform 0.15s ease;
  min-width: 0;
}
.tile:hover { border-color: var(--accent); transform: translateY(-1px); }
.tile-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tile-title { font-weight: 600; font-size: 14.5px; }
.tile-sub { color: var(--text-muted); font-size: 13px; line-height: 1.45; }
.tile-meta { color: var(--text-muted); font-size: 12px; margin-top: auto; padding-top: 4px; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 8px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.stat-label { font-size: 12.5px; color: var(--text-muted); }
.stat-value { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat-note { font-size: 12px; color: var(--text-muted); }

.empty-card { color: var(--text-muted); font-size: 14px; }
.empty-row { padding: 18px; color: var(--text-muted); font-size: 13.5px; }

/* --- Tables --- */

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  color: var(--text-muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-sunken);
  white-space: nowrap;
}
table.data td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tr.clickable { cursor: pointer; }
table.data tr.clickable:hover td { background: var(--surface-sunken); }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-main { font-weight: 500; }
.cell-sub { color: var(--text-muted); font-size: 12px; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }

.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

/* --- Status badge --- */

.status-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
  background: var(--surface-sunken);
  color: var(--text-muted);
}
.status-badge--queued, .status-badge--dispatched { background: var(--warning-soft); color: var(--warning); }
.status-badge--running { background: var(--accent-soft); color: var(--accent-hover); }
.status-badge--completed { background: var(--success-soft); color: var(--success); }
.status-badge--failed { background: var(--danger-soft); color: var(--danger); }

.progress { height: 6px; border-radius: 999px; background: var(--surface-sunken); overflow: hidden; min-width: 80px; }
.progress > span { display: block; height: 100%; background: var(--accent); }
.progress--done > span { background: var(--success); }
.progress--failed > span { background: var(--danger); }

/* --- Forms --- */

.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form input[type=text] { flex: 1; min-width: 180px; }

.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.field > span { font-size: 12.5px; }
.field input, .field select { color: var(--text); }
.field--info { justify-content: flex-end; font-size: 12.5px; }

.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; padding-bottom: 6px; }

.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: start; }
.tool-kicker { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent-hover); margin-bottom: 6px; }
.tool-aside {
  position: sticky;
  top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  font-size: 13.5px;
}
.tool-aside h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin: 14px 0 6px; }
.tool-aside h4:first-child { margin-top: 0; }
.tool-aside ul { margin: 0; padding-left: 18px; }
.tool-aside li { margin-bottom: 4px; }
.tool-aside p { margin: 0 0 8px; }

.job-form { display: flex; flex-direction: column; gap: 22px; max-width: 720px; }
.job-form--wide { max-width: none; gap: 16px; }
.form-section-title { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.field-group { display: flex; flex-direction: column; }
.submit-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.submit-row .error-text { margin: 0; }

.input-mode-toggle, .seg { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.mode-btn, .seg-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  border-radius: var(--radius);
  padding: 6px 13px;
  font-size: 13px;
  cursor: pointer;
}
.mode-btn--active, .seg-btn--active { background: var(--accent-soft); color: var(--accent-hover); border-color: var(--accent-soft); }

.pdb-textarea, .pdb-id-input {
  width: 100%;
  padding: 12px;
  font-size: 13px;
  font-family: var(--mono);
  resize: vertical;
}

.pdb-file-input-wrap {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px 16px;
  margin-top: 8px;
}
.field-hint { margin: 8px 0 0; font-size: 12px; color: var(--text-muted); }

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.checkbox-row, .number-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.number-row { justify-content: space-between; }
/* .number-row--wide: metin girdileri için satırın tamamını kaplar (D-017). */
.number-row--wide { grid-column: 1 / -1; justify-content: flex-start; }
.number-row--wide input, .number-row--wide select { flex: 1; width: auto; min-width: 0; max-width: 100%; }
/* Uzun seçenek metinli açılır menüler ızgarayı taşırmasın (D-030 trajectory seçenekleri). */
.options-grid > * { min-width: 0; }
.number-row--wide { flex-wrap: wrap; }
.number-row input { width: 76px; padding: 4px 6px; font-size: 13px; }

.pipeline-picker { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pipeline-step {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  border-radius: var(--radius);
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
}
.pipeline-step--on { background: var(--accent-soft); color: var(--accent-hover); border-color: var(--accent); }
.pipeline-arrow { color: var(--text-muted); }

/* --- Job detail --- */

.detail-block { margin-top: 8px; }

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.summary-text {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.6;
}

.result-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.result-actions-inline { display: contents; }

.report-json, .code-block {
  margin-top: 16px;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  font-size: 12px;
  font-family: var(--mono);
  overflow-x: auto;
  max-height: 360px;
  white-space: pre;
}
.code-block { margin: 8px 0 0; max-height: none; }

/* --- Yapı görüntüleyici (D-026, viewer.js) --- */

.view--wide { max-width: none; }
.page-head--compact { margin-bottom: 14px; }

.mv {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 150px);
  min-height: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-size: 13px;
}
.mv:fullscreen { height: 100vh; border-radius: 0; }

.mv-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-sunken);
}
.mv-group { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.mv-btn {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
}
.mv-btn:hover { background: var(--hover); }
.mv-btn.mv-on { background: var(--accent-soft); color: var(--accent-hover); border-color: var(--accent); }
.mv-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.mv-primary:hover { background: var(--accent-hover); }
.mv-input { height: 28px; padding: 0 8px; font-size: 12.5px; border-radius: 7px; max-width: 220px; }
.mv-id { width: 76px; font-family: var(--mono); text-transform: uppercase; }

.mv-body { flex: 1; display: flex; min-height: 0; }
.mv-side {
  width: 290px;
  flex-shrink: 0;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  padding: 6px 8px 12px;
}
.mv-panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 12px 2px 4px;
}
.mv-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 3px 2px; border-radius: 6px; }
.mv-row:hover { background: var(--surface-sunken); }
.mv-row-name { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 12px; }
.mv-sel-name { color: #c2338f; }
.mv-swatch { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; border: 1px solid var(--border); }
.mv-tag { font-family: inherit; font-size: 10.5px; color: var(--text-muted); background: var(--surface-sunken); border-radius: 4px; padding: 0 4px; }
.mv-menus { display: flex; gap: 2px; flex-shrink: 0; }
.mv-menu {
  width: 24px;
  height: 22px;
  padding: 0;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  text-align-last: center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background: var(--surface);
}
.mv-menu[data-menu="A"] { color: #6f6a5e; }
.mv-menu[data-menu="S"] { color: #2f7d3b; }
.mv-menu[data-menu="H"] { color: #b3432f; }
.mv-menu[data-menu="L"] { color: #3c64b4; }
.mv-menu[data-menu="C"] { color: #a0569a; }
.mv-x { border: none; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 11px; padding: 0 4px; text-transform: none; letter-spacing: 0; }
.mv-x:hover { color: var(--danger); }
.mv-empty { color: var(--text-muted); font-size: 12px; padding: 4px 2px; }
.mv-dd { position: relative; }
.mv-dd-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; width: 290px; padding: 10px 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 24px rgba(15, 22, 32, .18); }
.mv-dd-title { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin: 2px 0 6px; }
.mv-dd-menu .mv-group + .mv-dd-title { margin-top: 12px; }
.mv-dd-list { width: 260px; padding: 6px; }
.mv-dd-list .mv-dd-title { margin: 8px 8px 4px; }
.mv-dd-list .mv-dd-title:first-child { margin-top: 4px; }
.mv-dd-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 6px 8px; border: 0; background: none;
  border-radius: 7px; font: inherit; font-size: 13px; color: var(--text); cursor: pointer; text-align: left; }
.mv-dd-item:hover, .mv-dd-item:focus-visible { background: var(--hover); outline: none; }
.mv-dd-item span { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }
.mv-row[data-center] { cursor: default; }
.mv-settings { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-muted); }
.mv-settings label { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mv-settings input[type=range] { width: 120px; }
.mv-settings select { padding: 2px 6px; font-size: 12px; }

.mv-stage { position: relative; flex: 1; min-width: 0; }
.mv-canvas { position: absolute; inset: 0; }
.mv-empty-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  pointer-events: none;
}
.mv-hover, .mv-pickhint {
  position: absolute;
  left: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  pointer-events: none;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  border-radius: 6px;
  padding: 0 6px;
  max-width: calc(100% - 20px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mv-hover { bottom: 8px; }
.mv-pickhint { top: 8px; color: var(--accent-hover); }
.mv-hover:empty, .mv-pickhint:empty { display: none; }

/* Dizi çubuğu (D-027): zincir başına satır, yatay kaydırma tüm satırlarda ortak. */
.mv-seq {
  border-top: 1px solid var(--border);
  padding: 4px 0 6px;
  font-family: var(--mono);
  font-size: 12px;
  overflow: auto;
  max-height: 168px;
  min-height: 40px;
  user-select: none;
  touch-action: pan-y;
}
.mv-seq-row { display: flex; align-items: flex-end; white-space: nowrap; width: max-content; min-width: 100%; padding-top: 12px; }
.mv-seq-row--hidden .mv-seq-res { opacity: 0.35; }
.mv-seq-head {
  position: sticky;
  left: 0;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px 0 8px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  margin-right: 6px;
}
.mv-seq-label {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
  padding: 0 2px;
  min-width: 64px;
  text-align: left;
}
.mv-seq-label:hover { color: var(--text); text-decoration: underline; }
.mv-chain-color, .mv-selbar input[type=color] { width: 20px; height: 18px; padding: 0; border: 1px solid var(--border); border-radius: 4px; background: none; cursor: pointer; }
.mv-seq-res { display: inline-block; }
.mv-res {
  position: relative;
  display: inline-block;
  padding: 0 0.5px 1px;
  cursor: pointer;
  border-radius: 2px;
  border-bottom: 3px solid var(--rc, transparent);
}
.mv-res:hover { background: var(--hover); }
.mv-res--on { background: #ff5fc8; color: #fff; }
.mv-res--preview { background: #ffb3e6; color: #3a0030; }
.mv-res--on.mv-res--preview { background: #b3478f; }
.mv-res--het { color: var(--accent-hover); margin: 0 2px; }
.mv-res[data-tick]::before { content: attr(data-tick); position: absolute; top: -12px; left: 0; font-size: 9px; color: var(--text-muted); }

.mv-selbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  padding: 6px 10px;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, #ff5fc8 8%, var(--surface));
}
.mv-selbar--empty { background: var(--surface); }
.mv-sel-summary { font-size: 12px; color: var(--text-muted); }
.mv-selbar:not(.mv-selbar--empty) .mv-sel-summary { color: #b3337f; font-weight: 600; }
.mv-selbar .mv-btn:disabled, .mv-selbar .mv-input:disabled, .mv-selbar input:disabled { opacity: 0.45; cursor: default; }
.mv-danger:not(:disabled):hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }

/* D-032: sahne rozeti, taslak şeridi, kaydet diyaloğu */
.mv-scenebar { padding: 4px 10px; font-size: 12.5px; color: var(--text-muted); border-bottom: 1px solid var(--border); min-height: 26px; }
.mv-scenebar a { color: var(--accent-hover); text-decoration: none; }
.mv-scenebar a:hover { text-decoration: underline; }
.mv-dirty { color: var(--accent); font-size: 14px; }
.mv-unsaved { font-style: italic; }
.mv-draftbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 10px; background: var(--warning-soft); color: var(--warning); font-size: 13px; border-bottom: 1px solid var(--border);
}
.mv-modal { position: absolute; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.35); padding: 16px; }
.mv-modal-card { width: min(520px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 18px 20px; }
.mv-modal-card h3 { margin: 0 0 12px; font-size: 16px; }
.mv-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-size: 13px; color: var(--text-muted); }
.mv-field input[type=text], .mv-field select { font-size: 13.5px; }
.mv-radio { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--text); }
.mv-radio input[type=text], .mv-radio select { flex: 1; min-width: 160px; }
.mv-hint { font-size: 12px; color: var(--text-muted); margin: 0 0 6px; }
.mv-error { color: var(--danger); font-size: 12.5px; margin: 0 0 8px; min-height: 0; }
.mv-modal-actions { justify-content: flex-end; }
.mv { position: relative; }

.scene-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 8px; }
.scene-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.scene-thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10; background: var(--surface-sunken); color: var(--text-muted); }
.scene-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scene-meta { padding: 8px 12px 10px; }
.scene-meta a { text-decoration: none; color: var(--text); }
.scene-card [data-scene-delete] { position: absolute; top: 6px; right: 6px; background: var(--surface); }
.scene-grid .empty-row { grid-column: 1 / -1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }

.mv-box {
  position: absolute;
  border: 1.5px dashed #ff5fc8;
  background: rgba(255, 95, 200, 0.12);
  pointer-events: none;
  z-index: 2;
}

.mv-traj { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-top: 1px solid var(--border); }
.mv-traj input[type=range] { flex: 1; }
.mv-frame { font-family: var(--mono); font-size: 12px; color: var(--text-muted); min-width: 70px; text-align: right; }

.mv-console { border-top: 1px solid var(--border); background: var(--surface-sunken); }
.mv-info { font-family: var(--mono); font-size: 11.5px; padding: 4px 10px 0; color: var(--text-muted); min-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-log { height: 92px; overflow-y: auto; padding: 2px 10px; font-family: var(--mono); font-size: 11.5px; line-height: 1.45; }
.mv-log-cmd { color: var(--text); }
.mv-log-info { color: var(--text-muted); }
.mv-log-error { color: var(--danger); }
.mv-cmdline { display: flex; align-items: center; gap: 6px; padding: 4px 10px 8px; font-family: var(--mono); font-size: 12px; color: var(--text-muted); }
.mv-cmdline input { flex: 1; font-family: var(--mono); font-size: 12.5px; padding: 5px 8px; }

@media (max-width: 860px) {
  .mv { height: auto; }
  .mv-body { flex-direction: column; }
  .mv-side { width: auto; max-height: 240px; border-right: none; border-bottom: 1px solid var(--border); }
  .mv-stage { height: 52vh; flex: none; }
}

/* --- MSA --- */

.msa-output { overflow-x: auto; padding: 14px; }
.msa-grid { font-family: var(--mono); font-size: 12px; line-height: 16px; width: max-content; }
.msa-row { display: flex; align-items: flex-end; white-space: nowrap; }
.msa-name { width: 140px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; padding-right: 10px; color: var(--text-muted); position: sticky; left: 0; background: var(--surface); }
.msa-res { width: 10px; text-align: center; }
.msa-ruler { color: var(--text-muted); }
.msa-cons { height: 18px; margin-top: 4px; }
.msa-bar { display: inline-block; width: 10px; background: var(--accent); }
.aa-h { background: #F6D9A8; color: #3A2C10; }
.aa-p { background: #BFE3C6; color: #10331A; }
.aa-pos { background: #BDD5F2; color: #0F2440; }
.aa-neg { background: #F3C0B6; color: #3F1209; }
.aa-s { background: #E4D5F0; color: #2B1640; }
.aa-gap { color: var(--text-muted); }

/* --- Molecule --- */

.molecule-stage { display: flex; justify-content: center; align-items: center; min-height: 360px; }
.smiles-svg { width: 100%; max-width: 560px; height: 360px; }

/* --- Toast --- */

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  box-shadow: var(--shadow-md);
  z-index: 90;   /* pencerelerin de üstünde */
  max-width: calc(100vw - 32px);
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .tool-layout { grid-template-columns: minmax(0, 1fr); }
  .tool-aside { position: static; }
}

@media (max-width: 860px) {
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .options-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .app-screen { flex-direction: column; }
  .mobile-topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 0 8px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 20;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-md);
  }
  .app-screen--mobile-open .sidebar { transform: none; }
  .app-screen--mobile-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.3); z-index: 30; }
  #sidebar-collapse-btn { display: none; }
  .main { padding: 20px 16px 48px; }
}

/* D-037: worker eşleştirme */
.page-actions { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.worker-card-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.worker-card-head + .stat-row { margin-top: 14px; }
.worker-card-title { flex: 1; min-width: 180px; }
.worker-card-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.worker-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-muted); opacity: .5; flex: none; }
.worker-dot--on { background: var(--success); opacity: 1; }
.pairing-code { font-size: 28px; letter-spacing: .12em; font-weight: 600; margin: 4px 0 12px; user-select: all; }
.pairing-cmds { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 8px 0; }
.pairing-cmds .code-block { margin-top: 4px; white-space: pre-wrap; word-break: break-all; }
.worker-dot--paused { background: var(--warning, #b7791f); opacity: 1; }
.worker-limits-line { margin-top: 8px; }
.worker-paused { color: var(--warning, #b7791f); font-weight: 600; }
.limits-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.limits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.limits-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-muted); }
.limits-hours { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.limits-days { display: flex; flex-wrap: wrap; gap: 8px; }
.limits-actions { display: flex; gap: 8px; }

/* D-043: protein merkezli ana sayfa, köken ağacı, "Bu yapıyla…" paneli */
.chip { display: inline-block; padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; color: var(--text); text-decoration: none; background: var(--surface-sunken); }
.chip:hover { border-color: var(--accent); }
.draft-banner { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; border-color: var(--warning); background: var(--warning-soft); margin-bottom: 20px; }
.draft-actions { display: flex; gap: 6px; }
.lineage-tree { overflow-x: auto; }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { margin-left: 18px; padding-left: 12px; border-left: 1px solid var(--border); }
.tree-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; }
.tree-kind { width: 16px; color: var(--text-muted); text-align: center; flex: none; }
.tree-row--structure .tree-kind { color: var(--accent); }
.tree-actions { display: inline-flex; gap: 4px; margin-left: auto; }
.tree-group { margin: 14px 0 4px; }
.project-all-jobs summary { cursor: pointer; }
/* Görüntüleyici sayfası: başlık + Hızlı başlat, görüntüleyici kalan yüksekliği doldurur (sayfa kaydırmasız) */
.main:has(> .view[data-view="viewer"]:not([hidden])) { padding-top: 18px; padding-bottom: 18px; }
.viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.viewer-head h1 { font-size: 20px; font-weight: 600; margin: 0; }
@media (min-width: 761px) {
  .view[data-view="viewer"]:not([hidden]) { display: flex; flex-direction: column; height: calc(100vh - 36px); }
  #viewer-root { flex: 1 1 auto; min-height: 0; }
  #viewer-root .mv { height: 100%; min-height: 0; }
}
.qs-wrap { position: relative; }
.qs-btn { display: inline-flex; align-items: center; gap: 7px; }
.qs-btn .icon { width: 16px; height: 16px; }
.qs-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--on-accent); color: var(--accent); font-size: 11.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; }
.qs-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: 440px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 110px); overflow: auto; padding: 14px 16px; margin: 0; box-shadow: 0 12px 32px rgba(15, 22, 32, .18); }
.qs-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.qs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qs-grid label, .qs-params label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-muted); min-width: 0; }
.qs-grid select { width: 100%; }
.qs-field-label { font-size: 13px; color: var(--text-muted); margin: 12px 0 4px; }
.qs-picker { position: relative; }
.qs-pick { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.qs-pick:hover, .qs-pick[aria-expanded="true"] { border-color: var(--accent); }
.qs-pick-label { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.qs-pick .icon { width: 16px; height: 16px; flex: none; }
.qs-menu { margin-top: 4px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 10px 24px rgba(15, 22, 32, .16); padding: 8px; }
.qs-menu input { width: 100%; margin-bottom: 6px; }
.qs-list { max-height: 300px; overflow: auto; }
.qs-group { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); padding: 8px 8px 4px; }
.qs-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: none; border-radius: 8px; background: none;
  color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.qs-item:hover:not([disabled]), .qs-item--active { background: var(--surface-sunken); }
.qs-item .icon { width: 18px; height: 18px; flex: none; color: var(--text-muted); }
.qs-item-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.qs-item-label { font-size: 13.5px; font-weight: 500; }
.qs-item-desc { font-size: 12px; color: var(--text-muted); }
.qs-item--soon { cursor: default; opacity: .6; }
.qs-empty { padding: 10px; font-size: 13px; color: var(--text-muted); }
.qs-params { margin-top: 10px; }
.qs-params:empty { display: none; }
.qs-desc { font-size: 13px; color: var(--text-muted); margin: 0 0 8px; }
.qs-full { grid-column: 1 / -1; }
.qs-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
.va-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.va-row select { max-width: 220px; }
.va-buttons { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.va-adv { margin-top: 8px; }
.va-adv summary { cursor: pointer; color: var(--text-muted); font-size: 13px; }
.va-adv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 8px; }
.va-adv-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-muted); }
.va-launches { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.va-launch { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 600px) {
  .va-row select { max-width: 100%; flex: 1 1 140px; }
  .tree-actions { margin-left: 24px; }
}
.progress--warn span { background: var(--warning); }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font-weight: 600;
  text-decoration: none; margin-bottom: 14px; }
.btn-google:hover { background: var(--hover); }
.login-or { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 12.5px; margin: 4px 0 14px; }
.login-or::before, .login-or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.file-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 8px; }
.file-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-muted); }
.file-grid .req { color: var(--accent); font-size: 11.5px; }
.gmx-extend { margin-top: 10px; }
.gmx-extend summary { cursor: pointer; font-size: 13px; color: var(--text-muted); }
.login-legal { text-align: center; font-size: 12.5px; margin-top: 18px; color: var(--text-muted); }
.login-legal a { color: var(--text-muted); }
.terms-row { align-items: flex-start; font-size: 13px; line-height: 1.45; margin-top: 6px; }
.terms-row input { margin-top: 3px; }
.terms-banner { max-width: 1120px; margin-left: auto; margin-right: auto; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; border-color: var(--accent); margin-bottom: 16px; }
.danger-zone { border-color: var(--danger, #b3261e); }
.login-info { font-size: 13.5px; color: var(--text-muted); margin-top: 10px; line-height: 1.5; }
#account-panel form { display: flex; flex-direction: column; gap: 8px; }
#account-panel h2 { font-size: 17px; margin: 0 0 4px; }

/* ---------- Sol panel: sabitlenenler, son işler, kullanıcı ---------- */
.side-section { margin-top: 14px; }
.side-section-head { display: flex; align-items: center; gap: 4px; border: none; background: none; padding: 0 8px; margin-bottom: 6px;
  font-size: 12px; color: var(--text-muted); cursor: pointer; font-family: inherit; }
.side-section-head:hover { color: var(--text); }
.side-section-head .icon { width: 12px; height: 12px; transition: transform .15s ease; }
.side-section--collapsed .side-section-head .icon { transform: rotate(-90deg); }
.side-section--collapsed .side-section-body { display: none; }
.side-empty { margin: 0 4px; padding: 14px 10px; border: 1px dashed var(--border); border-radius: 10px; font-size: 13px; color: var(--text-muted); text-align: center; }
.side-link { display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 10px; border-radius: 9px; font-size: 13.5px; color: var(--text); text-decoration: none; min-width: 0; }
.side-link:hover { background: var(--hover); }
.side-link-icon { display: flex; color: var(--text-muted); }
.side-link-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-link--more { color: var(--text-muted); font-size: 13px; }
.side-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--text-muted); display: inline-block; }
.side-dot--completed { background: var(--success); }
.side-dot--running { background: var(--accent); }
.side-dot--queued, .side-dot--dispatched { background: var(--warning); }
.side-dot--failed { background: var(--danger); }
.me-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 6px; width: 100%; border: 0; background: none;
  font: inherit; color: inherit; text-align: left; border-radius: var(--radius); cursor: pointer; }
.me-row:hover, .me-row[aria-expanded="true"] { background: var(--hover); }
.me-caret { color: var(--text-muted); flex-shrink: 0; width: 15px; height: 15px; }
.app-screen--collapsed .me-caret { display: none; }
.me-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-hover); font-weight: 600; font-size: 13px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.me-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.me-name { font-size: 13.5px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-role { font-size: 12px; color: var(--text-muted); }
.app-screen--collapsed .me-row { flex-direction: column; padding: 6px 0 2px; }

/* ---------- Ana sayfa ---------- */
.home-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.view[data-view="home"] .section-title { margin: 20px 0 10px; }
.view[data-view="home"] .card { margin-bottom: 0; }
.home-head h1 { font-size: 24px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.home-head .btn-secondary { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.home-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px; padding: 12px 16px; font-size: 13.5px; color: var(--text-muted); }
.home-status-item { display: inline-flex; align-items: center; gap: 7px; }
.home-status-item strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.home-status-actions { margin-left: auto; display: flex; gap: 8px; }
.home-status-actions a { text-decoration: none; }
.section-title--split { justify-content: space-between; }
.recent-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.recent-tool { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); text-decoration: none; color: var(--text); box-shadow: var(--shadow-sm); transition: border-color .15s ease; min-width: 0; }
.recent-tool:hover { border-color: var(--accent); }
.recent-tool > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.recent-tool-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-tool-date { font-size: 12.5px; color: var(--text-muted); }
.home-results td { padding-top: 9px; padding-bottom: 9px; }
.home-results td:first-child { font-weight: 500; }
.home-tool { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.tool-search { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px; margin-bottom: 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text-muted); box-shadow: var(--shadow-sm); }
.tool-search:focus-within { border-color: var(--accent); }
.tool-search input { border: none; background: transparent; padding: 0; width: 100%; font-size: 14.5px; min-width: 0; }
.category-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
/* Ana sayfa: kategori kutuları sayfanın altına kadar uzanır (kalan yüksekliği doldurur), sayfa kaydırması oluşmaz */
.cat-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 0; padding: 10px 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); text-decoration: none; color: var(--text);
  box-shadow: var(--shadow-sm); transition: border-color .15s ease, transform .15s ease; text-align: center; }
.cat-tile:hover { border-color: var(--accent); transform: translateY(-1px); }
.cat-icon { color: var(--text); display: flex; margin-bottom: 2px; }
.cat-icon .icon { width: 30px; height: 30px; stroke-width: 1.5; }
.cat-title { font-weight: 600; font-size: 14.5px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-sub { font-size: 12.5px; color: var(--text-muted); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 761px) {
  .view[data-view="home"]:not([hidden]) { display: flex; flex-direction: column; min-height: calc(100vh - 56px); }
  .view[data-view="home"] .category-grid:not([hidden]) { flex: 1 1 auto; grid-auto-rows: 1fr; }
}
.cat-tile--soon .cat-icon { color: var(--text-muted); }
.cat-tile--soon .cat-sub { font-style: italic; }

/* ---------- Araç kataloğu filtresi + sabitleme ---------- */
.tools-filter { margin-bottom: 8px; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tool-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 8px; min-height: 30px; }
.tool-cat-head .section-title { margin: 0; min-width: 0; }
.tool-row-controls { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.tool-row-arrow { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.tool-row-arrow .icon { width: 15px; height: 15px; transform: rotate(90deg); }
.tool-row-arrow--next .icon { transform: rotate(-90deg); }
.tool-row-arrow:hover:not(:disabled) { border-color: var(--accent); }
.tool-row-arrow:disabled { opacity: .35; cursor: default; }
.tool-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px 8px; margin-bottom: 0;
  scrollbar-width: none; }
.tool-row::-webkit-scrollbar { display: none; }
.tool-row > .tile { flex: 0 0 260px; scroll-snap-align: start; }
/* Katalogda kart kompakt: ikon başlığın yanında, açıklama 2 satır - aşağıda daha çok kategori görünür */
#tools-catalog .tile { display: grid; grid-template-columns: 32px 1fr; column-gap: 10px; row-gap: 4px; padding: 12px 14px; }
#tools-catalog .tile-icon { width: 32px; height: 32px; margin: 0; grid-row: span 1; }
#tools-catalog .tile-title { align-self: center; }
#tools-catalog .tile-sub, #tools-catalog .tile-meta { grid-column: 1 / -1; }
#tools-catalog .tile-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tools-catalog .tile-sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#tools-catalog .card-grid { margin-bottom: 6px; }
.tile--soon { cursor: default; box-shadow: none; }
.tile--soon:hover { border-color: var(--border); transform: none; }
.tile--soon .tile-icon { background: var(--surface-sunken); color: var(--text-muted); }
.soon-badge { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-sunken); color: var(--text-muted); }
#home-tool-hits .tile-sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#tools-catalog .empty-card { padding: 12px 14px; font-size: 13px; }
@media (max-width: 600px) { .tool-row > .tile { flex-basis: 78%; } .tool-cat-head { flex-wrap: wrap; } }
.chip--active { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip-count { opacity: .6; font-size: 12px; margin-left: 2px; }
.tool-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tool-title-row h1 { margin-bottom: 0; }
.btn-pin { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.btn-pin--on { color: var(--accent-hover); }
.btn-pin--on .icon { fill: currentColor; }

@media (max-width: 900px) {
  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .home-status-actions { margin-left: 0; width: 100%; }
  .home-status-actions a { flex: 1; text-align: center; }
  .home-results td:nth-child(2), .home-results td:nth-child(4) { display: none; }
}

/* Alçak ekranlarda (ör. 1366x768) ana sayfa kaydırma yaratmasın: son sonuçlar 4 satır. */
@media (max-height: 820px) and (min-width: 761px) {
  .home-results tr:nth-child(n+5) { display: none; }
  .view[data-view="home"] .section-title { margin: 16px 0 8px; }
  .cat-tile { padding: 6px 8px; gap: 2px; }
  .cat-icon .icon { width: 24px; height: 24px; }
}
@media (max-height: 800px) and (min-width: 761px) { .cat-sub { display: none; } }
@media (min-height: 1000px) and (min-width: 761px) {
  .cat-icon .icon { width: 40px; height: 40px; }
  .cat-title { font-size: 16px; }
  .cat-sub { font-size: 13px; }
}

/* Logo: işaret + "code / fold" yazısı (logo SVG'si index.html'deki #logo-mark sembolünde) */
.logo { display: inline-flex; align-items: center; gap: .18em; color: var(--brand); text-decoration: none; }
.logo img { height: 100%; width: auto; display: block; }
.logo-word { font-weight: 600; line-height: .86; letter-spacing: -0.02em; font-size: .5em; text-align: left; }

/* ---------- İş akışı şablonları (D-058) ---------- */
.wf-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.wf-template { display: flex; flex-direction: column; gap: 8px; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, transform .15s ease; }
.wf-template:hover { border-color: var(--accent); transform: translateY(-1px); }
.wf-template--soon { opacity: .75; }
.wf-template-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wf-template-name { font-weight: 600; font-size: 15px; }
.wf-template-desc { font-size: 13px; color: var(--text-muted); line-height: 1.45; }
.wf-soon { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--surface-sunken); color: var(--text-muted); border: 1px solid var(--border); white-space: nowrap; }
.wf-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 2px; }
.wf-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 8px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-hover); }
.wf-chip .icon { width: 13px; height: 13px; }
.wf-chip--soon { background: var(--surface-sunken); color: var(--text-muted); border: 1px dashed var(--border); }
.wf-chip--opt { border: 1px dashed currentColor; }
.wf-chip-arrow { color: var(--text-muted); font-size: 12px; }
.wf-builder-head h2 { font-size: 19px; margin: 0 0 4px; }
.wf-builder-head .back-link { margin-bottom: 8px; }
.wf-flow { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.wf-arrow { align-self: flex-start; margin-top: 18px; color: var(--text-muted); display: flex; }
.wf-block { width: 218px; display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--surface-sunken);
  border: 1px solid var(--border); border-radius: var(--radius-lg); }
.wf-block--skip { opacity: .55; border-style: dashed; }
.wf-block--soon { border-style: dashed; }
.wf-block-head { display: flex; align-items: center; gap: 8px; }
.wf-block-icon { width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-hover); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wf-block-title { font-weight: 600; font-size: 14px; flex: 1; }
.wf-block-n { font-size: 11.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.wf-engine { width: 100%; }
.wf-skip { font-size: 13px; }
.wf-settings summary { cursor: pointer; font-size: 13px; color: var(--text-muted); }
.wf-fields { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.wf-field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-muted); }
.wf-field input, .wf-field select { width: 100%; }
.wf-field .req { color: var(--accent); font-size: 11px; }
.wf-fields .checkbox-row { font-size: 12.5px; }
#wf-uniprot { text-transform: uppercase; }
@media (max-width: 600px) {
  .wf-block { width: 100%; }
  .wf-arrow { transform: rotate(90deg); margin: 0 auto; align-self: center; }
}

/* ---------- D-062: kullanıcı menüsü ve Ayarlar ---------- */
.user-menu { position: fixed; z-index: 75; width: 264px; padding: 6px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.um-head { padding: 8px 10px 6px; font-size: 12.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.um-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; background: none; border-radius: 8px;
  font: inherit; font-size: 13.5px; color: var(--text); cursor: pointer; text-align: left; }
.um-item:hover, .um-item:focus-visible { background: var(--hover); outline: none; }
.um-item .icon { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }
.um-label { flex: 1; min-width: 0; }
.um-aside { font-size: 12px; color: var(--text-muted); }
.um-chev { transform: rotate(-90deg); }
.um-sep { height: 1px; background: var(--border); margin: 5px 4px; }
.um-badge { display: inline-block; font-size: 11.5px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--surface-sunken);
  color: var(--text-muted); border: 1px solid var(--border); white-space: nowrap; }
.um-badge--ok { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(10, 18, 28, 0.45); }
.settings-dialog { display: flex; width: 920px; max-width: 100%; height: 640px; max-height: calc(100vh - 32px); background: var(--surface);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md); overflow: hidden; border: 1px solid var(--border); }
.settings-nav { width: 236px; flex-shrink: 0; background: var(--sidebar); border-right: 1px solid var(--border); padding: 12px 10px; overflow-y: auto; }
.settings-search { display: flex; align-items: center; gap: 6px; padding: 0 8px; margin-bottom: 8px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); }
.settings-search .icon { width: 15px; height: 15px; color: var(--text-muted); flex-shrink: 0; }
.settings-search input[type=search] { border: 0; background: none; padding: 7px 0; flex: 1; min-width: 0; box-shadow: none; outline: none; }
.st-group { font-size: 11.5px; font-weight: 600; color: var(--text-muted); padding: 12px 8px 4px; }
.st-link { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 8px; border: 0; background: none; border-radius: 8px;
  font: inherit; font-size: 13.5px; color: var(--text); cursor: pointer; text-align: left; }
.st-link .icon { width: 16px; height: 16px; color: var(--text-muted); }
.st-link:hover { background: var(--hover); }
.st-link--active { background: var(--surface); box-shadow: var(--shadow-sm); font-weight: 500; }
.st-empty { padding: 8px; }
.settings-pane { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.settings-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 12px; border-bottom: 1px solid var(--border); }
.settings-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.settings-body { flex: 1; overflow-y: auto; padding: 8px 24px 24px; }
.st-h { font-size: 13px; font-weight: 600; color: var(--text-muted); margin: 20px 0 4px; }
.st-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); margin: 0; }
.st-row-text { min-width: 0; }
.st-row-title { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.st-row-ctl { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.st-row-ctl input[type=text] { width: 220px; }
.st-value { font-size: 13.5px; color: var(--text-muted); }
.st-actions { display: flex; gap: 8px; margin-top: 16px; }
.st-actions a, .st-row-ctl a { text-decoration: none; display: inline-flex; align-items: center; }
.st-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.settings-body .card { margin-top: 12px; }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-sunken); border: 1px solid var(--border); border-radius: var(--radius); }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 7px; font-size: 13px; color: var(--text-muted); }
.seg span .icon { width: 15px; height: 15px; }
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 500; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }

.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex-shrink: 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--border); border-radius: 999px; transition: background 0.15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch input:disabled + span { opacity: 0.45; cursor: not-allowed; }

.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.plan { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; }
.plan--current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan-name { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.plan-price { font-size: 22px; font-weight: 600; margin: 8px 0; }
.plan ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text-muted); line-height: 1.6; }

.mini-dialog { width: 520px; max-width: 100%; max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--surface);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md); border: 1px solid var(--border); overflow: hidden; }
.mini-body { padding: 14px 20px 20px; overflow-y: auto; }
.fb-form { display: flex; flex-direction: column; gap: 10px; }
.fb-form .cell-sub { margin: 0; }
.fb-form textarea { width: 100%; resize: vertical; }
.fb-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fb-row { padding: 10px 0; border-bottom: 1px solid var(--border); }
.fb-meta { font-size: 12px; color: var(--text-muted); }
.fb-msg { font-size: 13.5px; margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.changelog section { padding: 10px 0; border-bottom: 1px solid var(--border); }
.changelog section:last-child { border-bottom: 0; }
.cl-date { font-size: 12px; color: var(--text-muted); }
.changelog h4 { margin: 2px 0 4px; font-size: 14px; }
.changelog ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text-muted); line-height: 1.6; }

@media (max-width: 720px) {
  .settings-dialog { flex-direction: column; height: calc(100vh - 32px); }
  .settings-nav { width: auto; border-right: 0; border-bottom: 1px solid var(--border); max-height: 38%; }
  .st-row { flex-direction: column; align-items: flex-start; }
  .st-row-ctl input[type=text] { width: 100%; }
  .st-stats, .plan-grid { grid-template-columns: 1fr; }
  .settings-body { padding: 8px 16px 20px; }
}

/* ---------- D-064: dil ---------- */
html[lang="en"] [data-lang="tr"], html[lang="tr"] [data-lang="en"] { display: none !important; }
.login-lang { text-align: center; margin: 10px 0 0; font-size: 12.5px; color: var(--text-muted); }
.login-lang button { border: 0; background: none; padding: 2px 4px; font: inherit; color: var(--text-muted); cursor: pointer; border-radius: 6px; }
.login-lang button:hover { color: var(--text); }
html[lang="tr"] .login-lang [data-set-lang="tr"], html[lang="en"] .login-lang [data-set-lang="en"] { color: var(--text); font-weight: 600; }

/* ---------- D-065: krediler ---------- */
.credit-balance { display: flex; gap: 24px; align-items: center; padding: 16px 0 4px; }
.credit-balance .cell-sub { margin: 0; max-width: 460px; }
.credit-amount { font-size: 30px; font-weight: 700; white-space: nowrap; }
.credit-amount span { font-size: 15px; font-weight: 500; color: var(--text-muted); }
.plan-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pack-buy { display: inline-flex; justify-content: center; margin-top: 12px; text-decoration: none; width: 100%; }
.credit-pos { color: var(--success); } .credit-neg { color: var(--danger); }
@media (max-width: 720px) { .credit-balance { flex-direction: column; align-items: flex-start; } .plan-grid--3 { grid-template-columns: 1fr; } }

/* ---------- D-067: yatay logo (marka panosundaki "code2fold" kilidi) ---------- */
.brand-lockup { display: flex; align-items: center; flex-shrink: 0; }
.brand-lockup img { height: 34px; width: auto; display: block; }
.brand-lockup--login img { height: 56px; }
.lockup-dark { display: none !important; }
:root[data-theme="dark"] .lockup-light { display: none !important; }
:root[data-theme="dark"] .lockup-dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lockup-light { display: none !important; }
  :root:not([data-theme="light"]) .lockup-dark { display: block !important; }
}
.mobile-topbar .brand-lockup img { height: 26px; }


/* ---------- D-068: görüntüleyici yan penceresi + Analizler ---------- */
.viewer-head-actions { display: flex; align-items: center; gap: 8px; }
.vs-toggle { display: inline-flex; align-items: center; gap: 6px; }
.vs-toggle[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.viewer-main { display: flex; gap: 12px; min-height: 0; flex: 1 1 auto; }
.viewer-main #viewer-root { flex: 1 1 auto; min-width: 0; min-height: 0; }
.viewer-side { width: 340px; flex-shrink: 0; display: flex; flex-direction: column; min-height: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.vs-tabs { display: flex; align-items: center; gap: 4px; padding: 6px 6px 0 8px; border-bottom: 1px solid var(--border); }
.vs-tab { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 500; color: var(--text-muted); padding: 8px 10px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.vs-tab--on { color: var(--text); border-bottom-color: var(--accent); }
.vs-close { margin-left: auto; }
.vs-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px; min-height: 0; }
.an-head label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.an-head select { flex: 1; min-width: 0; }
.an-tools { display: flex; flex-direction: column; gap: 6px; }
.an-tool { border: 1px solid var(--border); border-radius: 10px; background: var(--surface-sunken); }
.an-tool-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; font: inherit;
  color: var(--text); cursor: pointer; text-align: left; border-radius: 10px; }
.an-tool-row:hover { background: var(--hover); }
.an-ico { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex-shrink: 0;
  color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); }
.an-ico svg { width: 15px; height: 15px; }
.an-label { flex: 1; font-size: 13px; font-weight: 500; }
.an-chev { width: 15px; height: 15px; color: var(--text-muted); transition: transform .15s; }
.an-tool-row[aria-expanded="true"] .an-chev { transform: rotate(90deg); }
.an-switch { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--border); flex-shrink: 0; transition: background .15s; }
.an-switch span { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.an-switch.on { background: #22c55e; }
.an-switch.on span { transform: translateX(14px); }
.an-body { padding: 4px 10px 12px; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
.an-field { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--text-muted); flex: 1; min-width: 0; }
.an-field select, .an-field input { width: 100%; }
.an-inline { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-end; }
.an-inline input[type=text] { flex: 1; min-width: 0; }
.an-check { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.an-run { align-self: flex-start; }
.an-aa { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.an-aa button { border: 1px solid var(--border); background: var(--surface); border-radius: 6px; padding: 4px 0; font: 600 11px var(--mono); color: var(--text); cursor: pointer; }
.an-aa button:hover { background: var(--hover); }
.an-aa button.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.an-aa--motif { grid-template-columns: repeat(14, 1fr); }
.an-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.an-stats > div { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 6px; text-align: center; }
.an-stats b { display: block; font-size: 15px; }
.an-stats span { font-size: 10.5px; color: var(--text-muted); line-height: 1.2; display: block; }
.an-note { margin: 0; font-size: 12px; color: var(--text-muted); line-height: 1.45; }
.an-note.ok { color: var(--success); }
.an-empty { margin: 0; font-size: 12px; color: var(--text-muted); }
.an-sub { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }
.an-chips { display: flex; flex-wrap: wrap; gap: 4px; max-height: 180px; overflow-y: auto; }
.an-chip { border: 1px solid var(--border); background: var(--surface); border-radius: 6px; padding: 2px 6px; font: 11px var(--mono); color: var(--text); cursor: pointer; }
.an-chip:hover { border-color: var(--accent); }
.an-chip.t-hydrophobic { color: #b7791f; } .an-chip.t-polar { color: #2f855a; } .an-chip.t-positive { color: #2b6cb0; } .an-chip.t-negative { color: #c53030; } .an-chip.t-special { color: #805ad5; }
.an-chip.flex-hi { border-color: #ef4444; } .an-chip.flex-lo { border-color: #3b82f6; }
.an-list { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow-y: auto; }
.an-row { display: flex; justify-content: space-between; gap: 8px; padding: 4px 6px; border-radius: 6px; font: 11.5px var(--mono); color: var(--text);
  border: 0; border-left: 3px solid var(--border); background: var(--surface); text-align: left; cursor: pointer; width: 100%; }
.an-row:hover { background: var(--hover); }
.an-row.hb { border-left-color: #22c55e; } .an-row.io { border-left-color: #ef4444; } .an-row.ar { border-left-color: #a855f7; } .an-row.hy { border-left-color: #eab308; }
.an-canvas { background: #0f172a; border-radius: 8px; overflow: hidden; display: flex; justify-content: center; }
.an-canvas canvas { display: block; max-width: 100%; height: auto !important; }
.an-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--text-muted); }
.an-legend span::before { content: ""; display: inline-block; width: 10px; height: 3px; margin-right: 4px; vertical-align: middle; border-radius: 2px; }
.an-legend .hb::before { background: #22c55e; } .an-legend .hy::before { background: #eab308; } .an-legend .ar::before { background: #a855f7; } .an-legend .io::before { background: #ef4444; }
@media (max-width: 760px) {
  .viewer-main { flex-direction: column; }
  .viewer-side { width: auto; max-height: 50vh; }
}
/* ---------- D-070: Analizler grupları, yeni araçlar ve İlaç keşfi sekmesi ---------- */
.an-group { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin: 8px 2px 0; }
.an-group:first-child { margin-top: 0; }
.an-legend span[style]::before { background: var(--c); height: 8px; width: 8px; border-radius: 50%; }
.an-canvas--plot { padding: 2px 0; }
.an-canvas canvas.an-pixel { image-rendering: pixelated; cursor: crosshair; }
.an-more summary { font-size: 12px; color: var(--text-muted); cursor: pointer; }
.an-more .an-inline { margin-top: 6px; }
.an-grow { flex: 2; }
.an-pep { font-size: 10.5px; color: var(--text-muted); letter-spacing: .04em; word-break: break-all; }
.an-row small { font-size: 10px; color: var(--text-muted); }
.an-row > span:last-child { text-align: right; flex-shrink: 0; }
.an-row.ep { border-left-color: #10b981; } .an-row.ep.on { background: color-mix(in srgb, #10b981 16%, var(--surface)); }
.an-row.ss { border-left-color: #eab308; }
.an-row.hb-bb { border-left-color: #34d399; } .an-row.hb-bs { border-left-color: #38bdf8; } .an-row.hb-sc { border-left-color: #a78bfa; }
.an-stats:has(> div:nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.an-tag { font-size: 9.5px; color: var(--text-muted); }
.an-kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 12px; }
.an-kv > span { color: var(--text-muted); }
.an-bars { display: flex; flex-direction: column; gap: 3px; max-height: 260px; overflow-y: auto; }
.an-bars > div { display: grid; grid-template-columns: 76px 1fr 34px; align-items: center; gap: 6px; font: 11px var(--mono); }
.an-bars span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-bars i { height: 6px; border-radius: 3px; background: linear-gradient(90deg, #6366f1 var(--w), var(--border) var(--w)); }
.an-bars b { font-weight: 500; text-align: right; color: var(--text-muted); }
.dd-mol { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 12px; }
.dd-mol > span { color: var(--text-muted); }
.dd-lip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.dd-lip > div { border: 1px solid var(--border); border-radius: 8px; padding: 4px; text-align: center; background: var(--surface); }
.dd-lip b { display: block; font-size: 13px; }
.dd-lip span { font-size: 10px; color: var(--text-muted); }
.dd-lip .ok { border-color: color-mix(in srgb, #22c55e 55%, var(--border)); } .dd-lip .bad { border-color: #ef4444; }
.dd-verdict { font-size: 12px; font-weight: 600; text-align: center; border-radius: 6px; padding: 3px; }
.dd-verdict.ok { background: color-mix(in srgb, #22c55e 15%, transparent); color: #15803d; }
.dd-verdict.warn { background: color-mix(in srgb, #f59e0b 15%, transparent); color: #b45309; }
.dd-verdict.bad { background: color-mix(in srgb, #ef4444 15%, transparent); color: #b91c1c; }
.dd-slider { display: grid; grid-template-columns: 22px 1fr 44px; align-items: center; gap: 6px; font: 11px var(--mono); color: var(--text-muted); }
.dd-slider b { text-align: right; font-weight: 500; }
.dd-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.dd-queue { display: flex; flex-direction: column; gap: 2px; max-height: 240px; overflow-y: auto; }
.dd-queue > div { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; font-size: 11.5px; padding: 3px 6px; border-radius: 6px; background: var(--surface); border-left: 3px solid var(--border); }
.dd-queue .ok { border-left-color: #22c55e; } .dd-queue .bad { border-left-color: #ef4444; } .dd-queue .warn { border-left-color: #f59e0b; }
.dd-queue small { color: var(--text-muted); font-family: var(--mono); }
.dd-queue textarea, .an-body textarea { width: 100%; min-height: 90px; font: 12px var(--mono); resize: vertical; }
/* ---------- D-071: iş akışı tasarım tuvali (wfgraph.js) ---------- */
.wfg { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); margin: 12px 0 16px; }
.wfg-toolbar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.wfg-toolbar .icon { width: 14px; height: 14px; }
.wfg-spacer { flex: 1; }
.wfg-hint { font-size: 12px; color: var(--text-muted); }
.wfg-zoom-val { font: 12px var(--mono); color: var(--text-muted); min-width: 38px; text-align: center; }
.wfg-addwrap { position: relative; }
.wfg-menu { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; width: 230px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,.15)); padding: 6px; display: flex; flex-direction: column; }
.wfg-menu-group { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); padding: 6px 8px 2px; }
.wfg-menu button { display: flex; align-items: center; gap: 8px; border: 0; background: none; font: inherit; font-size: 13px; color: var(--text); padding: 6px 8px; border-radius: 7px; cursor: pointer; text-align: left; }
.wfg-menu button:hover:not(:disabled) { background: var(--hover); }
.wfg-menu button:disabled { color: var(--text-muted); cursor: default; }
.wfg-menu .wf-soon { margin-left: auto; }
.wfg-viewport { position: relative; height: 560px; overflow: hidden; cursor: grab; touch-action: none;
  background-color: var(--surface-sunken); background-image: radial-gradient(circle, color-mix(in srgb, var(--text-muted) 28%, transparent) 1px, transparent 1px); background-size: 22px 22px; }
.wfg-viewport:active { cursor: grabbing; }
.wfg-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.wfg-edges { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.wfg-edge { fill: none; stroke: var(--accent); stroke-width: 2.2; opacity: .8; }
.wfg-edge.lig { stroke: #a855f7; }
.wfg-edge.sel { stroke-width: 3.5; opacity: 1; stroke: #f59e0b; }
.wfg-edge.tmp { stroke-dasharray: 6 5; opacity: .9; }
.wfg-hit { fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; cursor: pointer; }
.wfg-edge-del { position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: #ef4444; font-size: 15px; line-height: 1; cursor: pointer; z-index: 5; }
.wfg-empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--text-muted); font-size: 14px; pointer-events: none; }
.wfg-node { position: absolute; width: 236px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.06); cursor: default; }
.wfg-node.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.wfg-node--input { border-style: dashed; }
.wfg-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--border); cursor: move; user-select: none; }
.wfg-head .wf-block-icon { width: 26px; height: 26px; }
.wfg-title { flex: 1; font-weight: 600; font-size: 13.5px; }
.wfg-del { border: 0; background: none; color: var(--text-muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; border-radius: 6px; }
.wfg-del:hover { color: #ef4444; background: var(--hover); }
.wfg-ports { display: flex; justify-content: space-between; gap: 6px; padding: 6px 0; font-size: 11.5px; color: var(--text-muted); }
.wfg-ins { display: flex; flex-direction: column; gap: 5px; }
.wfg-in, .wfg-out { display: flex; align-items: center; gap: 6px; }
.wfg-in.on { color: var(--text); }
.wfg-out { margin-left: auto; color: var(--text); }
.wfg-dot { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--accent); background: var(--surface); flex-shrink: 0; cursor: crosshair; }
.wfg-in .wfg-dot { margin-left: -7px; }
.wfg-out .wfg-dot { margin-right: -7px; background: var(--accent); }
.wfg-in.on .wfg-dot { background: var(--accent); }
.wfg-connecting .wfg-dot[data-in] { opacity: .35; }
.wfg-connecting .wfg-dot[data-in].ok { opacity: 1; box-shadow: 0 0 0 4px var(--accent-soft); transform: scale(1.2); }
.wfg-body { padding: 4px 10px 10px; display: flex; flex-direction: column; gap: 8px; }
.wfg-body .wf-engine, .wfg-body input[type=text], .wfg-body input[type=number], .wfg-body textarea, .wfg-body select { width: 100%; }
.wfg-body textarea { font: 11px var(--mono); resize: vertical; }
.wfg-body input[type=file] { font-size: 11.5px; max-width: 100%; }
.wfg-pdb { text-transform: uppercase; font-family: var(--mono); }
.wfg-modes { display: flex; gap: 2px; background: var(--surface-sunken); border-radius: 8px; padding: 2px; }
.wfg-modes button { flex: 1; border: 0; background: none; font: inherit; font-size: 12px; padding: 4px; border-radius: 6px; color: var(--text-muted); cursor: pointer; }
.wfg-modes button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
@media (max-width: 760px) { .wfg-viewport { height: 460px; } .wfg-hint { display: none; } }
/* ---------- D-072: iş akışı üst çubuğu + başlatma özeti ---------- */
.wf-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.wf-back-btn { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.wf-back-btn .icon { width: 16px; height: 16px; transform: rotate(90deg); }
.wf-topbar-fields { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wf-topbar-fields input { width: 220px; }
.wf-topbar-fields select { max-width: 200px; }
#wf-submit { display: inline-flex; align-items: center; gap: 6px; }
#wf-submit .icon { width: 15px; height: 15px; }
.wf-pre { display: flex; flex-direction: column; gap: 10px; }
.wf-pre-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-sunken); }
.wf-pre-ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; color: #fff; background: #64748b; }
.wf-pre-row--ok .wf-pre-ico { background: #22c55e; }
.wf-pre-row--info .wf-pre-ico { background: #3b82f6; }
.wf-pre-row--warn .wf-pre-ico { background: #f59e0b; }
.wf-pre-row--bad .wf-pre-ico { background: #ef4444; }
.wf-pre-row--warn { border-color: color-mix(in srgb, #f59e0b 45%, var(--border)); }
.wf-pre-row--bad { border-color: #ef4444; }
@media (max-width: 760px) { .wf-topbar-fields, .wf-topbar-fields input, .wf-topbar-fields select { width: 100%; max-width: none; } }
/* D-079: giriş ekranındaki logo web sitesine bağlantı */
.login-home { display: inline-flex; border-radius: 10px; text-decoration: none; transition: opacity .15s; }
.login-home:hover { opacity: .8; }
.login-home:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
