:root,
html[data-theme="dark"] {
    --fr-green: #3db54a;
    --fr-green-dark: #2f9a3b;
    --fr-navy: #0a1d37;
    --fr-page-bg: #0b121c;
    --fr-panel: #141c27;
    --fr-panel-2: #1a222d;
    --fr-ink: #e8eef7;
    --fr-heading: #ffffff;
    --fr-muted: #9aa8bc;
    --fr-line: rgba(255, 255, 255, .08);
    --fr-input-bg: #0f1621;
    --fr-input-border: rgba(255, 255, 255, .12);
    --fr-placeholder: #6d7b90;
    --fr-topbar-bg: rgba(20, 28, 39, .88);
    --fr-hover-bg: rgba(255, 255, 255, .05);
    --fr-table-head-bg: rgba(0, 0, 0, .22);
    --fr-table-hover: rgba(255, 255, 255, .03);
    --fr-detail-bg: rgba(0, 0, 0, .18);
    --fr-outline-border: rgba(255, 255, 255, .22);
    --fr-icon-border: rgba(255, 255, 255, .14);
    --fr-map-bg: #0a1018;
    --fr-link-hover: #7be086;
    --fr-code: #9ad0ff;
    --fr-close-filter: invert(1);
    --fr-toggle-track: #2a3545;
    --sidebar-w: 240px;
    --brand: var(--fr-green);
    --brand-dark: var(--fr-green-dark);
    color-scheme: dark;
}

html[data-theme="light"] {
    --fr-page-bg: #f4f6f9;
    --fr-panel: #ffffff;
    --fr-panel-2: #ffffff;
    --fr-ink: #152238;
    --fr-heading: #0a1d37;
    --fr-muted: #5b6b82;
    --fr-line: #e6edf5;
    --fr-input-bg: #ffffff;
    --fr-input-border: #d7dee8;
    --fr-placeholder: #8a97ab;
    --fr-topbar-bg: rgba(255, 255, 255, .92);
    --fr-hover-bg: rgba(10, 29, 55, .05);
    --fr-table-head-bg: #f6f8fb;
    --fr-table-hover: rgba(10, 29, 55, .035);
    --fr-detail-bg: #f6f8fb;
    --fr-outline-border: #cfd8e6;
    --fr-icon-border: #d7dee8;
    --fr-map-bg: #e8eef5;
    --fr-link-hover: #2f9a3b;
    --fr-code: #1d4f91;
    --fr-close-filter: none;
    --fr-toggle-track: #d7dee8;
    color-scheme: light;
}

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

body.app-body {
    margin: 0;
    min-height: 100vh;
    background: var(--fr-page-bg);
    color: var(--fr-ink);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--fr-green); text-decoration: none; }
a:hover { color: var(--fr-link-hover); }

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    background: var(--fr-panel);
    border-right: 1px solid var(--fr-line);
    display: flex;
    flex-direction: column;
    padding: 1rem .85rem;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 40;
}

.sidebar-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .15rem 0 .85rem;
}

.sidebar-brand {
    display: block;
    padding: .2rem .35rem;
    min-width: 0;
    flex: 1 1 auto;
}

.sidebar-logo {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 48px;
    object-fit: contain;
}

.sidebar-close {
    display: none;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    border: 1px solid var(--fr-line);
    background: var(--fr-panel-2);
    color: var(--fr-heading);
    font-size: 1.45rem;
    line-height: 1;
    padding: 0;
    flex: 0 0 auto;
    cursor: pointer;
}
.sidebar-close:hover {
    background: var(--fr-hover-bg);
}

.sidebar-nav {
    display: grid;
    gap: .35rem;
    flex: 0 0 auto;
}

.sidebar-contact {
    margin-top: auto;
    padding: .9rem .55rem .75rem;
    border-top: 1px solid var(--fr-line);
    display: grid;
    gap: .45rem;
}

.sidebar-contact-title {
    margin: 0 0 .15rem;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--fr-green);
}

.sidebar-contact-link {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--fr-muted) !important;
    font-size: .84rem;
    font-weight: 600;
    padding: .35rem .4rem;
    border-radius: 8px;
    word-break: break-all;
}
.sidebar-contact-link svg {
    width: 1.05rem;
    height: 1.05rem;
    flex: 0 0 auto;
}
.sidebar-contact-link:hover {
    color: var(--fr-heading) !important;
    background: var(--fr-hover-bg);
}

.sidebar-backdrop {
    display: none;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .72rem .8rem;
    border-radius: 10px;
    color: var(--fr-muted) !important;
    font-weight: 600;
    font-size: .95rem;
    transition: background .15s ease, color .15s ease;
}

.sidebar-link svg {
    width: 1.2rem;
    height: 1.2rem;
    flex: 0 0 auto;
}

.sidebar-link:hover {
    background: var(--fr-hover-bg);
    color: var(--fr-heading) !important;
}

.sidebar-link.is-active {
    background: rgba(61, 181, 74, .14);
    color: var(--fr-heading) !important;
}

.sidebar-link.is-active svg { color: var(--fr-green); }

.sidebar-foot {
    border-top: 1px solid var(--fr-line);
    padding-top: .85rem;
    margin-top: .35rem;
    flex: 0 0 auto;
}

.sidebar-user {
    color: var(--fr-muted);
    font-size: .82rem;
    padding: 0 .5rem .55rem;
    word-break: break-all;
}

.sidebar-logout {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--fr-muted) !important;
    font-weight: 600;
    font-size: .9rem;
    padding: .45rem .5rem;
    border-radius: 8px;
}

.sidebar-logout svg { width: 1.1rem; height: 1.1rem; }
.sidebar-logout:hover { color: var(--fr-heading) !important; background: var(--fr-hover-bg); }

.app-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 60px;
    padding: .65rem 1.25rem;
    border-bottom: 1px solid var(--fr-line);
    background: var(--fr-topbar-bg);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar-heading {
    display: flex;
    align-items: baseline;
    gap: 20px;
    flex: 1 1 auto;
    min-width: 0;
}
.topbar-title {
    font-weight: 800;
    color: var(--fr-heading);
    font-size: 1.05rem;
    flex: 0 0 auto;
    white-space: nowrap;
}
.topbar-note {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 950px;
    color: #4a5568;
    font-size: 14px;
    font-style: italic;
    font-weight: 400;
    line-height: 1.4;
}
.topbar-note strong {
    font-weight: 800;
    font-style: italic;
    color: inherit;
}
html[data-theme="dark"] .topbar-note {
    color: #9aa8bc;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    border: 1px solid var(--fr-line);
    background: var(--fr-panel-2);
    color: var(--fr-muted);
    border-radius: 999px;
    padding: .35rem .7rem .35rem .4rem;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
}
.theme-toggle:hover {
    color: var(--fr-heading);
    border-color: var(--fr-outline-border);
}
.theme-toggle-track {
    width: 2.4rem;
    height: 1.35rem;
    border-radius: 999px;
    background: var(--fr-toggle-track);
    position: relative;
    flex: 0 0 auto;
}
.theme-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 50%;
    background: var(--fr-green);
    transition: transform .18s ease;
}
html[data-theme="light"] .theme-toggle-thumb {
    transform: translateX(1.05rem);
}
.theme-toggle-label::before {
    content: "Gece";
}
html[data-theme="light"] .theme-toggle-label::before {
    content: "Gündüz";
}

/* Sayfa uyarıları (bilgi kutuları) — Ayarlar'dan kapatılabilir; hata mesajları etkilenmez */
html[data-alerts="off"] .app-alert {
    display: none !important;
}

.alerts-toggle {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    border: 1px solid var(--fr-line);
    background: var(--fr-panel-2);
    color: var(--fr-muted);
    border-radius: 999px;
    padding: .4rem .85rem .4rem .45rem;
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
}
.alerts-toggle:hover {
    color: var(--fr-heading);
    border-color: var(--fr-outline-border);
}
.alerts-toggle-track {
    width: 2.4rem;
    height: 1.35rem;
    border-radius: 999px;
    background: var(--fr-toggle-track);
    position: relative;
    flex: 0 0 auto;
}
.alerts-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 50%;
    background: var(--fr-green);
    transition: transform .18s ease;
}
html[data-alerts="off"] .alerts-toggle-thumb {
    transform: translateX(1.05rem);
    background: #9aa8bc;
}
.alerts-toggle-label::before {
    content: "Uyarılar Açık";
}
html[data-alerts="off"] .alerts-toggle-label::before {
    content: "Uyarılar Kapalı";
}

.sidebar-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--fr-line);
    background: var(--fr-panel-2);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 0;
}
.sidebar-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--fr-heading);
}

.app-content {
    padding: 1.25rem;
    width: min(1280px, 100%);
    margin-inline: auto;
}

.card {
    background: var(--fr-panel-2) !important;
    border: 1px solid var(--fr-line) !important;
    border-radius: 14px !important;
    color: var(--fr-ink);
    box-shadow: none !important;
}

html[data-theme="light"] .card {
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .05) !important;
}

.card-title,
h1, h2, h3, h4, h5, h6 { color: var(--fr-heading); }

.text-muted { color: var(--fr-muted) !important; }

.form-label { color: var(--fr-muted); font-weight: 600; font-size: .86rem; }

.form-control,
.form-select {
    background: var(--fr-input-bg) !important;
    border: 1px solid var(--fr-input-border) !important;
    color: var(--fr-ink) !important;
    border-radius: 10px;
}

.form-control::placeholder { color: var(--fr-placeholder); }

.form-control:focus,
.form-select:focus {
    border-color: var(--fr-green) !important;
    box-shadow: 0 0 0 .2rem rgba(61, 181, 74, .18) !important;
}

.form-select option {
    background: var(--fr-panel);
    color: var(--fr-ink);
}

.btn { border-radius: 10px; font-weight: 700; }

.btn-primary {
    background: var(--fr-green) !important;
    border-color: var(--fr-green) !important;
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(61, 181, 74, .25);
}
.btn-primary:hover {
    background: var(--fr-green-dark) !important;
    border-color: var(--fr-green-dark) !important;
}

.btn-success {
    background: #238636 !important;
    border-color: #238636 !important;
}

.btn-outline-secondary,
.btn-outline-light {
    color: var(--fr-ink) !important;
    border-color: var(--fr-outline-border) !important;
    background: transparent !important;
}
.btn-outline-secondary:hover,
.btn-outline-light:hover {
    background: var(--fr-hover-bg) !important;
    color: var(--fr-heading) !important;
}

.btn-outline-danger {
    color: #e53935 !important;
    border-color: rgba(229, 57, 53, .45) !important;
}

.alert {
    border-radius: 12px;
    border: 1px solid transparent;
}
.alert-warning {
    background: rgba(255, 193, 7, .12);
    border-color: rgba(255, 193, 7, .28);
    color: #9a6b00;
}
html[data-theme="dark"] .alert-warning { color: #ffe082; }
.alert-info {
    background: rgba(47, 111, 214, .12);
    border-color: rgba(47, 111, 214, .28);
    color: #1d4f91;
}
html[data-theme="dark"] .alert-info { color: #b3d1ff; }
.alert-danger {
    background: rgba(239, 83, 80, .12);
    border-color: rgba(239, 83, 80, .3);
    color: #b71c1c;
}
html[data-theme="dark"] .alert-danger { color: #ffcdd2; }
.alert-warning a,
.alert-info a { color: inherit; text-decoration: underline; }
.btn-close { filter: var(--fr-close-filter); opacity: .7; }

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--fr-ink);
    --bs-table-border-color: var(--fr-line);
    --bs-table-hover-bg: var(--fr-table-hover);
    --bs-table-hover-color: var(--fr-heading);
    color: var(--fr-ink);
}

.table thead th {
    text-transform: none;
    font-size: 13px;
    letter-spacing: .02em;
    font-weight: 700;
    color: var(--fr-muted);
    background: var(--fr-table-head-bg);
    border-bottom-width: 1px;
    white-space: nowrap;
}

#resultsTable,
#leadsTable,
#resultsTable td,
#resultsTable th,
#leadsTable td,
#leadsTable th {
    font-size: 14px;
}

#leadsTable .col-name,
#resultsTable .col-name {
    width: 18%;
    max-width: 220px;
    word-break: break-word;
}

#leadsTable .col-phone,
#resultsTable .col-phone {
    width: 1%;
    min-width: 150px;
    white-space: nowrap;
}

#leadsTable .col-il,
#leadsTable .col-ilce,
#leadsTable .col-website,
#resultsTable .col-website,
#leadsTable .col-email,
#resultsTable .col-email,
#leadsTable .col-rating,
#resultsTable .col-rating,
#leadsTable .col-fav,
#resultsTable .col-fav,
#leadsTable .col-actions {
    width: 1%;
    white-space: nowrap;
}

#leadsTable .lead-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: .35rem;
}

#leadsTable .col-address,
#resultsTable .col-address {
    max-width: 260px;
    word-break: break-word;
}

.business-link { color: var(--fr-heading) !important; font-weight: 700; }
.business-link:hover { color: var(--fr-green) !important; }

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border-radius: .55rem;
    border: 1px solid var(--fr-icon-border);
    background: transparent;
    color: var(--fr-muted);
    line-height: 1;
}
.btn-icon svg { width: 1rem; height: 1rem; }
.btn-icon:hover { color: var(--fr-heading); border-color: var(--fr-outline-border); }

.btn-fav.is-fav {
    color: #d4a017;
    border-color: rgba(212, 160, 23, .45);
    background: rgba(246, 196, 69, .12);
}

.btn-delete-lead { color: #e53935; }

.btn-kw { color: var(--fr-green); }
.btn-kw:hover,
.btn-kw:focus-visible,
.btn-kw[aria-expanded="true"] {
    color: #fff;
    background: var(--fr-green);
    border-color: var(--fr-green);
}
.btn-kw.is-empty { color: var(--fr-muted); }
.btn-kw.is-empty:hover,
.btn-kw.is-empty:focus-visible,
.btn-kw.is-empty[aria-expanded="true"] {
    color: var(--fr-heading);
    background: var(--fr-hover-bg);
    border-color: var(--fr-outline-border);
}

.kw-active-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .45rem .6rem;
    margin-top: .85rem;
    padding-top: .85rem;
    border-top: 1px solid var(--fr-line);
}
.kw-active-label {
    color: var(--fr-muted);
    font-size: .82rem;
    font-weight: 600;
}

.kw-tip-panel {
    position: fixed;
    z-index: 80;
    width: min(280px, calc(100vw - 24px));
    background: var(--fr-panel);
    color: var(--fr-ink);
    border: 1px solid var(--fr-line);
    border-radius: 16px;
    padding: .9rem .95rem .85rem;
    box-shadow: 0 18px 40px rgba(10, 29, 55, .22);
    text-align: left;
}
.kw-tip-panel::after {
    content: "";
    position: absolute;
    right: var(--kw-arrow, 14px);
    bottom: -7px;
    width: 14px;
    height: 14px;
    background: var(--fr-panel);
    border-right: 1px solid var(--fr-line);
    border-bottom: 1px solid var(--fr-line);
    transform: rotate(45deg);
}
.kw-tip-panel.is-above::after {
    bottom: auto;
    top: -7px;
    border-right: 0;
    border-bottom: 0;
    border-left: 1px solid var(--fr-line);
    border-top: 1px solid var(--fr-line);
}
.kw-tip-panel[hidden] { display: none !important; }
.kw-tip-title {
    display: block;
    color: var(--fr-heading);
    font-size: .95rem;
    font-weight: 800;
    margin-bottom: .55rem;
}
.kw-tip-empty {
    margin: 0;
    color: var(--fr-muted);
    font-size: .82rem;
    line-height: 1.45;
}
.kw-tip-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.kw-chip {
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    max-width: 100%;
    padding: .28rem .7rem;
    border-radius: 999px;
    background: rgba(61, 181, 74, .12);
    color: var(--fr-heading);
    border: 1px solid rgba(61, 181, 74, .3);
    font-size: .8rem;
    font-weight: 650;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
}
.kw-chip:hover {
    background: var(--fr-green);
    color: #fff;
    border-color: var(--fr-green);
}
.kw-chip.is-active {
    background: var(--fr-green);
    color: #fff;
    border-color: var(--fr-green);
}
.kw-chip-x {
    font-size: 1.05rem;
    line-height: 1;
    font-weight: 700;
}

.rating-badge {
    white-space: nowrap;
    color: #d4a017;
    font-weight: 700;
    font-size: .88rem;
}

.leads-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: .75rem;
}

.leads-filter-bar .filter-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 140px;
    max-width: 200px;
}
.leads-filter-bar .filter-field--search {
    flex: 1 1 100%;
    max-width: none;
    min-width: 0;
}
.name-suggest {
    position: relative;
}
.name-suggest-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 20;
    max-height: 280px;
    overflow-y: auto;
    background: var(--fr-panel-2);
    border: 1px solid var(--fr-line);
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(10, 29, 55, .12);
    padding: .3rem;
}
.name-suggest-item {
    display: flex;
    flex-direction: column;
    gap: .12rem;
    width: 100%;
    text-align: left;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--fr-ink);
    padding: .55rem .7rem;
    cursor: pointer;
}
.name-suggest-item:hover,
.name-suggest-item.is-active {
    background: var(--fr-hover-bg);
}
.name-suggest-item strong {
    color: var(--fr-heading);
    font-size: .9rem;
    font-weight: 700;
}
.name-suggest-item span {
    color: var(--fr-muted);
    font-size: .78rem;
}
.name-suggest-empty {
    padding: .7rem .8rem;
    color: var(--fr-muted);
    font-size: .84rem;
}

.leads-filter-bar .filter-checks {
    flex: 1 1 220px;
    max-width: none;
    display: flex;
    flex-wrap: wrap;
    gap: .55rem .9rem;
    align-items: center;
    padding-bottom: .35rem;
}

.leads-filter-bar .form-check-label {
    color: var(--fr-muted);
    font-size: .86rem;
}

.leads-filter-bar .filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    flex: 0 0 auto;
    margin-left: auto;
}

.map-card .card-body { padding: .75rem; }
.fr-map {
    height: 340px;
    width: 100%;
    border-radius: 12px;
    background: var(--fr-map-bg);
    z-index: 1;
}
.fr-map--detail { height: 280px; }

.fr-map-pin-wrap { background: transparent !important; border: none !important; }
.fr-map-pin {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: var(--pin, #2f6fd6);
    box-shadow: 0 0 0 2px rgba(255,255,255,.35), 0 4px 10px rgba(0,0,0,.45);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 1rem;
}
.detail-list {
    display: grid;
    gap: .75rem;
}
.detail-item {
    display: grid;
    gap: .2rem;
    padding: .85rem .95rem;
    border: 1px solid var(--fr-line);
    border-radius: 12px;
    background: var(--fr-detail-bg);
}
.detail-item dt {
    color: var(--fr-muted);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 0;
}
.detail-item dd {
    margin: 0;
    color: var(--fr-heading);
    font-weight: 600;
    word-break: break-word;
}
.hours-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: .3rem;
    font-size: .9rem;
    color: var(--fr-muted);
}
.open-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border-radius: 999px;
    padding: .25rem .65rem;
    font-size: .78rem;
    font-weight: 800;
}
.open-pill--yes { background: rgba(61,181,74,.18); color: #2f9a3b; }
html[data-theme="dark"] .open-pill--yes { color: #8ee49a; }
.open-pill--no { background: rgba(239,83,80,.16); color: #c62828; }
html[data-theme="dark"] .open-pill--no { color: #ffab91; }

.pagination .page-link {
    border-radius: .5rem;
    margin: 0 2px;
    border: none;
    color: var(--fr-heading);
    background-color: var(--fr-hover-bg);
}
.pagination .page-item.active .page-link {
    background-color: var(--fr-green);
    color: #fff;
}
.pagination .page-item.disabled .page-link {
    background-color: transparent;
    color: var(--fr-placeholder);
}

code { color: var(--fr-code); }

@media (max-width: 992px) {
    .detail-grid { grid-template-columns: 1fr; }
    .sidebar-close { display: inline-flex; align-items: center; justify-content: center; }
    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 45;
        background: rgba(7, 12, 20, .55);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }
    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }
    .sidebar-backdrop[hidden] {
        display: none !important;
    }
    .app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 50;
        transform: translateX(-105%);
        transition: transform .2s ease;
        box-shadow: 16px 0 40px rgba(0,0,0,.35);
    }
    body.sidebar-open .app-sidebar { transform: translateX(0); }
    .sidebar-toggle { display: inline-flex; }
    .app-content { padding: 1rem; }
}

@media (max-width: 720px) {
    .fr-map { height: 260px; }
    .leads-filter-bar .filter-field { max-width: none; flex: 1 1 100%; }
    .leads-filter-bar .filter-field--search { flex: 1 1 100%; }
    .leads-filter-bar .filter-actions { margin-left: 0; width: 100%; }
    .theme-toggle-label { display: none; }

    /* Mobil listelerde yalnızca işletme adı + telefon */
    #leadsTable .col-fav,
    #leadsTable .col-il,
    #leadsTable .col-ilce,
    #leadsTable .col-rating,
    #leadsTable .col-website,
    #leadsTable .col-email,
    #leadsTable .col-address,
    #resultsTable .col-fav,
    #resultsTable .col-rating,
    #resultsTable .col-website,
    #resultsTable .col-email,
    #resultsTable .col-address {
        display: none !important;
    }

    #leadsTable .col-name,
    #resultsTable .col-name {
        width: auto;
        max-width: none;
    }

    #leadsTable .col-phone,
    #resultsTable .col-phone {
        width: 1%;
        min-width: 0;
        white-space: nowrap;
        text-align: right;
    }
}

/* Login */
body.login-page {
    background: radial-gradient(120% 100% at 50% 0%, #163a66 0%, #0a1d37 55%, #07182e 100%);
    color: #fff;
}
html[data-theme="light"] body.login-page {
    background: linear-gradient(160deg, #eef4ff, #f5ffef 55%, #fff);
    color: var(--fr-ink);
}
body.bg-light { background: var(--fr-page-bg) !important; color: var(--fr-ink); }
.navbar.bg-dark {
    background: var(--fr-panel) !important;
    box-shadow: none;
}

.call-count-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}
.call-count-label {
    color: var(--fr-heading);
    font-size: .92rem;
    font-weight: 700;
}
.call-stepper {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}
.call-stepper-btn {
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--fr-icon-border);
    border-radius: 8px;
    background: var(--fr-input-bg);
    color: var(--fr-heading);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
}
.call-stepper-btn:hover:not(:disabled) {
    border-color: var(--fr-green);
    color: var(--fr-green);
}
.call-stepper-btn:disabled {
    opacity: .4;
    cursor: default;
}
.call-stepper-value {
    min-width: 1.8rem;
    text-align: center;
    color: var(--fr-heading);
    font-size: 1.15rem;
    font-weight: 800;
}
.meta-save-status {
    min-height: 1.1rem;
    margin-top: .45rem;
    font-size: .78rem;
    font-weight: 600;
    color: var(--fr-muted);
}
.meta-save-status.is-ok { color: var(--fr-green); }
.meta-save-status.is-err { color: #e57373; }
.notes-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .65rem;
}
.notes-title {
    color: var(--fr-heading);
    font-size: .92rem;
    font-weight: 800;
}
.notes-head .meta-save-status { margin: 0; min-height: 0; }
.notes-editor {
    border: 1px solid var(--fr-line);
    border-radius: 12px;
    overflow: hidden;
    background: var(--fr-detail-bg);
}
.notes-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
    padding: .5rem .6rem;
    border-bottom: 1px solid var(--fr-line);
    background: var(--fr-panel-2);
}
.notes-tool {
    min-width: 1.85rem;
    height: 1.85rem;
    padding: 0 .4rem;
    border: 1px solid var(--fr-icon-border);
    border-radius: 7px;
    background: var(--fr-input-bg);
    color: var(--fr-heading);
    font-size: .82rem;
    font-weight: 800;
    cursor: pointer;
}
.notes-tool:hover { border-color: var(--fr-green); color: var(--fr-green); }
.notes-tool-sep {
    width: 1px;
    height: 1.2rem;
    background: var(--fr-line);
    margin: 0 .15rem;
}
.notes-color {
    width: 1.85rem;
    height: 1.85rem;
    border: 1px solid var(--fr-icon-border);
    border-radius: 7px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: var(--fr-input-bg);
    cursor: pointer;
}
.notes-color input {
    width: 2.2rem;
    height: 2.2rem;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}
.notes-swatch {
    width: 1.15rem;
    height: 1.15rem;
    border: 1px solid var(--fr-icon-border);
    border-radius: 50%;
    background: var(--sw);
    padding: 0;
    cursor: pointer;
}
.notes-area {
    min-height: calc(1.55em * 10 + 1.4rem);
    padding: .85rem .95rem;
    color: var(--fr-ink);
    font-size: .94rem;
    line-height: 1.55;
    outline: none;
    overflow-y: auto;
}
.notes-area:focus {
    box-shadow: inset 0 0 0 2px rgba(61, 181, 74, .22);
}
.notes-area p { margin: 0 0 .65em; }
.notes-area p:last-child { margin-bottom: 0; }
.notes-area ul,
.notes-area ol { margin: 0 0 .65em; padding-left: 1.2rem; }
