/* X Hesap Paneli — açık tema
   Renkler: zemin #EEF1F4 · yüzey #FFFFFF · mürekkep #131A24 · ikincil #5E6878 · çizgi #D9DEE5 · fosforlu #FFE45C */
:root {
  --bg: #eef1f4;
  --surface: #ffffff;
  --soft: #f6f7f9;
  --ink: #131a24;
  --ink-2: #364152;
  --muted: #5e6878;
  --line: #d9dee5;
  --line-2: #c3cad4;
  --mark: #ffe45c;
  --mark-soft: #fff6c2;
  --ok: #157347;
  --ok-bg: #e3f4ea;
  --err: #b83227;
  --err-bg: #fbe9e7;
  --warn: #8a5a00;
  --warn-bg: #fff3d1;
  --side: #131a24;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --r-lg: 16px;
  --r: 10px;
  --r-sm: 7px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 var(--body); font-feature-settings: "ss01";
}
a { color: var(--ink); text-underline-offset: 3px; }
h1, h2 { font-family: var(--display); letter-spacing: -0.01em; margin: 0; }
h1 { font-size: 30px; line-height: 1.15; font-weight: 700; }
h2 { font-size: 18px; line-height: 1.3; font-weight: 700; margin-bottom: 14px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 14px; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 600; }
:focus-visible { outline: 3px solid #2f6fed; outline-offset: 2px; }

/* ---------- Form öğeleri ---------- */
.field { display: block; margin: 0 0 16px; }
.field > span:first-child { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field i { font-style: normal; font-weight: 400; color: var(--muted); }
.field small { display: block; margin-top: 6px; color: var(--muted); font-size: 12.5px; }
input, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 12px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: #9aa3b0; }
input:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(19, 26, 36, .12); }
input[readonly] { background: var(--soft); }
textarea { resize: vertical; min-height: 84px; }
input[type=checkbox] { width: auto; }
.count { font-style: normal; font-family: var(--mono); font-weight: 400; font-size: 12px; color: var(--muted); }
.count.near { color: var(--err); }

/* Değişecek alan: fosforlu kalem çizgisi */
.lbl { font-weight: 600; }
.field.is-changed .lbl { background: linear-gradient(transparent 52%, var(--mark) 52%, var(--mark) 94%, transparent 94%); padding: 0 2px; margin: 0 -2px; }
.field.is-changed input, .field.is-changed textarea, .field.is-changed .dropzone { border-color: #c9a400; background: #fffdf0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 600 14px/1 var(--body); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 14px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--ink); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #263142; }
.btn-danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: inherit; }
.btn-ghost:hover { border-color: currentColor; }
.btn-sm { padding: 7px 11px; font-size: 13px; }
.btn-block { width: 100%; padding: 12px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
form.inline { display: inline; margin: 0; }
.copyrow { display: flex; gap: 6px; align-items: center; }
.copyrow input { flex: 1; min-width: 0; }

.chip { display: inline-block; font-size: 12.5px; font-weight: 600; line-height: 1; padding: 6px 9px; border-radius: 999px; background: var(--soft); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.chip-ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.chip-err { background: var(--err-bg); color: var(--err); border-color: transparent; }
.chip-warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }

.alert { padding: 12px 14px; border-radius: var(--r); margin: 0 0 14px; border: 1px solid; font-size: 14px; }
.alert-success { background: var(--ok-bg); border-color: #b5e0c6; }
.alert-error { background: var(--err-bg); border-color: #f0c2bc; }
.alert-warn { background: var(--warn-bg); border-color: #f0d68a; }
.alert code { font-family: var(--mono); font-size: 15px; background: var(--mark); padding: 2px 8px; border-radius: 5px; user-select: all; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; margin-bottom: 18px; }
.panel.flush { padding: 0; overflow-x: auto; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.panel-mark { background: var(--mark-soft); border-color: #eed46a; }
.empty, .empty-state { color: var(--muted); }
.empty-state { text-align: center; padding: 48px 22px; }
.empty-state h2 { margin-bottom: 6px; color: var(--ink); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 13px; font-weight: 600; color: var(--muted); background: var(--soft); }
tbody tr:last-child td { border-bottom: 0; }
.log td { vertical-align: top; font-size: 14px; }
.log th:first-child, .log td:first-child { padding-left: 0; }
.log th { background: none; }
.log-err { color: var(--err); font-size: 13px; margin-top: 4px; }

/* ---------- Giriş / kurulum ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-box { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px; }
.auth-mark { width: 44px; height: 44px; border-radius: 12px; background: var(--ink); margin-bottom: 22px; position: relative; }
.auth-mark::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 11px; height: 9px; background: var(--mark); border-radius: 2px; }
.auth h1 { font-size: 26px; margin-bottom: 6px; }
.auth p.muted { margin-bottom: 22px; }

/* ---------- Yönetici: kenar menü ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; background: linear-gradient(to right, var(--side) 232px, var(--bg) 232px); }
.side { background: var(--side); color: #c7ced8; padding: 22px 14px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.side-brand { display: flex; align-items: center; gap: 10px; color: #fff; font: 700 17px var(--display); text-decoration: none; padding: 0 10px 22px; }
.logo { width: 30px; height: 30px; border-radius: 8px; background: var(--mark); color: var(--ink); display: grid; place-items: center; font: 700 17px var(--display); }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a, .side-out { color: inherit; text-decoration: none; padding: 9px 12px; border-radius: 8px; font-weight: 500; }
.side nav a:hover, .side-out:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side nav a.on { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 3px 0 0 var(--mark); }
.side-out { margin-top: auto; }
.content { padding: 34px 40px 60px; max-width: 1240px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head p { margin: 4px 0 0; }
.page-actions { display: flex; gap: 10px; align-items: center; }
.search input { width: 300px; }
.back { display: inline-block; font-size: 14px; color: var(--muted); margin-bottom: 6px; text-decoration: none; }
.back::before { content: "‹ "; }
.back:hover { color: var(--ink); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }

.accounts tbody tr { cursor: pointer; }
.accounts tbody tr:hover { background: var(--soft); }
.acc { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; vertical-align: middle; margin-right: 8px; }
.av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.av-empty { display: grid; place-items: center; background: var(--ink); color: var(--mark); font: 700 16px var(--display); }
.acc-name { display: block; font-weight: 600; }
.acc-handle { display: block; color: var(--muted); font-size: 13.5px; }
.pmini { display: flex; gap: 12px; align-items: flex-start; padding: 14px; background: var(--soft); border-radius: var(--r); margin-bottom: 4px; }
.pmini img, .pmini .av { width: 48px; height: 48px; border-radius: 50%; flex: none; }
.pmini p { margin: 6px 0 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid #eed46a; font-size: 14px; }
details.more { margin-top: 14px; font-size: 14px; }
details summary { cursor: pointer; color: var(--muted); font-weight: 600; }
details[open] summary { margin-bottom: 10px; }
details.danger summary { color: var(--err); }
details.danger { padding: 16px 22px; }

/* ---------- Personel sayfası ---------- */
.bar { background: var(--ink); color: #fff; }
.bar-inner { max-width: 1180px; margin: 0 auto; padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bar-kicker { display: block; font-size: 12.5px; color: #9aa6b6; }
.bar-title { display: block; font: 700 20px/1.2 var(--display); }
.bar .btn-ghost { color: #c7ced8; }
.staff { max-width: 1180px; margin: 0 auto; padding: 26px 24px 70px; }
.staff-grid { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 22px; align-items: start; }
.staff-side { min-width: 0; }

/* X profil önizlemesi — sayfanın odak noktası */
.xcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 18px; }
.xbanner { aspect-ratio: 3 / 1; background: repeating-linear-gradient(135deg, #dfe4ea 0 10px, #e7ebf0 10px 20px); position: relative; }
.xbanner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.xbody { padding: 0 18px 16px; }
.xtop { display: flex; justify-content: space-between; align-items: flex-end; margin-top: -40px; margin-bottom: 10px; }
.xavatar { width: 84px; height: 84px; border-radius: 50%; border: 4px solid var(--surface); background: #cfd6df; overflow: hidden; display: block; position: relative; }
.xavatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xname { font: 700 20px/1.25 var(--display); overflow-wrap: anywhere; }
.xhandle { color: var(--muted); margin-bottom: 10px; }
.xbio { white-space: pre-line; overflow-wrap: anywhere; margin-bottom: 10px; }
.xmeta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 14px; }
.xloc::before { content: "⌖ "; }
.xurl { color: #1d63c7; overflow-wrap: anywhere; }
.xurl::before { content: "↗ "; color: var(--muted); }
[data-pv][data-empty] { display: none; }
.xstats { display: flex; gap: 16px; font-size: 14px; color: var(--muted); margin-top: 10px; }
.xstats b { color: var(--ink); }
.pv-changed:not(img) { background: var(--mark); box-shadow: 0 0 0 3px var(--mark); border-radius: 2px; color: var(--ink); }
.xavatar:has(img.pv-changed), .xbanner:has(img.pv-changed) { outline: 3px solid var(--mark); outline-offset: -3px; }
.xfoot { padding: 10px 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); background: var(--soft); }
.xfoot.is-preview { background: var(--mark); color: var(--ink); font-weight: 600; border-top-color: #e3c83a; }

.creds h2 { margin-bottom: 10px; }
.cred { padding: 10px 0; border-top: 1px solid var(--line); }
.cred:first-of-type { border-top: 0; }
.cred-label { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.cred input { padding: 8px 10px; }
.totp { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.totp output { font-size: 22px; font-weight: 500; letter-spacing: .06em; min-width: 110px; }
.totp-bar { flex: 1; min-width: 50px; height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.totp-bar i { display: block; height: 100%; width: 0; background: var(--ok); transition: width 1s linear; }
.totp-bar.low i { background: var(--err); }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.dropzone { position: relative; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 112px; padding: 14px; border: 1.5px dashed var(--line-2); border-radius: var(--r); background: var(--soft); cursor: pointer; font-weight: 400; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--ink); background: #fff; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone:focus-within { outline: 3px solid #2f6fed; outline-offset: 2px; }
.dz-text { font-size: 14px; pointer-events: none; }
.dz-text small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.dz-file { position: absolute; left: 10px; right: 10px; bottom: 8px; font-size: 12.5px; font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
fieldset.manual { border: 0; border-top: 1px solid var(--line); margin: 8px 0 0; padding: 18px 0 0; }
fieldset.manual legend { font: 700 15px var(--display); padding: 0 10px 0 0; }
.submitbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
#changecount.has { color: var(--ink); font-weight: 600; }

/* ---------- Mobil ---------- */
@media (max-width: 980px) {
  .staff-grid { grid-template-columns: minmax(0, 1fr); }
  .staff-side { position: static; }
  .cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; background: var(--bg); }
  .side { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; padding: 12px; gap: 4px; }
  .side-brand { padding: 0 8px 0 0; }
  .side nav { flex-direction: row; }
  .side-out { margin: 0 0 0 auto; }
  .content { padding: 22px 16px 50px; }
  .search input { width: 100%; }
  .page-actions { width: 100%; }
  .page-actions .search { flex: 1; }
  .two { grid-template-columns: 1fr; }
  .accounts th:nth-child(4), .accounts td:nth-child(4) { display: none; }
  .staff { padding: 18px 14px 60px; }
  h1 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.field.check { display: flex; gap: 8px; align-items: center; font-weight: 500; font-size: 14px; }
.table-scroll { overflow-x: auto; }
