/* Performans Değerlendirme — tüm stiller.
   Palet ngphaselisbay.com'dan çıkarıldı. Mobil öncelikli: temel kurallar telefon
   içindir, media query'ler yalnız genişleyen ekran için ekleme yapar. */

:root {
  --sand:      #b5a898;
  --sand-dk:   #96876f;
  --sand-lt:   #e2ded7;
  --sand-pale: #f4f1ec;
  --bg:        #ffffff;
  --bg-2:      #faf8f5;
  --text:      #2b2622;
  --text-mid:  #6d655c;
  --text-lt:   #9a9186;
  --line:      #ddd7cf;
  --ok:        #4a7c59;
  --warn:      #b5844a;
  --danger:    #a34b3c;

  /* Başlıklar da gövdeyle aynı düz karakter; ayrım punto ve ağırlıkla yapılıyor. */
  --font-d: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-b: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius:    12px;
  --radius-sm: 8px;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --shadow:    0 1px 3px rgba(43, 38, 34, 0.06), 0 8px 24px rgba(43, 38, 34, 0.04);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* display:flex/grid taşıyan öğelerde hidden özniteliği aksi hâlde yutuluyor */
[hidden] { display: none !important; }
html { -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-b);
  background: var(--bg-2);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
}
img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font: inherit; border: none; background: none; color: inherit; }
:focus-visible { outline: 2px solid var(--sand-dk); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--font-d); font-weight: 600; line-height: 1.25;
             letter-spacing: -0.01em; }
h1 { font-size: clamp(1.5rem, 4vw, 2rem); }
h2 { font-size: clamp(1.2rem, 3vw, 1.45rem); }
h3 { font-size: 1.05rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- form elemanları --------------------------------------------------- */

label { display: block; font-size: 13px; color: var(--text-mid); margin-bottom: 5px; }
input, select, textarea {
  width: 100%;
  padding: 12px 13px;               /* 44px'e yakın dokunma hedefi */
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: 16px;                  /* iOS'ta 16px altı input odakta sayfayı zoomlar */
  transition: border-color 0.15s var(--ease);
}
input:focus, select:focus, textarea:focus { border-color: var(--sand-dk); outline: none; }
input::placeholder, textarea::placeholder { color: var(--text-lt); }
textarea { resize: vertical; min-height: 68px; }
input:disabled, textarea:disabled { background: var(--sand-pale); color: var(--text-mid); }

.alan { margin-bottom: 14px; }
.alan-ikili { display: grid; gap: 14px; }
@media (min-width: 640px) { .alan-ikili { grid-template-columns: 1fr 1fr; } }

.btn-primary, .btn-secondary, .btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: var(--radius-sm); font-weight: 600;
  font-size: 15px; transition: all 0.15s var(--ease); min-height: 46px;
}
.btn-primary { background: var(--sand-dk); color: #fff; }
.btn-primary:hover { background: var(--text); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--line); }
.btn-secondary:hover { border-color: var(--sand-dk); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-blok { width: 100%; }
.btn-mini { padding: 7px 12px; min-height: 0; font-size: 13px; border-radius: 6px; }

.link { color: var(--sand-dk); font-weight: 600; text-decoration: underline; }

/* --- giriş / kayıt ------------------------------------------------------ */

.login-wrap {
  min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center; padding: 24px 20px;
  background: linear-gradient(180deg, var(--sand-lt) 0%, var(--bg-2) 55%);
}
.login-box {
  width: 100%; max-width: 420px; background: var(--bg); padding: 30px 24px;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.login-logo { text-align: center; margin-bottom: 26px; }
.login-logo img { width: 100%; max-width: 200px; height: auto; margin: 0 auto; }
.login-logo p {
  margin-top: 10px; color: var(--text-mid); font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.login-box h1 { text-align: center; margin-bottom: 4px; }
.login-box .alt {
  text-align: center; color: var(--text-mid); font-size: 13px; margin-bottom: 24px;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.login-box .btn-primary { margin-top: 6px; }
.login-alt { text-align: center; margin-top: 18px; font-size: 14px; color: var(--text-mid); }

.adim { display: none; }
.adim.aktif { display: block; }
.adim-bilgi {
  background: var(--sand-pale); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px; margin-bottom: 18px; font-size: 14px;
}
.adim-bilgi strong { display: block; font-size: 16px; margin-bottom: 2px; }
.adim-bilgi span { color: var(--text-mid); }

.onay { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0; font-size: 13px; }
.onay input { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 1px; }
.onay label { margin: 0; font-size: 13px; color: var(--text-mid); }
.kvkk-metin {
  max-height: 130px; overflow-y: auto; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px; font-size: 12px; color: var(--text-mid); margin-bottom: 12px;
}

/* --- uygulama kabuğu ---------------------------------------------------- */

.ust {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg); border-bottom: 1px solid var(--line);
  padding: 12px 16px; display: flex; align-items: center; gap: 12px;
}
.ust .marka { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.ust .marka small {
  display: block; font-family: var(--font-b); font-size: 11px; font-weight: 400;
  color: var(--text-lt); letter-spacing: 0.06em; text-transform: uppercase;
}
.ust .bosluk { flex: 1; }
.ust .kim { font-size: 13px; color: var(--text-mid); text-align: right; }
.ust .kim strong { display: block; color: var(--text); }

.icerik { max-width: 860px; margin: 0 auto; padding: 20px 16px 60px; }
.genis { max-width: 1180px; }

.kart {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.kart-baslik { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.kart-baslik h2, .kart-baslik h3 { flex: 1; }

.bolum-etiket {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-lt); margin-bottom: 6px;
}

.rozet {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; white-space: nowrap;
  background: var(--sand-pale); color: var(--text-mid); border: 1px solid var(--line);
}
.rozet.bekliyor { background: #fdf5e6; color: var(--warn); border-color: #eadcc2; }
.rozet.tamam { background: #eef5f0; color: var(--ok); border-color: #cfe3d6; }
.rozet.hata { background: #fbeeec; color: var(--danger); border-color: #f0d4cf; }

.bos {
  text-align: center; padding: 46px 20px; color: var(--text-mid);
  background: var(--bg); border: 1px dashed var(--line); border-radius: var(--radius);
}

/* --- anket listesi ------------------------------------------------------ */

.anket-satir {
  display: flex; align-items: center; gap: 12px; padding: 15px 0;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.anket-satir:last-child { border-bottom: none; }
.anket-satir .ad { flex: 1; min-width: 0; }
.anket-satir .ad strong { display: block; }
.anket-satir .ad span { font-size: 13px; color: var(--text-mid); }
.anket-satir .puan {
  font-size: 20px; font-weight: 700; color: var(--sand-dk);
  font-variant-numeric: tabular-nums;
}

/* --- anket doldurma ----------------------------------------------------- */

.kriter { padding: 18px 0; border-bottom: 1px solid var(--line); }
.kriter:last-child { border-bottom: none; padding-bottom: 0; }
.kriter > p { margin-bottom: 12px; font-weight: 500; }

.olcek { display: flex; gap: 8px; flex-wrap: wrap; }
.olcek button {
  flex: 1 1 52px; min-width: 52px; min-height: 48px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); font-weight: 600; font-size: 16px;
  transition: all 0.12s var(--ease);
}
.olcek button:hover { border-color: var(--sand-dk); }
.olcek button[aria-pressed="true"] { background: var(--sand-dk); color: #fff; border-color: var(--sand-dk); }
.olcek button.na { flex: 0 0 62px; font-size: 13px; color: var(--text-mid); }
.olcek button.na[aria-pressed="true"] { background: var(--text-mid); color: #fff; }

.olcek-yardim { font-size: 12px; color: var(--text-lt); margin-top: 8px; min-height: 18px; }
.kriter textarea { margin-top: 10px; }
.kriter .zorunlu-not { font-size: 12px; color: var(--warn); margin-top: 6px; }

.karsilastir {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px;
  font-size: 13px;
}
.karsilastir div {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 8px 10px;
}
.karsilastir span { display: block; color: var(--text-lt); font-size: 11px; }
.karsilastir.fark div { border-color: var(--warn); background: #fdf5e6; }

.gizli-not {
  background: var(--sand-pale); border-left: 3px solid var(--sand);
  padding: 10px 14px; font-size: 13px; color: var(--text-mid);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-bottom: 16px;
}

.alt-cubuk {
  position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--line);
  padding: 12px 16px; display: flex; gap: 10px; align-items: center;
  margin: 20px -16px -60px; box-shadow: 0 -4px 16px rgba(43, 38, 34, 0.05);
}
.alt-cubuk .durum { flex: 1; font-size: 12px; color: var(--text-lt); }

.sonuc-kutu { text-align: center; padding: 26px 16px; }
.sonuc-kutu .buyuk {
  font-size: 48px; font-weight: 700; color: var(--sand-dk); line-height: 1;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.sonuc-kutu .alt { color: var(--text-mid); font-size: 13px; margin-top: 6px; }

/* --- yönetim paneli: sol menü ------------------------------------------- */
/* Masaüstünde sabit sol bar; 980px altında dışarı kayan (off-canvas) panel. */

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

.yan-bar {
  width: 236px; flex: 0 0 236px;
  background: var(--bg); border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.yan-logo { padding: 22px 20px 18px; border-bottom: 1px solid var(--line); }
.yan-logo img { width: 100%; max-width: 168px; height: auto; }
.yan-logo small {
  display: block; margin-top: 8px; font-size: 11px; color: var(--text-lt);
  letter-spacing: 0.07em; text-transform: uppercase;
}

.yan-menu { flex: 1; padding: 12px 10px; overflow-y: auto; }
.yan-menu button {
  display: block; width: 100%; text-align: left;
  padding: 11px 14px; margin-bottom: 2px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--text-mid);
  transition: background 0.12s var(--ease), color 0.12s var(--ease);
}
.yan-menu button:hover { background: var(--bg-2); color: var(--text); }
.yan-menu button[aria-selected="true"] {
  background: var(--sand-pale); color: var(--text); font-weight: 600;
  box-shadow: inset 3px 0 0 var(--sand-dk);
}

.yan-alt {
  padding: 14px 16px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.yan-alt .kim { flex: 1; text-align: left; font-size: 12px; color: var(--text-mid); }
.yan-alt .kim strong { display: block; color: var(--text); font-size: 13px; }

.panel-icerik {
  flex: 1; min-width: 0; padding: 26px 28px 60px; max-width: 1280px;
}

.yan-ac {
  display: none; position: fixed; top: 12px; left: 12px; z-index: 40;
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--line); font-size: 18px;
  box-shadow: var(--shadow);
}
.yan-perde {
  display: none; position: fixed; inset: 0; z-index: 30;
  background: rgba(43, 38, 34, 0.4);
}

@media (max-width: 980px) {
  .yan-ac { display: block; }
  .yan-perde:not([hidden]) { display: block; }
  .yan-bar {
    position: fixed; z-index: 35; left: 0; top: 0;
    transform: translateX(-100%); transition: transform 0.22s var(--ease);
    box-shadow: 0 0 40px rgba(43, 38, 34, 0.18);
  }
  .yan-bar.acik { transform: translateX(0); }
  .panel-icerik { padding: 66px 16px 60px; }
}

/* --- tablo (yönetim) ---------------------------------------------------- */

.tablo-sar { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
th, td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: left; }
th {
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-lt); font-weight: 600; white-space: nowrap;
}
tbody tr:hover { background: var(--bg-2); }
tbody tr.secilebilir { cursor: pointer; }

th.sirala { cursor: pointer; user-select: none; white-space: nowrap; }
th.sirala:hover { color: var(--text); }
th.sirala::after { content: '↕'; opacity: 0.25; margin-left: 5px; font-size: 10px; }
th.sirala.artan::after  { content: '↑'; opacity: 1; color: var(--sand-dk); }
th.sirala.azalan::after { content: '↓'; opacity: 1; color: var(--sand-dk); }

/* --- sayfalama ---------------------------------------------------------- */

.sayfalama {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  flex-wrap: wrap; padding-top: 16px; margin-top: 4px;
  border-top: 1px solid var(--line);
}
.sayfalama button {
  min-width: 38px; height: 38px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); font-size: 14px; font-weight: 500; color: var(--text-mid);
}
.sayfalama button:hover:not(:disabled) { border-color: var(--sand-dk); color: var(--text); }
.sayfalama button.aktif {
  background: var(--sand-dk); border-color: var(--sand-dk); color: #fff; font-weight: 600;
}
.sayfalama .bilgi { color: var(--text-lt); font-size: 13px; margin: 0 10px; }
.sayfalama .aralik { color: var(--text-lt); padding: 0 4px; }

/* --- gizli şifre alanı --------------------------------------------------- */

.sifre-kutu {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.sifre-kutu code {
  flex: 1; font-size: 15px; letter-spacing: 0.06em; color: var(--text);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}
.sifre-kutu code.gizli { letter-spacing: 0.2em; color: var(--text-lt); }

.sekmeler {
  display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line);
  margin-bottom: 18px; -webkit-overflow-scrolling: touch;
}
.sekmeler button {
  padding: 12px 16px; font-size: 14px; font-weight: 600; color: var(--text-mid);
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.sekmeler button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--sand-dk); }
.sekme { display: none; }
.sekme.aktif { display: block; }

.alan-not {
  display: block; margin-top: 6px; font-size: 12px; line-height: 1.5;
  color: var(--text-mid);
}
.alan-not em { color: var(--danger); font-style: normal; font-weight: 600; }

/* --- rapor özeti -------------------------------------------------------- */

.ozet-satir { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .ozet-satir { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1100px) { .ozet-satir { grid-template-columns: repeat(7, 1fr); } }
.ozet-kutu {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.ozet-kutu span {
  display: block; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text-lt); margin-bottom: 4px; line-height: 1.3; min-height: 28px;
}
.ozet-kutu strong { font-size: 24px; font-weight: 700;
                    font-variant-numeric: tabular-nums; }
.ozet-kutu strong.tamam { color: var(--ok); }
.ozet-kutu strong.bekliyor { color: var(--warn); }
.ozet-kutu strong.hata { color: var(--danger); }

.artis { color: var(--ok); font-weight: 600; white-space: nowrap; }
.dusus { color: var(--danger); font-weight: 600; white-space: nowrap; }

/* --- toast -------------------------------------------------------------- */

/* Boşken tamamen kapalı: yalnız transform ile itmek kısa metinlerde alt kenardan
   siyah bir şerit sızdırıyordu. */
#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px);
  background: var(--text); color: #fff; padding: 13px 20px; border-radius: var(--radius-sm);
  font-size: 14px; max-width: calc(100vw - 32px); z-index: 100;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease), visibility 0.2s;
  white-space: pre-line; text-align: left;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
#toast.hata { background: var(--danger); }

.somediart {
  display: block; text-align: center; padding: 20px; font-size: 11px;
  color: var(--text-lt); letter-spacing: 0.06em;
}

/* --- puan ölçeği kutusu --------------------------------------------- */
.baslik-satir { display: flex; align-items: center; gap: 12px; }
.baslik-satir .bolum-etiket { margin: 0; }
.baslik-satir button { margin-left: auto; flex: none; }

.ortu {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(20, 18, 16, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto;
}
.ortu-kart {
  background: var(--bg); border-radius: var(--radius); padding: 20px;
  width: min(560px, 100%); max-height: 90vh; overflow-y: auto;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .22);
}
.olcek-madde {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.olcek-madde:last-child { border-bottom: none; }
.olcek-puan {
  flex: none; width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center; font-weight: 600;
  background: var(--sand-pale); color: var(--sand-dk);
}
/* Yalnız açıklama satırı — rozet de bir span, onu ezmesin. */
.olcek-madde div span { display: block; color: var(--text-mid); font-size: 13px;
  margin-top: 2px; line-height: 1.45; }

/* Yorum zorunlu olan (1 ve 5 puan) sorular */
.yorum-uyari { color: var(--danger); font-weight: 600; }
.kriter.yorum-eksik textarea {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(163, 75, 60, .08);
}
.kriter.yorum-eksik textarea:focus { outline-color: var(--danger); }
