/* ===== Belediye Sorun Bildirim — Stiller ===== */
:root {
    --color-primary: #0e7c5b;
    --color-primary-dark: #0a5d44;
    --color-primary-light: #e6f4ee;
    --color-accent: #f59e0b;
    --color-danger: #dc2626;
    --color-warn: #d97706;
    --color-success: #16a34a;
    --color-info: #2563eb;

    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-border: #e2e8f0;
    --color-text: #1e293b;
    --color-text-muted: #64748b;
    --color-text-light: #94a3b8;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.10);

    --header-height: 60px;
    --max-content: 560px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--color-primary); text-decoration: none; }

/* ===== Mobile Shell ===== */
.app-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    max-width: var(--max-content);
    margin: 0 auto;
    background: var(--color-bg);
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-height);
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    backdrop-filter: saturate(180%) blur(10px);
}
.app-header.dark {
    background: var(--color-primary);
    color: white;
    border-bottom-color: transparent;
}
.app-header.dark .brand-title { color: white; }

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.brand-title {
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.brand-sub {
    font-size: 12px;
    color: var(--color-text-muted);
}
.header-link {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    transition: background 0.15s;
}
.header-link:hover { background: var(--color-bg); }
.app-header.dark .header-link { color: white; }
.app-header.dark .header-link:hover { background: rgba(255, 255, 255, 0.15); }

.app-main {
    flex: 1;
    padding: 16px;
    padding-bottom: 32px;
}

.app-footer {
    padding: 16px;
    text-align: center;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
}

/* ===== Hero ===== */
.hero {
    margin-bottom: 20px;
}
.hero h1 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
}
.hero p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 14px;
}

/* ===== Form ===== */
.report-form { display: flex; flex-direction: column; gap: 16px; }
.field {
    border: 0;
    margin: 0;
    padding: 16px;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.field > legend {
    padding: 0;
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text);
    margin-bottom: 4px;
}
.field.collapsed { padding-bottom: 0; }
.field.collapsed > legend + * { display: none; }
.field.collapsed.open > legend + * { display: flex; }

.legend-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: transparent;
    border: 0;
    padding: 4px 0;
    font: inherit;
    color: var(--color-text);
    text-align: left;
}

/* Category grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
}
.category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    cursor: pointer;
    background: var(--color-surface);
    transition: all 0.15s;
    text-align: center;
}
.category-card input { position: absolute; opacity: 0; pointer-events: none; }
.category-card:has(input:checked) {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}
.category-card:active { transform: scale(0.97); }
.category-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
}
.category-icon svg { width: 100%; height: 100%; }
.category-card:has(input:checked) .category-icon { color: var(--color-primary); }
.category-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.2;
}

/* Photo drop */
.photo-drop {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-bg);
    cursor: pointer;
    transition: border-color 0.15s;
}
.photo-drop:hover { border-color: var(--color-primary); }
.photo-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--color-text-muted);
}
.photo-placeholder span { font-size: 13px; }
.photo-drop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Location */
.location-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.location-status {
    font-size: 13px;
    color: var(--color-text-muted);
}
.location-status.ok { color: var(--color-success); font-weight: 500; }
.location-status.err { color: var(--color-danger); }
.mini-map {
    width: 100%;
    height: 160px;
    border-radius: var(--radius);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

/* Inputs */
textarea,
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
textarea:focus,
input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}
textarea { min-height: 80px; }

.contact-fields { display: flex; flex-direction: column; gap: 10px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border: 1.5px solid transparent;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    min-height: 48px;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
    background: var(--color-primary);
    color: white;
}
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-outline {
    background: var(--color-surface);
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary-light); }
.btn-block { width: 100%; }

.form-message {
    padding: 12px 14px;
    border-radius: var(--radius);
    font-size: 14px;
}
.form-message.error {
    background: #fef2f2;
    color: var(--color-danger);
    border: 1px solid #fecaca;
}
.form-message.success {
    background: #f0fdf4;
    color: var(--color-success);
    border: 1px solid #bbf7d0;
}

/* Detail / Success */
.success-card {
    text-align: center;
    padding: 28px 20px;
    background: var(--color-primary-light);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}
.success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.success-card h2 { margin: 0 0 4px; font-size: 18px; }
.success-card p { margin: 0; color: var(--color-text-muted); font-size: 14px; }

.detail-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
    gap: 12px;
}
.detail-row.column { flex-direction: column; align-items: flex-start; }
.detail-row:last-child { border-bottom: 0; }
.detail-label { color: var(--color-text-muted); font-size: 13px; font-weight: 500; }
.detail-value { font-weight: 500; text-align: right; }
.detail-text { margin: 4px 0 0; font-size: 14px; }
.detail-photo { margin-top: 12px; }
.detail-photo img {
    width: 100%;
    border-radius: var(--radius);
    display: block;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.status-reported { background: #dbeafe; color: #1d4ed8; }
.status-acknowledged { background: #ede9fe; color: #6d28d9; }
.status-in_progress { background: #fef3c7; color: #92400e; }
.status-resolved { background: #d1fae5; color: #065f46; }
.status-rejected { background: #fee2e2; color: #991b1b; }

.risk-low { background: #d1fae5; color: #065f46; }
.risk-medium { background: #fef3c7; color: #92400e; }
.risk-high { background: #fed7aa; color: #9a3412; }
.risk-critical { background: #fee2e2; color: #991b1b; }

/* ===== Public Map / Admin Map ===== */
.map-shell {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
}
.full-map {
    flex: 1;
    width: 100%;
    background: var(--color-bg);
}

/* ===== Admin Panel ===== */
.admin-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
}
.admin-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}
.admin-nav {
    display: flex;
    gap: 4px;
}
.admin-nav a {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
}
.admin-nav a:hover { background: var(--color-bg); color: var(--color-text); }
.admin-nav a.active { background: var(--color-primary-light); color: var(--color-primary); }

.admin-content {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.summary-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
}
.summary-card .summary-value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}
.summary-card .summary-label {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}
.filter-bar select {
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    font-size: 14px;
}

.report-table {
    width: 100%;
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border-collapse: collapse;
}
.report-table th,
.report-table td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-border);
    font-size: 14px;
}
.report-table thead { background: var(--color-bg); }
.report-table th {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.report-table tr:hover { background: #fafbfc; }
.report-table tr:last-child td { border-bottom: 0; }
.report-table .thumb {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--color-bg);
}

.report-table-row { cursor: pointer; }

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}
.login-card {
    width: 100%;
    max-width: 360px;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-lg);
}
.login-card h1 { font-size: 20px; margin: 0 0 4px; }
.login-card .login-sub { color: var(--color-text-muted); font-size: 13px; margin-bottom: 20px; }
.login-card form { display: flex; flex-direction: column; gap: 12px; }
.login-card .error {
    color: var(--color-danger);
    font-size: 13px;
    padding: 10px 12px;
    background: #fef2f2;
    border-radius: var(--radius-sm);
}

.admin-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 768px) {
    .admin-detail-grid { grid-template-columns: 1fr; }
}
.admin-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}
.admin-card h3 { margin: 0 0 16px; font-size: 14px; text-transform: uppercase; color: var(--color-text-muted); letter-spacing: 0.5px; }

.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.history-item {
    padding: 12px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--color-primary);
}
.history-time { font-size: 12px; color: var(--color-text-muted); }
.history-note { font-size: 13px; margin-top: 4px; }

/* ===== Toast notifications ===== */
.toast-container {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 380px;
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(110%);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    border-left: 4px solid var(--color-primary);
}
.toast.show {
    transform: translateX(0);
    opacity: 1;
}
.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-primary-light);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 700;
}
.toast-text {
    flex: 1;
    font-size: 14px;
    color: var(--color-text);
}
.toast-action {
    background: var(--color-primary);
    color: white;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}
.toast-close {
    background: transparent;
    border: 0;
    color: var(--color-text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}
.toast.toast-error { border-left-color: var(--color-danger); }
.toast.toast-error .toast-icon { background: #fee2e2; color: var(--color-danger); }
.toast.toast-success { border-left-color: var(--color-success); }
.toast.toast-success .toast-icon { background: #d1fae5; color: var(--color-success); }

/* Mute toggle */
.mute-toggle {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.mute-toggle.muted { color: var(--color-danger); border-color: var(--color-danger); }

/* ===== Live indicator ===== */
.live-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #ecfdf5;
    color: #047857;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.live-dot::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: live-pulse 1.5s ease-in-out infinite;
}
@keyframes live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

/* ===== Admin map shell with sidebar ===== */
.admap-shell {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.admap-body {
    flex: 1;
    display: grid;
    grid-template-columns: 340px 1fr;
    min-height: 0;
}
@media (max-width: 900px) {
    .admap-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .admap-sidebar { max-height: 40vh; }
}
.admap-sidebar {
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.admap-map-wrap {
    position: relative;
    min-height: 300px;
}
#admap-map {
    width: 100%;
    height: 100%;
}

.admap-section {
    padding: 16px;
    border-bottom: 1px solid var(--color-border);
}
.admap-section h3 {
    margin: 0 0 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.filter-pill {
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 12px;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s;
}
.filter-pill .pill-count {
    font-size: 11px;
    opacity: 0.7;
}
.filter-pill.active {
    background: var(--color-primary);
    color: white;
}
.filter-pill.active .pill-count { opacity: 1; }
.filter-pill:hover { border-color: var(--color-primary); }

.report-feed {
    display: flex;
    flex-direction: column;
}
.report-feed-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: background 0.15s;
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 12px;
    align-items: center;
}
.report-feed-item:hover {
    background: var(--color-bg);
}
.report-feed-item.selected {
    background: var(--color-primary-light);
}
.report-feed-item.new-flash {
    animation: feed-flash 1.2s ease;
}
@keyframes feed-flash {
    0% { background: #fef3c7; }
    100% { background: transparent; }
}
.feed-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 11px;
}
.feed-meta { min-width: 0; }
.feed-cat { font-size: 13px; font-weight: 600; color: var(--color-text); }
.feed-addr { font-size: 11px; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-time { font-size: 11px; color: var(--color-text-muted); }
.feed-risk-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.feed-risk-dot.low { background: #10b981; }
.feed-risk-dot.medium { background: #f59e0b; }
.feed-risk-dot.high { background: #f97316; }
.feed-risk-dot.critical { background: var(--color-danger); }

.admap-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.admap-stat {
    padding: 10px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
}
.admap-stat-value { font-size: 20px; font-weight: 800; line-height: 1; }
.admap-stat-label { font-size: 11px; color: var(--color-text-muted); margin-top: 4px; }

.map-action-bar {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 400;
    display: flex;
    gap: 6px;
    background: white;
    border-radius: var(--radius-sm);
    padding: 4px;
    box-shadow: var(--shadow);
}
.map-action-bar button {
    background: white;
    border: 0;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.map-action-bar button:hover { background: var(--color-bg); }
.map-action-bar button.active {
    background: var(--color-primary);
    color: white;
}

/* ===== Header right (lang + actions) ===== */
.header-right {
    display: flex;
    align-items: center;
    gap: 4px;
}
.admin-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ===== Language switch ===== */
.lang-switch {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    overflow: hidden;
    background: var(--color-surface);
}
.lang-link {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    color: var(--color-text-muted);
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.15s;
}
.lang-link.active {
    background: var(--color-primary);
    color: white;
}
.lang-link:not(.active):hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}
.app-header.dark .lang-switch {
    border-color: rgba(255, 255, 255, 0.3);
    background: transparent;
}
.app-header.dark .lang-link {
    color: rgba(255, 255, 255, 0.8);
}
.app-header.dark .lang-link.active {
    background: white;
    color: var(--color-primary);
}

/* ===== Landing page ===== */
.landing-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-primary-light) 100%);
}
.landing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}
.landing-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    width: 100%;
}
.landing-title {
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 800;
    color: var(--color-text);
    margin: 0 0 16px;
    line-height: 1.15;
    max-width: 720px;
}
.landing-sub {
    color: var(--color-text-muted);
    font-size: clamp(15px, 2.2vw, 18px);
    margin: 0 0 32px;
    max-width: 600px;
    line-height: 1.55;
}
.landing-cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
    max-width: 640px;
    margin-bottom: 28px;
}
@media (max-width: 540px) {
    .landing-cta-grid { grid-template-columns: 1fr; }
}
.landing-cta {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--color-text);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.landing-cta:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}
.landing-cta-citizen .cta-icon { color: var(--color-primary); }
.landing-cta-admin .cta-icon { color: #1e40af; }
.cta-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--color-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
}
.landing-cta-admin .cta-icon { background: #dbeafe; }
.cta-title {
    font-size: 18px;
    font-weight: 700;
    margin-top: 8px;
}
.cta-sub {
    font-size: 13px;
    color: var(--color-text-muted);
}
.landing-secondary {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}
.landing-link {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}
.landing-link:hover {
    background: var(--color-primary-light);
}
.landing-footer {
    padding: 20px;
    text-align: center;
    color: var(--color-text-muted);
}

/* ===== Acil Müdahale Paneli ===== */
.urgent-section {
    background: linear-gradient(135deg, #fef2f2 0%, #fff7ed 100%);
    border-bottom: 1px solid var(--color-border);
}
.urgent-section.empty { background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%); }
.urgent-empty {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #047857;
    font-size: 13px;
    font-weight: 500;
}
.urgent-empty-icon {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: #10b981;
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 14px;
    flex-shrink: 0;
}
.urgent-header {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 13px; font-weight: 700; color: #991b1b;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.urgent-count {
    background: var(--color-danger);
    color: white;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 12px;
    animation: urgent-pulse 1.5s ease-in-out infinite;
}
@keyframes urgent-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5); }
    50% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
}
.urgent-list { display: flex; flex-direction: column; gap: 6px; }
.urgent-item {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 8px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.15s;
    border-left: 3px solid var(--color-danger);
}
.urgent-item:hover { transform: translateX(2px); }
.urgent-icon {
    width: 36px; height: 36px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
}
.urgent-meta { min-width: 0; }
.urgent-title { font-size: 13px; font-weight: 600; color: var(--color-text); }
.urgent-sub { font-size: 11px; color: var(--color-danger); }
.urgent-action {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--color-danger);
    color: white;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
    font-weight: 700;
}

/* ===== Hourly chart ===== */
.hourly-chart {
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    gap: 2px;
    height: 90px;
    align-items: end;
    padding: 4px 0;
}
.hour-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    gap: 2px;
    min-width: 0;
}
.hour-bar {
    width: 100%;
    background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: 3px 3px 0 0;
    min-height: 2px;
    transition: opacity 0.15s;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 2px;
    position: relative;
}
.hour-col:hover .hour-bar { opacity: 0.85; }
.hour-col.now .hour-bar {
    background: linear-gradient(180deg, var(--color-accent) 0%, #d97706 100%);
}
.hour-col.now::after {
    content: '';
    position: absolute;
    bottom: 14px;
    width: 2px;
    height: 4px;
    background: var(--color-accent);
}
.hour-count {
    font-size: 8px;
    color: white;
    font-weight: 700;
}
.hour-label {
    font-size: 8px;
    color: var(--color-text-muted);
    line-height: 1;
}

/* ===== Filter label ===== */
.filter-label {
    font-size: 11px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
    font-weight: 600;
}
.filter-details summary {
    cursor: pointer;
    user-select: none;
    list-style: none;
}
.filter-details summary::-webkit-details-marker { display: none; }
.filter-details summary::before {
    content: '▾';
    margin-right: 6px;
    color: var(--color-text-muted);
    transition: transform 0.2s;
    display: inline-block;
}
.filter-details:not([open]) summary::before { transform: rotate(-90deg); }

/* ===== View toggle ===== */
.view-toggle {
    display: flex;
    gap: 4px;
    background: var(--color-bg);
    padding: 4px;
    border-radius: var(--radius);
}
.view-toggle button {
    flex: 1;
    background: transparent;
    border: 0;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
}
.view-toggle button.active {
    background: white;
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
}

/* ===== Feed item v2 (rich) ===== */
.feed-item {
    display: grid;
    grid-template-columns: 56px 1fr 24px;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: background 0.15s;
    align-items: center;
}
.feed-item:hover { background: var(--color-bg); }
.feed-item.selected { background: var(--color-primary-light); }
.feed-item.is-new {
    background: #fef3c7;
    animation: feed-fade 4s ease forwards;
}
@keyframes feed-fade {
    0% { background: #fde68a; }
    100% { background: transparent; }
}
.feed-thumb-wrap {
    position: relative;
    width: 56px;
    height: 56px;
}
.feed-thumb-img {
    width: 56px; height: 56px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--color-bg);
    display: block;
}
.feed-thumb-icon {
    width: 56px; height: 56px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.feed-risk-corner {
    position: absolute;
    top: -2px; right: -2px;
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.feed-body { min-width: 0; }
.feed-line-1 {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600;
    color: var(--color-text);
    margin-bottom: 2px;
}
.feed-cat { color: var(--color-text); }
.badge-new {
    background: var(--color-accent);
    color: white;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.5px;
    animation: pulse-badge 1.2s ease-in-out infinite;
}
@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
.feed-line-2 {
    font-size: 12px;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.feed-line-3 {
    display: flex; align-items: center; gap: 6px;
    font-size: 11px;
    color: var(--color-text-muted);
    flex-wrap: wrap;
}
.feed-time { color: var(--color-text-muted); }
.feed-sep { opacity: 0.4; }
.feed-status {
    padding: 1px 6px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 10px;
}
.feed-status.status-reported { background: #dbeafe; color: #1d4ed8; }
.feed-status.status-acknowledged { background: #ede9fe; color: #6d28d9; }
.feed-status.status-in_progress { background: #fef3c7; color: #92400e; }
.feed-status.status-resolved { background: #d1fae5; color: #065f46; }
.feed-status.status-rejected { background: #fee2e2; color: #991b1b; }
.sla-mark {
    background: #fee2e2;
    color: #991b1b;
    padding: 1px 6px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 10px;
}
.feed-open {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--color-bg);
    color: var(--color-text-muted);
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.15s;
}
.feed-open:hover {
    background: var(--color-primary);
    color: white;
}
.feed-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 13px;
}
.feed-empty-icon {
    font-size: 36px;
    margin-bottom: 8px;
    opacity: 0.5;
}

/* ===== Department view ===== */
.dep-section {
    border-bottom: 1px solid var(--color-border);
}
.dep-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--color-bg);
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text);
    position: sticky;
    top: 0;
    z-index: 1;
}
.dep-name { text-transform: uppercase; letter-spacing: 0.5px; }
.dep-stats { display: flex; gap: 6px; align-items: center; }
.dep-stat {
    background: var(--color-surface);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    color: var(--color-text-muted);
    font-weight: 600;
    border: 1px solid var(--color-border);
}
.dep-stat-crit {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}
.dep-stat-total {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* ===== Map legend ===== */
.map-legend {
    position: absolute;
    bottom: 16px;
    left: 16px;
    z-index: 400;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-radius: 10px;
    padding: 10px 14px;
    box-shadow: var(--shadow);
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 200px;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text);
}
.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.legend-sep {
    height: 1px;
    background: var(--color-border);
    margin: 4px 0;
}
.legend-ring {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    background: transparent;
}
.legend-ring-crit { border: 2.5px solid #dc2626; }
.legend-ring-high { border: 2px solid #f97316; }

/* ===== Pin pulse animation (new reports) ===== */
.pin-pulse-ring {
    animation: pin-pulse 1.5s ease-out infinite;
    transform-origin: 16px 16px;
}
@keyframes pin-pulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* ===== Map action bar refinements ===== */
.map-action-bar {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 400;
}
@media (max-width: 700px) {
    .map-action-bar { font-size: 11px; gap: 2px; padding: 3px; }
    .map-action-bar button { padding: 6px 8px; font-size: 11px; }
}

/* Leaflet pin — varsayılan görsel yerine SVG DivIcon */
.lf-default-pin { background: transparent; border: 0; }
.lf-default-pin svg { display: block; }

/* Leaflet popup customization */
.leaflet-popup-content { margin: 12px; min-width: 180px; }
.leaflet-popup-content .popup-title { font-weight: 700; margin-bottom: 6px; }
.leaflet-popup-content .popup-meta { font-size: 12px; color: var(--color-text-muted); margin-bottom: 8px; }
.leaflet-popup-content .popup-link { font-size: 13px; }

/* ===== Stats / Şeffaflık ===== */
.stats-shell {
    min-height: 100vh;
    background: var(--color-bg);
}
.stats-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}
.stats-hero {
    text-align: center;
    padding: 28px 12px 24px;
}
.stats-hero h1 {
    font-size: 26px;
    margin: 0 0 8px;
    color: var(--color-text);
}
.stats-sub {
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
    font-size: 14px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.kpi-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border-left: 3px solid var(--color-primary);
}
.kpi-card.kpi-success { border-left-color: var(--color-success); }
.kpi-card.kpi-info { border-left-color: var(--color-info); }
.kpi-card.kpi-danger { border-left-color: var(--color-danger); }
.kpi-card.kpi-warn { border-left-color: var(--color-warn); }
.kpi-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    color: var(--color-text);
}
.kpi-unit { font-size: 16px; font-weight: 600; color: var(--color-text-muted); }
.kpi-label {
    margin-top: 6px;
    font-size: 12px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
@media (max-width: 640px) {
    .stats-grid { grid-template-columns: 1fr; }
}
.stats-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}
.stats-card h3 {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bar-chart { display: flex; flex-direction: column; gap: 10px; }
.bar-row {
    display: grid;
    grid-template-columns: 130px 1fr 40px;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}
.bar-label { color: var(--color-text); font-weight: 500; }
.bar-track {
    height: 14px;
    background: var(--color-bg);
    border-radius: 999px;
    overflow: hidden;
}
.bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
    background: var(--color-primary);
}
.bar-fill.cat-pothole { background: #7c3aed; }
.bar-fill.cat-flood { background: #2563eb; }
.bar-fill.cat-garbage { background: #16a34a; }
.bar-fill.cat-broken_light { background: #f59e0b; }
.bar-fill.cat-other { background: #64748b; }
.bar-fill.status-bar-reported { background: #1d4ed8; }
.bar-fill.status-bar-acknowledged { background: #6d28d9; }
.bar-fill.status-bar-in_progress { background: #d97706; }
.bar-fill.status-bar-resolved { background: var(--color-success); }
.bar-fill.status-bar-rejected { background: var(--color-danger); }
.bar-value { font-weight: 600; text-align: right; }

.trend-chart {
    display: grid;
    grid-template-columns: repeat(30, 1fr);
    gap: 2px;
    align-items: end;
    height: 180px;
    padding-bottom: 16px;
    overflow-x: auto;
}
.trend-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
    justify-content: flex-end;
    min-width: 22px;
}
.trend-bar {
    width: 100%;
    background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: 4px 4px 0 0;
    min-height: 2px;
    position: relative;
    transition: opacity 0.15s;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 2px;
}
.trend-col:hover .trend-bar { opacity: 0.85; }
.trend-count {
    font-size: 9px;
    color: white;
    font-weight: 700;
}
.trend-date {
    font-size: 9px;
    color: var(--color-text-muted);
    transform: rotate(-45deg);
    transform-origin: center;
    white-space: nowrap;
    margin-top: 4px;
}

.stats-footer {
    margin-top: 32px;
    text-align: center;
    color: var(--color-text-muted);
}

/* ===== Anonim toggle ===== */
.anon-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: var(--radius);
    font-size: 13px;
    border: 1px solid transparent;
    cursor: pointer;
    margin-bottom: 8px;
}
.anon-toggle input { margin: 0; }
.anon-toggle.active {
    background: var(--color-primary);
    color: white;
}

/* ===== PWA install banner ===== */
.install-banner {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    max-width: 520px;
    margin: 0 auto;
    background: var(--color-primary);
    color: white;
    padding: 14px 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100;
    animation: slide-up 0.3s ease;
}
@keyframes slide-up {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.install-banner-text { flex: 1; font-size: 13px; }
.install-banner-text strong { display: block; margin-bottom: 2px; }
.install-banner button {
    background: white;
    color: var(--color-primary);
    border: 0;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px;
}
.install-banner .install-dismiss {
    background: transparent;
    color: white;
    padding: 8px;
    opacity: 0.7;
}

/* ===== SLA badge ===== */
.sla-warn {
    background: #fef3c7;
    color: #92400e;
}
.sla-breached {
    background: #fee2e2;
    color: #991b1b;
}
.sla-row-warn { background: #fffbeb; }
.sla-row-breached { background: #fef2f2; }

/* ===== Admin search ===== */
.search-input {
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    font-size: 14px;
    min-width: 200px;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px;
}
.pagination a, .pagination span {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    font-size: 13px;
    color: var(--color-text);
    text-decoration: none;
}
.pagination a:hover { background: var(--color-primary-light); border-color: var(--color-primary); }
.pagination .current { background: var(--color-primary); color: white; border-color: var(--color-primary); }
.pagination .disabled { opacity: 0.5; pointer-events: none; }

/* ===== Heatmap toggle ===== */
.map-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 400;
    background: white;
    border-radius: var(--radius-sm);
    padding: 6px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 4px;
}
.map-controls button {
    background: white;
    color: var(--color-text);
    border: 0;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
}
.map-controls button.active {
    background: var(--color-primary);
    color: white;
}

/* ===== AI badge ===== */
.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}
.ai-badge.ai-mismatch {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
}

/* ===== Duplicate indicator ===== */
.dup-badge {
    background: #ede9fe;
    color: #6d28d9;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 600;
}

/* ===== Error pages ===== */
.error-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-primary-light) 100%);
}
.error-content {
    text-align: center;
    max-width: 420px;
}
.error-code {
    font-size: 96px;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 8px;
}
.error-content h1 {
    font-size: 22px;
    margin: 0 0 12px;
}
.error-content p {
    color: var(--color-text-muted);
    margin: 0 0 24px;
}

/* Map markers — category colored pins */
.cat-marker {
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 0;
    background: var(--color-primary);
    transform: rotate(-45deg);
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}
.cat-marker svg { transform: rotate(45deg); width: 16px; height: 16px; }
.cat-marker.cat-pothole { background: #7c3aed; }
.cat-marker.cat-flood { background: #2563eb; }
.cat-marker.cat-garbage { background: #16a34a; }
.cat-marker.cat-broken_light { background: #f59e0b; }
.cat-marker.cat-other { background: #64748b; }
.cat-marker.risk-critical { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.5), 0 2px 6px rgba(0,0,0,0.3); }
.cat-marker.risk-high { box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.4), 0 2px 6px rgba(0,0,0,0.3); }
