/* SotsTech CV — ortak tema (renkler, düğmeler, formlar, kartlar, editör, CV görüntüleme sayfası).
   style.css ve cv-menu.css'DEN SONRA yüklenir. Üst menü kuralları cv-menu.css'te; ana sayfa kuralları home.css'te. */

:root {
  --bg: #f4f6fb;
  --paper: #fff;
  --ink: #0e1424;
  --muted: #586179;
  --line: #e2e6ef;
  --soft: #f2f4fa;
  --accent: #2f54e0;
  --accent-dark: #2140b8;
  --accent-soft: #eaeffe;
  --navy: #0b1226;
  --danger: #c0392b;
  --ok: #13804f;
  --ui: "Inter", "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 16px;
  --sh-sm: 0 1px 2px rgba(15, 23, 50, .06), 0 1px 1px rgba(15, 23, 50, .04);
  --sh: 0 12px 32px -14px rgba(15, 23, 60, .22), 0 2px 6px rgba(15, 23, 50, .05);
}

html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--ui); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--ui); letter-spacing: -.02em; }
h1 { font-weight: 700; font-size: clamp(1.6rem, 4.6vw, 2.1rem); }
h2 { font-weight: 650; font-size: 1.25rem; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid rgba(47, 84, 224, .4); outline-offset: 2px; border-radius: 8px; }

.wrap { max-width: 1040px; padding: 32px 20px 72px; }
.wrap.wrap-full { max-width: none; padding: 0; }
@media (max-width: 639px) { .wrap { padding: 20px 14px 56px; } }

/* ---------- düğmeler ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 12px;
  border: 1px solid var(--accent); background: var(--accent); color: #fff; font: 600 .93rem var(--ui); text-decoration: none; cursor: pointer;
  box-shadow: 0 6px 16px -8px rgba(47, 84, 224, .75); transition: background .15s, transform .15s, box-shadow .15s, border-color .15s;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn .ic { flex: none; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid #d5dae7; box-shadow: var(--sh-sm); }
.btn.ghost:hover { background: var(--soft); color: var(--ink); border-color: #c3cadc; }
.btn.ghost .ic { color: var(--accent); }
.btn.danger { background: var(--danger); border-color: var(--danger); box-shadow: none; }
.btn.danger:hover { background: #9b2c20; border-color: #9b2c20; }
.btn.small { min-height: 38px; padding: 7px 14px; font-size: .85rem; border-radius: 10px; }
.btn.big { min-height: 52px; padding: 13px 26px; font-size: 1rem; border-radius: 14px; }
.btn.is-done { border-color: var(--ok); color: var(--ok); }
.btn.is-done .ic { color: var(--ok); }
.btn.is-locked:hover { background: var(--accent); }
.linklike { font-family: var(--ui); }

/* ---------- formlar ---------- */
.field label, .field legend { font: 600 .85rem var(--ui); color: #2a3148; margin-bottom: 6px; }
input, select, textarea {
  border: 1px solid #d3d9e6; border-radius: 12px; background: #fff; color: var(--ink); min-height: 46px; padding: 11px 13px;
  transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover, textarea:hover { border-color: #b9c1d6; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 4px rgba(47, 84, 224, .16); }
input::placeholder, textarea::placeholder { color: #98a0b6; }
.field small.muted { display: block; margin-top: 5px; font-size: .78rem; }
.muted { color: var(--muted); }
.check input { border-radius: 6px; }

.notice { border-radius: 14px; padding: 12px 16px; font-size: .92rem; }

/* kimlik / kayıt / bilgi kartları */
.narrow { max-width: 520px; padding: 32px 28px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--sh); }
.narrow.prose { max-width: 700px; }
.narrow h1 { margin-bottom: .35em; }
.addr, .code { border-radius: 16px; }
@media (max-width: 639px) { .narrow { padding: 24px 18px; border-radius: 20px; } }

/* ---------- alt bilgi ---------- */
.site-footer { margin-top: 0; border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: .875rem; }
.foot-in { max-width: 1240px; margin: 0 auto; padding: 28px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.foot-brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.foot-brand .logo-mark { margin: 0; }
.foot-brand strong { display: block; color: var(--ink); font: 650 .95rem var(--ui); }
.foot-brand small { display: block; font-size: .8rem; color: var(--muted); }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot-links a, .foot-copy a { color: var(--muted); text-decoration: none; }
.foot-links a:hover, .foot-copy a:hover { color: var(--accent); }
.foot-copy { margin: 0; }
@media (max-width: 639px) { .foot-in { padding: 24px 18px 28px; flex-direction: column; align-items: flex-start; } .foot-brand { margin-right: 0; } }

.privacy-bar { border-radius: 16px; border-color: var(--line); box-shadow: var(--sh); font-family: var(--ui); }
.privacy-bar .btn { min-height: 36px; }

/* ================= EDİTÖR ================= */
body.editor .wrap { max-width: 1280px; padding-top: 28px; }
.editor { max-width: none; padding-bottom: 8px; }

.ed-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.ed-title h1 { margin: 10px 0 4px; }
.ed-title p { margin: 0; font-size: .95rem; }
.ed-pill { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 10px; border-radius: 99px; background: #fff; border: 1px solid var(--line); font: 600 .78rem var(--ui); color: var(--muted); }
.ed-pill i { width: 8px; height: 8px; border-radius: 50%; background: #aab1c5; }
.ed-pill.live { color: var(--ok); border-color: #b9e3cd; background: #eefaf3; }
.ed-pill.live i { background: var(--ok); box-shadow: 0 0 0 3px rgba(19, 128, 79, .18); }
.ed-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* özet kartları + ilerleme */
.dash { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; margin-bottom: 22px; align-items: stretch; }
.dash:not(:has(.progress:not([hidden]))) { grid-template-columns: 1fr; }
.dash-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dash-stats.empty { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px dashed #c3cadc; border-radius: var(--r); background: #fff; }
.dash-stats.empty p { margin: 0; color: var(--muted); font-size: .92rem; }
.stat { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: var(--sh-sm); color: var(--ink); font-size: inherit; }
.stat div { min-width: 0; }
.stat strong { display: block; font: 700 1.55rem/1.1 var(--ui); letter-spacing: -.02em; color: var(--ink); }
.stat small { display: block; margin-top: 3px; font-size: .78rem; color: var(--muted); }
.si { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }

.progress { margin: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: var(--sh-sm); display: flex; flex-direction: column; justify-content: center; }
.progress-head { margin-bottom: 10px; font-size: .95rem; }
.pbar { height: 8px; background: #e8ebf4; }
.pbar i { background: linear-gradient(90deg, #4f74f0, var(--accent)); }
.progress.is-done .pbar i { background: var(--ok); }
.progress .muted { margin: 10px 0 12px; line-height: 1.5; }
.progress a { font-weight: 600; text-decoration: none; }
.progress a:hover { text-decoration: underline; }
.progress .row-actions { margin: 0; }

/* bölüm gezinme çubuğu (masaüstü: yapışkan) */
.secnav { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 14px; padding: 0 0 2px; scrollbar-width: none; }
.secnav::-webkit-scrollbar { display: none; }
.secnav a { flex: none; padding: 7px 13px; border-radius: 99px; background: #fff; border: 1px solid var(--line); color: #3b435a; font: 500 .82rem var(--ui); text-decoration: none; white-space: nowrap; }
.secnav a:hover { background: var(--soft); color: var(--ink); }
.secnav a.on { background: var(--navy); border-color: var(--navy); color: #fff; }
@media (min-width: 980px) {
  .secnav { position: sticky; top: 72px; z-index: 12; margin: 0 -6px 14px; padding: 8px 6px; background: linear-gradient(var(--bg) 78%, rgba(244, 246, 251, 0)); }
}
@media (max-width: 979px) { .secnav { margin-left: -14px; margin-right: -14px; padding: 0 14px 4px; } }

/* form kartları */
.block-f { margin: 0 0 16px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: var(--sh-sm); scroll-margin-top: 130px; }
.block-f legend { float: left; width: 100%; margin: 0 0 14px; padding: 0; font: 650 1.02rem var(--ui); letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.block-f legend::before { content: ''; width: 4px; height: 18px; border-radius: 3px; background: var(--accent); }
.block-f legend + * { clear: both; }
.block-f > .hint { margin: -4px 0 14px; font-size: .85rem; }
.block-f .grid2 { gap: 0 16px; }
.rep-item { border: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #fafbfe; margin-bottom: 12px; }
.rep-item:focus-within { border-color: #b7c4f5; background: #fff; box-shadow: 0 0 0 3px rgba(47, 84, 224, .08); }
.rep-n { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.rep-tools button { color: #44507a; border-radius: 8px; }
.rep-tools button:hover:not(:disabled) { background: var(--soft); }
.rep-tools .rep-del { color: var(--danger); }
.mini { border-radius: 8px; border-color: #d3d9e6; }
.block-f > .btn.ghost.small { border-style: dashed; box-shadow: none; }

.addr-box, .danger-zone, .acct-box { margin: 0 0 16px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: var(--sh-sm); }
.addr-box summary, .danger-zone summary { cursor: pointer; font: 600 .95rem var(--ui); }
.danger-zone { margin-top: 0; border-color: #f0cfcb; background: #fffafa; }
.acct-box h2 { font-size: 1.05rem; }

/* kaydet çubuğu */
.savebar { position: sticky; bottom: 12px; z-index: 30; display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 10px 10px 10px 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, .94); box-shadow: 0 16px 40px -12px rgba(15, 23, 60, .3); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); flex-direction: row; justify-content: flex-start; }
.savebar .dirty { flex: 1; text-align: left; min-height: 0; font-size: .85rem; }
.savebar .dirty.on { color: #8a5a00; }
.savebar .btn { width: auto; }
.tabs { display: none; }

/* önizleme */
.pane-pv .pv-title { font: 650 .8rem var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.pv-frame { border-radius: 14px; box-shadow: var(--sh); background: #fff; }

@media (min-width: 980px) {
  .split, .split[data-view] { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 28px; }
  .pane-pv { top: 80px; max-height: calc(100vh - 170px); }
  .pv-frame { border: 1px solid var(--line); border-radius: 14px; }
}

/* ---- editör: mobil ---- */
@media (max-width: 979px) {
  body.editor .wrap { padding-bottom: 110px; }
  .ed-head { margin-bottom: 16px; }
  .ed-actions { width: 100%; }
  .ed-actions .btn { flex: 1; }
  .dash { grid-template-columns: 1fr; gap: 12px; margin-bottom: 16px; }
  .dash-stats { gap: 8px; }
  .stat { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .stat .si { width: 32px; height: 32px; border-radius: 10px; }
  .stat strong { font-size: 1.25rem; }
  .block-f { padding: 16px 14px; border-radius: 14px; }

  .savebar {
    position: fixed; left: 0; right: 0; bottom: 0; margin: 0; z-index: 45; gap: 10px; flex-direction: row; justify-content: stretch;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0;
    box-shadow: 0 -12px 30px -14px rgba(15, 23, 60, .3);
  }
  .tabs { display: flex; flex: none; position: static; margin: 0; padding: 4px; gap: 2px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); overflow: visible; }
  .tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 10px; background: none; color: var(--muted); font: 600 .85rem var(--ui); }
  .tabs button[aria-selected="true"] { background: #fff; color: var(--accent); box-shadow: 0 1px 3px rgba(15, 20, 50, .16); }
  .savebar .save-btn { flex: 1; min-height: 48px; padding: 0 14px; font-size: .95rem; }
  .savebar .dirty { display: none; position: absolute; left: 12px; right: 12px; top: -38px; flex: none; padding: 7px 12px; border-radius: 10px; background: #fff6e0; border: 1px solid #ecd08a; text-align: center; box-shadow: var(--sh-sm); }
  .savebar .dirty.on { display: block; }
  .pane-pv .pv-title { display: none; }
}
@media (max-width: 380px) { .tabs button span { display: none; } .tabs button { padding: 0 14px; } }

/* ================= CV GÖRÜNTÜLEME ================= */
body.cvpage { background: #e9ecf3; }
body.cvpage .wrap { max-width: 920px; padding-top: 22px; }

.cv-actions { max-width: 820px; margin: 0 auto 14px; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--sh-sm); flex-wrap: nowrap; }
.cv-back { display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 8px 4px; color: var(--muted); font: 500 .9rem var(--ui); text-decoration: none; }
.cv-back:hover { color: var(--ink); }
.cv-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-left: auto; }
.cv-acts .btn[hidden] { display: none; }

.cv-stats { max-width: 820px; margin: 0 auto 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding: 12px 18px; border: 1px solid #cfdafd; border-radius: 16px; background: var(--accent-soft); list-style: none; }
.cv-stats .cs-lead { display: flex; align-items: center; gap: 8px; margin: 0; font: 600 .85rem var(--ui); color: var(--accent-dark); }
.cv-stats dl { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 0 0 0 auto; }
.cv-stats dl div { display: flex; align-items: baseline; gap: 8px; }
.cv-stats dt { font: 500 .8rem var(--ui); color: #4a5a99; }
.cv-stats dd { margin: 0; font: 700 1.2rem var(--ui); color: var(--ink); }

.cv-frame { box-shadow: 0 20px 50px -20px rgba(15, 23, 60, .35), 0 2px 8px rgba(15, 23, 50, .08); border-radius: 6px; background: #fff; }
.cv-frame .cv { border: 0; border-radius: 6px; }
.cv-flash { max-width: 820px; }
.report-box { max-width: 820px; margin: 18px auto 0; padding: 14px 4px 0; border-top: 1px solid #d3d9e6; }
.report-box summary { color: var(--muted); }

@media (max-width: 699px) {
  body.cvpage .wrap { padding: 14px 12px 40px; }
  .cv-actions { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px; }
  .cv-back { padding: 2px 4px; }
  .cv-acts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0; }
  .cv-acts .btn { min-height: 46px; justify-content: flex-start; padding: 0 14px; }
  .cv-acts .btn:first-child { grid-column: 1 / -1; justify-content: center; min-height: 50px; }
  .cv-stats dl { margin-left: 0; width: 100%; justify-content: space-between; }
  body.cvpage .cv-frame { box-shadow: 0 10px 30px -14px rgba(15, 23, 60, .4); }
}

@media print {
  body, body.cvpage { background: #fff !important; }
  .cv-frame { box-shadow: none !important; border-radius: 0; }
  .cv-actions, .cv-stats, .site-header, .site-footer, .nav-scrim, .privacy-bar { display: none !important; }
}
.site-footer .foot-brand .logo-mark { color: #fff; }
.nav-x .ic { box-sizing: border-box !important; width: 20px !important; height: 20px !important; padding: 0 !important; background: none !important; color: var(--ink) !important; }
@media (min-width: 700px) {
  .cv-back { display: none; }
  .cv-actions { padding: 8px; }
  .cv-acts { flex-wrap: nowrap; width: 100%; justify-content: space-between; margin: 0; gap: 6px; }
  .cv-acts .btn.small { padding: 7px 10px; font-size: .82rem; white-space: nowrap; }
}
@media (min-width: 980px) { .secnav { flex-wrap: wrap; overflow: visible; } }
@media (max-width: 979px) { body.editor .site-footer { padding-bottom: 84px; } }
@media (min-width: 640px) { body.editor .wrap { max-width: 1240px; padding-left: 24px; padding-right: 24px; } }
