/* Saha Mobil: telefon öncelikli, geniş ekranda ortalanan tek kolon */

:root {
    --sm-ana: #2c3e7b;
    --sm-ana-koyu: #1e2d5e;
    --sm-zemin: #f2f4f8;
    --sm-kart: #ffffff;
    --sm-cizgi: #e3e6ee;
    --sm-ust-y: 56px;
    --sm-alt-y: 62px;
    --sm-genislik: 720px;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--sm-zemin);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1f2430;
    -webkit-tap-highlight-color: transparent;
}

/* Üst çubuk */
.sm-ust {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--sm-ana);
    color: #fff;
    padding-top: env(safe-area-inset-top);
}

.sm-ust-ic {
    max-width: var(--sm-genislik);
    margin: 0 auto;
    height: var(--sm-ust-y);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.75rem;
}

.sm-ust-dugme,
.sm-ust-kisi {
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    font-size: 1.35rem;
    border-radius: 0.5rem;
}

.sm-ust-kisi span {
    font-size: 0.9rem;
}

.sm-ust-dugme:active,
.sm-ust-kisi:active {
    background: var(--sm-ana-koyu);
    color: #fff;
}

.sm-ust-baslik {
    flex: 1;
    min-width: 0;
    line-height: 1.2;
}

.sm-ust-ad {
    font-weight: 600;
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sm-ust-alt {
    font-size: 0.78rem;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Gövde */
.sm-govde {
    max-width: var(--sm-genislik);
    margin: 0 auto;
    padding: 0.75rem;
}

.sm-alt-menulu .sm-govde {
    padding-bottom: calc(var(--sm-alt-y) + env(safe-area-inset-bottom) + 1rem);
}

.sm-bildirim {
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
}

.sm-kart {
    background: var(--sm-kart);
    border: 1px solid var(--sm-cizgi);
    border-radius: 0.9rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.sm-bolum-baslik {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
}

.sm-metin {
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.sm-bilgi {
    display: grid;
    grid-template-columns: minmax(6.5rem, auto) 1fr;
    gap: 0.35rem 0.75rem;
    font-size: 0.95rem;
}

.sm-bilgi dt {
    font-weight: 500;
    color: #6b7280;
}

.sm-bilgi dd {
    margin: 0;
    overflow-wrap: anywhere;
}

/* Alt menü */
.sm-alt {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    background: #fff;
    border-top: 1px solid var(--sm-cizgi);
    display: flex;
    justify-content: center;
    padding-bottom: env(safe-area-inset-bottom);
}

.sm-alt-oge {
    flex: 1;
    max-width: 180px;
    height: var(--sm-alt-y);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.72rem;
}

.sm-alt-oge i {
    font-size: 1.4rem;
    line-height: 1;
}

.sm-alt-oge.aktif {
    color: var(--sm-ana);
    font-weight: 600;
}

/* Sekmeler */
.sm-sekmeler {
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}

.sm-sekmeler::-webkit-scrollbar {
    display: none;
}

.sm-sekmeler .nav-link {
    white-space: nowrap;
    background: #fff;
    border: 1px solid var(--sm-cizgi);
    color: #374151;
    border-radius: 2rem;
    padding: 0.45rem 0.9rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.sm-sekmeler .nav-link.active {
    background: var(--sm-ana);
    border-color: var(--sm-ana);
    color: #fff;
}

/* Görev kartları */
.sm-liste {
    display: grid;
    gap: 0.75rem;
}

.sm-gorev {
    display: block;
    background: var(--sm-kart);
    border: 1px solid var(--sm-cizgi);
    border-left: 5px solid #adb5bd;
    border-radius: 0.9rem;
    padding: 0.85rem 1rem;
    color: inherit;
    text-decoration: none;
}

.sm-gorev:active {
    background: #f8f9fc;
    color: inherit;
}

.sm-oncelik-acil {
    border-left: 5px solid #dc3545;
}

.sm-oncelik-yuksek {
    border-left: 5px solid #ffc107;
}

.sm-oncelik-normal {
    border-left: 5px solid #0d6efd;
}

.sm-oncelik-dusuk {
    border-left: 5px solid #adb5bd;
}

.sm-gorev-gecikti {
    background: #fff5f5;
}

.sm-gorev-ust {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}

.sm-gorev-no {
    margin-left: auto;
    font-size: 0.78rem;
    color: #6b7280;
}

.sm-gorev-konu {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.3rem;
    overflow-wrap: anywhere;
}

.sm-gorev-satir {
    font-size: 0.88rem;
    color: #4b5563;
    margin-bottom: 0.15rem;
    overflow-wrap: anywhere;
}

.sm-gorev-alt {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    margin-top: 0.45rem;
}

.sm-gorev-sayac {
    display: inline-flex;
    gap: 0.75rem;
    color: #6b7280;
    margin-left: auto;
}

.sm-detay-konu {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0.25rem 0 0.6rem;
    overflow-wrap: anywhere;
}

/* Boş durum */
.sm-bos {
    text-align: center;
    color: #6b7280;
    padding: 2.5rem 1rem;
}

.sm-bos-ikon {
    font-size: 3rem;
    color: #9ca3af;
    line-height: 1;
    margin-bottom: 0.75rem;
}

/* Öncelik ve sonuç seçimi */
.sm-oncelik-secim {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 0.4rem;
}

.sm-oncelik-secim .btn {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

/* Satır listeleri */
.sm-satirlar {
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0;
}

.sm-satirlar li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--sm-cizgi);
}

.sm-satirlar li:last-child {
    border-bottom: 0;
}

.sm-satirlar .btn {
    min-width: 44px;
    min-height: 44px;
}

.sm-ata {
    display: flex;
    gap: 0.5rem;
}

.sm-ata .form-select {
    min-height: 46px;
}

.sm-ata .btn {
    white-space: nowrap;
}

.sm-akis {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sm-akis li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--sm-cizgi);
}

.sm-akis li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.sm-akis-ust {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.sm-acilir {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: 0;
    padding: 0;
    min-height: 32px;
    color: inherit;
}

/* Fotoğraflar */
.sm-fotolar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.sm-foto {
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 0.6rem;
    overflow: hidden;
    background: #e9ecef;
}

.sm-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sm-foto-dosya {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.4rem;
    font-size: 0.7rem;
    text-align: center;
    text-decoration: none;
    color: #374151;
    overflow-wrap: anywhere;
}

.sm-foto-dosya i {
    font-size: 1.6rem;
}

/* Personel seçimi */
.sm-secim-listesi {
    display: grid;
    gap: 0.25rem;
}

.sm-secim {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.25rem;
    border-bottom: 1px solid var(--sm-cizgi);
    min-height: 48px;
    margin: 0;
}

.sm-secim:last-child {
    border-bottom: 0;
}

.sm-secim .form-check-input {
    width: 1.4rem;
    height: 1.4rem;
    margin: 0;
    flex-shrink: 0;
}

/* Kontrol listesi */
.sm-ilerleme {
    position: sticky;
    top: calc(var(--sm-ust-y) + env(safe-area-inset-top));
    z-index: 1020;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    background: var(--sm-zemin);
    padding: 0.5rem 0.25rem;
    font-size: 0.9rem;
}

.sm-madde {
    border-left: 5px solid #adb5bd;
}

.sm-madde-uygun {
    border-left-color: #198754;
}

.sm-madde-uygun_degil {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.sm-madde-uygulanamaz {
    border-left-color: #6c757d;
}

.sm-madde-metin {
    font-weight: 500;
    margin-bottom: 0.6rem;
    overflow-wrap: anywhere;
}

.sm-madde-dugmeler {
    display: grid;
    grid-template-columns: 1fr 1.25fr 0.8fr;
    gap: 0.4rem;
}

.sm-madde-dugmeler .btn {
    min-height: 48px;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    white-space: nowrap;
}

.sm-mesgul {
    opacity: 0.6;
    pointer-events: none;
}

/* Giriş */
.sm-giris {
    max-width: 420px;
    margin: 8vh auto 0;
    background: var(--sm-kart);
    border: 1px solid var(--sm-cizgi);
    border-radius: 1rem;
    padding: 1.5rem;
}

.sm-giris-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 0.75rem;
    border-radius: 1rem;
    background: var(--sm-ana);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.sm-giris-baslik {
    font-size: 1.4rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.25rem;
}

.sm-hesap-ad {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Büyük dokunma alanları */
.btn-lg {
    min-height: 52px;
}

.form-control,
.form-select {
    font-size: 1rem;
}

@media (min-width: 768px) {
    .sm-govde {
        padding: 1.25rem 0.75rem;
    }

    .sm-fotolar {
        grid-template-columns: repeat(5, 1fr);
    }

    .sm-liste {
        grid-template-columns: 1fr 1fr;
    }
}
