:root {
    --bg: #f5f6f8;
    --panel: #ffffff;
    --text: #1c2230;
    --muted: #6b7280;
    --border: #e2e5eb;
    --brand: #2a5bd7;
    --brand-dark: #1e44a8;
    --accent: #0f9d6e;
    --danger: #d64545;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #12151c;
        --panel: #1a1f29;
        --text: #e7eaf0;
        --muted: #94a0b4;
        --border: #2a3040;
        --brand: #6d8dff;
        --brand-dark: #8ba3ff;
        --accent: #3fcf95;
        --danger: #ff6b6b;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 1px 3px rgba(0, 0, 0, .4);
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.45;
}

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-header {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 20px;
}

.brand {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

.brand-mark {
    display: inline-block;
    background: rgba(255, 255, 255, .18);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: .85rem;
    font-weight: 800;
    letter-spacing: .04em;
}

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

.nav-link {
    position: relative;
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 7px;
}
.nav-link:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.nav-link.is-active { background: rgba(255, 255, 255, .18); color: #fff; }

.nav-badge {
    display: inline-block;
    min-width: 18px;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 999px;
    background: #fff;
    color: var(--brand-dark);
    font-size: .72rem;
    font-weight: 800;
    text-align: center;
    line-height: 18px;
}
.nav-badge:empty { display: none; }

.page-title { margin: 24px 0 0; font-size: 1.4rem; }

.site-footer {
    margin-top: 40px;
    padding: 20px 0 40px;
    color: var(--muted);
    font-size: .82rem;
}

.notice {
    margin-top: 24px;
    padding: 16px 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.results-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 18px;
    margin-top: 18px;
    align-items: start;
}

@media (max-width: 900px) {
    .results-layout { grid-template-columns: 1fr; }
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
}

.panel h2 {
    font-size: .95rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    margin: 18px 0 10px;
}
.panel h2:first-child { margin-top: 0; }

.mono { font-variant-numeric: tabular-nums; font-family: "SF Mono", Consolas, Menlo, monospace; font-size: .82rem; }

/* Used by admin/ice-aktar.php forms */
.field-row { margin-bottom: 12px; }
.field-row label { display: block; font-size: .85rem; margin-bottom: 4px; color: var(--muted); }
.field-row input, .field-row select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    font-size: .95rem;
}

/* Filters bar */
.filters-bar { margin-top: 20px; }

.filters-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.filters-head-title { display: flex; align-items: center; gap: 10px; }
.filters-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg);
    color: var(--brand);
    font-size: 1.05rem;
    flex-shrink: 0;
}
.filters-title { font-size: 1.05rem; font-weight: 700; }
.filters-desc { font-size: .8rem; color: var(--muted); margin-top: 1px; }
.filters-head-actions { display: flex; align-items: center; gap: 10px; }

.filter-count-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: .76rem;
    font-weight: 700;
    white-space: nowrap;
}

.btn-clear {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 7px;
    padding: 6px 12px;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
}
.btn-clear:hover { background: var(--bg); border-color: var(--brand); color: var(--brand); }

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.f-field { display: grid; gap: 5px; min-width: 0; }
.f-field-wide { grid-column: span 2; }
.f-field span { font-size: .78rem; font-weight: 700; color: var(--muted); }
.f-field input, .f-field select {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--bg);
    color: var(--text);
    font-size: .9rem;
}
.f-field input:focus, .f-field select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent);
}

.filters-extra {
    display: grid;
    grid-template-columns: minmax(260px, 380px) 1fr;
    gap: 12px;
    margin-top: 14px;
}
@media (max-width: 720px) {
    .filters-extra { grid-template-columns: 1fr; }
    .f-field-wide { grid-column: span 1; }
}

.range-box, .quick-filters {
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--bg);
    padding: 10px 12px;
}
.range-box-head span {
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
}
.range-box-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.range-box-inputs label { display: grid; gap: 4px; }
.range-box-inputs label span { font-size: .72rem; color: var(--muted); font-weight: 600; }
.range-box-inputs input {
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--panel);
    color: var(--text);
    font-size: .88rem;
}

.quick-filters-label {
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    margin-bottom: 8px;
}
.quick-filters-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.qf-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
}
.qf-chip:hover { border-color: var(--brand); }
.qf-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.btn-block { display: block; width: 100%; margin-top: 16px; padding: 11px; font-size: .95rem; }

.btn {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 7px;
    border: 1px solid transparent;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); margin-left: 8px; }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: 4px 9px; font-size: .78rem; }

.muted { color: var(--muted); font-weight: normal; font-size: .82rem; }

#sonuc-alani { overflow-x: auto; }

table.results-table {
    width: 100%;
    min-width: 920px;
    border-collapse: collapse;
    font-size: .88rem;
}
table.results-table th, table.results-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}
table.results-table th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; }
table.results-table tr:hover td { background: var(--bg); }

.tag {
    display: inline-block;
    font-size: .72rem;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--muted);
}

.tercih-listesi ol { list-style: none; margin: 0; padding: 0; }
.tercih-listesi li {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 8px;
    font-size: .84rem;
}
.tercih-listesi li .li-baslik { font-weight: 600; }
.tercih-listesi li .li-alt { color: var(--muted); font-size: .78rem; margin: 2px 0 6px; }
.tercih-listesi li .li-btns { display: flex; gap: 6px; }
.tercih-listesi li .li-btns button {
    border: 1px solid var(--border);
    background: var(--bg);
    border-radius: 5px;
    cursor: pointer;
    padding: 2px 7px;
    font-size: .78rem;
    color: var(--text);
}
.tercih-listesi li .li-btns button.danger { color: var(--danger); }

.tercih-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.tercih-actions .btn { flex: 1; }

.print-table-wrap { overflow-x: auto; margin-top: 20px; }
.print-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.print-table th, .print-table td {
    border: 1px solid var(--border);
    padding: 8px 10px;
    font-size: .88rem;
    text-align: left;
}
.print-table th { background: var(--bg); }

.list-actions { margin-top: 20px; display: flex; gap: 10px; }

@media print {
    .no-print, .site-header, .list-actions { display: none !important; }
    body { background: #fff; }
    .print-table th { background: #eee; }
}
