/* STYLUS — temel görünüm. Mobil önce: dokunma alanları en az 44px. */
:root {
    --stylus-lacivert: #0b2a4a;
    --stylus-mavi: #1b6ec2;
    --stylus-zemin: #f4f6f9;
    --stylus-cizgi: #dfe3e8;
}

html, body {
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    background: var(--stylus-zemin);
    color: #1f2933;
}

h1 { font-size: 1.5rem; margin-bottom: 1rem; }
h1:focus { outline: none; }
a { color: var(--stylus-mavi); }

.btn, .form-control, .form-select { min-height: 44px; }
.btn-sm { min-height: 36px; }
.btn-buyuk { padding: .7rem 1rem; font-size: 1.05rem; }
.btn-primary { background-color: var(--stylus-mavi); border-color: var(--stylus-mavi); }

.ortada { text-align: center; margin-top: 30vh; }

/* Üst menü */
.ust-menu {
    display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem;
    background: var(--stylus-lacivert); color: #fff; padding: .5rem 1rem;
}
.ust-menu .marka { color: #fff; font-weight: 700; letter-spacing: .08em; text-decoration: none; font-size: 1.2rem; }
.ust-menu nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.ust-menu nav a {
    color: #cfe0f3; text-decoration: none; padding: .55rem .75rem; border-radius: .375rem; min-height: 44px;
    display: inline-flex; align-items: center;
}
.ust-menu nav a.active, .ust-menu nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.ust-menu .kullanici { margin-left: auto; display: flex; align-items: center; gap: .75rem; }

.icerik { max-width: 1100px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }

/* Giriş / onay bekliyor kart ekranı */
.kart-ekran { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.kart {
    background: #fff; border-radius: .75rem; box-shadow: 0 6px 24px rgba(11,42,74,.12);
    padding: 2rem 1.5rem; width: 100%; max-width: 420px; text-align: center;
}
.kart .marka { color: var(--stylus-lacivert); font-weight: 800; letter-spacing: .15em; font-size: 1.6rem; margin-bottom: 1.25rem; }
.kart p { color: #52606d; }
.ms-logo {
    display: inline-block; width: 18px; height: 18px; margin-right: .5rem; vertical-align: -3px;
    background: linear-gradient(90deg, #f25022 50%, #7fba00 50%) top / 100% 50% no-repeat,
                linear-gradient(90deg, #00a4ef 50%, #ffb900 50%) bottom / 100% 50% no-repeat;
}
.durum-simge {
    width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 1rem; display: flex;
    align-items: center; justify-content: center; font-size: 2rem; font-weight: 700;
}
.durum-simge.bekliyor { background: #fff4d6; }
.durum-simge.pasif { background: #fde2e1; color: #b42318; }
.hesap-bilgi { background: var(--stylus-zemin); border-radius: .5rem; padding: .75rem; margin: 1.25rem 0; }
.hesap-bilgi dt { font-weight: 400; color: #7b8794; font-size: .85rem; }
.hesap-bilgi dd { margin: 0; }

/* Rozetler */
.rozet { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.rozet-aktif { background: #dcfce7; color: #166534; }
.rozet-bekliyor { background: #fff4d6; color: #8a5a00; }
.rozet-pasif { background: #e5e7eb; color: #4b5563; }

/* Sekmeler */
.sekmeler { display: flex; gap: .25rem; border-bottom: 1px solid var(--stylus-cizgi); margin-bottom: 1rem; }
.sekmeler button {
    background: none; border: 0; border-bottom: 3px solid transparent; padding: .6rem .9rem; min-height: 44px; color: #52606d;
}
.sekmeler button.secili { border-bottom-color: var(--stylus-mavi); color: var(--stylus-lacivert); font-weight: 600; }
.sayac { background: #d64545; color: #fff; border-radius: 999px; padding: 0 .45rem; font-size: .75rem; margin-left: .3rem; }
.arama { max-width: 360px; margin-bottom: 1rem; }

/* Tablo: telefonda kartlara dönüşür */
.tablo { width: 100%; background: #fff; border-collapse: collapse; border-radius: .5rem; overflow: hidden; }
.tablo th { text-align: left; font-size: .8rem; color: #7b8794; font-weight: 600; padding: .6rem .75rem; border-bottom: 1px solid var(--stylus-cizgi); }
.tablo td { padding: .65rem .75rem; border-bottom: 1px solid var(--stylus-cizgi); vertical-align: middle; }
.tablo tr.tiklanir { cursor: pointer; }
.tablo tr.tiklanir:hover td { background: #f8fafc; }

@media (max-width: 720px) {
    .tablo thead { display: none; }
    .tablo, .tablo tbody, .tablo tr, .tablo td { display: block; width: 100%; }
    .tablo tr { border: 1px solid var(--stylus-cizgi); border-radius: .5rem; margin-bottom: .75rem; background: #fff; }
    .tablo td { border: 0; padding: .3rem .75rem; display: flex; gap: .75rem; }
    .tablo td::before { content: attr(data-etiket); color: #7b8794; font-size: .8rem; min-width: 6.5rem; }
    .ust-menu .kullanici-adi { display: none; }
}

/* Formlar */
.form-blok { margin-bottom: 1rem; }
fieldset.form-blok legend { font-size: 1rem; margin-bottom: .25rem; }
.secim-izgara { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .25rem .75rem; }
.secim { display: flex; align-items: center; gap: .5rem; min-height: 44px; cursor: pointer; }
.secim .form-check-input { margin: 0; width: 1.25rem; height: 1.25rem; }
.buton-satiri { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 1rem; }
.bosluk { flex: 1; }
.geri { display: inline-block; margin-bottom: .75rem; text-decoration: none; }
.kod-girisi { max-width: 8rem; text-transform: uppercase; }

/* Bölüm kutuları */
.kutu { background: #fff; border: 1px solid var(--stylus-cizgi); border-radius: .5rem; padding: 1rem; margin-bottom: .75rem; }
details.kutu summary { cursor: pointer; font-weight: 600; min-height: 32px; }
details.kutu[open] summary { margin-bottom: 1rem; }
.kutu-baslik { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; flex-wrap: wrap; }
.kod { font-family: Consolas, monospace; background: var(--stylus-lacivert); color: #fff; border-radius: .25rem; padding: .1rem .45rem; font-size: .85rem; }
.alt-baslik { font-size: .9rem; color: #7b8794; margin: .75rem 0 .25rem; text-transform: uppercase; letter-spacing: .04em; }
.pozisyonlar { list-style: none; padding: 0; margin: 0 0 .5rem; }
.pozisyonlar li { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; border-bottom: 1px dashed var(--stylus-cizgi); }
.satir-form { display: flex; gap: .5rem; }
.soluk { opacity: .6; }

/* Blazor hata ve yükleme göstergeleri */
#blazor-error-ui {
    color-scheme: light only; background: lightyellow; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2);
    box-sizing: border-box; display: none; left: 0; padding: .6rem 1.25rem .7rem; position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

.loading-progress { position: absolute; display: block; width: 8rem; height: 8rem; inset: 20vh 0 auto 0; margin: 0 auto; }
.loading-progress circle { fill: none; stroke: #e0e0e0; stroke-width: .6rem; transform-origin: 50% 50%; transform: rotate(-90deg); }
.loading-progress circle:last-child {
    stroke: var(--stylus-mavi);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * .8), 500%;
    transition: stroke-dasharray .05s ease-in-out;
}
.loading-progress-text { position: absolute; text-align: center; font-weight: bold; inset: calc(20vh + 3.25rem) 0 auto .2rem; }
.loading-progress-text:after { content: var(--blazor-load-percentage-text, ""); }

/* ---------- Arşiv ---------- */
.sayfa-basligi { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem; }
.sayfa-basligi h1 { margin: 0; }
.rozet-taslak { background: #e0ecfb; color: #1b4f8a; }
.rev { font-weight: 600; color: var(--stylus-lacivert); font-size: .85rem; }
.iki-kolon { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1rem; }
.tarih-girisi { max-width: 12rem; }
.sayi-girisi { max-width: 7rem; }

/* ---------- Doküman Yönetimi ---------- */
.filtreler { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.4fr); gap: .5rem; margin-bottom: .5rem; }
.filtre-alt { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: center; margin-bottom: 1rem; font-size: .9rem; }
.dokuman-listesi { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.dokuman-listesi a { display: block; background: #fff; border: 1px solid var(--stylus-cizgi); border-radius: .5rem; padding: .75rem 1rem; color: inherit; text-decoration: none; min-height: 44px; }
.dokuman-listesi a:hover { border-color: var(--stylus-mavi); box-shadow: 0 2px 8px rgba(11,42,74,.08); }
.dokuman-ust { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .2rem; }
.dokuman-baslik { display: block; font-size: 1.02rem; overflow-wrap: anywhere; }
.dokuman-alt { font-size: .85rem; margin-top: .15rem; overflow-wrap: anywhere; }
.etiket { display: inline-block; background: var(--stylus-zemin); border-radius: 999px; padding: 0 .5rem; font-size: .78rem; margin-right: .25rem; }

.detay-izgara { display: grid; grid-template-columns: 1fr 300px; gap: 1rem; align-items: start; }
.kutu h2.alt-baslik { display: flex; align-items: center; gap: .5rem; margin-top: 0; }
.islem { border-top: 1px solid var(--stylus-cizgi); margin-top: 1rem; padding-top: 1rem; }
.islem-baslik { font-size: 1rem; font-weight: 600; margin-bottom: .5rem; }
details.islem > summary { cursor: pointer; min-height: 32px; }
.bilgi-listesi { display: grid; grid-template-columns: auto 1fr; gap: .25rem .75rem; margin: 0; font-size: .92rem; }
.bilgi-listesi dt { color: #7b8794; font-weight: 400; }
.bilgi-listesi dd { margin: 0; overflow-wrap: anywhere; }
.dosya-satiri { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: .5rem; }
.dosya-adi { word-break: break-all; }
.dosya-dugmeleri { display: inline-flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.gecmis-satiri { border-top: 1px dashed var(--stylus-cizgi); padding-top: .6rem; margin-top: .6rem; }
.gecmis-satiri:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.aciklama { white-space: pre-line; }

@media (max-width: 900px) {
    .detay-izgara { grid-template-columns: 1fr; }
    .filtreler { grid-template-columns: 1fr 1fr; }
    .filtreler .arama-kutusu { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    .tablo thead { display: none; }
    .tablo, .tablo tbody, .tablo tr, .tablo td { display: block; width: 100%; }
    .tablo tr { border: 1px solid var(--stylus-cizgi); border-radius: .5rem; margin-bottom: .75rem; background: #fff; }
    .tablo td { border: 0; padding: .3rem .75rem; display: flex; gap: .75rem; }
    .tablo td::before { content: attr(data-etiket); color: #7b8794; font-size: .8rem; min-width: 6.5rem; }
    .ust-menu .kullanici-adi { display: none; }
    .filtreler { grid-template-columns: 1fr; }
}
