:root {
  --bg: #f3f5f8;
  --ink: #1c2430;
  --muted: #66758a;
  --card: #ffffff;
  --line: #e3e8ef;
  --accent: #1f6feb;
  --accent-dark: #1558c0;
  --accent-soft: #e8f1ff;
  --ok: #1a7f4b;
  --danger: #c62828;
  --shadow: 0 8px 24px rgba(28, 36, 48, 0.06);
  --radius: 12px;
  --font: "Segoe UI", "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}

.page-bg { display: none; }

.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}
.brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: .92rem;
  padding: .45rem .7rem;
  border-radius: 8px;
}
.nav a:hover, .nav a.active { color: var(--accent); background: var(--accent-soft); }
.userbox { margin-left: auto; display: flex; align-items: center; gap: .65rem; color: var(--muted); font-size: .9rem; }

.main { width: min(1400px, calc(100% - 1.5rem)); margin: 1rem auto 3rem; }

.list-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}
.list-bar-left, .list-bar-right {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
}
.list-bar-form {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
}
.list-bar-form input[type="text"] { width: 140px; }
.list-bar-form select { width: auto; min-width: 110px; }

.pref-strip { margin-bottom: .75rem; padding: .65rem .85rem; }
.pref-list.horizontal {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 0;
}
.pref-list.horizontal li {
  max-width: 280px;
  flex: 0 1 auto;
}

.robot-layout { display: block; }
.results-panel { margin-top: .75rem; }

.filter-card { margin-bottom: 0; }

.footer { text-align: center; color: var(--muted); font-size: .82rem; padding: 1.25rem; }

.hero-strip { display: none; }

.panel, .side-panel, .auth-card, .stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel, .side-panel { padding: 1rem 1.1rem; }

.robot-page { display: grid; gap: 1rem; }
.filter-card h2, .results-toolbar h2 {
  margin: 0 0 .85rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.filter-form { display: grid; gap: .75rem; }
.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
}
.filter-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
}
@media (max-width: 1000px) {
  .filter-grid, .filter-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .filter-grid, .filter-grid-3 { grid-template-columns: 1fr; }
}

label { display: grid; gap: .3rem; font-size: .86rem; }
label > span, .label { color: var(--muted); font-weight: 600; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .55rem .7rem;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus { outline: 2px solid rgba(31,111,235,.25); border-color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: .55rem 1rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline {
  background: #fff;
  border-color: var(--accent);
  color: var(--accent);
}
.btn-ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-small {
  width: 32px; height: 32px; padding: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
}
.btn-tiny { padding: .2rem .45rem; font-size: .78rem; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.btn-tiny.danger { color: var(--danger); }
.btn-tiny.js-pasif-kayit {
  border-color: #f0b4b4;
  color: var(--danger);
  background: #fff;
  white-space: nowrap;
}
.btn-tiny.js-pasif-kayit:hover {
  background: #c62828;
  border-color: #c62828;
  color: #fff;
}

.btn.btn-add {
  background: var(--accent);
  color: #fff !important;
  border-color: var(--accent);
  border-radius: 8px;
  padding: .4rem .7rem;
  font-size: .82rem;
  white-space: nowrap;
  gap: .35rem;
  opacity: 1;
  visibility: visible;
}
.btn.btn-add .plus {
  display: inline-grid;
  place-items: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  background: rgba(255,255,255,.25);
  font-weight: 700;
}
.btn.btn-add:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff !important;
}
.btn.btn-add:disabled { opacity: .6; cursor: wait; }

.filter-actions { display: flex; gap: .5rem; align-items: end; padding-top: 1.15rem; }
.range-row { display: flex; gap: .4rem; }
.range-row input { width: 100%; }

/* Checkbox'lı çoklu seçim (YÖK Atlas tarzı) */
.ms { position: relative; }
.ms-control {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .55rem .7rem;
  font: inherit;
  color: var(--text, #1f2933);
  cursor: pointer;
  text-align: left;
}
.ms-control:hover { border-color: #b9c2cc; }
.ms.open .ms-control { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(25,118,210,.12); }
.ms-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-label.is-placeholder { color: #8a95a1; }
.ms-control.has-value .ms-label { color: var(--accent); font-weight: 600; }
.ms-caret {
  flex: 0 0 auto;
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #8a95a1;
  transition: transform .15s;
}
.ms.open .ms-caret { transform: rotate(180deg); }
.ms-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  padding: .5rem;
}
.ms-search-wrap { margin-bottom: .4rem; }
.ms-search {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: .45rem .6rem;
  font: inherit;
}
.ms-search:focus { outline: none; border-color: var(--accent); }
.ms-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 .15rem .4rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: .3rem;
}
.ms-count { font-size: .8rem; color: var(--muted, #667); }
.ms-clear {
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
  padding: .1rem .3rem;
}
.ms-clear:hover { text-decoration: underline; }
.ms-options { max-height: 260px; overflow-y: auto; }
.ms-option {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .4rem .45rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: .9rem;
}
.ms-option[hidden],
.ms-option.ms-hidden { display: none !important; }
.ms-empty {
  padding: .6rem .45rem;
  color: var(--muted, #667);
  font-size: .88rem;
  text-align: center;
}
.ms-option:hover { background: #f2f6fb; }
.ms-option input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: var(--accent); }
.ms-option span { overflow: hidden; text-overflow: ellipsis; }

.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: .75rem; }
.alert-error { background: #fdecea; color: var(--danger); }
.alert-ok { background: #e8f6ee; color: var(--ok); }

.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}
.toolbar-left, .toolbar-right { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.seg button {
  border: 0;
  background: #fff;
  padding: .45rem .8rem;
  font: inherit;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.seg button.active { background: var(--accent); color: #fff; }
.quick-search {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.quick-search input[type="search"] {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .45rem .7rem;
  min-width: 260px;
  font-size: .9rem;
}
.quick-search input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(25, 118, 210, .12);
}
.quick-count { font-size: .8rem; color: var(--muted, #667); white-space: nowrap; }
#search-btn .btn-spin[hidden] { display: none; }
#search-btn .btn-spin:not([hidden]) { display: inline-block; }
#search-btn:disabled { opacity: .7; cursor: progress; }
.list-badge {
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: .45rem .85rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  gap: .4rem;
  align-items: center;
}
.list-badge .count {
  background: #e53935;
  border-radius: 999px;
  min-width: 1.3rem;
  height: 1.3rem;
  display: inline-grid;
  place-items: center;
  font-size: .75rem;
}

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th, .data-table td { padding: .7rem .65rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th {
  background: #f7f9fc;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted);
  white-space: nowrap;
}
.data-table tbody tr:hover { background: #f8fbff; }
.cell-strong { font-weight: 700; }
.cell-soft { color: var(--muted); font-size: .82rem; margin-top: .15rem; }
.muted { color: var(--muted); }
.result-meta { color: var(--muted); margin: 0 0 .65rem; font-size: .9rem; }
.empty-hint { color: var(--muted); padding: 1.5rem 0; text-align: center; }
.pager { display: flex; gap: .75rem; align-items: center; margin-top: 1rem; flex-wrap: wrap; }
.per-page-wrap {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-right: .5rem;
  font-size: .88rem;
  color: var(--muted);
}
.per-page-wrap input {
  width: 72px;
  padding: .35rem .45rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
}

.robot-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1rem;
  align-items: start;
}
@media (max-width: 980px) {
  .robot-layout { grid-template-columns: 1fr; }
}

.pref-list { list-style: none; padding: 0; margin: .75rem 0; display: grid; gap: .5rem; }
.pref-list li {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  padding: .65rem .7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.pref-main { display: flex; gap: .5rem; min-width: 0; }
.pref-actions { display: flex; gap: .2rem; align-items: start; }
.side-panel h2, .panel h2 { margin: 0 0 .75rem; font-size: 1.05rem; }
.side-panel hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }

.stack { display: grid; gap: .75rem; }
.stack.tight { gap: .5rem; }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; }
.wide-left { grid-template-columns: 2fr 1fr; }
@media (max-width: 800px) { .two-col, .wide-left { grid-template-columns: 1fr; } }

.list-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.list-cards li a, .list-cards li {
  display: grid;
  gap: .15rem;
  padding: .75rem .9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  background: #fff;
}

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-bottom: 1rem; }
.stat { padding: .9rem 1rem; }
.stat span { color: var(--muted); display: block; margin-bottom: .2rem; font-size: .85rem; }
.stat strong { font-size: 1.4rem; }

.auth-wrap { display: grid; place-items: center; min-height: 70vh; }
.auth-card { width: min(420px, 100%); padding: 1.75rem; }
.auth-card h1 { margin: 0 0 .5rem; font-size: 1.6rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; color: var(--accent); font-weight: 700; margin: 0 0 .4rem; }
.lead { color: var(--muted); }
.hint { margin-top: 1rem; color: var(--muted); font-size: .88rem; }
.hint ul { padding-left: 1.1rem; }
.auth-switch {
  margin: 1.1rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: .92rem;
}
.auth-switch a { color: var(--accent); font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
.username-field { display: grid; gap: .35rem; }
.username-input-wrap { position: relative; }
.username-input-wrap input { padding-right: 2.2rem; width: 100%; box-sizing: border-box; }
.username-icon {
  position: absolute;
  right: .7rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .95rem;
  font-weight: 700;
  pointer-events: none;
  color: var(--muted);
}
.username-icon.is-ok { color: var(--ok, #1b7a3d); }
.username-icon.is-err { color: var(--danger, #c62828); }
.username-icon.is-loading { color: var(--muted); }
.username-status {
  min-height: 1.1em;
  font-size: .85rem;
  color: var(--muted);
}
.username-status.is-ok { color: var(--ok, #1b7a3d); }
.username-status.is-err { color: var(--danger, #c62828); }
.username-status.is-loading { color: var(--muted); }
.username-field input:focus { outline: none; }
.username-field:has(.is-ok) input { border-color: var(--ok, #1b7a3d); }
.username-field:has(.is-err) input { border-color: var(--danger, #c62828); }
code { background: #eef2f7; padding: .1rem .35rem; border-radius: 4px; }

.toast {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 50;
  padding: .75rem 1rem; border-radius: 8px; background: #1c2430; color: #fff;
  box-shadow: var(--shadow); max-width: min(340px, calc(100% - 2rem));
}
.toast.ok { background: var(--ok); }
.toast.err { background: var(--danger); }

.bulk-bar {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  margin: 0 0 .75rem; padding: .55rem .7rem;
  border: 1px solid var(--line); border-radius: 8px; background: #f7f9fc;
}
.check { display: flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .86rem; }
.row-mini-actions { display: flex; gap: .3rem; margin-top: .3rem; flex-wrap: wrap; }
.kont-cell { font-size: .82rem; white-space: nowrap; }
tr.is-pasif { opacity: .4; background: #fff5f5; }
.user-edit {
  border: 1px solid var(--line); border-radius: 8px;
  padding: .7rem .9rem; margin-bottom: .55rem; background: #fff;
}
.user-edit summary { cursor: pointer; display: flex; gap: .65rem; align-items: baseline; flex-wrap: wrap; }
.inline-form { display: inline; }

/* Choices overrides — compact combobox look */
.choices { margin-bottom: 0; font-size: .9rem; }
.choices__inner {
  border-radius: 8px !important;
  border: 1px solid var(--line) !important;
  min-height: 38px !important;
  padding: 4px 8px !important;
  background: #fff !important;
}
.choices__list--dropdown, .choices__list[aria-expanded] {
  border-radius: 8px !important;
  border-color: var(--line) !important;
  z-index: 40 !important;
}
.choices__list--multiple .choices__item {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  border-radius: 6px !important;
  font-size: .8rem;
}
.choices[data-type*="select-multiple"] .choices__inner { min-height: 38px; }
.choices__placeholder { opacity: .7; }
.meta-inline { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .75rem; }
.pill {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 999px;
  padding: .25rem .65rem;
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
}
.pill.warn { background: #fff3e0; color: #c45c00; }

.detail-only { display: none !important; }
body.view-detail th.detail-only,
body.view-detail td.detail-only { display: table-cell !important; }
body.view-detail div.detail-only,
body.view-detail span.detail-only { display: block !important; }
body.view-detail .summary-only { display: none !important; }

.prog-cell .fakulte { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .02em; }
.prog-cell .adi { font-weight: 700; margin-top: .1rem; }
.prog-cell .sure { color: var(--muted); font-size: .82rem; }
.link-detail {
  border: 0; background: none; padding: 0; margin: 0;
  font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; text-align: left;
}
.link-detail:hover { color: var(--accent); text-decoration: underline; }
.badge-row { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.pill-badge {
  display: inline-flex; align-items: center;
  padding: .12rem .45rem; border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .01em;
  background: #eef2f7; color: #334155;
  border: 0; font-family: inherit; cursor: pointer;
  line-height: 1.3;
}
.pill-badge:hover { filter: brightness(0.96); outline: 1px solid rgba(0,0,0,.08); }
.pill-acred { background: #e8f1ff; color: #1558c0; }
.pill-tyc { background: #e8f7ef; color: #1a7f4b; }
.pill-kosul { background: #fff4e5; color: #9a5b00; }
.pill-type { background: #e8f1ff; color: #1558c0; cursor: default; }
.pill-type:hover { filter: none; outline: none; }

.kont-wrap { white-space: nowrap; }
.info-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.15rem; height: 1.15rem; margin-left: .25rem;
  border-radius: 50%; border: 1px solid var(--accent);
  background: #fff; color: var(--accent);
  font-size: .7rem; font-weight: 800; cursor: pointer; vertical-align: middle;
}
.info-btn:hover { background: var(--accent-soft); }

.float-pop {
  position: absolute; z-index: 60; min-width: 220px; max-width: 280px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); padding: .75rem .85rem; font-size: .85rem;
}
.float-pop-wide { max-width: 340px; min-width: 240px; }
.float-pop .pop-kod {
  display: inline-block; font-size: .7rem; font-weight: 800;
  padding: .1rem .4rem; border-radius: 999px; margin-bottom: .35rem;
  background: #eef2f7; color: #334155;
}
.float-pop .pop-ad { font-weight: 700; margin: 0 0 .35rem; line-height: 1.3; }
.float-pop .pop-desc { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.float-pop .pop-extra { margin: .5rem 0 0; font-size: .78rem; color: #9a5b00; }
.float-pop strong { display: block; margin-bottom: .45rem; }
.float-pop ul { list-style: none; margin: 0; padding: 0; }
.float-pop li { display: flex; justify-content: space-between; gap: .75rem; padding: .2rem 0; border-bottom: 1px solid #f0f3f7; }
.float-pop li:last-child { border-bottom: 0; }
.float-pop li span { color: var(--muted); }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(28, 36, 48, .45);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 3vh 1rem; overflow: auto;
}
.modal-backdrop[hidden] { display: none !important; }
.modal-card {
  position: relative; width: min(920px, 100%);
  background: #fff; border-radius: 14px; box-shadow: 0 20px 50px rgba(28,36,48,.18);
  padding: 1.25rem 1.35rem 1.5rem; margin-bottom: 4vh;
}
.modal-card-sm {
  width: min(560px, 100%);
}
#badge-modal {
  z-index: 90;
  background: rgba(28, 36, 48, .5);
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
  overflow: hidden;
}
#badge-modal .modal-card-sm {
  max-height: min(80vh, 640px);
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1.15rem 1.2rem 1.2rem;
}
#badge-modal #bm-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: .35rem;
  -webkit-overflow-scrolling: touch;
}
.bm-head {
  padding-right: 2rem;
  margin-bottom: .85rem;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
  padding-bottom: .55rem;
  border-bottom: 1px solid var(--line);
}
.bm-head .pill-badge { margin-bottom: .45rem; }
.bm-head h2 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.35;
}
.bm-sub {
  margin: .35rem 0 0;
  color: var(--muted);
  font-size: .9rem;
}
.bm-content { margin-top: .55rem; padding-bottom: .25rem; }
.bm-desc {
  margin: 0;
  font-size: .95rem;
  line-height: 1.55;
  color: #334155;
}
.modal-close {
  position: absolute; top: .65rem; right: .75rem;
  border: 0; background: #eef2f7; width: 2rem; height: 2rem; border-radius: 50%;
  font-size: 1.25rem; cursor: pointer; line-height: 1;
}
.modal-close:hover { background: #e3e8ef; }
.pm-head { display: flex; justify-content: space-between; gap: 1rem; padding-right: 2rem; margin-bottom: 1rem; }
.pm-uni { font-size: .92rem; font-weight: 700; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.pm-head h2 { margin: .35rem 0 .15rem; font-size: 1.35rem; }
.pm-fak { color: var(--muted); font-size: .88rem; }
.pm-kod {
  flex: 0 0 auto; text-align: right; font-size: .75rem; color: var(--muted);
  background: var(--accent-soft); padding: .55rem .75rem; border-radius: 10px;
}
.pm-kod strong { display: block; color: var(--accent-dark); font-size: 1rem; margin-top: .15rem; }
.pm-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .65rem; margin-bottom: 1rem;
}
.pm-stat {
  background: #f7f9fc; border: 1px solid var(--line); border-radius: 10px; padding: .55rem .7rem;
}
.pm-stat span { display: block; font-size: .72rem; color: var(--muted); margin-bottom: .2rem; }
.pm-stat strong { font-size: .95rem; }
.pm-block { margin-top: 1.1rem; }
.pm-block h3 { margin: 0 0 .55rem; font-size: .95rem; }
.pm-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.pm-table th, .pm-table td { text-align: left; padding: .45rem .4rem; border-bottom: 1px solid var(--line); }
.kosul-list { list-style: none; margin: 0; padding: 0; }
.kosul-list li {
  display: grid; grid-template-columns: 4.5rem 1fr; gap: .65rem;
  padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .88rem; line-height: 1.45;
}
.kosul-kod {
  font-weight: 700; color: var(--accent-dark); background: var(--accent-soft);
  align-self: start; text-align: center; border-radius: 6px; padding: .15rem .3rem; font-size: .78rem;
}
@media (max-width: 640px) {
  .pm-head { flex-direction: column; }
  .pm-kod { text-align: left; }
  .kosul-list li { grid-template-columns: 1fr; }
}

/* ---- Sürükle-bırak ---- */
.dnd-handle {
  flex: 0 0 auto;
  border: 0;
  background: #eef2f7;
  color: #6b7a8d;
  border-radius: 6px;
  width: 2rem;
  height: 2rem;
  cursor: grab;
  font-size: .95rem;
  line-height: 1;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.dnd-handle:active { cursor: grabbing; background: var(--accent-soft); color: var(--accent); }
.dnd-dragging {
  opacity: .95;
  background: #fff !important;
  border-color: var(--accent) !important;
}
.dnd-placeholder {
  border: 2px dashed var(--accent) !important;
  background: var(--accent-soft) !important;
  border-radius: 8px;
  min-height: 48px;
  list-style: none;
}
.dnd-hint {
  margin: 0 0 .75rem;
  color: var(--muted);
  font-size: .88rem;
}
.dnd-hint.tight { margin: 0 0 .45rem; font-size: .82rem; }

.pref-list li {
  align-items: center;
}
.pref-list .dnd-handle { margin-right: .15rem; }
.pref-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .65rem;
  margin-top: .35rem;
  font-size: .8rem;
  color: var(--muted);
}

/* ---- Liste detay sayfası (site ile aynı dil) ---- */
.list-page {
  display: grid;
  gap: 1rem;
}
.lp-head { margin-bottom: 0; }
.lp-title {
  display: block;
  font-size: 1.15rem;
  color: var(--ink);
}
.lp-board { margin: 0; }
.lp-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .55rem;
}
.lp-item {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: .65rem;
  padding: .75rem .85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.lp-item:hover {
  background: #f8fbff;
  border-color: #d0dae8;
}
.lp-handle.dnd-handle {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: #f7f9fc;
  border: 1px solid var(--line);
  display: grid;
  place-content: center;
  gap: 3px;
  color: transparent;
  font-size: 0;
}
.lp-handle.dnd-handle span {
  display: block;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--muted);
}
.lp-handle.dnd-handle:hover {
  background: var(--accent-soft);
  border-color: #b7cef5;
}
.lp-handle.dnd-handle:hover span { background: var(--accent); }

.lp-rank {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
}
.lp-content { min-width: 0; }
.lp-program { font-size: .98rem; }
.lp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-top: .45rem;
}
.lp-tags .pill {
  margin: 0;
}
.lp-remove { margin: 0; }
.lp-item.dnd-dragging {
  box-shadow: var(--shadow) !important;
  border-color: var(--accent) !important;
  background: #fff !important;
}
.list-settings h2 {
  margin: 0 0 .85rem;
  font-size: 1.05rem;
}
.lp-settings-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
}
.lp-rename-row {
  display: flex;
  gap: .5rem;
  align-items: center;
}
.lp-rename-row input { flex: 1; min-width: 0; }

@media (max-width: 900px) {
  .lp-settings-grid { grid-template-columns: 1fr; }
  .lp-item {
    grid-template-columns: auto auto 1fr;
    grid-template-areas:
      "handle rank remove"
      "content content content";
  }
  .lp-handle { grid-area: handle; }
  .lp-rank { grid-area: rank; }
  .lp-content { grid-area: content; }
  .lp-remove { grid-area: remove; justify-self: end; }
}
@media (max-width: 560px) {
  .lp-rename-row { flex-direction: column; align-items: stretch; }
}

/* ---- Mobil navigasyon ---- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0;
  cursor: pointer;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 18px;
  margin: 0 auto;
  background: var(--ink);
  border-radius: 2px;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
    padding: .65rem .85rem;
    gap: .5rem;
  }
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    width: 100%;
    order: 3;
    flex-direction: column;
    gap: .15rem;
    padding: .35rem 0 .15rem;
  }
  body.nav-open .nav { display: flex; }
  .nav a {
    padding: .7rem .85rem;
    border: 1px solid var(--line);
    background: #fff;
  }
  .userbox {
    margin-left: 0;
    order: 2;
  }
  .main { width: calc(100% - 1rem); margin: .75rem auto 2rem; }
  .list-settings-grid,
  .lp-settings-grid { grid-template-columns: 1fr; }
  .results-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .toolbar-left, .toolbar-right {
    width: 100%;
    justify-content: space-between;
  }
  .quick-search { width: 100%; }
  .quick-search input[type="search"] {
    min-width: 0;
    width: 100%;
  }
  .data-table { font-size: .82rem; }
  .data-table th, .data-table td { padding: .55rem .45rem; }
  .btn.btn-add {
    padding: .35rem .55rem;
    font-size: .78rem;
  }
  .pref-list.horizontal {
    flex-direction: column;
  }
  .pref-list.horizontal li {
    max-width: none;
    width: 100%;
  }
  .list-bar-form input[type="text"] { width: 120px; }
  .stats-row { grid-template-columns: 1fr; }
  .hide-sm { display: none !important; }
  .auth-card { width: 100%; padding: 1.25rem; }
  .ms-panel { position: fixed; left: .75rem; right: .75rem; top: auto; max-height: 60vh; }
  .ms-options { max-height: 40vh; }
}

@media (max-width: 560px) {
  .brand { font-size: 1rem; }
  .userbox span { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .seg { width: 100%; }
  .seg button { flex: 1; }
  .filter-actions { flex-wrap: wrap; }
  .filter-actions .btn { flex: 1; justify-content: center; }
  .pager { justify-content: center; }
  .lp-title { font-size: 1.05rem; }
  .lp-head .list-bar-right { width: 100%; }
  .lp-head .list-bar-right .btn { flex: 1; justify-content: center; }
  .pref-meta { gap: .25rem .5rem; }
  th:nth-child(1), td:nth-child(1) { /* keep checkbox */ }
}

@media (hover: none) {
  .dnd-handle { width: 2.4rem; height: 2.4rem; font-size: 1.05rem; }
}

