/* ==========================================================================
   Burs Yönetim Sistemi — Kurumsal Tasarım Sistemi (v4.0)
   Ankara Üniversitesi kurumsal kimliği · açık tema · tek dosya, bağımlılıksız
   Sözleşme: includes/layout.php içindeki sınıf listesi (HTML değişmedi)

   Renk kullanım kuralı
     #003366  kurumsal lacivert — üst bar, başlık, bağlantı, birincil eylem
     #1E2A38  koyu slate       — alt bilgi
     #E5C97B  kurumsal altın   — YALNIZCA ince vurgu (aktif sekme çizgisi,
                                 rozet ayrıntısı). Asla büyük dolgu/gradyan.
   ========================================================================== */

/* ==========================================================================
   Yazı tipi — Montserrat (yerel, değişken ağırlık 400–700, dış istek yok)
   ========================================================================== */
@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-latin-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304-0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
                 U+A720-A7FF;
}

/* ==========================================================================
   Tasarım jetonları
   ========================================================================== */
:root {
  /* Kurumsal renkler */
  --navy:      #003366;
  --navy-dark: #002348;
  --slate:     #1E2A38;
  --gold:      #E5C97B;

  /* Metin */
  --ink:  #333333;   /* başlık / veri */
  --body: #535353;   /* gövde metni */
  --mut:  #6B7280;   /* ikincil, ipucu, etiket */

  /* Yüzeyler */
  --surface:   #FFFFFF;
  --page:      #F8F9FA;
  --surface-2: #F1F3F5;   /* tablo başlığı, sakin şerit */
  --zebra:     #FAFBFC;   /* tablo tek satır */
  --row-hover: #F1F5F9;   /* tablo satır vurgusu */
  --tint-navy: #F5F8FC;   /* lacivert temelli en açık vurgu zemini */

  /* Çizgiler */
  --line:      #DDDDDD;
  --line-soft: #E5E7EB;
  --line-hover: rgba(0, 51, 102, .30);   /* hover'da koyulaşan kenarlık */
  --ring-focus: rgba(0, 51, 102, .15);   /* odak halkası */

  /* Durum renkleri (kurumsal, düşük doygunluk) */
  --ok:   #1E7E4F;
  --err:  #B3261E;
  --warn: #8A6100;
  --info: #003366;

  /* Durum zeminleri — beyaz üstüne bindirilir (bkz. .alert / .badge).
     Başarı yeşili %10'da AA sınırında kaldığı için %8 kullanılır. */
  --ok-bg:   rgba(30, 126, 79, .08);
  --err-bg:  rgba(179, 38, 30, .10);
  --warn-bg: rgba(138, 97, 0, .10);
  --info-bg: rgba(0, 51, 102, .10);

  --ok-line:   rgba(30, 126, 79, .32);
  --err-line:  rgba(179, 38, 30, .32);
  --warn-line: rgba(138, 97, 0, .32);
  --info-line: rgba(0, 51, 102, .28);

  /* Yarıçap — resmi, dar bant: düğme/alan 4px, kart/kapsayıcı 6px */
  --r-xs: 4px;
  --r-md: 6px;

  /* Gölge — yalnızca nötr ve çok hafif */
  --sh-1: 0 1px 2px rgba(0, 0, 0, .06);
  --sh-2: 0 2px 6px rgba(0, 0, 0, .08);
  --sh-3: 0 8px 28px rgba(0, 0, 0, .16);

  /* Geçiş */
  --t-fast: 120ms ease;
  --t:      180ms ease;

  /* Ölçü */
  --container: 1120px;
  --topbar-h: 64px;
  --ring-size: 132px;

  /* Halka basamakları */
  --ring-track: var(--line-soft);
  --ring-low:   var(--warn);
  --ring-mid:   var(--navy);
  --ring-high:  var(--navy);
  --ring-top:   var(--ok);

  /* Üst çubuğun gerçek yüksekliği — app.js ölçüp günceller (mobilde sarınca
     büyür). JS yoksa tasarım değeri geçerli kalır. */
  --topbar-real: var(--topbar-h);
}

/* ==========================================================================
   Sıfırlama / temel
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; }

/* app.js gizlediği öğeler (upload ilerlemesi, dosya listesi) sınıf tabanlı
   display kurallarıyla geri gelmesin */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--body);
  background: var(--page);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  line-height: 1.3;
  font-weight: 600;
  color: var(--ink);
}
h1 { font-weight: 700; }

p { line-height: 1.65; }

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { display: block; max-width: 100%; }
strong { font-weight: 600; color: var(--ink); }
::selection { background: rgba(0, 51, 102, .14); color: var(--ink); }

/* Klavye odağı — kurumsal lacivert halka */
:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
/* Lacivert zemin üzerinde lacivert halka görünmez: beyaza döner */
.topbar :focus-visible,
.footer :focus-visible { outline-color: var(--surface); }

/* ==========================================================================
   Üst çubuk
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--navy);
  border-bottom: 1px solid var(--navy-dark);
}

.topbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  min-height: var(--topbar-h);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--surface);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .01em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand em {
  font-style: normal;
  color: rgba(255, 255, 255, .72);
  font-weight: 400;
  font-size: .88rem;
}

/* Kurumsal amblem — logo saydam zeminli ve lacivert-altın olduğu için
   lacivert üst çubukta kaybolmasın diye BEYAZ daire üzerinde durur. */
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface);
  padding: 3px;
  object-fit: contain;
  flex: none;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: .1rem;
  margin-left: auto;
}

.nav-link {
  position: relative;
  padding: .55rem .8rem;
  color: rgba(255, 255, 255, .86);
  font-size: .9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-link:hover {
  color: var(--surface);
  background: rgba(255, 255, 255, .10);
  text-decoration: none;
}
.nav-link.active { color: var(--surface); font-weight: 600; }
/* Aktif sekme göstergesi — 3px kurumsal altın çizgi */
.nav-link.active::after {
  content: "";
  position: absolute;
  left: .55rem;
  right: .55rem;
  bottom: -2px;
  height: 3px;
  background: var(--gold);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding-left: 1.1rem;
  border-left: 1px solid rgba(255, 255, 255, .22);
  color: rgba(255, 255, 255, .86);
  font-size: .88rem;
  white-space: nowrap;
}

/* Üst çubuktaki ikincil düğme (Çıkış) lacivert zemine uyar */
.topbar .btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, .45);
  color: var(--surface);
}
.topbar .btn-ghost:hover {
  background: rgba(255, 255, 255, .12);
  border-color: var(--surface);
  color: var(--surface);
}

/* ==========================================================================
   Yerleşim
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  flex: 1;
}

body.area-guest .container {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.footer {
  background: var(--slate);
  padding: 1.5rem;
  text-align: center;
  color: rgba(255, 255, 255, .75);
  font-size: .82rem;
  line-height: 1.6;
}
.footer a { color: rgba(255, 255, 255, .9); text-decoration: underline; }

/* ==========================================================================
   Kartlar
   ========================================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.5rem;
  box-shadow: var(--sh-1);
  margin-bottom: 1.4rem;
  transition: border-color var(--t);
}
.card:hover { border-color: var(--line-hover); }

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  padding-bottom: .7rem;
  margin-bottom: .9rem;
  border-bottom: 1px solid var(--line);
}
/* İçerikten sonra gelen başlık (kart dışı bölüm başlıkları) nefes alsın;
   kartın ilk çocuğu olan başlık etkilenmez */
.card-title:not(:first-child) { margin-top: 1.5rem; }

/* Başlık satırında sağa yaslanan eylem (ör. "Excel'e Aktar" butonu) */
.ml-auto { margin-left: auto; }

.card-sub {
  color: var(--mut);
  font-size: .88rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* ---------- Izgara ---------- */
.grid { display: grid; gap: 1.1rem; margin-bottom: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid .card { margin-bottom: 0; }

/* ---------- İstatistik ---------- */
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--sh-1);
  transition: border-color var(--t);
}
.stat:hover { border-color: var(--line-hover); }

.stat-num {
  font-size: clamp(1.75rem, 3.4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  margin-top: .3rem;
  color: var(--mut);
  font-size: .76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-top: .6rem;
  padding: .14rem .5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--mut);
  font-size: .73rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.stat-trend::before { content: "•"; line-height: 1; }
.stat-trend.is-up {
  color: var(--ok);
  border-color: var(--ok-line);
  background: linear-gradient(var(--ok-bg), var(--ok-bg)) var(--surface);
}
.stat-trend.is-up::before { content: "↑"; }
.stat-trend.is-down {
  color: var(--err);
  border-color: var(--err-line);
  background: linear-gradient(var(--err-bg), var(--err-bg)) var(--surface);
}
.stat-trend.is-down::before { content: "↓"; }

/* ==========================================================================
   Düğmeler
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .6rem 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--r-xs);
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  user-select: none;
}
.btn:hover { text-decoration: none; }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--surface);
}
.btn-primary:hover { background: var(--navy-dark); border-color: var(--navy-dark); }

.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--mut); }

.btn-danger {
  background: var(--err);
  border-color: var(--err);
  color: var(--surface);
}
/* Koyulaşma düz siyah örtü ile: palete yeni renk girmez */
.btn-danger:hover { background: linear-gradient(rgba(0, 0, 0, .16), rgba(0, 0, 0, .16)) var(--err); }

.btn-sm { padding: .38rem .75rem; font-size: .82rem; }
.btn-block { width: 100%; }

/* ==========================================================================
   Formlar
   ========================================================================== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: start;   /* hücreler satır yüksekliğine gerilmesin */
  gap: 1rem 1.2rem;
  margin-bottom: 1.2rem;
}

.field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }

.field > label {
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink);
}
.field > label .req,
.field > label > em { color: var(--err); font-style: normal; }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .6rem .8rem;
  border-radius: var(--r-xs);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: .92rem;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field textarea { min-height: 104px; resize: vertical; line-height: 1.55; }

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .8rem center;
  padding-right: 2.2rem;
}
.field select option { background: var(--surface); color: var(--ink); }

.field input::placeholder,
.field textarea::placeholder { color: var(--mut); }

.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--mut); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px var(--ring-focus);
}

.field input:disabled,
.field select:disabled,
.field textarea:disabled {
  background: var(--surface-2);
  color: var(--mut);
  cursor: not-allowed;
}

/* Radyo / onay kutuları satır içi */
.field input[type="checkbox"],
.field input[type="radio"] {
  width: auto;
  accent-color: var(--navy);
}

.field-hint { font-size: .78rem; color: var(--mut); line-height: 1.5; }

.field-error {
  font-size: .79rem;
  color: var(--err);
  font-weight: 600;
  line-height: 1.5;
}
.field-error:not(:empty) { display: flex; align-items: baseline; gap: .3rem; }
.field-error:not(:empty)::before { content: "!"; font-weight: 700; }

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--err); }

/* Koşullu alanlar ([data-show-when]) gizlenince */
[data-show-when][hidden] { display: none !important; }

/* ==========================================================================
   Uyarı kutuları — %8 opak zemin BEYAZ üstüne biner (gri sayfa zemininde de
   kontrast sabit kalır), solda 3px durum şeridi
   ========================================================================== */
.alert {
  padding: .8rem 1rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--mut);
  border-radius: var(--r-xs);
  margin-bottom: 1.1rem;
  background: var(--surface);
  color: var(--ink);
  font-size: .9rem;
  line-height: 1.55;
  display: flex;
  align-items: baseline;
  gap: .55rem;
  transition: opacity 320ms ease, transform 320ms ease;
}
.alert::before { flex: none; font-weight: 700; }

.alert-success {
  background: linear-gradient(var(--ok-bg), var(--ok-bg)) var(--surface);
  border-color: var(--ok-line);
  border-left-color: var(--ok);
  color: var(--ok);
}
.alert-success::before { content: "✓"; }

.alert-error {
  background: linear-gradient(var(--err-bg), var(--err-bg)) var(--surface);
  border-color: var(--err-line);
  border-left-color: var(--err);
  color: var(--err);
}
.alert-error::before { content: "✕"; }

.alert-info {
  background: linear-gradient(var(--info-bg), var(--info-bg)) var(--surface);
  border-color: var(--info-line);
  border-left-color: var(--info);
  color: var(--info);
}
.alert-info::before { content: "i"; }

.alert-warn {
  background: linear-gradient(var(--warn-bg), var(--warn-bg)) var(--surface);
  border-color: var(--warn-line);
  border-left-color: var(--warn);
  color: var(--warn);
}
.alert-warn::before { content: "!"; }

/* app.js — 6 sn sonraki yumuşak kaybolma */
.alert.fade-out { opacity: 0; transform: translateY(-4px); }

/* ==========================================================================
   Rozetler ve bilgi hapları
   ========================================================================== */
.badge,
.chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--body);
  font-size: .76rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

/* Rozetin durum noktası — küçük ayrıntı, metin rengini izler */
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.badge-ok,   .chip-ok {
  background: linear-gradient(var(--ok-bg), var(--ok-bg)) var(--surface);
  border-color: var(--ok-line);
  color: var(--ok);
}
.badge-bad,  .chip-bad {
  background: linear-gradient(var(--err-bg), var(--err-bg)) var(--surface);
  border-color: var(--err-line);
  color: var(--err);
}
.badge-warn, .chip-warn {
  background: linear-gradient(var(--warn-bg), var(--warn-bg)) var(--surface);
  border-color: var(--warn-line);
  color: var(--warn);
}
.badge-info, .chip-info {
  background: linear-gradient(var(--info-bg), var(--info-bg)) var(--surface);
  border-color: var(--info-line);
  color: var(--info);
}

/* Altın hap: zemin/kenarlık altın vurgu, metin okunur lacivert */
.chip-gold {
  background: rgba(229, 201, 123, .22);
  border-color: var(--gold);
  color: var(--navy);
}

/* ==========================================================================
   Tablolar — resmi liste görünümü
   ========================================================================== */
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--sh-1);
  margin-bottom: 1.4rem;
}

/* Kart içindeki tablo kendi çerçevesini bırakır: iç içe kutu yerine
   üstten/alttan ince çizgiyle ayrılmış veri bölgesi */
.card > .table-wrap,
.doc-card > .table-wrap {
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  box-shadow: none;
}
.card > .table-wrap:last-child,
.doc-card > .table-wrap:last-child { margin-bottom: 0; }

table.tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .88rem;
}

.tbl th, .tbl td {
  padding: .7rem 1rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line-soft);
}

.tbl thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-2);
  color: var(--ink);
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

.tbl tbody tr { background: var(--surface); transition: background var(--t-fast); }
.tbl tbody tr:nth-child(even) { background: var(--zebra); }
.tbl tbody tr:hover { background: var(--row-hover); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl td { color: var(--ink); }
.tbl td .btn { margin: .1rem .15rem .1rem 0; }

/* Satırın herhangi bir yerine tıklanınca detaya gider (JS: tr[data-href]).
   Klavye erişimi satırdaki bağlantı üzerinden sürer. */
.tbl tbody tr.row-link { cursor: pointer; }

/* ==========================================================================
   Belgeler
   ========================================================================== */
.doc-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.5rem;
  box-shadow: var(--sh-1);
  margin-bottom: 1.4rem;
  transition: border-color var(--t);
}
.doc-card:hover { border-color: var(--line-hover); }

.doc-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xs);
  background: var(--surface);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.doc-item:hover { background: var(--tint-navy); border-color: var(--line-hover); }

.doc-item .doc-name {
  font-weight: 600;
  font-size: .9rem;
  color: var(--ink);
  word-break: break-word;
  min-width: 0;
}
.doc-item .doc-meta {
  color: var(--mut);
  font-size: .78rem;
  margin-top: .1rem;
}
.doc-item > div:first-child { flex: 1; min-width: 0; }
.doc-item .badge,
.doc-item .btn { flex: none; }

/* ==========================================================================
   Form içi evrak bloğu — başvuru formunda sorunun hemen altında.
   Soruya ait olduğu belli olsun diye .field'ın İÇİNE girer; ince altın şerit
   ve hafif lacivert zemin onu form alanlarından ayırır ama koparmaz.
   ========================================================================== */
.form-doc {
  position: relative;
  margin-top: .55rem;
  padding: .8rem .9rem .85rem 1rem;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: var(--r-md);
  background:
    linear-gradient(var(--tint-navy), var(--tint-navy)) padding-box,
    var(--surface);
  overflow: hidden;
}
/* Sol kimlik şeridi — altın, ince, yalnızca vurgu */
.form-doc::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--gold);
}
.form-doc.is-done::before { background: var(--ok); }
.form-doc[hidden] { display: none; }

.form-doc-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem .5rem;
  margin-bottom: .3rem;
}
.form-doc-title {
  display: flex;
  align-items: center;
  gap: .4rem;
  min-width: 0;
  color: var(--navy);
  font-size: .84rem;
  font-weight: 700;
  line-height: 1.35;
}
/* Ataç simgesi — belgeyi işaret eden küçük ayrıntı */
.form-doc-title::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23003366' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48'/%3E%3C/svg%3E") center / contain no-repeat;
}
.form-doc-head .badge { flex: none; }

.form-doc-info { min-width: 0; }

.form-doc-hint {
  margin: 0 0 .55rem;
  color: var(--mut);
  font-size: .77rem;
  line-height: 1.5;
}

/* Yüklenmiş dosyalar — kompakt satırlar */
.form-doc-files {
  list-style: none;
  margin: 0 0 .55rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.form-doc-files li {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .38rem .55rem;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: var(--surface);
  font-size: .8rem;
}
.form-doc-files li::before {
  content: "";
  flex: none;
  width: 13px;
  height: 13px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E7E4F' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
}
.form-doc-file {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.form-doc-date { flex: none; color: var(--mut); font-size: .74rem; }
.form-doc-files .btn { flex: none; }

/* Grid hücresi olarak duran evrak kartları (bölüm sonu şeridi + Belgeler bölümü) */
.form-grid > .form-doc { margin-top: 0; height: 100%; }

/* ---------- Bölüm sonu evrak şeridi ----------
   Sorular grid'de kalır, belgeler bölümün sonunda toplanır: soru sütunları
   asla kaymaz, komşu hücrede boşluk oluşmaz. */
.form-doc-strip {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line-soft);
}
.form-doc-strip-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .85rem;
  color: var(--navy);
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}
/* Başlığın iki yanına ince altın vurgu */
.form-doc-strip-title::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--gold);
  flex: none;
}
.form-doc-strip .form-grid { margin-bottom: 0; }

@media (max-width: 620px) {
  .form-doc { padding: .7rem .75rem .75rem .85rem; }
  .form-doc-files li { flex-wrap: wrap; }
  .form-doc-date { order: 3; }
}

/* ---------- Yükleme bölgesi ---------- */
.upload-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  text-align: center;
  padding: 2rem 1.4rem;
  border: 2px dashed var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--body);
  font-size: .9rem;
  cursor: pointer;
  transition: border-color var(--t), background var(--t), color var(--t);
}
.upload-zone::before {
  content: "";
  width: 34px;
  height: 34px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23003366' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E") center / contain no-repeat;
  flex: none;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--navy);
  background: var(--tint-navy);
  color: var(--navy);
}

.upload-zone.uploading {
  pointer-events: none;
  border-style: solid;
  border-color: var(--navy);
  background: var(--tint-navy);
  color: var(--navy);
}

.upload-zone .upload-hint { font-size: .79rem; color: var(--mut); }
.upload-zone:hover .upload-hint,
.upload-zone.dragover .upload-hint { color: var(--body); }

/* Küçük yükleme bölgesi — form içinde dev bir kutu yer kaplamasın */
.upload-zone-sm {
  padding: .95rem .8rem;
  gap: .25rem;
  font-size: .82rem;
  border-width: 1px;
  background: var(--surface);
}
.upload-zone-sm::before { width: 22px; height: 22px; }
.upload-zone-sm p { margin: 0; }
.upload-zone-sm .upload-hint { font-size: .73rem; }


/* app.js'in zone içine bastığı mesaj */
.upload-msg {
  font-size: .83rem;
  font-weight: 600;
  line-height: 1.5;
}
.upload-msg.is-error { color: var(--err); }
.upload-msg.is-info  { color: var(--navy); }

/* Yüzdeli ilerleme (XHR) */
.upload-progress {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.upload-progress .progress { height: 6px; }

.upload-pct {
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  font-size: .76rem;
  font-weight: 600;
  color: var(--body);
  font-variant-numeric: tabular-nums;
}
.upload-pct .up-count { color: var(--mut); font-weight: 500; }

.upload-files {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  text-align: left;
}
.upload-file {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .79rem;
  color: var(--body);
}
.upload-file .uf-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-file .uf-state {
  flex: none;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--mut);
}
.upload-file.is-active .uf-state { color: var(--navy); }
.upload-file.is-done   .uf-state { color: var(--ok); }
.upload-file.is-error  .uf-state,
.upload-file.is-error  .uf-name  { color: var(--err); }

/* ==========================================================================
   Adım göstergesi — yatay, resmi
   ========================================================================== */
.steps {
  display: flex;
  counter-reset: bys-step;
  margin: 0 0 1.6rem;
  padding: 0;
  list-style: none;
}

.step {
  counter-increment: bys-step;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  position: relative;
  text-align: center;
  color: var(--mut);
  font-size: .79rem;
  font-weight: 500;
  line-height: 1.35;
}

/* Yuvarlak numara */
.step::before {
  content: counter(bys-step);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .86rem;
  font-weight: 700;
  color: var(--mut);
  background: var(--surface);
  border: 1px solid var(--line);
  position: relative;
  z-index: 1;
  transition: border-color var(--t), color var(--t), background var(--t);
}

/* Bağlantı çizgisi */
.step::after {
  content: "";
  position: absolute;
  top: 16px;
  left: calc(50% + 22px);
  right: calc(-50% + 22px);
  height: 1px;
  background: var(--line);
}
.step:last-child::after { display: none; }

.step.active { color: var(--navy); font-weight: 600; }
.step.active::before {
  border-color: var(--navy);
  border-width: 2px;
  color: var(--navy);
  background: var(--surface);
}

.step.done { color: var(--body); }
.step.done::before {
  content: "✓";
  background: var(--navy);
  border-color: var(--navy);
  color: var(--surface);
}
.step.done::after { background: var(--navy); }

/* ==========================================================================
   Modal
   ========================================================================== */
.modal-back {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(30, 42, 56, .55);
  opacity: 0;
  visibility: hidden;
  /* visibility açılışta anında, kapanışta solma bitince değişir:
     geçiş süresi boyunca hidden kalırsa app.js'in odak taşıması reddedilir. */
  transition: opacity var(--t), visibility 0s linear 180ms;
}
.modal-back.open {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--t), visibility 0s;
}

.modal {
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--navy);
  border-radius: var(--r-md);
  box-shadow: var(--sh-3);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--line);
}
.modal-head h3,
.modal-head .modal-title {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--navy);
}

/* Kapat düğmesi (JS .modal-close ve [data-modal-close] dinler) */
.modal-close, .modal [data-modal-close] { cursor: pointer; }
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--r-xs);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--body);
  font-size: 1.05rem;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
  flex: none;
}
.modal-close:hover { color: var(--ink); border-color: var(--mut); background: var(--surface-2); }

.modal-body {
  padding: 1.3rem 1.4rem;
  overflow-y: auto;
  color: var(--body);
  font-size: .92rem;
  line-height: 1.65;
}
.modal-body > :last-child { margin-bottom: 0; }

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: .6rem;
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--line);
  background: var(--page);
  border-radius: 0 0 var(--r-md) var(--r-md);
}

body.modal-open { overflow: hidden; }

/* ==========================================================================
   Giriş ekranı
   ========================================================================== */
/* ==========================================================================
   Giriş ekranı — tam sayfa arka plan görseli, ortada tek kart
   (tanıtım metinleri kaldırıldı; sayfa yalnızca giriş kartından oluşur)
   ========================================================================== */
body.area-guest {
  background-image:
    linear-gradient(180deg, rgba(0, 35, 72, .34), rgba(0, 35, 72, .52)),
    url("bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
/* Alt bilgi zemin üstünde ağır durmasın */
body.area-guest .footer {
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .82);
}
body.area-guest .container {
  display: flex;
  flex-direction: column;   /* flash mesajları kartın YANINA değil ÜSTÜNE */
  justify-content: center;
}

.login-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 2rem 0 2.5rem;
}

/* Giriş kartının altındaki duyurular (yalnızca duyuru varsa görünür) */
.login-duyurular {
  width: 100%;
  padding: 1.1rem 1.2rem;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .93);
  border: 1px solid var(--line);
  box-shadow: var(--sh-2);
}
.login-duyuru-baslik {
  margin: 0 0 .6rem;
  color: var(--navy);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.login-duyuru { padding: .6rem 0; border-bottom: 1px solid var(--line-soft); }
.login-duyuru:last-child { border-bottom: 0; padding-bottom: 0; }
.login-duyuru:first-of-type { padding-top: 0; }
.login-duyuru-ust {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .7rem;
  margin-bottom: .2rem;
}
.login-duyuru-ad { color: var(--navy); font-size: .9rem; font-weight: 700; }
.login-duyuru-tarih { color: var(--mut); font-size: .75rem; flex: none; }
.login-duyuru-metin { margin: 0; color: var(--body); font-size: .86rem; line-height: 1.6; }

.login-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--navy);
  border-radius: var(--r-md);
  padding: 1.8rem;
  box-shadow: var(--sh-3);   /* zemin görseli üstünde ayrışsın */
}
.login-card .card-title { font-size: 1.1rem; }
.login-card .field { margin-bottom: .9rem; }
.login-card .btn-block { margin-top: .4rem; }


/* ==========================================================================
   Boş durum
   ========================================================================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .6rem;
  padding: 2.6rem 1.5rem;
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--mut);
}
.empty-state::before {
  content: "";
  width: 38px;
  height: 38px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='1.5'/%3E%3Cpath d='M7 9h10M7 13h6'/%3E%3C/svg%3E") center / contain no-repeat;
  flex: none;
}
.empty-state strong { color: var(--ink); font-size: 1rem; }
.empty-state p { font-size: .89rem; line-height: 1.6; max-width: 46ch; }
.empty-state .btn { margin-top: .5rem; }

/* ==========================================================================
   Göstergeler
   ========================================================================== */

/* ---------- Sayan sayı ---------- */
.counter {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ---------- Halka göstergesi ----------
   <div class="ring" data-value="9" data-max="13" data-label="…" style="--p:69%">
     <span class="ring-val">9<span class="ring-sep">/</span>13</span>
     <span class="ring-label">…</span>
   </div>
   İki renkli düz conic: dolgu + iz. İçi beyaz, ortada koyu değer. */
.ring {
  --p: 0%;
  --ring-c: var(--ring-mid);
  position: relative;
  width: var(--ring-size);
  aspect-ratio: 1 / 1;
  flex: none;
  display: grid;
  place-content: center;
  place-items: center;
  gap: .05rem;
  padding: 26px;
  border-radius: 50%;
  background: conic-gradient(from -90deg,
    var(--ring-c) 0% var(--p),
    var(--ring-track) var(--p) 100%);
}

/* İç beyaz alan — halkayı 10px'lik bant hâline getirir */
.ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line-soft);
}

.ring > * { position: relative; z-index: 1; }

.ring-val {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ring-sep { color: var(--mut); font-weight: 500; margin: 0 .04em; }

.ring-label {
  max-width: 11ch;
  font-size: .62rem;
  font-weight: 600;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--mut);
  text-align: center;
}

/* Değer basamakları — app.js sınıfı ekler */
.ring.is-low  { --ring-c: var(--ring-low);  }
.ring.is-mid  { --ring-c: var(--ring-mid);  }
.ring.is-high { --ring-c: var(--ring-high); }
.ring.is-top  { --ring-c: var(--ring-top);  }

.ring.is-low .ring-val { color: var(--warn); }
.ring.is-top .ring-val { color: var(--ok); }

.ring-sm { --ring-size: 100px; padding: 20px; }
.ring-sm .ring-val { font-size: .98rem; }
.ring-sm .ring-label { font-size: .56rem; max-width: 9ch; }
.ring-sm::before { inset: 8px; }

/* ---------- İlerleme çubuğu ----------
   <div class="progress"><div class="progress-bar" style="--p:62%"></div></div> */
.progress {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}

.progress-bar {
  --p: 0%;
  display: block;
  width: var(--p);
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--navy);
  transition: width 500ms ease, background var(--t);
}

.progress.is-ok   .progress-bar { background: var(--ok); }
.progress.is-warn .progress-bar { background: var(--warn); }
.progress.is-bad  .progress-bar { background: var(--err); }

/* ==========================================================================
   Bildirimler — BYS.toast(mesaj, tür)
   .toast-host'u app.js oluşturur; aria-live="polite".
   ========================================================================== */
.toast-host {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 95;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .5rem;
  width: min(380px, calc(100vw - 2rem));
  pointer-events: none;
}
body:not(.area-guest) .toast-host { top: calc(var(--topbar-real) + .75rem); }

.toast {
  pointer-events: auto;
  position: relative;
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  padding: .75rem .75rem .75rem 1rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--toast-c, var(--navy));
  border-radius: var(--r-xs);
  background: var(--surface);
  box-shadow: var(--sh-2);
  color: var(--ink);
  font-size: .88rem;
  font-weight: 500;
  line-height: 1.5;
  opacity: 0;
  transform: translate3d(1rem, 0, 0);
  transition: opacity var(--t), transform 240ms ease;
}
.toast.is-in  { opacity: 1; transform: none; }
.toast.is-out { opacity: 0; transform: translate3d(1rem, 0, 0); }

.toast-ico {
  flex: none;
  width: 18px;
  text-align: center;
  font-weight: 700;
  color: var(--toast-c, var(--navy));
}
.toast-msg { flex: 1; min-width: 0; word-break: break-word; }

.toast-x {
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--r-xs);
  background: transparent;
  color: var(--mut);
  font: inherit;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast);
}
.toast-x:hover { color: var(--ink); background: var(--surface-2); border-color: var(--line); }

.toast-success { --toast-c: var(--ok); }
.toast-error   { --toast-c: var(--err); }
.toast-warn    { --toast-c: var(--warn); }
.toast-info    { --toast-c: var(--info); }

/* ==========================================================================
   Bölüm menüsü + scroll-spy
   <nav class="section-nav"><a href="#sec-kimlik">Kimlik</a>…</nav>
   ========================================================================== */
.section-nav {
  position: sticky;
  top: var(--topbar-real);
  z-index: 30;
  display: flex;
  gap: .1rem;
  padding: 0 .25rem;
  margin-bottom: 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--sh-1);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.section-nav::-webkit-scrollbar { display: none; }

.section-nav a {
  position: relative;
  flex: none;
  padding: .7rem .8rem;
  color: var(--body);
  font-size: .85rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--t-fast), background var(--t-fast);
}
.section-nav a:hover { color: var(--navy); background: var(--surface-2); text-decoration: none; }
.section-nav a.active { color: var(--navy); font-weight: 600; }
.section-nav a.active::after {
  content: "";
  position: absolute;
  left: .55rem;
  right: .55rem;
  bottom: 0;
  height: 3px;
  background: var(--gold);
}

/* Bağlantıyla atlanan bölüm üst çubuğun altında kalmasın */
[data-spy] { scroll-margin-top: calc(var(--topbar-real) + 4rem); }

/* ==========================================================================
   Yardımcı sınıflar
   ========================================================================== */

/* ---------- Ayırıcı ---------- */
.divider {
  height: 1px;
  border: 0;
  margin: 1.4rem 0;
  background: var(--line);
}

/* ---------- Etiket / değer listesi ----------
   <dl class="kv"><div class="kv-row"><dt>Etiket</dt><dd>Değer</dd></div>…</dl> */
.kv { display: grid; margin: 0; }
.kv-row {
  display: grid;
  grid-template-columns: minmax(150px, 34%) 1fr;
  gap: .25rem 1.2rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.kv-row:last-child { border-bottom: 0; }
.kv dt { color: var(--mut); font-size: .8rem; font-weight: 600; line-height: 1.5; }
.kv dd { margin: 0; color: var(--ink); font-size: .9rem; line-height: 1.55; word-break: break-word; }
.kv dd:empty::before { content: "—"; color: var(--mut); }

/* ---------- İskelet (yükleniyor) ---------- */
.skeleton {
  border-radius: var(--r-xs);
  background: var(--surface-2);
  color: transparent !important;
  user-select: none;
  animation: bys-skeleton 1.5s ease-in-out infinite;
}
@keyframes bys-skeleton {
  0%, 100% { opacity: 1; }
  50%      { opacity: .55; }
}
.skeleton-line { display: block; height: .85em; margin: .4em 0; }
.skeleton-line.is-short { width: 42%; }
.skeleton-line.is-half  { width: 62%; }
.skeleton-block { display: block; height: 128px; border-radius: var(--r-md); }

/* ---------- Kaldırılan görsel katmanlar ----------
   Sınıflar sözleşmede kalıyor (HTML'de bulunabilir) ama hiçbir görsel
   etkisi yok: aurora arka plan ve 3B eğim kurumsal kimliğe uymuyor. */
.aurora, .aurora-grain { display: none !important; }
.tilt, .tilt:hover, .tilt.is-tilting { transform: none; }

/* Yazdırma yardımcıları — kuralları @media print tanımlar.
   .no-print: ekranda görünür, kâğıtta gizli.
   .print-head: ekranda gizli, kâğıtta kurum başlığı. */
.print-head { display: none; }

/* ==========================================================================
   Sayfa girişi + .reveal (sakin, yalnızca opaklık ağırlıklı)
   ========================================================================== */
.container { animation: bys-page-in 200ms ease both; }
@keyframes bys-page-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* JS yoksa .reveal-init hiç eklenmez → içerik olduğu gibi görünür kalır.
   Kademeli gecikme: style="--d:.08s" */
.reveal { opacity: 1; }
.reveal.reveal-init {
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  transition: opacity 320ms ease var(--d, 0ms), transform 320ms ease var(--d, 0ms);
}
.reveal.reveal-init.is-visible { opacity: 1; transform: none; }

/* Tablo satırı ve liste öğesi: transform satır hizasını kaydırır */
tr.reveal.reveal-init,
.doc-item.reveal.reveal-init { transform: none; }

/* ==========================================================================
   Responsive — 1024px
   ========================================================================== */
/* ==========================================================================
   Başvuru sihirbazı — adım adım form (basvuru-formu.php)
   Tek sütun, dar ölçü: yan yana alan olmadığı için sütunlar arası boşluk ya da
   cevaba göre yer değiştirme sorunu oluşmaz.
   ========================================================================== */
.sihirbaz {
  max-width: 780px;
  margin: 0 auto;
}

/* ---------- Üst başlık ---------- */
.sihirbaz-ust {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}
.sihirbaz-ust-metin { min-width: 0; }
.sihirbaz-etiket {
  margin: 0 0 .15rem;
  color: var(--mut);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.sihirbaz-baslik {
  margin: 0;
  color: var(--navy);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.25;
}
.sihirbaz-oran { text-align: right; flex: none; }
.sihirbaz-oran-sayi {
  display: block;
  color: var(--navy);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.sihirbaz-oran-alt { color: var(--mut); font-size: .74rem; }

.sihirbaz .progress { margin-bottom: 1.1rem; }

/* ---------- Adım göstergesi ---------- */
.adimlar {
  display: flex;
  flex-wrap: wrap;      /* taşıp kesilmektense alt satıra insin */
  gap: .4rem;
  margin-bottom: 1.1rem;
}
.adim {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex: none;
  padding: .5rem .75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--body);
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast);
}
.adim:hover { border-color: var(--navy); color: var(--navy); text-decoration: none; }
.adim-no {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--mut);
  font-size: .72rem;
  font-weight: 700;
  flex: none;
}
.adim.tamam { border-color: var(--ok-line); }
.adim.tamam .adim-no { background: var(--ok); color: #fff; }
.adim.aktif {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.adim.aktif .adim-no { background: rgba(255, 255, 255, .22); color: #fff; }
.adim.aktif:hover { color: #fff; }

/* ---------- Gövde kartı ---------- */
.sihirbaz-govde {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
  padding: .35rem 1.5rem;
}
.adim-aciklama {
  margin: 1.25rem 0 0;
  color: var(--body);
  font-size: .9rem;
  line-height: 1.6;
}

/* ---------- Soru bloğu ---------- */
.soru {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.soru:last-child { border-bottom: 0; }
.soru-baslik {
  display: flex;
  align-items: baseline;
  gap: .6rem;
}
.soru-no {
  flex: none;
  min-width: 2.1rem;
  padding: .1rem .4rem;
  border-radius: var(--r-xs);
  background: var(--tint-navy);
  color: var(--navy);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-align: center;
}
.soru-metin {
  color: var(--ink);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.45;
}
.soru-ipucu {
  margin: .35rem 0 0;
  padding-left: 2.7rem;
  color: var(--mut);
  font-size: .8rem;
  line-height: 1.5;
}
.soru-govde { margin-top: .7rem; padding-left: 2.7rem; }
.soru-govde > * + * { margin-top: .7rem; }

/* ---------- Seçenekler (radio) ---------- */
.secenekler { display: flex; flex-wrap: wrap; gap: .5rem; }
.secenekler.dikey { flex-direction: column; align-items: flex-start; }
.secenek {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .85rem;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: var(--surface);
  color: var(--body);
  font-size: .88rem;
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast);
}
.secenek:hover { border-color: var(--navy); }
.secenek input { flex: none; margin: 0; accent-color: var(--navy); }
/* Seçili seçenek vurgusu — :has() yoksa sade kenarlık kalır, işlev bozulmaz */
.secenek:has(input:checked) {
  border-color: var(--navy);
  background: var(--tint-navy);
  color: var(--navy);
  font-weight: 600;
}
.secenekler.dikey .secenek { width: 100%; }

/* ---------- Alan yerleşimi ---------- */
.ikili {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem 1rem;
  align-items: start;
}
.field.dar { max-width: 340px; }

/* ---------- Taahhüt kutusu ---------- */
.onay-kutusu {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--r-md);
  background: var(--tint-navy);
  font-size: .88rem;
  line-height: 1.6;
  cursor: pointer;
}
.onay-kutusu input { margin-top: .25rem; flex: none; accent-color: var(--navy); }

/* ---------- Özet listesi ---------- */
.ozet {
  margin-top: 1.25rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  overflow: hidden;
}
.ozet-satir {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}
.ozet-satir:last-child { border-bottom: 0; }
.ozet-ikon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--warn-bg);
  color: var(--warn);
  font-size: .8rem;
  font-weight: 700;
  flex: none;
}
.ozet-satir.tamam .ozet-ikon { background: var(--ok-bg); color: var(--ok); }
.ozet-ad {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  font-size: .88rem;
  font-weight: 600;
}
.ozet-satir .badge, .ozet-satir .btn { flex: none; }

/* ---------- Alt gezinme ---------- */
.sihirbaz-alt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.1rem;
}
.sihirbaz-sayac {
  color: var(--mut);
  font-size: .8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---------- Evrak kartı listesi ---------- */
.form-doc-liste {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: .8rem;
}
.form-doc-liste > .form-doc { margin-top: 0; height: 100%; }
.sihirbaz .form-doc-strip { margin: 1.4rem 0 1.25rem; }

@media (max-width: 640px) {
  .sihirbaz-baslik { font-size: 1.15rem; }
  .sihirbaz-govde { padding: .35rem 1rem; }
  .soru-ipucu, .soru-govde { padding-left: 0; }
  .soru-baslik { align-items: flex-start; }
  .ikili { grid-template-columns: 1fr; }
  .field.dar { max-width: none; }
  .sihirbaz-alt { flex-wrap: wrap; }
  .sihirbaz-alt .btn { flex: 1 1 auto; text-align: center; }
  .sihirbaz-sayac { order: -1; width: 100%; text-align: center; }
  .ozet-satir { flex-wrap: wrap; }
  .ozet-ad { flex: 1 1 60%; }
}

/* ==========================================================================
   Öğrenci paneli (dashboard.php)
   ========================================================================== */

/* ---------- Durum kartı: sıradaki tek eylem ---------- */
.panel-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.4rem 1.6rem 1.4rem 1.75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--sh-1);
  overflow: hidden;
}
/* Sol kimlik şeridi — duruma göre renk alır */
.panel-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--navy);
}
.panel-hero-uyari::before { background: var(--warn); }
.panel-hero-basari::before { background: var(--ok); }
.panel-hero-metin { min-width: 0; flex: 1 1 340px; }
.panel-selam {
  margin: 0 0 .2rem;
  color: var(--mut);
  font-size: .82rem;
}
.panel-selam strong { color: var(--body); font-weight: 600; }
.panel-baslik {
  margin: 0;
  color: var(--navy);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.25;
}
.panel-aciklama {
  margin: .3rem 0 0;
  color: var(--body);
  font-size: .9rem;
  line-height: 1.6;
}
.panel-hero-btn { flex: none; }

/* ---------- Sayısal durum kutuları ---------- */
.durum-kartlari {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: .9rem;
  margin-bottom: 1rem;
}
.durum-kart {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .35rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--sh-1);
}
.durum-deger {
  color: var(--navy);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.durum-bolu { color: var(--mut); font-size: 1.1rem; font-weight: 600; }
.durum-etiket {
  color: var(--mut);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.durum-kart .badge { margin-top: .15rem; }
.durum-link {
  margin-top: .15rem;
  color: var(--navy);
  font-size: .8rem;
  font-weight: 600;
}

/* Tıklanabilir kutu (yönetim paneli) */
a.durum-kart {
  color: inherit;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
a.durum-kart:hover {
  border-color: var(--navy);
  box-shadow: var(--sh-2);
  text-decoration: none;
}
a.durum-kart:hover .durum-link { text-decoration: underline; }

/* Yönetim: sayfa başlığı + sağda eylem */
.sayfa-basligi {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.sayfa-basligi .card-title {
  margin-bottom: .2rem;
  padding-bottom: 0;
  border-bottom: 0;   /* flex öğesi içinde yarım çizgi olarak görünüyordu */
}
.sayfa-basligi .card-sub { margin: 0; }
/* Başlık sağındaki dışa aktarım formu düğme gibi hizalansın */
.sayfa-basligi .disa-aktar { flex: none; margin: 0; }

/* Yönetim: kompakt filtre çubuğu (eskiden tam boy form-grid idi) */
.filtre-cubugu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .7rem .9rem;
  align-items: end;
  padding-top: .9rem;
  border-top: 1px solid var(--line-soft);
}
.filtre-cubugu .field { gap: .3rem; }
.filtre-cubugu .field > label { font-size: .76rem; color: var(--mut); }
.filtre-eylem { flex-direction: row !important; gap: .5rem !important; }
.filtre-eylem .btn { flex: none; }

/* İki sıra kutu alt alta gelince araları açılmasın */
.durum-kartlari + .durum-kartlari { margin-top: -.1rem; }

/* ---------- Hazırlık ilerlemesi ---------- */
.hazirlik {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem 1.5rem;
  margin-top: 1rem;
}
.hazirlik-satir { display: flex; flex-direction: column; gap: .4rem; }
.hazirlik-ust {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .6rem;
}
.hazirlik-ad { color: var(--ink); font-size: .88rem; font-weight: 600; }
.hazirlik-oran {
  color: var(--mut);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}
.hazirlik-link { color: var(--navy); font-size: .8rem; font-weight: 600; }

/* ---------- İki sütunlu bölüm ---------- */
.ikili-bolum {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  align-items: start;
}

/* ---------- Sade öğe listesi (başvuru / burs) ---------- */
.oge-liste { list-style: none; margin: .9rem 0; padding: 0; }
.oge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.oge:last-child { border-bottom: 0; }
.oge-metin { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.oge-ad {
  color: var(--ink);
  font-size: .89rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}
.oge-alt { color: var(--mut); font-size: .78rem; }
.oge .badge, .oge .chip { flex: none; }

/* ---------- Duyurular ---------- */
.duyuru-liste { list-style: none; margin: .9rem 0 0; padding: 0; }
.duyuru {
  padding: .85rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.duyuru:last-child { border-bottom: 0; padding-bottom: 0; }
.duyuru-ust {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .8rem;
  margin-bottom: .25rem;
}
.duyuru-baslik { color: var(--navy); font-size: .92rem; font-weight: 700; }
.duyuru-tarih { color: var(--mut); font-size: .76rem; flex: none; }
.duyuru-metin { margin: 0; color: var(--body); font-size: .88rem; line-height: 1.6; }

@media (max-width: 640px) {
  .panel-hero { padding: 1.1rem 1.1rem 1.1rem 1.35rem; }
  .panel-baslik { font-size: 1.1rem; }
  .panel-hero-btn { width: 100%; text-align: center; }
  .durum-deger { font-size: 1.6rem; }
}

@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }

  .login-card { position: static; max-width: 480px; margin: 0 auto; width: 100%; }

  .topbar-inner { flex-wrap: wrap; gap: .3rem 1.2rem; padding: .7rem 1.2rem; }
  .nav {
    order: 3;
    flex-basis: 100%;
    margin-left: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-link.active::after { bottom: 0; }
  .nav-user { margin-left: auto; }
}

/* ==========================================================================
   Responsive — 768px
   ========================================================================== */
@media (max-width: 768px) {
  .container { padding: 1.4rem 1rem 2.5rem; }

  .grid, .grid-2, .grid-3 { grid-template-columns: 1fr; gap: .9rem; }
  .form-grid { grid-template-columns: 1fr; }

  .card, .doc-card { padding: 1.15rem; }

  .brand { font-size: .92rem; }
  .brand-mark { width: 32px; height: 32px; }
  .nav-user > span { display: none; }   /* mobilde kullanıcı adı gizlenir, Çıkış kalır */
  .nav-user { padding-left: .6rem; }
  .nav-link { padding: .45rem .65rem; font-size: .85rem; }
  .nav-link.active::after { left: .4rem; right: .4rem; }

  .stat { padding: 1rem 1.1rem; }

  .doc-item { flex-wrap: wrap; gap: .55rem; }
  .doc-item > div:first-child { flex-basis: 100%; }

  .step { font-size: .7rem; }
  .step::before { width: 28px; height: 28px; font-size: .78rem; }
  .step::after { top: 14px; left: calc(50% + 19px); right: calc(-50% + 19px); }

  .upload-zone { padding: 1.5rem 1rem; }
  .upload-progress, .upload-files { max-width: none; }

  .modal-back { padding: .8rem; }
  .modal { max-height: calc(100vh - 2rem); }
  .modal-head, .modal-body, .modal-foot { padding-left: 1.1rem; padding-right: 1.1rem; }

  .tbl th, .tbl td { padding: .6rem .75rem; font-size: .84rem; }

  .login-card { padding: 1.4rem; }

  .ring { --ring-size: 112px; padding: 22px; }
  .ring-val { font-size: 1.02rem; }

  .toast-host { left: .7rem; right: .7rem; width: auto; align-items: stretch; }
  .toast { font-size: .85rem; }

  .section-nav { margin-bottom: 1rem; }
  .section-nav a { padding: .6rem .7rem; font-size: .81rem; }

  .kv-row { grid-template-columns: 1fr; gap: .1rem; padding: .55rem 0; }
}

/* ==========================================================================
   Yazdırma — resmi form çıktısı
   Sarmalayıcı: <div class="print-form"><div class="print-head">Kurum…</div>…
   app.js ayrıca body'ye .has-print-form ekler (:has() olmayan tarayıcılar).
   ========================================================================== */
@media print {
  @page { margin: 16mm 14mm; }

  .topbar, .footer, .nav, .btn, .upload-zone, .modal-back,
  .aurora, .toast-host, .section-nav, .steps, .no-print,
  .upload-progress, .upload-files, .skeleton { display: none !important; }

  body {
    background: #FFFFFF;
    color: #333333;
    font-size: 11pt;
    display: block;
  }
  .container { max-width: none; padding: 0; animation: none !important; opacity: 1 !important; }

  .reveal, .reveal.reveal-init { opacity: 1 !important; transform: none !important; }

  .card, .doc-card, .stat, .table-wrap, .empty-state {
    border: .6pt solid #DDDDDD;
    box-shadow: none !important;
    break-inside: avoid;
  }
  .card-title { color: #003366; border-bottom: .5pt solid #DDDDDD; }
  .stat-num { color: #003366; }
  .tbl thead th { position: static; background: #F1F3F5 !important; color: #333333; }
  .tbl tbody tr, .tbl tbody tr:nth-child(even) { background: none !important; }

  /* Renkli zeminler basılmaz: kenarlık + koyu metin taşır */
  .badge, .chip, .stat-trend, .alert {
    background: none !important;
    border: .5pt solid #6B7280 !important;
    color: #333333 !important;
  }
  .badge::before { display: none !important; }

  a { color: #003366; text-decoration: none; }

  /* Kurum başlığı */
  .print-head {
    display: block !important;
    margin: 0 0 8mm;
    padding-bottom: 3mm;
    border-bottom: 1.2pt solid #003366;
    color: #003366;
    font-size: 13pt;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
  }
  .print-head span {
    display: block;
    margin-top: 1.5mm;
    color: #535353;
    font-size: 10.5pt;
    font-weight: 600;
    letter-spacing: .04em;
  }

  /* Sarmalayıcı şeffaf; içindeki kartlar ince çerçeveli resmi bloklar */
  .print-form {
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: #333333;
  }
  .print-form .card, .print-form .doc-card, .print-form .stat, .print-form section {
    border: .6pt solid #DDDDDD;
    border-radius: 3pt;
    padding: 5mm;
    margin: 0 0 5mm;
    break-inside: avoid;
  }
  .print-form .card-title {
    font-size: 11.5pt;
    padding-bottom: 2mm;
    margin-bottom: 3mm;
  }
  .print-form .card-sub, .print-form .field-hint { color: #535353; font-size: 9pt; }
  .print-form .kv-row { padding: 1.6mm 0; }

  /* Form alanları kâğıtta: değer koyu, altı çizili satır */
  .field input, .field select, .field textarea {
    color: #333333 !important;
    -webkit-text-fill-color: #333333;
    background: none !important;
    background-image: none !important;
    border: 0 !important;
    border-bottom: .5pt solid #6B7280 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 1mm 0 !important;
    font-size: 10.5pt;
  }
  .field textarea {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible;
    resize: none;
  }
  .field input[type="checkbox"], .field input[type="radio"] {
    border-bottom: 0 !important;
    width: 3.2mm;
    height: 3.2mm;
  }
  .field > label { font-size: 8.5pt; font-weight: 700; color: #333333; }
  .field-hint { color: #535353; font-size: 8pt; }
  .field-error { display: none !important; }
  [data-show-when][hidden] { display: none !important; }

  .kv-row { border-bottom: .4pt dotted #DDDDDD; }
  .kv dt { color: #535353; }
  .kv dd { color: #333333; }

  /* Halka: conic-gradient kâğıda basılmaz — çerçeve + koyu değer kalır */
  .ring {
    background: none !important;
    border: .8pt solid #6B7280;
    width: 26mm;
    padding: 4mm;
  }
  .ring::before { display: none !important; }
  .ring-val, .ring-label { color: #333333 !important; }

  .progress {
    border: .5pt solid #6B7280;
    background: none !important;
    height: 2.4mm;
  }
  .progress-bar { background: #6B7280 !important; transition: none !important; }
  .counter { color: #003366 !important; }
}

/* ==========================================================================
   Azaltılmış hareket
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

  .container { animation: none !important; opacity: 1; }
  .skeleton { animation: none !important; }

  .reveal, .reveal.reveal-init, .reveal.reveal-init.is-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .toast { transition: none !important; }
  .toast.is-in, .toast.is-out { transform: none !important; }
  .toast.is-out { opacity: 0 !important; }

  .progress-bar { transition: none !important; }
}
