/* Saha mobil uygulama kabuğu — büyük dokunuş, alt menü */
.saha-app {
    --saha-bg: #0f172a;
    --saha-surface: #ffffff;
    --saha-muted: #64748b;
    --saha-line: #e2e8f0;
    --saha-accent: #0f766e;
    --saha-accent-soft: #ccfbf1;
    --saha-warn: #b45309;
    --saha-nav-h: 64px;
    min-height: 100dvh;
    background: #f1f5f9;
    color: #0f172a;
    font-family: Inter, system-ui, sans-serif;
    padding-bottom: calc(var(--saha-nav-h) + env(safe-area-inset-bottom, 0px));
}

.saha-top {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    padding-top: calc(0.85rem + env(safe-area-inset-top, 0px));
    background: var(--saha-bg);
    color: #fff;
}

.saha-top h1 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.saha-top p {
    margin: 0.15rem 0 0;
    font-size: 0.75rem;
    opacity: 0.75;
}

.saha-top-link {
    color: #fff;
    text-decoration: none;
    font-size: 0.78rem;
    opacity: 0.9;
    padding: 0.4rem 0.65rem;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 8px;
    white-space: nowrap;
}

.saha-body {
    padding: 1rem;
    max-width: 560px;
    margin: 0 auto;
}

.saha-body.is-field {
    max-width: 720px;
    padding: 0.75rem 0.85rem 1.25rem;
}

.saha-hello {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    color: var(--saha-muted);
}

.saha-hello strong {
    color: #0f172a;
}

.saha-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.saha-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    min-height: 118px;
    padding: 1rem;
    border: 1px solid var(--saha-line);
    border-radius: 16px;
    background: var(--saha-surface);
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.saha-tile:active {
    transform: scale(0.98);
}

.saha-tile.is-wide {
    grid-column: 1 / -1;
    min-height: 96px;
    flex-direction: row;
    align-items: center;
}

.saha-tile-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--saha-accent-soft);
    color: var(--saha-accent);
    flex-shrink: 0;
}

.saha-tile-icon svg {
    width: 22px;
    height: 22px;
}

.saha-tile h2 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
}

.saha-tile span {
    font-size: 0.78rem;
    color: var(--saha-muted);
    line-height: 1.35;
    text-decoration: none;
}

.saha-tile.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.saha-note {
    margin-top: 1.25rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 0.82rem;
    line-height: 1.45;
}

.saha-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: calc(var(--saha-nav-h) + env(safe-area-inset-bottom, 0px));
    min-height: calc(var(--saha-nav-h) + env(safe-area-inset-bottom, 0px));
    max-height: calc(var(--saha-nav-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-sizing: border-box;
    background: #fff;
    border-top: 1px solid var(--saha-line);
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
    /* iOS / geçişlerde boyut zıplamasını kes */
    transform: translateZ(0);
}

.saha-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    text-decoration: none;
    color: var(--saha-muted);
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.1;
    -webkit-tap-highlight-color: transparent;
    /* text zoom / odak büyütmesi */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.saha-nav a svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.saha-nav a.is-active {
    color: var(--saha-accent);
}

.saha-nav a.is-disabled {
    opacity: 0.35;
    pointer-events: none;
}

.saha-profil-card {
    background: #fff;
    border: 1px solid var(--saha-line);
    border-radius: 16px;
    padding: 1.1rem;
}

.saha-profil-card h2 {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
}

.saha-profil-card p {
    margin: 0.25rem 0;
    color: var(--saha-muted);
    font-size: 0.88rem;
}

.saha-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
}

.saha-btn-primary {
    background: var(--saha-accent);
    color: #fff;
}

.saha-btn-ghost {
    background: #fff;
    color: #0f172a;
    border: 1px solid var(--saha-line);
}

.saha-btn-danger {
    background: #fee2e2;
    color: #b91c1c;
}

@media (min-width: 900px) {
    .saha-app {
        background: #e2e8f0;
    }
    .saha-body {
        padding-top: 1.5rem;
    }
}

/* Harita + Saha alt menü: boşluk yok, OSM yazısı sol alt, zoom sağ alt */
@media (max-width: 900px) {
    .app-shell.is-saha-nav {
        --saha-nav-h: 64px;
        padding-bottom: 0 !important;
    }

    .app-shell.is-saha-nav .app-header .header-brand span {
        display: inline-block !important;
        font-size: 0.95rem;
        font-weight: 700;
        max-width: min(62vw, 280px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .app-shell.is-saha-nav > .map-container {
        height: calc(100dvh - 52px - env(safe-area-inset-top, 0px) - 64px - env(safe-area-inset-bottom, 0px)) !important;
        min-height: 240px !important;
        margin-bottom: 0 !important;
    }

    .app-shell.is-saha-nav .map-container .leaflet-bottom.leaflet-right {
        bottom: 8px !important;
        right: 10px !important;
    }

    .app-shell.is-saha-nav .map-container .leaflet-bottom.leaflet-left {
        bottom: 6px !important;
        left: 8px !important;
    }

    .app-shell.is-saha-nav .leaflet-control-attribution {
        margin: 0 !important;
        font-size: 10px !important;
        background: rgba(255, 255, 255, 0.85) !important;
    }

    .app-shell.is-saha-nav .btn-location {
        bottom: 78px !important;
        right: 12px !important;
    }

    .app-shell.is-saha-nav .saha-map-search-fab {
        right: 12px;
        left: auto;
        bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 132px);
    }

    .app-shell.is-saha-nav .mobile-tab-bar {
        display: none !important;
    }
}

.saha-map-search-fab {
    position: fixed;
    right: 14px;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 42px;
    padding: 0 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    color: #0f766e;
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.saha-map-search-fab svg {
    width: 18px;
    height: 18px;
}

@media (min-width: 901px) {
    .saha-map-search-fab {
        display: none !important;
    }
}
