/* Aesthetic Dental CRM — tasarım */
[hidden] { display: none !important; }
:root {
  --bg: #f4f5f3;
  --surface: #ffffff;
  --col: #eceeeb;
  --text: #1d2321;
  --muted: #66706c;
  --line: #dde1de;
  --brand: #0f6e64;
  --brand-ink: #ffffff;
  --brand-soft: #e2f1ee;
  --red: #b42318; --red-soft: #fdecea;
  --amber: #93590b; --amber-soft: #fbf0dc;
  --green: #2f6b14; --green-soft: #e8f3dc;
  --blue: #185fa5; --blue-soft: #e6f0fa;
  --radius: 10px;
  --topbar: 56px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121514; --surface: #1c201f; --col: #171a19; --text: #e8ebe9; --muted: #9aa4a0; --line: #2d3331;
    --brand: #3fb3a3; --brand-ink: #06231f; --brand-soft: #173430;
    --red: #f2918a; --red-soft: #3a1c1a; --amber: #f0bf6b; --amber-soft: #352914;
    --green: #9ed37a; --green-soft: #1f2e16; --blue: #8dbdf0; --blue-soft: #16273a;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; }
a { color: inherit; }
h1, h2 { font-weight: 600; }
.muted { color: var(--muted); }
input, select, button { font: inherit; color: inherit; }
input, select {
  width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
}
input:focus, select:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
label input, label select { margin-top: 6px; color: var(--text); font-size: 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 18px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface); text-decoration: none; cursor: pointer; font-weight: 600; }
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn-block { width: 100%; }
.alert { background: var(--red-soft); color: var(--red); padding: 10px 12px; border-radius: var(--radius); margin-bottom: 14px; font-size: 14px; }
.alert-info { background: var(--blue-soft); color: var(--blue); }
.pill { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 99px; }
.pill-red { background: var(--red-soft); color: var(--red); }

/* ---------- Giriş ---------- */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px 24px; }
.auth-card h1 { font-size: 22px; margin: 18px 0 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--brand); color: var(--brand-ink);
  display: grid; place-items: center; font-size: 13px; letter-spacing: .5px; flex: none; }
.lang-switch { display: flex; gap: 14px; justify-content: center; margin-top: 18px; font-size: 13px; }
.lang-switch a { color: var(--muted); text-decoration: none; }
.lang-switch a.on { color: var(--brand); font-weight: 600; }

/* ---------- Üst bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar); display: flex; align-items: center; gap: 16px;
  padding: 0 16px; padding-top: env(safe-area-inset-top); background: var(--surface); border-bottom: 1px solid var(--line); }
.topnav { display: flex; gap: 4px; flex: 1; }
.topnav a { text-decoration: none; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 14px; }
.topnav a.on { background: var(--brand-soft); color: var(--brand); }
.user-box { display: flex; align-items: center; gap: 12px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.logout { font-size: 14px; color: var(--muted); text-decoration: none; }
@media (max-width: 640px) { .brand-name { display: none; } }

/* ---------- İşlemsiz kart uyarısı ---------- */
.board-page { padding: 14px 0 24px; }
.stale { margin: 0 16px 14px; }
.stale-banner { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; cursor: pointer;
  background: var(--red-soft); color: var(--red); border: 2px solid var(--red); border-radius: 14px; padding: 16px 18px; }
.stale-icon { width: 38px; height: 38px; border-radius: 50%; background: var(--red); color: var(--red-soft);
  display: grid; place-items: center; font-weight: 800; font-size: 22px; flex: none; }
.stale-text { flex: 1; display: flex; flex-direction: column; }
.stale-text strong { font-size: 17px; line-height: 1.3; }
.stale-text small { font-size: 13px; opacity: .85; margin-top: 2px; }
.chev { font-size: 18px; transition: transform .2s; }
.stale-banner[aria-expanded=true] .chev { transform: rotate(180deg); }
.stale-list { background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px;
  margin-top: -8px; padding: 14px 8px 8px; }
.stale-group { display: flex; justify-content: space-between; align-items: center; padding: 10px 10px 4px; font-weight: 700; font-size: 14px; }
.stale-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 10px;
  border-radius: 8px; text-decoration: none; border-bottom: 1px solid var(--line); }
.stale-row:last-child { border-bottom: 0; }
.stale-row span:first-child { font-weight: 600; }

/* ---------- Araç çubuğu ---------- */
.toolbar { display: flex; gap: 10px; margin: 0 16px 6px; }
.toolbar .search { flex: 1; }
.toolbar select { width: auto; min-width: 150px; }
.swipe-hint { display: none; margin: 4px 16px 6px; font-size: 12px; color: var(--muted); }

/* ---------- Kanban ---------- */
.board { display: flex; gap: 12px; overflow-x: auto; padding: 8px 16px 16px; align-items: flex-start;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; min-height: calc(100vh - 200px); }
.col { flex: 0 0 272px; background: var(--col); border-radius: 14px; padding: 10px; scroll-snap-align: start; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 4px 10px; position: sticky; top: 0; }
.col-head h2 { font-size: 14px; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.count { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 1px 9px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.dot-blue { background: #378add; } .dot-red { background: #e24b4a; } .dot-amber { background: #ef9f27; } .dot-green { background: #639922; }
.col-body { min-height: 60px; display: flex; flex-direction: column; gap: 8px; }
.empty { display: none; margin: 6px 4px; font-size: 13px; color: var(--muted); text-align: center; padding: 14px 0; border: 1px dashed var(--line); border-radius: var(--radius); }
.col-body:not(:has(.card)) .empty { display: block; }

.card { display: flex; flex-direction: column; gap: 3px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 11px 12px; text-decoration: none; cursor: grab;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: pan-x pan-y; }
.card:hover { border-color: var(--brand); }
.card-stale { border-left: 4px solid var(--red); }
.card-name { font-weight: 650; font-size: 15px; }
.card-price { font-size: 14px; color: var(--text); }
.card-price i { color: var(--muted); font-style: normal; font-size: 13px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
.owner { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fu { font-size: 12px; font-weight: 600; border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.fu-pending { background: var(--blue-soft); color: var(--blue); }
.fu-late { background: var(--red-soft); color: var(--red); }
.fu-done { background: var(--green-soft); color: var(--green); }
.fu-none { background: var(--col); color: var(--muted); }

.placeholder { border: 2px dashed var(--brand); border-radius: var(--radius); background: var(--brand-soft); }
.dragging-src { display: none !important; }
.ghost { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; box-shadow: 0 12px 28px rgba(0,0,0,.18); border-color: var(--brand); }
body.is-dragging { cursor: grabbing; -webkit-user-select: none; user-select: none; }

/* Telefon: sütunlar biraz daha dar, bir sonraki sütunun kenarı görünsün */
@media (max-width: 640px) {
  .col { flex-basis: 82vw; }
  .swipe-hint { display: block; }
  .toolbar { flex-wrap: wrap; }
  .toolbar select { flex: 1 1 100%; }
}

/* ---------- Bildirim ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; transition: .2s; z-index: 200;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 99px; font-size: 14px; font-weight: 600; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--red); color: #fff; }

/* ---------- Hasta kartı (1. parça) ---------- */
.lead-page { max-width: 640px; margin: 0 auto; padding: 16px; }
.back { display: inline-block; text-decoration: none; color: var(--muted); margin-bottom: 12px; font-weight: 600; }
.lead-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.lead-card h1 { margin: 0 0 14px; font-size: 22px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0 0 18px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }

/* ---------- 2. parça ---------- */
.alert-ok { background: var(--green-soft); color: var(--green); }
.small { font-size: 12px; }
textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font: inherit; font-size: 16px; color: var(--text); resize: vertical; margin-bottom: 10px; }
textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger-outline { color: var(--red); border-color: var(--red); background: transparent; }
.btn-ghost { border-style: dashed; background: transparent; color: var(--brand); }
.btn.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

/* Geliş uyarısı */
.notice { margin: 0 16px 14px; }
.notice-banner { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; cursor: pointer;
  background: var(--blue-soft); color: var(--blue); border: 2px solid var(--blue); border-radius: 14px; padding: 14px 18px; }
.notice-icon { width: 38px; height: 38px; border-radius: 50%; background: var(--blue); color: var(--blue-soft); display: grid; place-items: center; font-size: 18px; flex: none; }
.notice-banner[aria-expanded=true] .chev { transform: rotate(180deg); }
.fu-arr { background: var(--blue-soft); color: var(--blue); }
.tags { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }

/* Hasta kartı */
.lead-page { max-width: 720px; display: flex; flex-direction: column; gap: 12px; }
.lead-page > .back, .lead-page > .alert { margin-bottom: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.panel h2 { font-size: 16px; margin: 0 0 12px; }
.lead-head h1 { margin: 0 0 14px; font-size: 24px; line-height: 1.2; }
.facts dd a { color: var(--brand); text-decoration: none; }
.owner-line { margin: 0 0 12px; font-size: 14px; }
.inline-form label, .stage-form label { margin-bottom: 10px; }
.stage-form .btn { margin-bottom: 8px; }
.sub summary { color: var(--brand); font-weight: 600; font-size: 14px; padding: 4px 0 10px; }
.row-form, .price-row { display: flex; gap: 8px; }
.row-form input { flex: 1; }
.lost-box { margin-top: 6px; }
.lost-box > summary { width: 100%; }
.lost-form { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.lost-form .q { font-weight: 700; margin: 4px 0 8px; font-size: 14px; }
.radio { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 15px; padding: 10px 12px; margin-bottom: 6px;
  border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.radio input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--red); }
.radio:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.reasons { margin-top: 10px; }
.treat-form .treat-text { margin-bottom: 8px; }
.price-row input { flex: 1; min-width: 0; }
.price-row select { width: 76px; flex: none; }

.fu-list, .fu-day, .timeline, .file-list { list-style: none; margin: 0; padding: 0; }
.fu-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 8px; background: var(--surface); }
.fu-item.is-late { border-color: var(--red); background: var(--red-soft); }
.fu-item.is-done { opacity: .75; }
.fu-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.fu-title, .fu-patient { font-weight: 700; text-decoration: none; }
.fu-when { font-size: 13px; color: var(--muted); white-space: nowrap; }
.is-late .fu-when { color: var(--red); }
.fu-sub { font-size: 13px; color: var(--muted); margin: 2px 0 4px; }
.res-form { margin-top: 8px; }
.res-form input { height: 38px; font-size: 14px; margin-bottom: 8px; }
.res-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rb { height: 42px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 14px; cursor: pointer; }
.rb-pos { color: var(--green); border-color: var(--green); }
.rb-unc { color: var(--amber); border-color: var(--amber); }
.rb-neg { color: var(--red); border-color: var(--red); }
.res { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 2px 8px; margin-top: 6px; }
.res-positive { background: var(--green-soft); color: var(--green); }
.res-unclear { background: var(--amber-soft); color: var(--amber); }
.res-negative { background: var(--red-soft); color: var(--red); }
.new-fu-link { margin-left: 8px; font-size: 13px; font-weight: 700; color: var(--brand); text-decoration: none; }

.fu-new { margin-top: 10px; }
.tpl-pick { display: grid; gap: 8px; margin: 12px 0; }
.fu-row { display: grid; grid-template-columns: 1fr 34px; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; }
.fu-row .fu-t { grid-column: 1; }
.fu-row .fu-d { grid-column: 1; }
.fu-row .icon-btn { grid-column: 2; grid-row: 1 / span 2; }
.icon-btn { border: 0; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; border-radius: 8px; }
.icon-btn:hover { background: var(--red-soft); color: var(--red); }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
@media (min-width: 641px) {
  .tpl-pick { grid-template-columns: repeat(3, 1fr); }
  .fu-row { grid-template-columns: 1fr 220px 34px; }
  .fu-row .fu-t, .fu-row .fu-d, .fu-row .icon-btn { grid-column: auto; grid-row: auto; }
}

.file-list li { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid var(--line); }
.file-list a { color: var(--brand); font-weight: 600; text-decoration: none; word-break: break-all; }
.upload-form input[type=file] { height: auto; padding: 10px; margin: 10px 0 8px; }

.timeline li { position: relative; padding: 0 0 14px 18px; border-left: 2px solid var(--line); margin-left: 4px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.tl-lost::before, .tl-trash::before { background: var(--red) !important; }
.tl-cross::before, .tl-transfer::before, .tl-owner::before { background: var(--amber) !important; }
.tl-fu_done::before, .tl-arrival::before { background: var(--green) !important; }
.tl-meta { display: block; font-size: 12px; color: var(--muted); }
.tl-body { font-size: 14px; }

/* Win geliş tarihi penceresi */
.modal-wrap { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: center; z-index: 300; padding: 20px; }
.modal { background: var(--surface); border-radius: 16px; padding: 20px; width: 100%; max-width: 360px; }
.modal h2 { font-size: 17px; margin: 0 0 12px; }
.modal .alert { margin: 10px 0 0; }

/* Takiplerim */
.fu-page { max-width: 760px; margin: 0 auto; padding: 14px 16px 30px; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--col); padding: 4px; border-radius: 12px; margin-bottom: 12px; }
.tabs a { text-align: center; padding: 10px 6px; border-radius: 9px; text-decoration: none; font-weight: 700; font-size: 14px; color: var(--muted); }
.tabs a.on { background: var(--surface); color: var(--brand); }
.fu-page .toolbar { margin: 0 0 12px; }
.fu-page .toolbar select { flex: 1; }
.sum-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-bottom: 16px; }
.sum-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.sum-name { font-weight: 700; margin-bottom: 8px; }
.sum-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; font-size: 11px; color: var(--muted); text-align: center; }
.sum-nums b { display: block; font-size: 18px; color: var(--text); }
.sum-nums .bad b { color: var(--red); }
.sum-res { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.empty-state { text-align: center; padding: 30px 0; }
.upload-form .price-row select.kind-select { width: auto; flex: 1; }
.flash-wrap { margin: 0 16px 12px; }

/* ---------- Yönetim paneli ---------- */
.admin-page { max-width: 900px; margin: 0 auto; padding: 14px 16px 40px; display: flex; flex-direction: column; gap: 12px; }
.admin-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.admin-tabs a { flex: none; padding: 9px 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; }
.admin-tabs a.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.help { margin: 0; font-size: 14px; color: var(--muted); }
.panel .help { margin-bottom: 12px; }
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr.off td { opacity: .5; }
.tbl form { margin: 0; }
.chip { border: 1px solid var(--line); background: var(--col); color: var(--muted); border-radius: 99px; padding: 4px 12px; font-size: 13px; font-weight: 700; cursor: pointer; }
.chip-on { background: var(--green-soft); color: var(--green); border-color: var(--green); }
.link { color: var(--brand); font-weight: 700; text-decoration: none; }
.grid-form { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 641px) { .grid-form { grid-template-columns: 1fr 1fr; } }
.form-actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
.weight-row { display: grid; grid-template-columns: 1fr 84px 52px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.weight-row:last-of-type { border-bottom: 0; margin-bottom: 10px; }
.w-name { font-weight: 600; }
.w-pct { font-size: 13px; color: var(--muted); text-align: right; }
.weight-row input { text-align: center; font-size: 18px; font-weight: 700; }
.stage-row { display: flex; gap: 8px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.stage-row:last-child { border-bottom: 0; }
.stage-order { display: flex; flex-direction: column; }
.stage-order .icon-btn { height: 22px; width: 32px; font-size: 12px; }
.stage-order .icon-btn:disabled { opacity: .25; cursor: default; }
.stage-edit { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.stage-edit input[name=name] { flex: 1 1 180px; }
.stage-edit select { width: auto; flex: 0 0 auto; }
.check { display: inline-flex; gap: 6px; align-items: center; margin: 0; color: var(--text); font-size: 14px; }
.check input { width: 18px; height: 18px; margin: 0; }
.stage-del summary { width: 36px; height: 44px; display: grid; place-items: center; }
.del-form { margin-top: 8px; }
.pill { background: var(--col); color: var(--muted); }
.tpl-row { display: grid; grid-template-columns: 1fr 110px 34px; gap: 8px; align-items: center; margin-bottom: 8px; }
.days { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.days input { text-align: center; }
.trash-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.trash-item p { margin: 6px 0 10px; }

/* Telefon: menü alta, kullanıcı tablosu kart görünümü */
@media (max-width: 640px) {
  .topbar { gap: 10px; }
  .topnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .topnav a { flex: 1; text-align: center; padding: 10px 4px; font-size: 13px; }
  .topbar .user-box { margin-left: auto; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .table-wrap { margin: 0; padding: 0; overflow: visible; }
  .tbl { min-width: 0; }
  .tbl thead { display: none; }
  .tbl tr { display: grid; grid-template-columns: 1fr auto auto; gap: 6px 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .tbl td { padding: 0; border: 0; }
  .tbl td:first-child { grid-column: 1 / -1; }
  .tbl td:nth-child(2), .tbl td:nth-child(3) { font-size: 13px; color: var(--muted); }
  .tbl td:nth-child(2) { grid-column: 1; }
  .tbl td:nth-child(3) { grid-column: 2 / -1; text-align: right; }
  .tbl td:nth-child(4) { grid-column: 1; }
  .tbl td:nth-child(5) { grid-column: 2; }
  .tbl td:nth-child(6) { grid-column: 3; text-align: right; }
}
.deact summary { display: inline-block; }
.deact[open] { grid-column: 1 / -1; }
.deact-form { margin-top: 10px; padding: 12px; border: 1px solid var(--red); border-radius: var(--radius); background: var(--red-soft); min-width: 240px; }
.deact-form p { margin: 0 0 8px; font-size: 14px; }
.deact-form select { margin-bottom: 8px; }
a.avatar { text-decoration: none; }
.profile-name { font-size: 22px; margin: 0 0 4px; }
/* Toplu aktarma */
.bulk-toggle-row { margin: 4px 16px 0; display: flex; justify-content: flex-end; gap: 8px; }
.btn-small { height: 34px; padding: 0 12px; font-size: 13px; }
.col-all { display: none; border: 0; background: transparent; color: var(--brand); font-weight: 700; font-size: 12px; cursor: pointer; padding: 2px 4px; }
body.bulk-mode .col-all { display: inline; }
body.bulk-mode .card { cursor: pointer; position: relative; padding-left: 40px; }
body.bulk-mode .card::before { content: ""; position: absolute; left: 12px; top: 13px; width: 18px; height: 18px; border: 2px solid var(--line); border-radius: 5px; background: var(--surface); }
body.bulk-mode .card.selected { border-color: var(--brand); background: var(--brand-soft); }
body.bulk-mode .card.selected::before { background: var(--brand); border-color: var(--brand); box-shadow: inset 0 0 0 3px var(--surface); }
.bulk-bar { position: fixed; left: 12px; right: 12px; bottom: 16px; z-index: 60; display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: var(--surface); border: 2px solid var(--brand); border-radius: 14px; padding: 10px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.15); max-width: 640px; margin: 0 auto; }
.bulk-count { flex: 1 1 100%; font-size: 14px; }
.bulk-bar select { flex: 1; width: auto; }
@media (max-width: 640px) { .bulk-bar { bottom: calc(76px + env(safe-area-inset-bottom)); } }
@media (min-width: 641px) { .bulk-count { flex: 0 0 auto; margin-right: 8px; } }

/* ---------- Raporlar ---------- */
.rep-page { max-width: 1100px; margin: 0 auto; padding: 14px 16px 40px; display: flex; flex-direction: column; gap: 12px; }
.rep-filters { display: flex; flex-direction: column; gap: 8px; }
.seg { display: flex; gap: 4px; background: var(--col); padding: 4px; border-radius: 12px; overflow-x: auto; }
.seg a { flex: 1; text-align: center; white-space: nowrap; padding: 9px 10px; border-radius: 9px; text-decoration: none; font-weight: 700; font-size: 13px; color: var(--muted); }
.seg a.on { background: var(--surface); color: var(--brand); }
.rep-custom { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rep-custom select { grid-column: 1; }
@media (min-width: 641px) { .rep-custom { grid-template-columns: 1fr 1fr 1fr auto; } .rep-custom select { grid-column: auto; } }
.rep-range { margin: 0; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 641px) { .tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.tile-wide { grid-column: 1 / -1; }
@media (min-width: 641px) { .tile-wide { grid-column: auto; } }
.tile-l { font-size: 12px; color: var(--muted); }
.tile-v { font-size: 26px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tile-v-sm { font-size: 18px; }
.table-scroll { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
.rtbl { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.rtbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rtbl td { padding: 9px 8px; border-bottom: 1px solid var(--line); }
.rtbl tr:last-child td { border-bottom: 0; }
.rtbl tr:hover td { background: var(--col); }
.rtbl .n { text-align: right; }
.rtbl tr.off td { opacity: .55; }
.nowrap { white-space: nowrap; }
.bad { color: var(--red); font-weight: 700; }
.panel > .muted.small { margin: 10px 0 0; }
.hbar { display: inline-block; vertical-align: middle; width: 100%; max-width: 160px; height: 10px; border-radius: 0 4px 4px 0; }
.hbar span { display: block; height: 100%; background: var(--brand); border-radius: 0 4px 4px 0; }
.hbar-muted span { background: var(--muted); }
.barcell { display: flex; align-items: center; gap: 8px; min-width: 140px; }
.bv { font-variant-numeric: tabular-nums; font-size: 13px; min-width: 22px; text-align: right; }
.bars { list-style: none; margin: 12px 0 0; padding: 0; }
.bars li { display: grid; grid-template-columns: minmax(0, 1.2fr) 1fr 30px; gap: 10px; align-items: center; padding: 6px 0; font-size: 14px; }
.bars .hbar { max-width: none; }
.bl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rep-2col { display: grid; gap: 12px; }
@media (min-width: 900px) { .rep-2col { grid-template-columns: 1fr 1fr; } }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.split > div { background: var(--col); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; }
.stackcell { min-width: 150px; }
.stack { display: flex; gap: 2px; height: 10px; width: 100%; max-width: 180px; margin-bottom: 2px; }
.stack span:first-child { border-radius: 4px 0 0 4px; } .stack span:last-child { border-radius: 0 4px 4px 0; }
.s-pos { background: #3b7d1e; } .s-unc { background: #c98a1a; } .s-neg { background: #c0392b; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.sub-h { font-size: 14px; margin: 16px 0 8px; }
.heat-scroll { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
.heat { border-collapse: separate; border-spacing: 2px; font-size: 11px; }
.heat th { color: var(--muted); font-weight: 600; padding: 2px 4px; text-align: center; }
.heat tbody th { text-align: left; color: var(--text); font-size: 13px; padding-right: 8px; white-space: nowrap; }
.heat td { width: 22px; height: 22px; border-radius: 4px; background: var(--col); }
.h1 { background: #cfe8e3 !important; } .h2 { background: #8ccbbf !important; } .h3 { background: #3f9e8f !important; } .h4 { background: #0f6e64 !important; }
@media (prefers-color-scheme: dark) {
  .h1 { background: #1d3f3a !important; } .h2 { background: #24675d !important; } .h3 { background: #2f9585 !important; } .h4 { background: #5fd0bd !important; }
  .s-pos { background: #7cc35a; } .s-unc { background: #e5b04a; } .s-neg { background: #ee7b6e; }
}

/* ---------- Bağlantılar / E-posta ---------- */
textarea.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; margin-top: 8px; }
.map-row { display: grid; grid-template-columns: 1fr 180px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.map-row:last-of-type { margin-bottom: 10px; }
.kill { border: 2px solid var(--red); background: var(--red-soft); }
.kill.kill-on { border-color: var(--green); background: var(--green-soft); }
.kill-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.rule-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mail-log { list-style: none; margin: 0; padding: 0; }
.mail-log li { border-bottom: 1px solid var(--line); }
.mail-log summary { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; padding: 10px 0; align-items: start; }
.ml-dir { font-size: 16px; color: var(--muted); }
.ml-meta { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
.ml-error .ml-meta small { color: var(--red); font-weight: 700; }
.ml-body { white-space: pre-wrap; font-family: inherit; font-size: 13px; background: var(--col); padding: 10px; border-radius: 8px; margin: 0 0 10px; }
code { background: var(--col); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
@media (max-width: 640px) { .map-row { grid-template-columns: 1fr; } }
.prev-box { background: var(--amber-soft); border: 2px solid var(--amber); border-radius: 14px; padding: 12px 16px; color: var(--text); }
.prev-box > summary { display: flex; gap: 12px; align-items: center; color: var(--amber); }
.prev-box .notice-icon { background: var(--amber); color: var(--amber-soft); }
.prev-item { background: var(--surface); border-radius: 10px; padding: 10px 12px; margin-top: 10px; font-size: 14px; }
.prev-item p { margin: 0 0 8px; }
.timeline.compact li { padding-bottom: 8px; }
.mail-form { margin-top: 12px; }
.mail-new { margin-bottom: 10px; }
.check.att { display: flex; margin-bottom: 6px; }
.q.small { font-weight: 700; margin: 4px 0 6px; }
@media (max-width: 640px) { .map-row.map-row-inline { grid-template-columns: 1fr 140px; } }
.tg-ok { color: var(--green); font-weight: 700; margin: 0 0 10px; }
/* Canlı bildirim kutusu */
.live-alert { position: fixed; top: calc(var(--topbar) + 10px + env(safe-area-inset-top)); left: 12px; right: 12px; max-width: 560px; margin: 0 auto; z-index: 250;
  background: var(--brand); color: var(--brand-ink); border-radius: 14px; padding: 12px 44px 12px 14px; box-shadow: 0 12px 30px rgba(0,0,0,.25);
  display: flex; flex-direction: column; gap: 6px; animation: la-in .25s ease-out; }
.live-alert a { color: inherit; text-decoration: none; font-weight: 700; }
.live-alert .la-main { font-size: 16px; }
.live-alert .la-fu { font-size: 14px; font-weight: 600; }
.live-alert .la-perm { align-self: flex-start; background: transparent; color: inherit; border: 1px solid currentColor; border-radius: 99px; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.live-alert .la-x { position: absolute; right: 8px; top: 8px; background: transparent; border: 0; color: inherit; font-size: 18px; cursor: pointer; width: 32px; height: 32px; }
@keyframes la-in { from { transform: translateY(-10px); opacity: 0; } to { transform: none; opacity: 1; } }
.fu-edit { margin: 6px 0 2px; }
.fu-edit summary { font-size: 13px; color: var(--brand); font-weight: 600; padding: 2px 0; }
.fu-edit .row-form { margin: 8px 0; }
.fu-edit .row-form input { height: 40px; }
a.locked { color: var(--amber) !important; font-weight: 600; }
.opt-group { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 4px; margin: 0 0 12px; }
.opt-group legend { font-weight: 700; font-size: 14px; padding: 0 6px; }
.switch-row { display: flex; gap: 10px; align-items: flex-start; color: var(--text); font-size: 14px; margin-bottom: 12px; }
.switch-row input { width: 20px; height: 20px; flex: none; margin: 1px 0 0; accent-color: var(--brand); }
.time-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* Temizlik modu */
.lock-banner { display: flex; gap: 14px; background: var(--red-soft); border: 2px solid var(--red); border-radius: 16px; padding: 16px; margin-bottom: 16px; color: var(--text); }
.lock-ico { font-size: 30px; line-height: 1; }
.lock-banner h1 { font-size: 19px; margin: 0 0 6px; color: var(--red); }
.lock-banner p { margin: 0 0 10px; font-size: 14px; }
.lock-meters { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 700; }
.lock-meters li.over { color: var(--red); }
.sec-h { font-size: 16px; margin: 18px 0 8px; display: flex; align-items: center; gap: 8px; }
.unlock-box { text-align: center; }
.lock-line { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.link-btn { border: 0; background: transparent; color: var(--brand); font-weight: 700; font-size: 13px; cursor: pointer; padding: 2px 4px; }
.lock-sum { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; }
.lockrow { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px; border-radius: 12px; margin-bottom: 8px; border: 1px solid var(--line); }
.lockrow.lock-locked { border: 2px solid var(--red); background: var(--red-soft); }
.lockrow.lock-exempt { border: 2px solid var(--amber); background: var(--amber-soft); }
.lr-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lr-state { font-size: 13px; font-weight: 700; }
.lock-locked .lr-state { color: var(--red); } .lock-exempt .lr-state { color: var(--amber); } .lock-ok .lr-state { color: var(--green); }
.lr-nums { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.locked-admin { display: block; margin: 0 16px 14px; padding: 12px 16px; border-radius: 14px; border: 2px solid var(--red); background: var(--red-soft); color: var(--red); text-decoration: none; font-size: 14px; }

/* ---------- Tahsilat ---------- */
.col-page { max-width: 900px; margin: 0 auto; padding: 14px 16px 40px; display: flex; flex-direction: column; gap: 12px; }
.filters > summary { font-weight: 700; font-size: 14px; color: var(--brand); }
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; margin-top: 12px; }
.filter-grid .span2 { grid-column: 1 / -1; }
.filter-grid label { margin-bottom: 10px; }
@media (max-width: 640px) { .filter-grid { grid-template-columns: 1fr; } }
.col-totals { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.tot-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.tot-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.tot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.tot-grid > div { display: flex; flex-direction: column; }
.tv { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ok { color: var(--green); } .warn { color: var(--amber); }
.tot-dep { display: flex; flex-direction: column; gap: 2px; background: var(--col); }
.col-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.col-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.col-item > details > summary { padding: 12px 14px; }
.col-item.st-done { border-left: 4px solid var(--green); border-radius: 0 14px 14px 0; }
.col-item.st-second_visit { border-left: 4px solid var(--blue); border-radius: 0 14px 14px 0; }
.col-item.st-cancelled { opacity: .8; }
.ci-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.ci-name { font-weight: 700; font-size: 16px; }
.chip-st { font-size: 12px; font-weight: 700; border-radius: 99px; padding: 2px 10px; white-space: nowrap; }
.cs-waiting { background: var(--amber-soft); color: var(--amber); } .cs-second_visit { background: var(--blue-soft); color: var(--blue); }
.cs-done { background: var(--green-soft); color: var(--green); } .cs-cancelled { background: var(--col); color: var(--muted); }
.ci-meta { font-size: 13px; color: var(--muted); margin: 3px 0 8px; }
.ci-money { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; font-variant-numeric: tabular-nums; font-size: 15px; }
.ci-money small { display: block; font-size: 11px; color: var(--muted); }
.ci-body { padding: 0 14px 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.pf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pf-row label { margin-bottom: 10px; }
.pf-visit { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.pill-radio { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 99px; padding: 8px 14px; margin: 0; color: var(--text); font-size: 14px; cursor: pointer; }
.pill-radio input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.pill-radio:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.pf-rem { font-size: 16px; margin: 4px 0 12px; }
.cancel-box { margin-top: 10px; }
.pay-summary { background: var(--col); border-radius: 12px; padding: 10px 12px; margin: 4px 0 10px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }

/* Roller: salt okunur kart ve yetki ayarları */
.lead-page.ro form:not(.note-form) button, .lead-page.ro .lost-box, .lead-page.ro .fu-new, .lead-page.ro .fu-edit,
.lead-page.ro .mail-new, .lead-page.ro .res-form, .lead-page.ro .upload-form, .lead-page.ro .transfer-form { display: none !important; }
.lead-page.ro form:not(.note-form) :is(input, select, textarea) { pointer-events: none; background: var(--bg, #f6f7f7); }
.board-ro .card { touch-action: auto; }
.perm-form h3 { margin: 18px 0 4px; font-size: 15px; }
.perm-form .check { display: flex; align-items: flex-start; margin: 8px 0; line-height: 1.4; }
.perm-form .check input { flex: none; margin-top: 2px; }
.perm-form .btn { margin-top: 14px; }
.demo-bar { background: #b4531a; color: #fff; text-align: center; font-size: 12px; font-weight: 600; padding: 4px 8px; letter-spacing: .02em; }
.demo-accounts { margin-top: 18px; padding: 12px; border: 1px dashed #b4531a; border-radius: 12px; font-size: 13px; }
.demo-accounts p { margin: 0 0 8px; }
.demo-accounts .chip { margin: 0 6px 6px 0; }

/* Veri aktarımı */
.import-page h1 { margin: 4px 0 12px; }
.imp-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 14px; flex-wrap: wrap; }
.imp-steps li { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted, #6b7280); padding: 6px 10px; border-radius: 999px; background: var(--card, #fff); border: 1px solid var(--line, #e5e7eb); }
.imp-steps li span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--line, #e5e7eb); font-size: 11px; font-weight: 700; }
.imp-steps li.on { color: var(--text); border-color: var(--brand, #0f6e64); font-weight: 600; }
.imp-steps li.on span, .imp-steps li.done span { background: var(--brand, #0f6e64); color: #fff; }
.imp-preview { max-height: 220px; margin-bottom: 14px; }
.imp-preview td, .imp-preview th { white-space: nowrap; font-size: 12px; }
.imp-notes { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 14px; }
.imp-pairs { display: grid; gap: 8px; margin-bottom: 12px; }
.imp-pairs label { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 10px; align-items: center; margin: 0; padding: 8px 10px; border: 1px solid var(--line, #e5e7eb); border-radius: 10px; }
.imp-pairs label span { overflow-wrap: anywhere; font-weight: 600; }
@media (max-width: 640px) { .imp-pairs label { grid-template-columns: 1fr; gap: 6px; } }
.imp-values .check { margin: 10px 0 4px; }
.fu-days input { max-width: 90px; }
.imp-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 6px 0 12px; }
.imp-sum div { border: 1px solid var(--line, #e5e7eb); border-radius: 12px; padding: 10px 12px; }
.imp-sum b { display: block; font-size: 24px; }
.imp-sum span { font-size: 12px; color: var(--muted, #6b7280); }
.imp-notes-list { padding-left: 18px; font-size: 14px; line-height: 1.5; }
.imp-notes-list .warn { color: #9a5b00; }
.imp-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.row-line { display: flex; justify-content: space-between; margin: 4px 0; font-size: 14px; border-bottom: 1px dashed var(--line, #e5e7eb); }
.imp-hist { list-style: none; padding: 0; margin: 0; }
.imp-hist li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line, #e5e7eb); }
.imp-hist li.off { opacity: .55; }
.inline-cancel { margin-top: 8px; text-align: right; }
.imp-preview { overflow: auto; max-height: 200px; border: 1px solid var(--line, #e5e7eb); border-radius: 10px; -webkit-overflow-scrolling: touch; }
.imp-tbl { border-collapse: collapse; font-size: 12px; min-width: 100%; }
.imp-tbl th, .imp-tbl td { padding: 6px 8px; border-bottom: 1px solid var(--line, #e5e7eb); text-align: left; white-space: nowrap; }
.imp-tbl th { position: sticky; top: 0; background: var(--card, #fff); font-weight: 600; }

/* Güncellemeler */
.upd-page h1 { margin: 4px 0 12px; }
.upd-now { display: flex; justify-content: space-between; align-items: center; }
.upd-ver { display: block; font-size: 28px; }
.upd-form label { display: block; }
.upd-toggle { margin-top: 10px; }
.upd-list, .upd-log { list-style: none; padding: 0; margin: 0; }
.upd-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line, #e5e7eb); flex-wrap: wrap; }
.upd-rb[open] { flex-basis: 100%; }
.upd-rb form { margin-top: 10px; }
.upd-log li { padding: 8px 0; border-bottom: 1px dashed var(--line, #e5e7eb); font-size: 14px; }

/* Logo ve uygulama ikonu */
.brand-logo { height: 34px; width: auto; max-width: 160px; object-fit: contain; display: block; flex: none; }
.brand:has(.brand-logo) { display: flex; align-items: center; gap: 8px; }
.brand-logo-lg { height: 48px; max-width: 220px; }
.brand-prev { display: flex; gap: 22px; align-items: flex-end; margin: 10px 0 16px; flex-wrap: wrap; }
.brand-prev figure { margin: 0; text-align: center; }
.brand-prev figcaption { font-size: 12px; color: var(--muted, #6b7280); margin-top: 6px; }
.bp-ios { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 1px 4px rgba(0,0,0,.18); display: block; }
.bp-android { width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.18); display: block; }
.bp-name { display: block; font-size: 13px; padding: 22px 0; }
.brand-form input[type=color] { width: 64px; height: 40px; padding: 2px; }
.fu-replace-warn { margin: 12px 0; padding: 10px 12px; border-radius: 10px; background: #fff4e5; color: #8a4b00; font-size: 14px; }
.fu-replace-warn ul { margin: 6px 0 0; padding-left: 18px; }
.fu-prev { margin: 8px 0 14px; }
.fu-prev summary { cursor: pointer; font-size: 14px; color: var(--muted, #6b7280); padding: 6px 0; }
.fu-prev .fu-item { opacity: .75; }

/* Ana ekran kutuları ve arama */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 16px 10px; }
.kpi { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--card, #fff); border: 1px solid var(--line, #e5e7eb); color: inherit; text-decoration: none; min-width: 0; }
.kpi-l { font-size: 12px; color: var(--muted, #6b7280); line-height: 1.25; }
.kpi-v { font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi-win { background: #e8f5ef; border-color: #b7e0cc; }
.kpi-win .kpi-v { color: #0f6e64; }
a.kpi:active { transform: scale(.98); }
@media (max-width: 380px) { .kpi { padding: 10px; } .kpi-v { font-size: 24px; } }
.search-box { position: relative; flex: 1; display: flex; min-width: 0; }
.search-box .search { flex: 1; padding-right: 48px; }
.search-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; font-size: 18px; width: 40px; height: 40px; border-radius: 10px; cursor: pointer; }
.search-clear { font-size: 13px; align-self: center; white-space: nowrap; }
.search-results { margin: 4px 16px 16px; }
.sr-count { font-size: 13px; color: var(--muted, #6b7280); margin: 4px 0 10px; }
.sr-list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.sr-item { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--card, #fff); border: 1px solid var(--line, #e5e7eb); color: inherit; text-decoration: none; }
.sr-item .fu { justify-self: start; }
.sr-name { font-weight: 600; font-size: 16px; }
.sr-meta { display: flex; flex-wrap: wrap; gap: 4px; font-size: 13px; color: var(--muted, #6b7280); }
.sr-stage { color: var(--text); font-weight: 500; }
.sr-closed { opacity: .7; border-style: dashed; }
.alert-warn { background: #fff4e5; color: #8a4b00; }
.win-fu { margin: 4px 0 12px; }
.fu-prompt { margin: 10px 0 0; }
.notice-visit { margin-top: 12px; }
.notice-visit .notice-banner { border: 2px solid #d9480f; background: #fff1e6; color: #9a3412; animation: visitPulse 2.4s ease-in-out 3; }
.notice-visit .notice-icon { background: #d9480f; color: #fff; font-weight: 800; }
.notice-visit .stale-list { border-color: #f5c2a8; }
@keyframes visitPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(217,72,15,0); } 50% { box-shadow: 0 0 0 6px rgba(217,72,15,.18); } }
@media (prefers-reduced-motion: reduce) { .notice-visit .notice-banner { animation: none; } }
.visit-strip { display: block; background: #d9480f; color: #fff; text-align: center; padding: 9px 16px; font-size: 14px; text-decoration: none; line-height: 1.35; }
.visit-strip b { white-space: nowrap; }
.visit-modal .modal { max-width: 420px; text-align: center; }
.vm-icon { width: 48px; height: 48px; border-radius: 50%; background: #d9480f; color: #fff; font-size: 28px; font-weight: 800; display: grid; place-items: center; margin: 0 auto 10px; }
.visit-modal h2 { color: #9a3412; margin: 0 0 6px; font-size: 19px; }
.vm-list { list-style: none; padding: 0; margin: 12px 0; text-align: left; }
.vm-list a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line, #e5e7eb); color: inherit; text-decoration: none; }
.visit-ask .visit-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; align-items: flex-start; }
.visit-ask .va-second[open] { flex-basis: 100%; }
.visit-ask .va-second form { margin-top: 8px; }
.visit-ask p { margin: 4px 0 0; }

/* Dar ekranlar (360 px) için taşma düzeltmeleri */
.filter-grid > *, .time-pair > *, .grid-form > * { min-width: 0; }
.filter-grid input:not([type=checkbox]):not([type=radio]), .filter-grid select, .time-pair input { width: 100%; max-width: 100%; box-sizing: border-box; }
@media (max-width: 640px) { .topnav a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
@media (max-width: 380px) { .topnav { padding-left: 4px; padding-right: 4px; } .topnav a { font-size: 12px; padding: 10px 2px; } }

/* Takiplerim (v21.1): hızlı aralıklar, gün gezinme, tarih aralığı, gün grupları */
.fu-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.fu-chips::-webkit-scrollbar { display: none; }
.fu-chips .chip { flex: 0 0 auto; text-decoration: none; padding: 8px 14px; font-size: 14px; white-space: nowrap; }
.fu-chips .chip b { display: inline-block; min-width: 20px; margin-left: 4px; padding: 0 6px; border-radius: 99px; background: var(--surface); color: var(--text); font-size: 12px; text-align: center; }
.fu-chips .chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.fu-chips .chip.on b { background: rgba(255,255,255,.22); color: #fff; }
.fu-chips .chip-late:not(.on) { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.fu-daynav { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px; margin-bottom: 12px; }
.fu-daynav .icon-btn { display: flex; align-items: center; justify-content: center; height: 44px; font-size: 26px; text-decoration: none; color: var(--brand); border-radius: 10px; }
.fu-daypick { margin: 0; }
.fu-daypick label { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 0; font-weight: 400; }
.fu-daytitle { font-weight: 700; font-size: 15px; text-align: center; }
.fu-daypick input[type=date] { width: auto; max-width: 170px; padding: 4px 8px; font-size: 13px; text-align: center; }
.fu-range { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 8px; }
.fu-range label { margin: 0; font-size: 12px; }
.fu-range input { width: 100%; }
@media (max-width: 420px) { .fu-range { grid-template-columns: 1fr 1fr; } .fu-range .btn { grid-column: 1 / -1; } }
.fu-rangeline { margin: -4px 0 10px; font-weight: 700; font-size: 14px; color: var(--muted); }
.fu-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.fu-filters .seg { flex: 1 1 240px; }
.fu-owner { flex: 1 1 180px; margin: 0; }
.fu-owner select { width: 100%; }
.fu-group { margin-bottom: 16px; }
.fu-group-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; margin: 0 2px 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.fu-group-h small { color: var(--muted); font-weight: 400; font-size: 12px; white-space: nowrap; }
.fu-group-late .fu-group-h { color: var(--red); border-color: var(--red); }
.empty-next { text-align: center; margin: -14px 0 20px; }
.extra-tpl { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: var(--bg); }
.extra-head { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 520px) { .extra-head { grid-template-columns: 1fr; } }
.extra-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.extra-foot .danger, .link-btn.danger { color: var(--red); }
.extra-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* Çöp sütunu (sadece Admin) */
.col-trash { background: repeating-linear-gradient(135deg, var(--col), var(--col) 10px, transparent 10px, transparent 20px), var(--col); }
.col-trash .dot { width: auto; height: auto; background: none; font-size: 13px; }
.col-note { margin: -4px 4px 8px; font-size: 12px; color: var(--muted); }
.card-static { opacity: .88; }
.col-more { display: block; text-align: center; padding: 8px; font-weight: 700; font-size: 13px; }
.trash-banner .restore-form { margin-top: 8px; }
.lead-page.ro form.restore-form button { display: inline-flex !important; }
.lead-page.ro form.restore-form.row-form select[name=to] { pointer-events: auto; background: var(--surface); }
.lead-page.ro .trash-banner form.restore-form.row-form :is(select, button) { pointer-events: auto; }
.restore-form .btn { white-space: nowrap; }

/* Event bölümü */
.ev-page { max-width: 900px; margin: 0 auto; padding: 14px 16px 40px; }
.ev-page h1 { font-size: 22px; margin: 4px 0 12px; }
.ev-sec-h { font-size: 15px; color: var(--muted); margin: 18px 2px 8px; }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.ev-card { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-decoration: none; color: var(--text); }
.ev-card:hover { border-color: var(--brand); }
.ev-card.ev-off { opacity: .6; }
.ev-date { flex: none; width: 52px; text-align: center; background: var(--brand-soft, #e3f1ef); color: var(--brand); border-radius: 10px; padding: 6px 0; line-height: 1.1; }
.ev-date b { display: block; font-size: 22px; }
.ev-date small { font-size: 12px; font-weight: 700; text-transform: uppercase; }
.ev-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ev-info small { color: var(--muted); }
.ev-nums { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; margin-top: 4px; }
.ev-nums .ok { color: var(--green, #3b6d11); font-weight: 700; }
.ev-new summary { list-style: none; }
.ev-new[open] summary { margin-bottom: 12px; }
.ev-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ev-form .ev-f-name { grid-column: 1 / -1; }
@media (max-width: 480px) { .ev-form { grid-template-columns: 1fr; } }
.ev-settings { margin-top: 20px; }
.ev-head h1 { margin: 0 0 6px; }
.ev-head p { margin: 4px 0; }
.ev-when { font-weight: 700; }
.ev-edit { margin-top: 10px; }
.ev-edit[open] .ev-form { margin-top: 10px; }
.ev-admin-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ev-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 12px 0 16px; }
@media (max-width: 640px) { .ev-kpis { grid-template-columns: repeat(3, 1fr); } }
.ev-kpis div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.ev-kpis small { color: var(--muted); font-size: 12px; }
.ev-kpis b { font-size: 22px; }
.ev-kpis .k-win b { color: var(--green, #3b6d11); }
.ev-kpis .k-lost b { color: var(--red); }
.ev-stage { margin-bottom: 18px; }
.ev-list, .ev-closed { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ev-item { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.ev-item:target { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft, #e3f1ef); }
.ev-closed li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.ev-closed a { font-weight: 700; }
.ev-r-win { background: var(--green-soft, #eaf3de); color: var(--green, #3b6d11); }
.ev-r-lost { background: var(--red-soft); color: var(--red); }
.ev-r-offer { background: var(--amber-soft); color: var(--amber); }
.ev-controls { display: grid; gap: 8px; margin-top: 8px; }
.ev-line { margin: 0; }
.ev-stage-form { margin: 0; }
.ev-stage-form label { margin: 0; font-size: 12px; }
.ev-outcome summary { list-style: none; }
.ev-out-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
@media (max-width: 560px) { .ev-out-grid { grid-template-columns: 1fr; } }
.ev-out { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 0; background: var(--bg); }
.ev-out p { margin: 0; flex: 1; }
.ev-out label { margin: 0; font-size: 12px; }
.ev-out-win { border-color: var(--green, #3b6d11); }
.ev-out-lost { border-color: var(--red); }
.ev-banner { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--brand-soft, #e3f1ef); color: var(--brand); border-radius: 10px; padding: 10px 12px; margin-top: 12px; }
.ev-src { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.ev-move { margin-top: 10px; }
.ev-move summary { list-style: none; }
.ev-move-form { display: grid; gap: 8px; margin-top: 8px; }
.ev-move-form p { margin: 0; }
.ev-soon { display: grid; gap: 6px; margin-bottom: 12px; }
.ev-soon a { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--brand-soft, #e3f1ef); color: var(--brand); border: 1px solid var(--brand); border-radius: 12px; padding: 10px 14px; text-decoration: none; }

/* Menü: rozet ve telefonda kaydırılabilir alt menü (çok sekme olunca) */
.nav-badge { display: inline-block; min-width: 18px; margin-left: 5px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: 11px; line-height: 18px; text-align: center; vertical-align: 1px; }
@media (max-width: 640px) {
  .topnav { overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav a { flex: 1 0 auto; min-width: 66px; position: relative; }
  .topnav a .nav-badge { position: absolute; top: 2px; right: 4px; margin: 0; min-width: 16px; line-height: 16px; font-size: 10px; }
}

/* Mesajlar ve Yorumlar */
.msg-page { max-width: 820px; margin: 0 auto; padding: 14px 16px 30px; }
.msg-tabs { margin-bottom: 10px; }
.msg-tabs small { font-weight: 400; opacity: .8; }
.msg-tools { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 12px; }
.conv-list, .cmt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.conv { display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.conv.is-unread { border-color: var(--brand); }
.conv-check { display: flex; align-items: center; padding: 0 4px 0 12px; }
.conv-check input { width: 20px; height: 20px; }
.conv-main { display: flex; gap: 10px; flex: 1; min-width: 0; padding: 10px 12px 10px 6px; text-decoration: none; color: var(--text); }
.conv-av { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.conv-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.conv-top { display: flex; align-items: center; gap: 6px; }
.conv-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-time { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.conv-text { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is-unread .conv-text { color: var(--text); font-weight: 600; }
.conv-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.pill-free { background: var(--amber-soft); color: var(--amber); }
.ch { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 18px; padding: 0 4px; border-radius: 5px; font-size: 10px; font-weight: 800; color: #fff; flex: none; }
.ch-ig { background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); }
.ch-fb { background: #0866ff; }
.ch-fbk { background: #1877f2; }
.msg-bulk { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; box-shadow: 0 6px 20px rgba(0,0,0,.15); max-width: 600px; margin: 0 auto; }
@media (min-width: 641px) { .msg-bulk { bottom: 16px; } }
.chat-page { padding-bottom: 20px; }
.chat-head { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 8px 0; }
.chat-head .back { font-size: 22px; text-decoration: none; padding: 0 6px; margin: 0; }
.chat-who { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.chat-who b { font-size: 16px; }
.chat-log { display: flex; flex-direction: column; gap: 6px; padding: 8px 0 12px; }
.bubble { max-width: 82%; padding: 8px 12px; border-radius: 16px; font-size: 15px; line-height: 1.4; word-wrap: break-word; overflow-wrap: anywhere; }
.b-in { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.b-out { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.b-out .b-meta { color: rgba(255,255,255,.8); }
.b-failed { background: var(--red-soft); color: var(--red); border: 1px solid var(--red); }
.b-failed .b-meta { color: var(--red); }
.b-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.b-img { display: block; max-width: 220px; max-height: 260px; border-radius: 10px; margin-top: 4px; }
.b-file { color: inherit; }
.chat-send { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; position: sticky; bottom: calc(68px + env(safe-area-inset-bottom)); background: var(--bg); padding: 8px 0; }
@media (min-width: 641px) { .chat-send { bottom: 0; } }
.chat-send textarea { resize: vertical; min-height: 44px; }
.chat-window { grid-column: 1 / -1; margin: 0; font-size: 13px; padding: 8px 10px; border-radius: 10px; }
.chat-window.tag { background: var(--amber-soft); color: var(--amber); }
.chat-window.closed { background: var(--col); color: var(--muted); }
.chat-actions { display: grid; gap: 8px; margin-top: 8px; }
.chat-act summary { list-style: none; }
.chat-act[open] form { margin-top: 8px; }
.cmt { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.cmt-head { display: flex; align-items: center; gap: 8px; }
.cmt-head .conv-check { padding: 0; }
.cmt-text { margin: 6px 0; font-size: 15px; }
.cmt-done { margin: 6px 0 0; font-size: 13px; color: var(--green); }
.cmt-reply { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; margin-top: 6px; }
.chat-who .ch { align-self: flex-start; }
.chat-who b { display: inline; }
@media (max-width: 640px) { .topnav a .nav-badge { top: 0; right: 1px; } }
.conv-list, .cmt-list { grid-template-columns: minmax(0, 1fr); } .conv, .cmt { min-width: 0; }
@media (max-width: 640px) {
  body.kb-open .topnav, body.kb-open .msg-bulk { display: none; }
  body.kb-open { padding-bottom: 0; }
  body.kb-open .chat-send { bottom: 0; }
}
.meta-connect { display: grid; gap: 8px; margin: 10px 0 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.meta-ok { margin: 0; color: var(--green); }
.btn-fb { background: #1877f2; border-color: #1877f2; color: #fff; }
