/* ==========================================================================
   Güvenli Sokaklar — Ana Stiller
   ========================================================================== */

:root {
    --color-bg: #f5f3ff;
    --color-surface: rgba(255, 255, 255, 0.85);
    --color-surface-solid: #ffffff;
    --color-text: #1e1b4b;
    --color-text-muted: #64748b;
    --color-primary: #7c3aed;
    --color-primary-hover: #6d28d9;
    --color-border: rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 1px 3px rgba(91, 33, 182, 0.08);
    --shadow-md: 0 4px 16px rgba(91, 33, 182, 0.1);
    --shadow-lg: 0 8px 32px rgba(91, 33, 182, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --navbar-height: 64px;
    --font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    --container-max: 1520px;
    --transition: 0.2s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    min-height: 100%;
}

body:not(.page-home):not(.page-reports) {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

/* Navbar — Glassmorphism */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--navbar-height);
    background: var(--color-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 16px;
    max-width: 100%;
    gap: 12px;
}

.navbar__search {
    flex: 1;
    max-width: 220px;
    min-width: 0;
}

.city-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    color: var(--color-text);
    background: var(--color-surface-solid);
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.city-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.btn--pin {
    color: var(--color-primary);
}

.navbar__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--color-text);
    font-weight: 600;
    font-size: 16px;
}

.navbar__icon {
    font-size: 22px;
    line-height: 1;
}

.navbar__actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Butonlar */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
    background: var(--color-surface-solid);
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: scale(0.97);
}

.btn--icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
}

.btn--icon:hover {
    background: rgba(0, 0, 0, 0.06);
    box-shadow: none;
}

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

.btn--primary:hover {
    background: var(--color-primary-hover);
}

/* Ana içerik — tam ekran harita modu */
.app-main--fullscreen {
    position: relative;
    height: 100vh;
    padding-top: var(--navbar-height);
}

/* Harita bölümü — landing sayfasında */
.map-section {
    position: relative;
    background: linear-gradient(180deg, #1e0b3a 0%, #2e1065 42%, #3b0764 100%);
}

.map-section__map-wrap {
    position: relative;
    height: 85vh;
    min-height: 500px;
}

.map-section .map-container {
    width: 100%;
    height: 100%;
}

.map-section .map-loading {
    z-index: 500;
}

.map-section .map-hint {
    top: 12px;
}

/* Map Toolbar */
.map-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background: var(--color-surface-solid);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}

.map-toolbar__left {
    flex: 1;
    min-width: 160px;
}

.map-toolbar__title {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.map-toolbar__hint {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.map-toolbar__center {
    flex: 0 1 220px;
}

.map-toolbar__center .city-select {
    width: 100%;
}

.map-toolbar__actions {
    display: flex;
    gap: 4px;
}

@media (max-width: 768px) {
    .map-toolbar {
        padding: 10px 14px;
    }

    .map-toolbar__left {
        display: none;
    }

    .map-toolbar__center {
        flex: 1;
    }
}
