/* Renkler logodan (12.10.2026): lacivert #123a52, turkuaz #0b8ea6 (yazıda koyusu #0b7f95), turuncu #ff8a3d, kum #f2c78f,
   krem #fff6e8. Durum renkleri (ok/warn/bad) anlam taşır, değişmez. */
:root { --ink:#123a52; --muted:#56697a; --line:#e3dccf; --accent:#0b7f95; --accent-dark:#0a6a7d; --bg:#fbf6ee;
  --brand-orange:#ff8a3d; --brand-sand:#f2c78f; --ok:#1e7a3c; --warn:#9a6200; --bad:#b3261e; }
* { box-sizing:border-box; }
body { margin:0; font:16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; color:var(--ink); background:var(--bg); }
a { color:var(--accent); }
.topbar { display:flex; gap:24px; align-items:center; padding:10px 24px; background:#fff; border-bottom:3px solid var(--brand-sand); flex-wrap:wrap; }
.topbar .brand { display:inline-flex; align-items:center; gap:10px; font-weight:700; font-size:20px; text-decoration:none; color:var(--ink);
  font-family:Georgia, "Times New Roman", serif; }
.topbar .brand img { height:38px; width:auto; display:block; }
.topbar .brand .evleri { color:var(--accent); font-style:italic; font-weight:600; }
.topbar nav { display:flex; gap:16px; flex:1; }
.topbar .me { display:flex; gap:12px; align-items:center; }
.page { max-width:1100px; margin:24px auto; padding:0 16px; }
.narrow { max-width:440px; margin:48px auto; padding:0 16px; }
.card { background:#fff; border:1px solid var(--line); border-radius:8px; padding:20px; }
.card div { margin-bottom:14px; }
label { display:block; font-weight:600; margin-bottom:4px; }
input[type=text], input[type=password], input[type=email], input:not([type]), select { width:100%; padding:10px; font-size:16px; border:1px solid var(--line); border-radius:6px; }
input[type=checkbox] { width:auto; }
button, .button { display:inline-block; background:var(--accent); color:#fff; border:0; border-radius:6px; padding:10px 18px; font-size:16px; cursor:pointer; text-decoration:none; }
[hidden] { display:none !important; }
button.link { background:none; color:var(--accent); padding:0; }
.actions { display:flex; gap:12px; margin-top:16px; flex-wrap:wrap; }
.actions button { background:#fff; color:var(--ink); border:1px solid var(--line); }
.actions button.primary, button.primary { background:var(--accent); color:#fff; border:0; font-weight:600; }
button.secondary { background:#fff; color:var(--accent); border:1px solid var(--accent); }
table { width:100%; border-collapse:collapse; background:#fff; border:1px solid var(--line); margin:12px 0; }
th, td { text-align:left; padding:8px 10px; border-bottom:1px solid var(--line); vertical-align:top; font-size:14px; }
tr.inactive td { color:var(--muted); }
.muted { color:var(--muted); }
.msg { padding:10px 14px; border-radius:6px; background:#e9f5f7; overflow-wrap:anywhere; margin:12px 0; }
.msg ul { margin:6px 0; padding-left:20px; }
.msg.error { background:#fbeceb; color:var(--bad); }
.msg.warning { background:#fff5e0; color:var(--warn); }
.msg.success { background:#e8f5ec; color:var(--ok); }
.helptext, .errorlist { font-size:13px; color:var(--muted); }
.errorlist { color:var(--bad); padding-left:18px; }
.qr svg { width:220px; height:220px; background:#fff; }
.secret code { font-size:22px; }
.filters { display:flex; gap:12px; align-items:end; flex-wrap:wrap; }
.filters label { font-weight:400; }
.pager { display:flex; gap:12px; }
@media (max-width:600px) { .topbar nav { flex-basis:100%; order:3; } th, td { font-size:13px; } }
.page-head { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.button.secondary { background:#fff; color:var(--accent); border:1px solid var(--accent); }
.stats { display:grid; grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)); gap:12px; margin:12px 0; }
.stat { background:#fff; border:1px solid var(--line); border-radius:8px; padding:12px 14px; }
.stat span { display:block; color:var(--muted); font-size:14px; }
.stat strong { font-size:clamp(17px, 1.6vw, 22px); white-space:nowrap; display:block; }
.stat.total { border-color:var(--accent); }
.stats.cols-6 { grid-template-columns:repeat(6, minmax(0, 1fr)); }
.stats.cols-5 { grid-template-columns:repeat(5, minmax(0, 1fr)); }
.stats.cols-6 .stat, .stats.cols-5 .stat { container-type:inline-size; min-width:0; padding:12px; }
.stats.cols-6 .stat strong, .stats.cols-5 .stat strong { font-size:clamp(13px, 11cqi, 22px); }
a.stat.link { color:inherit; text-decoration:none; transition:border-color .15s, box-shadow .15s; }
a.stat.link:hover, a.stat.link:focus-visible { border-color:var(--accent); box-shadow:0 2px 8px rgba(0,0,0,.08); }
a.stat.link.due strong { color:var(--bad); }
@media (max-width: 1000px) { .stats.cols-6, .stats.cols-5 { grid-template-columns:repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .stats.cols-6, .stats.cols-5 { grid-template-columns:repeat(2, minmax(0, 1fr)); } }
.cards { display:grid; grid-template-columns:repeat(auto-fill, minmax(190px, 1fr)); gap:12px; margin-top:16px; }
.unit-card { display:block; background:#fff; border:1px solid var(--line); border-left:4px solid var(--ok); border-radius:8px; padding:12px; color:var(--ink); text-decoration:none; }
.unit-card:hover { border-color:var(--accent); }
.unit-card.debt { border-left-color:var(--bad); }
.unit-card.inactive { border-left-color:var(--muted); opacity:.7; }
.unit-head { display:flex; gap:8px; align-items:baseline; }
.unit-head strong { font-size:22px; }
.badge { margin-left:auto; font-size:12px; padding:2px 8px; border-radius:10px; background:var(--bg); border:1px solid var(--line); }
.tenant { color:var(--muted); font-size:14px; margin:4px 0; }
.debt-total { font-size:18px; font-weight:700; }
.debt-lines { display:grid; grid-template-columns:auto 1fr; gap:0 8px; margin:6px 0 0; font-size:13px; }
.debt-lines dt { color:var(--muted); }
.debt-lines dd { margin:0; text-align:right; }
textarea { width:100%; padding:10px; font-size:16px; border:1px solid var(--line); border-radius:6px; font-family:inherit; }
input[type=number] { width:100%; padding:10px; font-size:16px; border:1px solid var(--line); border-radius:6px; }
.receipt { background: #fff; border: 1px solid #ccc; border-radius: 6px; padding: 1.2rem 1.4rem; max-width: 148mm; }
.receipt header h2 { margin: 0 0 .2rem; }
.receipt .stamp { color: #b00020; font-weight: bold; font-size: 1.2rem; border: 2px solid #b00020; display: inline-block; padding: .2rem .6rem; }
.receipt-info { display: grid; grid-template-columns: max-content 1fr; gap: .2rem 1rem; }
.receipt-info dt { font-weight: bold; }
.receipt-info dd { margin: 0; }
.print-page { background: #fff; padding: 0; }
/* Sayfa boyutları isimli sayfalarla: makbuz A5, rapor ve listeler A4 yatay */
body.print-page:not(.report-print) { page: makbuz; }
body.report-print { page: report; }
@page makbuz { size: A5; margin: 10mm; }
@media print {
  .topbar, .no-print, .actions, .msg { display: none !important; }
  body, .print-page { background: #fff; }
  .receipt { border: none; padding: 0; max-width: none; }
}
tr.changed td { background: #fff4d6; }
tr.row-error td { background: #fde4e4; }
table.readings input { width: 7.5rem; }
table.summary td:last-child, table.summary th:last-child { text-align: right; white-space: nowrap; }
fieldset.card label { display: block; margin: .3rem 0; }
td input { display: inline-block; width: auto; max-width: 9rem; }
table.report td.money, table.report td.number, table.report td.percent,
table.report th.money, table.report th.number, table.report th.percent { text-align: right; white-space: nowrap; }
table.report th.money, table.report th.number, table.report th.percent { white-space: normal; }  /* dar ekranda başlık kırılır; tutar tek satır kalır */
table.report tr.total td, table.report tr.subtotal td, table.report tr.opening td { font-weight: 700; background: #f3f5f8; }
.report-print { padding: 0 8mm; font-size: 11px; }
@media print { @page report { size: A4 landscape; } .report-print table { font-size: 9px; } }
.person-card .unit-head { flex-wrap: wrap; }
.people { list-style: none; padding: 0; margin: .4rem 0; font-size: .95rem; }
.people li { padding: 2px 0; }
.menu-bar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.menu-bar > a, details.menu > summary { padding: 6px 10px; border-radius: 6px; cursor: pointer; color: inherit; text-decoration: none; }
.menu-bar > a:hover, details.menu > summary:hover, details.menu[open] > summary { background: #e6f4f7; }
details.menu { position: relative; }
details.menu > summary { list-style: none; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu > summary::after { content: " ▾"; font-size: .8em; }
.menu-list { position: absolute; top: 100%; left: 0; z-index: 20; min-width: 180px; background: #fff; border: 1px solid #d6dbe3; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 6px 0; margin-top: 4px; }
.menu-list a { display: block; padding: 8px 14px; color: #1d2a3a; text-decoration: none; white-space: nowrap; }
.menu-list a:hover { background: #e6f4f7; }
/* Yana açılan alt menü (Elektrik / Su, Banka, Giderler / Tamirat): masaüstünde fareyle veya klavye odağıyla
   sağa açılır, sığmazsa sola (.sola); dar ekranda dokununca aynı yerde aşağı açılır (.acik). */
.alt-menu { position: relative; }
.menu-list button.alt-baslik { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%;
  background: none; color: #1d2a3a; border: 0; border-radius: 0; padding: 8px 14px; font: inherit; text-align: left; white-space: nowrap; cursor: pointer; }
.menu-list button.alt-baslik::after { content: "▸"; font-size: .85em; color: var(--muted); }
.alt-menu:hover > .alt-baslik, .alt-menu.acik > .alt-baslik, .alt-menu:focus-within > .alt-baslik { background: #e6f4f7; }
.menu-list .alt-list { display: none; top: -7px; left: 100%; margin: 0 0 0 2px; }
.alt-menu.acik > .alt-list { display: block; }
.alt-menu.sola > .alt-list, details.menu.sag .alt-list { left: auto; right: 100%; margin: 0 2px 0 0; }
.site-mevcut { display: block; padding: 8px 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.menu-ayrac { display: block; border-top: 1px solid var(--line); margin: 6px 0; }
.menu-bar > a:focus-visible, details.menu > summary:focus-visible, .menu-list a:focus-visible, .menu-list button.alt-baslik:focus-visible {
  outline: 2px solid var(--accent); outline-offset: -2px; }
@media (min-width: 901px) {
  .alt-menu:hover > .alt-list, .alt-menu:focus-within > .alt-list { display: block; }
}
@media print { .menu-bar { display: none; } }
.cards.wide { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.person-card dl.debt-lines { display: grid; grid-template-columns: 1fr; gap: 0; }
.person-card dl.debt-lines dt { color: var(--muted); font-size: 12px; margin-top: 6px; }
.person-card dl.debt-lines dd { margin: 0; text-align: left; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.plain { border: 0; background: transparent; margin: 6px 0; }
table.plain td, table.plain th { border: 0; padding: 4px 6px 4px 0; }
.unit-head a.badge { margin-left: auto; text-decoration: none; }
.wide-page { max-width: none; padding-left: 16px; padding-right: 16px; }
table.rent-table { font-size: 13px; }
table.rent-table td, table.rent-table th { vertical-align: top; padding: 6px 8px; }
table.rent-table td.dates { min-width: 92px; }
.cell { display: block; padding: 2px 6px; margin: 2px 0; border-radius: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.legend .cell { display: inline-block; margin-right: 8px; }
table.rent-table td.money { white-space: nowrap; }
.cell.yesil { background: #d9f2df; color: #145c2c; }
.cell.turuncu { background: #ffe5c2; color: #8a4b00; }
.cell.kirmizi { background: #fbd5d5; color: #8f1d1d; }
@media print { table.rent-table { font-size: 9px; } .cell { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.repairs-box { margin: 16px 0; }
.repairs-box .page-head h2 { margin: 0; }
.repairs-box table { margin-bottom: 0; }
.repair-card h3 { margin: 12px 0 4px; font-size: 15px; color: var(--muted); }
.repair-card p { margin: 0 0 8px; }
.badge.status-acik { background: #fff4d6; border-color: #e8c66a; }
.badge.status-tamam { background: #d9f2df; border-color: #8fd0a2; }
.badge.status-iptal { background: #eee; color: var(--muted); }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; }
table.month-bars td.bar { width: 45%; }
table.month-bars progress { width: 100%; height: 12px; accent-color: var(--accent); }
.qr svg { display: block; margin: 12px auto; max-width: 100%; height: auto; }
.copy { font-family: ui-monospace, Menlo, monospace; word-break: break-all; }
.info-card { max-width: 420px; text-align: center; }
form.inline { display: inline; }
/* Liste sayfalarının yazdırılması: A4 yatay, düğmeler/süzgeçler/menü gizli */
main[data-yazdir] { page: liste; }
@page liste { size: A4 landscape; margin: 10mm; }
@media print {
  main[data-yazdir] form.filters, main[data-yazdir] .actions, main[data-yazdir] button { display: none !important; }
  main[data-yazdir] { padding: 0; max-width: none; }
  main[data-yazdir] table { font-size: 10px; }
  main[data-yazdir] a { color: inherit; text-decoration: none; }
  .stat, .unit-card { break-inside: avoid; }
}
/* Revizyon 9: üst menü (sekmeler, daire no kutusu, kullanıcı menüsü, dar ekranda tek "Menü" düğmesi) */
.topbar { gap: 12px 18px; }
.topbar nav.menu-bar { flex: 1; }
.menu-ac { display: none; }  /* masaüstünde menü düğmesi yok: klavyede boş durak olmasın */
.menu-dugme { display: none; margin: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; font-weight: 600; }
details.menu.sag .menu-list { left: auto; right: 0; }
.menu-list a.ikincil { color: var(--muted); border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; font-size: 14px; }
.menu-list .rol { display: block; padding: 4px 14px 8px; font-size: 13px; }
.menu-list form { padding: 8px 14px; }
details.menu.me > summary { font-weight: 600; }
.daire-git { display: flex; gap: 6px; align-items: center; }
.daire-git input { width: 92px; padding: 7px 8px; font-size: 16px; }
.daire-git button { padding: 7px 12px; font-size: 15px; }
@media (max-width: 900px) {
  .menu-dugme { display: inline-block; }
  .menu-ac { display: block; position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
  .topbar nav.menu-bar { display: none; flex-basis: 100%; order: 5; flex-direction: column; align-items: stretch; }
  .menu-ac:checked ~ nav.menu-bar { display: flex; }
  .menu-ac:focus-visible + .menu-dugme { outline: 2px solid var(--accent); outline-offset: 2px; }
  .menu-list { position: static; box-shadow: none; border: 0; padding-left: 12px; }
  .menu-list .alt-list, .alt-menu.sola > .alt-list, details.menu.sag .alt-list { margin: 0; padding: 0 0 4px 14px; }
  .menu-list button.alt-baslik::after { content: "▾"; }
  .alt-menu.acik > .alt-baslik::after { content: "▴"; }
  .daire-git { order: 4; }
}
@media print { .daire-git, .menu-dugme, details.menu.me { display: none; } }
/* Tablolar: dar ekranda tablo kendi içinde kayar, sayfa yana kaymaz; tutarlar sağa yaslı */
/* Her tablo bir .table-wrap kutusundadır (şablonda ya da js/tablo.js ile); kutu yana kayar, tablo genişliği doldurur */
td.money, th.money { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Düğme düzeni: sayfa başına tek birincil (mavi) düğme; diğerleri ikincil, Vazgeç/süzgeç sade, iptal kırmızı */
.button.ghost, button.ghost { background: transparent; color: var(--accent); border: 1px solid transparent; }
.button.ghost:hover, button.ghost:hover { background: #e6f4f7; }
.button.danger, button.danger { background: #fff; color: var(--bad); border: 1px solid var(--bad); }
.filters button { background: #fff; color: var(--accent); border: 1px solid var(--accent); }
form > .card button[type=submit]:not(.secondary):not(.ghost) { font-weight: 600; }
details.gecmis { margin: 16px 0; }
details.gecmis > summary { cursor: pointer; }
details.gecmis > summary h2 { display: inline; font-size: 1.2em; }
.print-only { display: none; }
@media print { .print-only { display: inline; } .no-print { display: none !important; } }
.ayar-bolumleri { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 16px 0 24px; }
.ayar-kart { display: block; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; color: var(--ink); text-decoration: none; }
.ayar-kart:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.ayar-kart strong { display: block; font-size: 17px; margin-bottom: 4px; color: var(--accent); }
.ayar-kart span { color: var(--muted); font-size: 14px; }
.ayar-formu { max-width: 560px; }
details.odenenler { margin: 0 0 12px; }
details.odenenler > summary { cursor: pointer; color: var(--accent); padding: 6px 0; }
.stat small { display: block; font-size: 12px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.chips a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none; color: var(--ink); }
.chips a.on { background: var(--accent); color: #fff; border-color: var(--accent); }
table.rent-table thead th { position: sticky; top: 0; background: #f2f6f7; z-index: 1; }
.card.adim h2 { margin-top: 0; }
.alan { margin-bottom: 12px; }
label.secim { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 8px 0; }
.belge { max-width: 760px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
.belge table.bilgi th { width: 140px; color: var(--muted); font-weight: 400; }
.imzalar { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 48px; }
.imzalar div { border-top: 1px solid var(--ink); padding-top: 6px; display: grid; }
.imzalar span:last-child { color: var(--muted); font-size: 13px; }
tfoot th { background: #f2f6f7; }
.stat.due strong { color: var(--bad); }
@media print { .belge { border: 0; padding: 0; } }
.badge.gecikme-1-30 { background: #fff4d6; border-color: #e8c66a; }
.badge.gecikme-31-60 { background: #ffe1c2; border-color: #e6a35c; }
.badge.gecikme-60 { background: #fbd5d5; border-color: #d98080; color: #8f1d1d; }
tr.takip td { border-top: 0; padding-top: 0; font-size: 13px; }
details.not-ekle { display: inline-block; margin-right: 8px; }
details.not-ekle > summary { cursor: pointer; color: var(--accent); }
.kurtarma { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: center; }
.kurtarma code { font-size: 20px; letter-spacing: 1px; }
.badge.status-uyari { background: #fff4d6; border-color: #e8c66a; color: #7a4d00; }
.due { color: var(--bad); }

/* Revizyon 10 / Paket D */
.paid { color: var(--ok); }
h2.tek-satir { font-size: 1.1em; display: flex; gap: 12px; align-items: baseline; }
h2.tek-satir .paid { font-size: .85em; font-weight: 500; }
.table-wrap { overflow-x: auto; max-width: 100%; margin: 12px 0; }
.table-wrap > table { display: table; margin: 0; }
@media print { .table-wrap { overflow: visible; } }
.icerige-atla { position: absolute; left: -9999px; top: 0; z-index: 100; background: #fff; padding: 8px 14px; border: 2px solid var(--accent); border-radius: 6px; }
.icerige-atla:focus { left: 12px; top: 12px; }
.menu-bar a[aria-current="page"], .menu-list a[aria-current="page"] { font-weight: 700; color: var(--ink); }
.daire-git input { font-size: 16px; }
.pesin { background: #eef7f0; border-radius: 6px; padding: 6px 10px; }
.badge.kurum-odendi { background: #e6f4ea; border-color: #9fd3ad; color: var(--ok); }
.badge.kurum-gecikti { background: #fbd5d5; border-color: #d98080; color: #8f1d1d; }
.badge.kurum-yaklasti, .badge.kurum-kismen { background: #fff4d6; border-color: #e8c66a; color: #7a4d00; }
.kurum-odeme summary.button { display: inline-block; margin: 6px 0; }
.badge.ariza-yeni { background: #fff4d6; border-color: #e8c66a; color: #7a4d00; }
.badge.ariza-tamirat { background: #dff0f4; border-color: #8cc9d6; color: var(--accent); }
.badge.ariza-kapandi { background: #e6f4ea; border-color: #9fd3ad; color: var(--ok); }
img.ariza-foto { max-width: 100%; max-height: 480px; border-radius: 8px; border: 1px solid var(--line); }
.badge.kurum-kabul { background: #eef1f6; border-color: #c9d0dc; color: var(--muted); }
.badge.kurum-fazla { background: #fff4d6; border-color: #e8c66a; color: #7a4d00; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }

/* Eksik bilgi işareti (Revizyon 14): kiracı/daire/sözleşme bilgisinde eksik varsa kırmızı ! */
.eksik { display: inline-flex; align-items: center; justify-content: center; width: 1.25em; height: 1.25em;
  margin-left: .35em; border-radius: 50%; background: #c62828; color: #fff; font-weight: 700; font-size: .85em;
  line-height: 1; vertical-align: middle; cursor: help; }
.eksik.telefon { background: #1565c0; margin-left: .2em; }  /* telefon eksik: mavi (müşteri isteği 14.10.2026) */
.eksik-liste { color: #c62828; font-size: .9em; }
.eksik-aciklama { display:flex; flex-wrap:wrap; gap:6px 18px; align-items:center; margin:0 0 12px; font-size:15px; }
.eksik-aciklama .eksik { margin-left:0; margin-right:.35em; }

/* Sözleşme sayfası: kira ve aidat ayları (açılır düğme + liste) */
.aylar { margin:24px 0; }
.aylar h2 { margin:0 0 2px; }
.aylar > .muted { margin:0 0 12px; font-size:14px; }
.aylar-kutu { background:#fff; border:1px solid var(--line); border-radius:10px; margin:0 0 12px; overflow:hidden; }
.aylar-kutu > summary { list-style:none; display:flex; flex-wrap:wrap; align-items:center; gap:6px 14px; padding:14px 48px 14px 16px;
  cursor:pointer; position:relative; min-height:56px; }
.aylar-kutu > summary::-webkit-details-marker { display:none; }
.aylar-kutu > summary::after { content:""; position:absolute; right:18px; top:50%; width:9px; height:9px; margin-top:-7px;
  border-right:2px solid var(--accent); border-bottom:2px solid var(--accent); transform:rotate(45deg); transition:transform .15s; }
.aylar-kutu[open] > summary::after { transform:rotate(-135deg); margin-top:-2px; }
.aylar-kutu > summary:hover, .aylar-kutu > summary:focus-visible { background:#f0f8fa; }
.aylar-kutu[open] > summary { border-bottom:1px solid var(--line); background:#f0f8fa; }
.aylar-baslik { font-weight:700; font-size:17px; color:var(--accent); }
.aylar-ozet { color:var(--muted); font-size:14px; }
.aylar-sayilar { display:flex; flex-wrap:wrap; gap:6px; margin-left:auto; }
.aylar-kutu .table-wrap { overflow-x:auto; }
.aylar-tablo { margin:0; border:0; }
.aylar-tablo th { background:#f8f9fb; font-weight:600; }
.aylar-tablo tbody tr:nth-child(even) td { background:#fbfcfd; }
.aylar-tablo tr.satir-gelecek td { color:var(--muted); }
.aylar-tablo tfoot th { border-bottom:0; border-top:2px solid var(--line); }
.durum { display:inline-block; padding:2px 10px; border-radius:999px; font-size:13px; font-weight:600; white-space:nowrap; }
.durum.odendi { background:#e6f4ea; color:var(--ok); }
.durum.kismen { background:#fff4dc; color:var(--warn); }
.durum.gecikmis { background:#fbeceb; color:var(--bad); }
.durum.gelecek { background:#eef1f5; color:var(--muted); }
@media print { .aylar-kutu > summary::after { display:none; } }
@media (max-width: 640px) {
  .aylar-kutu > summary { padding:12px 40px 12px 12px; }
  .aylar-sayilar { margin-left:0; }
  .aylar-tablo th, .aylar-tablo td { padding:8px 6px; font-size:13px; }
  .aylar-tablo th:nth-child(4), .aylar-tablo td:nth-child(4) { display:none; } /* Ödenen: telefonda Kalan yeterli */
}

/* Sözleşme yazdır: kira sözleşmesi, tahliye taahhütnamesi, KVKK (A4, her belge yeni sayfada) */
.sozlesme-belge { max-width:800px; background:#fff; border:1px solid var(--line); border-radius:8px; padding:32px 40px;
  margin:0 0 24px; font-family:"Times New Roman", Times, serif; font-size:15px; line-height:1.5; color:#000; }
.sozlesme-belge .belge-baslik { text-align:center; font-size:19px; text-decoration:underline; margin:0 0 20px; }
.sozlesme-belge h2 { text-align:center; font-size:16px; margin:20px 0 8px; }
.sozlesme-belge table.taraflar { border:0; margin:0 0 12px; background:none; }
.sozlesme-belge table.taraflar th, .sozlesme-belge table.taraflar td { border:0; padding:3px 6px; font-size:15px; }
.sozlesme-belge table.taraflar th { width:190px; text-align:left; white-space:nowrap; }
.sozlesme-belge ol.maddeler { padding-left:28px; margin:0; }
.sozlesme-belge ol.maddeler li { margin:0 0 6px; text-align:justify; }
.sozlesme-belge .kapanis, .sozlesme-belge .taahhut { text-align:justify; text-indent:3em; margin:16px 0; }
.sozlesme-belge .imzalar { display:grid; grid-template-columns:1fr 1fr; gap:24px; margin-top:28px; text-align:center; min-height:120px; }
.sozlesme-belge.belge h2 { text-align:left; font-size:15px; }
@media print {
  .sozlesme-belge { border:0; border-radius:0; padding:0; margin:0; max-width:none; font-size:12pt; }
  .sozlesme-belge table.taraflar th, .sozlesme-belge table.taraflar td { font-size:12pt; }
  .sozlesme-belge.sayfa-basi { break-before:page; page-break-before:always; }
}
.sozlesme-belge table.ibanlar { width:auto; border:0; background:none; margin:6px 0 0; }
.sozlesme-belge table.ibanlar th, .sozlesme-belge table.ibanlar td { border:0; padding:1px 10px 1px 0; font-size:inherit; }
.sozlesme-belge table.ibanlar td:nth-child(2) { font-family:"Courier New", monospace; white-space:nowrap; }
main[data-yazdir][data-belge] { page: auto; } /* dikey A4: sayfa boyu şablondaki <style> ile */
@media print {
  .sozlesme-belge h2 { break-after: avoid; page-break-after: avoid; }
  .sozlesme-belge.belge { font-size: 10.5pt; line-height: 1.4; }
  .sozlesme-belge.belge h2 { margin: 10px 0 4px; }
  .sozlesme-belge .imzalar { break-inside: avoid; }
}

/* Banka hesapları: liste + Düzenle / Kaldır, "Hesap ekle" açılır menüsü */
details.menu.hesap-ekle > summary { background:var(--accent); color:#fff; padding:10px 18px; font-weight:600; }
details.menu.hesap-ekle > summary:hover, details.menu.hesap-ekle[open] > summary { background:#0a6a7d; }
details.menu.hesap-ekle .menu-list { left:auto; right:0; }
td.iban { font-family:"Courier New", monospace; white-space:nowrap; }
td.hesap-dugmeler { white-space:nowrap; text-align:right; }
td.hesap-dugmeler .button { padding:6px 12px; font-size:14px; margin-left:4px; }
.sozlesme-belge .nusha { text-align:right; font-size:12px; color:#555; margin:0 0 4px; font-family:inherit; }

/* Onay ekranı: havalenin dairesinin açık borçları (doğrulama için) */
details.acik-borc { margin:6px 0 10px; }
details.acik-borc > summary { cursor:pointer; font-size:14px; }
table.borc-mini { margin:6px 0 0; font-size:13px; width:auto; min-width:60%; }
table.borc-mini td { padding:4px 10px; }
table.borc-mini tr.onerilen td { background:#f0f8fa; font-weight:600; }

/* Menü düzeni: grup sekmeleri (banka, borçlar) ve sayı rozeti */
.sekmeler { display:flex; flex-wrap:wrap; gap:4px; border-bottom:2px solid var(--line); margin:0 0 16px; }
.sekmeler a { padding:8px 14px; border-radius:6px 6px 0 0; color:var(--ink); text-decoration:none; margin-bottom:-2px;
  border-bottom:2px solid transparent; font-size:15px; }
.sekmeler a:hover, .sekmeler a:focus-visible { background:#e6f4f7; }
.sekmeler a[aria-current="page"] { border-bottom-color:var(--accent); color:var(--accent); font-weight:600; }
.rozet { display:inline-block; min-width:1.4em; padding:0 6px; border-radius:999px; background:var(--bad); color:#fff;
  font-size:12px; font-weight:700; line-height:1.5; text-align:center; }
@media (max-width: 640px) { .sekmeler a { padding:6px 10px; font-size:14px; } }

/* 8 menü grubu geniş ekranda tek satıra sığsın (menü düzeni) */
@media (min-width: 1100px) {
  .topbar { gap:16px; padding:10px 20px; }
  .menu-bar { gap:0; flex-wrap:nowrap; }
  .menu-bar > a, details.menu > summary { padding:6px 8px; white-space:nowrap; }
}
@media (min-width: 1100px) { .topbar .daire-git { margin-left:auto; } }

/* Logo ve filigran kaldırıldı (müşteri isteği 14.10.2026: kendi logosunu verecek). */
main { position:relative; z-index:1; }
.topbar { position:relative; z-index:10; } /* açılır menüler içeriğin üstünde kalsın */

/* Açılır sol menü (müşteri isteği 12.10.2026): masaüstünde menü kapalı durur; logonun yanındaki ▾ ile sol üstten
   aşağı doğru açılır, dışarı tıklayınca / Esc ile kapanır. Telefonda ☰ Menü aynen kalır. */
@media (min-width: 901px) {
  .topbar { position:sticky; top:0; height:64px; flex-wrap:nowrap; }
  .topbar .brand { margin-right:-12px; }
  .menu-ac { display:block; position:absolute; opacity:0; width:1px; height:1px; pointer-events:none; }
  .menu-dugme { display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; padding:0;
    border:1px solid var(--line); border-radius:8px; background:#fff; }
  .menu-dugme:hover { background:#e6f4f7; border-color:var(--accent); }
  .menu-dugme-yazi { display:none; }
  .menu-ok { width:9px; height:9px; margin-top:-4px; border-right:2px solid var(--accent); border-bottom:2px solid var(--accent);
    transform:rotate(45deg); transition:transform .15s, margin .15s; }
  .menu-ac:checked + .menu-dugme { background:#e6f4f7; border-color:var(--accent); }
  .menu-ac:checked + .menu-dugme .menu-ok { transform:rotate(-135deg); margin-top:4px; }
  .menu-ac:focus-visible + .menu-dugme { outline:2px solid var(--accent); outline-offset:2px; }
  .topbar nav.menu-bar { display:none; position:fixed; top:64px; left:12px; width:280px; max-height:calc(100vh - 76px);
    z-index:30; flex:none; flex-direction:column; align-items:stretch; flex-wrap:nowrap; gap:2px; overflow-y:auto;
    background:#fff; border:1px solid var(--line); border-radius:0 0 12px 12px; box-shadow:0 14px 34px rgba(18,58,82,.18);
    padding:10px 10px 14px; }
  .menu-ac:checked ~ nav.menu-bar { display:flex; }
  .menu-bar > a, .menu-bar details.menu > summary { display:block; padding:9px 12px; border-radius:8px; font-weight:600; white-space:normal; }
  .menu-bar details.menu > summary::after { content:"▾"; float:right; color:var(--muted); transition:transform .15s; }
  .menu-bar details.menu:not([open]) > summary::after { transform:rotate(-90deg); }
  .menu-bar details.menu[open] > summary { background:#e6f4f7; color:var(--accent-dark); }
  .menu-bar .menu-list { position:static; min-width:0; margin:2px 0 6px; padding:0 0 0 12px;
    background:transparent; border:0; border-left:2px solid var(--brand-sand); border-radius:0; box-shadow:none; }
  .menu-bar .menu-list a { white-space:normal; padding:6px 10px; border-radius:6px; font-size:15px; }
  .menu-bar .menu-list a[aria-current="page"] { background:#e6f4f7; color:var(--accent-dark); font-weight:600; }
  .menu-bar .alt-menu > .alt-list, .menu-bar .alt-menu.sola > .alt-list { display:block; position:static; margin:0; padding-left:8px; border-left:0; }
  .menu-bar .menu-list button.alt-baslik { pointer-events:none; padding:8px 10px 2px; font-size:12px; font-weight:700;
    text-transform:uppercase; letter-spacing:.04em; color:var(--muted); background:none; }
  .menu-bar .menu-list button.alt-baslik::after { content:none; }
}

/* Kullanıcı menüsü (sağ üst): aşağı doğru açılan düzgün panel */
details.menu.me > summary { display:inline-flex; align-items:center; gap:6px; padding:7px 12px; border:1px solid var(--line);
  border-radius:999px; background:#fff; font-weight:600; }
details.menu.me > summary::after { content:""; width:7px; height:7px; margin-top:-3px; border-right:2px solid var(--accent);
  border-bottom:2px solid var(--accent); transform:rotate(45deg); transition:transform .15s, margin .15s; }
details.menu.me[open] > summary { background:#e6f4f7; border-color:var(--accent); }
details.menu.me[open] > summary::after { transform:rotate(-135deg); margin-top:3px; }
details.menu.me > .menu-list { left:auto; right:0; top:calc(100% + 6px); min-width:220px; padding:8px; border:1px solid var(--line);
  border-radius:12px; box-shadow:0 14px 34px rgba(18,58,82,.18); background:#fff; }
details.menu.me > .menu-list .rol { padding:4px 10px 10px; margin-bottom:6px; border-bottom:1px solid var(--line); }
details.menu.me > .menu-list a, details.menu.me > .menu-list button.link { display:block; width:100%; text-align:left; padding:9px 10px;
  border-radius:8px; color:var(--ink); font-size:15px; text-decoration:none; }
details.menu.me > .menu-list a:hover, details.menu.me > .menu-list button.link:hover { background:#e6f4f7; }
details.menu.me > .menu-list form { padding:0; margin-top:6px; border-top:1px solid var(--line); padding-top:6px; }
details.menu.me > .menu-list button.link { color:var(--bad); background:none; border:0; cursor:pointer; font:inherit; }
/* Telefonda üst çubuk: 1. satır logo · Menü · kullanıcı (sağda); 2. satır daire no; açılan menü en altta */
@media (max-width: 900px) {
  .topbar { gap:10px 8px; padding:10px 14px; }
  .topbar .brand { order:0; }
  .menu-dugme { order:1; }
  .topbar details.menu.me { order:2; margin-left:auto; }
  .topbar .daire-git { order:3; flex-basis:100%; }
}
@media (max-width: 480px) {
  .topbar .brand { font-size:18px; gap:8px; }
  .topbar .brand img { height:32px; }
  .menu-dugme { padding:6px 10px; font-size:18px; line-height:1; }
  .menu-dugme-yazi { font-size:0; }
  .menu-dugme-yazi::before { content:"☰"; font-size:20px; }
  details.menu.me > summary { padding:6px 10px; font-size:15px; }
}

/* Kira takip (denetim 13.10.2026): ekranda yatay kaydırma kutusunda; telefonda renk açıklamaları sığar; yazdırırken
   bütün ay sütunları A4 yatay kâğıda sığar (hücre yazıları satır kırar, daha az önemli iki sütun gizlenir). */
.legend .cell { white-space:normal; }
@media print {
  .table-wrap { overflow:visible !important; }
  table.rent-table { width:100%; table-layout:fixed; font-size:7.5px; }
  table.rent-table th, table.rent-table td { padding:2px 3px; }
  table.rent-table td.dates { min-width:0; }
  table.rent-table .cell { white-space:normal; padding:1px 2px; margin:1px 0; }
  table.rent-table td.money { white-space:normal; }
  table.rent-table th:nth-child(3), table.rent-table td:nth-child(3),
  table.rent-table th:nth-child(4), table.rent-table td:nth-child(4) { display:none; }  /* depozito, son ödeme günü */
}

/* Dokunmatik ekranda (telefon/tablet) seçim kutuları parmakla rahat basılacak büyüklükte */
@media (pointer: coarse), (max-width: 640px) {
  input[type=checkbox]:not(.menu-ac), input[type=radio] { width:28px; height:28px; flex:none; accent-color:var(--accent); }
  label.secim { min-height:44px; gap:12px; }
}
/* Ödeme al: satırın tamamına dokununca borç seçilir; seçili satır renklenir */
table.borc-sec tbody tr { cursor:pointer; }
table.borc-sec td.kutu { width:44px; text-align:center; }
table.borc-sec tbody tr.secili td { background:#e6f4f7; }
@media (pointer: coarse), (max-width: 640px) { table.borc-sec td { padding-top:12px; padding-bottom:12px; } }
/* Telefonda tabloya sığması için yalnız Kalan gösterilir (kısmi ödenmemişse Tutar ile aynıdır) */
@media (max-width: 640px) { table.borc-sec .tutar { display:none; } }

/* Tablolarda gecikme etiketi ("128 gün"), telefon numarası ve tutarlar iki satıra bölünmez */
td .badge[class*="gecikme-"], a[href^="tel:"], a[href*="/makbuz/"], td.money { white-space: nowrap; }
table.report td.kiraci-hucre { min-width: 11em; }

/* Tablet: tablolar biraz sıkı yazılır ki daha çok sütun sığsın; sığmayanda üstte kaydırma ipucu (js/tablo.js) */
@media (max-width: 1280px) {
  main table th, main table td { padding-left: 6px; padding-right: 6px; }
}
.kaydir-ipucu { margin: 8px 0 -6px; font-size: 13px; color: var(--muted); text-align: right; }

/* Denetim 13.10.2026 (ekran taraması) */
.aylar-kutu .table-wrap { margin: 0; }
.nowrap { white-space: nowrap; }
/* Kira takip: tablo kendi kutusunda iki yönde kayar; sütun başlıkları ve daire no sabit kalır */
.kira-kutu { max-height: calc(100vh - 120px); overflow: auto; }
table.rent-table th:first-child, table.rent-table td:first-child { position: sticky; left: 0; background: #fff; z-index: 1; }
table.rent-table thead th:first-child { z-index: 2; background: #f2f6f7; }
@media (max-width: 1280px) {  /* tablette ay sütunlarına yer: depozito ve sözleşme toplamı gizli */
  table.rent-table th:nth-child(3), table.rent-table td:nth-child(3),
  table.rent-table th:nth-child(8), table.rent-table td:nth-child(8) { display: none; }
}
@media print { .kira-kutu { max-height: none; overflow: visible; } }
/* Toplam alacak: en önemli sütun (Toplam) yana kaydırırken sağda görünür kalır */
table .sabit-sag { position: sticky; right: 0; background: #fff; box-shadow: -6px 0 6px -6px rgba(0,0,0,.25); }
thead .sabit-sag, tfoot .sabit-sag { background: #f2f6f7; }
/* İşlem geçmişi: değişiklik hücresi telefonda kelime kelime alt alta düşmesin */
td.degisiklik { min-width: 16em; }
/* Sayaç girişi telefonda: kiracı sütunu gizli, kutular dar (daire no yeter) */
@media (max-width: 640px) {
  table.readings .kiraci-sutun { display: none; }
  table.readings input { width: 6.5em; }
}

/* WhatsApp (14.10.2026): özet kutuları bağlantıdır; konuşma balonları */
a.stat { color:inherit; text-decoration:none; }
a.stat:hover, a.stat:focus-visible { border-color:var(--accent); }
.wa-konusma { display:flex; flex-direction:column; gap:8px; margin:12px 0; }
.wa-mesaj { max-width:min(560px, 85%); padding:8px 12px; border-radius:10px; border:1px solid var(--line); background:#fff;
  white-space:pre-wrap; overflow-wrap:anywhere; }
.wa-mesaj.giden { align-self:flex-end; background:#e7f6ec; border-color:#bfe3cb; }
.wa-mesaj small { display:block; margin-top:4px; color:var(--muted); font-size:12px; white-space:normal; }
.wa-cevap textarea { width:100%; min-height:90px; }
