/* Saha listeleri: mobil/app kart — PC tablo (geçiş yok) */
.sm-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.sm-card {
    background: var(--surface-solid, #fff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.sm-card.is-alert {
    border-color: #fecaca;
    background: #fff7f7;
}
.sm-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}
.sm-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text, #0f172a);
    line-height: 1.25;
}
.sm-card-sub {
    font-size: 0.82rem;
    color: var(--text-muted, #64748b);
}
.sm-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}
.sm-card-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.84rem;
}
.sm-card-row span:first-child {
    color: var(--text-muted, #64748b);
}
.sm-card-row strong {
    text-align: right;
}
.sm-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.35rem;
}
.sm-card-actions .btn {
    flex: 1 1 auto;
    min-height: 40px;
}
.sm-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted, #64748b);
    border: 1px dashed var(--border, #e2e8f0);
    border-radius: 12px;
}

/* Mobil filtre paneli */
.sm-filter-stack {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 0.85rem;
}
.sm-filter-stack .form-input,
.sm-filter-stack input[type="search"],
.sm-filter-stack input[type="text"],
.sm-filter-stack .sf-search,
.sm-filter-stack .sf-select {
    flex: 0 0 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px;
    box-sizing: border-box;
}
.sm-filter-more {
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    background: var(--surface-solid, #fff);
    overflow: hidden;
}
.sm-filter-more > summary {
    list-style: none;
    cursor: pointer;
    padding: 0.7rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f766e;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    user-select: none;
}
.sm-filter-more > summary::-webkit-details-marker { display: none; }
.sm-filter-more > summary::after {
    content: "▾";
    font-size: 0.75rem;
    opacity: 0.7;
}
.sm-filter-more[open] > summary::after { content: "▴"; }
.sm-filter-more-body {
    padding: 0 0.9rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.sm-chip-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.15rem;
    scrollbar-width: none;
}
.sm-chip-row::-webkit-scrollbar { display: none; }

/* Masaüstü-only / mobil sadeleştirme */
.sm-phone { display: none; }
.sm-phone.sm-filter-stack { flex-direction: column; }

@media (max-width: 700px) {
    .sm-desk { display: none !important; }
    .sm-phone { display: flex; }
    .sm-phone.sm-filter-stack { flex-direction: column; }
    .sm-mobile-lead { display: none !important; }

    .saha-app .admin-page-title,
    .saha-app .denetim-title,
    .saha-app .mektep-title,
    .saha-app .sf-title {
        font-size: 1.15rem !important;
        line-height: 1.25;
    }
    .saha-app .denetim-lead,
    .saha-app .mektep-lead,
    .saha-app .sf-sub {
        display: none !important;
    }
    .saha-app .denetim-stats,
    .saha-app .mektep-stats,
    .saha-app .uo-chips {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem;
    }
    .saha-app .denetim-stat:last-child,
    .saha-app .uo-chip:last-child {
        grid-column: 1 / -1;
    }

    .saha-app .ct-filter-bar,
    .saha-app .uo-filters,
    .saha-app .mektep-toolbar,
    .saha-app .denetim-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.55rem;
    }
    .saha-app .ct-filter-search,
    .saha-app .ct-filter-select,
    .saha-app .uo-filter,
    .saha-app .mektep-search,
    .saha-app .denetim-search,
    .saha-app .denetim-search .form-input {
        width: 100%;
        min-width: 0;
    }
    .saha-app .denetim-filters,
    .saha-app .mektep-chips {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.4rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.1rem;
    }
    .saha-app .denetim-filters::-webkit-scrollbar,
    .saha-app .mektep-chips::-webkit-scrollbar { display: none; }
    .saha-app .denetim-chip,
    .saha-app .mektep-chip {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .saha-app .sf-filters {
        flex-direction: column;
        align-items: stretch;
    }
    .saha-app .sf-select,
    .saha-app .sf-search {
        width: 100%;
        min-height: 42px;
    }
    .saha-app .sf-summary {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.4rem;
        scrollbar-width: none;
    }
    .saha-app .sf-summary::-webkit-scrollbar { display: none; }
    .saha-app .sf-sum {
        flex: 0 0 auto;
        min-width: 4.5rem;
    }

    /* Modallar: tam ekran sheet */
    .saha-app .modal-overlay,
    .saha-app .premium-modal-overlay {
        padding: 0 !important;
        align-items: stretch !important;
        justify-content: flex-end !important;
    }
    .saha-app .modal,
    .saha-app .premium-modal-content {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 100dvh !important;
        height: 100dvh !important;
        border-radius: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }
    .saha-app .modal-body,
    .saha-app .premium-modal-body {
        flex: 1 1 auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        max-height: none !important;
    }
    .saha-app .modal-footer,
    .saha-app .premium-modal-footer {
        position: sticky;
        bottom: 0;
        background: var(--surface-solid, #fff);
        padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    .saha-app .modal-footer .btn,
    .saha-app .premium-modal-footer .btn {
        flex: 1 1 auto;
        min-height: 44px;
    }
    .saha-app .form-row input,
    .saha-app .form-row select,
    .saha-app .form-row textarea,
    .saha-app .form-input,
    .saha-app .form-select {
        min-height: 44px;
        font-size: 16px; /* iOS zoom engeli */
    }
    .saha-app .admin-page-title {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .saha-app .admin-page-title .btn {
        width: 100%;
        min-height: 44px;
    }
}

/* Saha kabuğu içinde de aynı kurallar */
.saha-app .sm-desk { display: none !important; }
.saha-app .sm-phone { display: flex; }
.saha-app .sm-phone.sm-filter-stack { flex-direction: column; }
.saha-app .sm-mobile-lead { display: none !important; }
