:root {
  --zemin: #E6F1FB;
  --kart: #FFFFFF;
  --lacivert: #14284B;
  --vurgu: #0B6A73;
  --vurgu-koyu: #084F56;
  --vurgu-acik: #E6F3F4;
  --yazi: #14213A;
  --soluk: #4A5568;
  --cizgi: #DDE3EC;
  --alan-cizgi: #8E9AAB;
  --ic-zemin: #F3F5F8;
  --yesil: #1B6B3F; --yesil-zemin: #EAF6EF;
  --amber: #8A5A00; --amber-zemin: #FFF6E5;
  --mavi: #1A4E8A; --mavi-zemin: #E6F0FA;
  --kirmizi: #A1261D; --kirmizi-zemin: #FDECEA;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--zemin); }
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--yazi); font-size: 16px; line-height: 1.4; -webkit-text-size-adjust: 100%; }
h1, h2, h3, p { margin: 0; }
a { color: var(--vurgu); }
button, input, textarea, select { font: inherit; color: inherit; }

.app { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--zemin); }
.yukleniyor { padding: 32px; text-align: center; color: var(--soluk); }

.ust { background: var(--lacivert); color: #fff; padding: 20px 20px 16px; border-radius: 0 0 24px 24px; }
.ust-satir { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.ust-kucuk { font-size: 13px; color: #C9D6EA; }
.ust h1 { font-size: 22px; font-weight: 700; margin-top: 4px; }
.btn-cikis { min-height: 44px; padding: 0 14px; border: 1px solid #5B7199; border-radius: 10px; background: transparent; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }

.icerik { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.geri { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: 14px; text-decoration: none; }

.kart { background: var(--kart); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.kart h2 { font-size: 15px; font-weight: 700; }
.satir { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.soluk { color: var(--soluk); }
.kucuk { font-size: 12px; }
.orta { font-size: 13px; }
.ustyazi { font-size: 12px; font-weight: 600; color: var(--vurgu); }
.soru-metni { font-size: 16px; font-weight: 600; line-height: 22px; }
.rakam { font-variant-numeric: tabular-nums; }

.not { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 16px; color: var(--soluk); }
.not svg { flex: none; margin-top: 1px; }
.uyari { display: flex; gap: 8px; align-items: flex-start; background: var(--amber-zemin); color: #6B4500; border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 18px; }
.uyari svg { flex: none; margin-top: 1px; }
.bilgi { background: var(--mavi-zemin); color: var(--mavi); border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 18px; }

.ilerleme { display: flex; flex-direction: column; gap: 6px; }
.cubuk { height: 8px; border-radius: 4px; background: #E3E8EF; overflow: hidden; }
.cubuk > div { height: 8px; background: #0E7C86; }

.rozet { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.rozet.yesil { background: var(--yesil-zemin); color: var(--yesil); }
.rozet.amber { background: var(--amber-zemin); color: var(--amber); }
.rozet.mavi { background: var(--mavi-zemin); color: var(--mavi); }
.rozet.kirmizi { background: var(--kirmizi-zemin); color: var(--kirmizi); }
.rozet.gri { background: var(--ic-zemin); color: var(--soluk); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid transparent; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center; }
.btn.ana { background: var(--vurgu); color: #fff; }
.btn.koyu { background: var(--lacivert); color: #fff; }
.btn.ikincil { background: #fff; color: var(--yazi); border-color: var(--alan-cizgi); }
.btn.yumusak { background: var(--vurgu-acik); color: var(--vurgu-koyu); }
.btn.tehlike { background: #fff; color: var(--kirmizi); border-color: var(--kirmizi); }
.btn.kucukbtn { min-height: 44px; font-size: 13px; padding: 0 12px; border-radius: 10px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-grup { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.btn-grup.uc { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.genis { grid-column: span 2; }

.alan { display: flex; flex-direction: column; gap: 4px; }
.alan label { font-size: 12px; color: var(--soluk); }
.alan input, .alan textarea { width: 100%; min-height: 44px; border: 1px solid var(--alan-cizgi); border-radius: 10px; padding: 10px 12px; background: #fff; font-size: 16px; }
.alan textarea { min-height: 96px; resize: vertical; }
.alan input:disabled, .alan textarea:disabled { background: var(--ic-zemin); color: var(--soluk); }
:focus-visible { outline: 3px solid #5AA9B1; outline-offset: 2px; }

.secenekler { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; background: #E3E8EF; border-radius: 12px; padding: 4px; }
.secenekler.uc { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.secenek { min-height: 44px; border: none; border-radius: 9px; background: transparent; color: #3D4858; font-size: 14px; font-weight: 500; cursor: pointer; }
.secenek[aria-pressed="true"] { background: #fff; color: var(--yazi); font-weight: 700; box-shadow: 0 1px 2px rgba(20, 33, 58, 0.15); }

.liste { display: flex; flex-direction: column; }
.liste-oge { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 52px; padding: 8px 0; border-bottom: 1px solid #E3E8EF; text-decoration: none; color: var(--yazi); }
.liste-oge:last-child { border-bottom: none; }
.liste-oge .ad { font-size: 14px; font-weight: 500; line-height: 19px; }
.liste-oge .no { flex: none; width: 26px; font-size: 12px; font-weight: 700; color: var(--soluk); font-variant-numeric: tabular-nums; }
.liste-sol { display: flex; align-items: flex-start; gap: 6px; min-width: 0; }

details.bolum > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 44px; }
details.bolum > summary::-webkit-details-marker { display: none; }
details.bolum > summary h2 { font-size: 15px; font-weight: 700; }

.cevap-kutu { background: var(--ic-zemin); border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 20px; white-space: pre-wrap; word-break: break-word; }
.mesaj { border-radius: 10px; padding: 8px 12px; font-size: 14px; line-height: 19px; background: var(--ic-zemin); white-space: pre-wrap; word-break: break-word; }
.mesaj.ben { background: var(--vurgu-acik); }
.mesaj .kim { font-size: 12px; font-weight: 600; color: var(--soluk); margin-bottom: 2px; }

.belgeler { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.belge { display: flex; flex-direction: column; gap: 4px; }
.belge .kare { aspect-ratio: 3 / 4; border-radius: 10px; background: var(--ic-zemin); border: 1px solid var(--cizgi); overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--soluk); text-align: center; padding: 4px; }
.belge .kare img { width: 100%; height: 100%; object-fit: cover; }
.belge.gecersiz .kare { opacity: 0.4; }
.belge .alt { font-size: 11px; color: var(--soluk); line-height: 14px; }
.belge .uy { font-size: 11px; color: var(--amber); font-weight: 600; line-height: 14px; }
.belge button { min-height: 32px; border: none; background: none; color: var(--vurgu); font-size: 12px; font-weight: 600; padding: 0; text-align: left; cursor: pointer; }

.altnav { position: sticky; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: #fff; border-top: 1px solid var(--cizgi); min-height: 64px; padding-bottom: env(safe-area-inset-bottom); }
.altnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--soluk); text-decoration: none; min-height: 64px; }
.altnav a[aria-current="page"] { color: var(--vurgu); font-weight: 700; }
.altbar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--cizgi); min-height: 64px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--soluk); }

.rol-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 64px; padding: 12px 14px; border: 1px solid var(--cizgi); border-radius: 12px; background: #fff; cursor: pointer; text-align: left; }
.rol-btn strong { font-size: 15px; }
.rol-btn span { font-size: 12px; color: var(--soluk); }

table.tablo { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tablo th, table.tablo td { text-align: left; vertical-align: top; padding: 6px 4px; border-bottom: 1px solid #E3E8EF; }
table.tablo th { font-size: 12px; color: var(--soluk); font-weight: 600; }
.imza { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.imza div { border-top: 1px solid var(--yazi); padding-top: 6px; font-size: 12px; min-height: 56px; }

@media print {
  html, body, .app { background: #fff; }
  .ust { background: #fff; color: #000; border-radius: 0; padding: 0 0 8px; }
  .ust-kucuk { color: #000; }
  .altnav, .altbar, .btn, .btn-cikis, .geri, .yazdirma { display: none !important; }
  .app { max-width: none; }
  .kart { padding: 8px 0; border-radius: 0; break-inside: avoid; }
}
