/* Demir Konut v12.8.0 — Kayıt formu ve fiyat listesi yeniden tasarımı (v128-feel.css'ten SONRA, v128-platform.css'ten ÖNCE yüklenir)
   Kayıt formu (Yeni Kayıt / Kaydı Düzenle): kutu içinde kutu yok; önce tür, sonra büyük tutar (seçili türün rengiyle), ardından
   kişi, tarih | kategori, açıklama; ödeme ve ek bilgiler ince ayraçla ayrılır; "Belgeden doldur" tek satırlık şerit; ipuçları
   yalnız alan odaklanınca görünür. Fiyat listesi: gerçek arama kutusu, kalem grupları geniş ekranda 2–3 sütun, grup başlığı şerit,
   tek firmalı grupta ad tekrar etmez, fiyat sağda büyük. */

/* ================================================================ kayıt formu */
.tx-sheet .sheet-body { padding: 14px 20px 28px; }
.tx-form-guide { margin: 0 0 8px; }
.tx-form-guide summary { font-size: 12px; color: var(--slate); min-height: 30px; }
.tx-form-guide p { font-size: 12px; }

/* Belgeden doldur: tek satırlık şerit */
.tx-sheet .scan-bar { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px 14px; padding: 10px 12px; margin: 0 0 8px; border: 1px dashed var(--line-strong); border-radius: 14px; background: var(--surface-2); }
.tx-sheet .scan-title { grid-column: 1; margin: 0; display: flex; flex-direction: column; gap: 0; }
.tx-sheet .scan-title b { font-size: 13px; white-space: nowrap; }
.tx-sheet .scan-title small, .tx-sheet .scan-hint, .tx-sheet .scan-btn small { display: none; }
.tx-sheet .scan-actions { grid-column: 2; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tx-sheet .scan-btn { flex-direction: row; justify-content: center; gap: 8px; min-height: 42px; padding: 6px 8px; border-radius: 11px; background: var(--surface); border-color: var(--line); }
.tx-sheet .scan-btn svg { width: 19px; height: 19px; }
.tx-sheet .scan-btn b { font-size: 12.5px; line-height: 1.2; }
.tx-sheet .scan-btn.primary { background: var(--accent-fill); color: var(--accent-ink); border-color: transparent; }
.tx-sheet .scan-status, .tx-sheet .scan-result { grid-column: 1 / -1; margin-top: 4px; }

/* Cümleyle / sesle doldur: hafif satır */
.tx-sheet #txf .tx-quick { border: 0; background: transparent; padding: 0 2px; margin: 0; }
.tx-sheet .tx-quick summary { font-size: 12.5px; font-weight: 650; color: var(--accent); padding: 6px 0; min-height: 34px; }
.tx-sheet .tx-quick[open] > .quick-fill { padding: 10px; margin-top: 4px; border: 1px solid var(--line); border-radius: 12px; }

/* Bölümler: kutu yok, ince ayraç, küçük başlık */
.tx-sheet #txf { gap: 0; }
.tx-sheet .sheet-body .tx-section, .tx-sheet #txf .tx-section { border: 0; background: transparent; padding: 14px 0 18px; border-radius: 0; gap: 12px; margin: 0; }
.tx-sheet #txf .tx-section + .tx-section { border-top: 1px solid var(--line); }
.tx-sheet #txf .tx-section > h4 { position: static; width: auto; height: auto; clip: auto; margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .2px; text-transform: none; color: var(--slate); }
.tx-sheet #txf .tx-section > p:not(.tx-preview) { display: none; }
.tx-sheet #txf .ux-field-hint { display: none !important; }
.tx-sheet #txf .field:focus-within > .ux-field-hint { display: block !important; }

/* İşlem bilgileri: ızgara — tür, tutar, kişi tam satır; tarih | kategori yan yana */
.tx-sheet #txf .tx-basic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; align-items: start; }
.tx-sheet #txf .tx-basic > * { grid-column: 1 / -1; min-width: 0; margin: 0; }
.tx-sheet #txf .tx-basic > h4 { order: -3; }
.tx-sheet #txf .tx-basic > #segType { order: -2; }
.tx-sheet #txf .tx-basic > .field:has(> .amount-box) { order: -1; }
.tx-sheet #txf .tx-basic > .field:has(> .date-chips), .tx-sheet #txf .tx-basic > .field:has(> #catBtn) { grid-column: auto; }
@media (max-width: 560px) { .tx-sheet #txf .tx-basic { grid-template-columns: minmax(0, 1fr); } .tx-sheet #txf .tx-basic > * { grid-column: 1; } }

/* Tür seçici: beş eşit pil, seçili olan tür rengiyle */
.tx-sheet #txf #segType { gap: 6px; }
.tx-sheet #txf #segType button { min-height: 58px; border-radius: 12px; background: var(--surface-2); border: 1px solid transparent; font-size: 12px; font-weight: 650; color: var(--ink-2); gap: 4px; transition: background .18s, color .18s, box-shadow .18s; }
.tx-sheet #txf #segType button svg { width: 20px; height: 20px; }
/* seçili pil: türün rengi (--tx-c, aşağıda .tx-basic üzerinde tanımlanır); kimlik seçicili taban kuralı app.css'teki tür rengini ezdiği için burada yeniden verilir */
.tx-sheet #txf #segType button.on { background: var(--tx-c, var(--navy)); border-color: var(--tx-c, var(--navy)); box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .4); color: #fff; }
[data-theme="dark"] .tx-sheet #txf #segType button.on { color: #0B1119; }
.tx-sheet #txf #segType button:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

/* Tutar: seçili türün rengiyle tonlanan büyük kutu */
.tx-sheet #txf .tx-basic:has(#segType button.on[data-v="gelir"]) { --tx-c: var(--green); }
.tx-sheet #txf .tx-basic:has(#segType button.on[data-v="gider"]) { --tx-c: var(--red); }
.tx-sheet #txf .tx-basic:has(#segType button.on[data-v="odeme"]) { --tx-c: var(--amber); }
.tx-sheet #txf .tx-basic:has(#segType button.on[data-v="tahsilat"]) { --tx-c: var(--teal); }
.tx-sheet #txf .tx-basic:has(#segType button.on[data-v="virman"]) { --tx-c: var(--steel); }
.tx-sheet #txf .amount-box { margin: 0; padding: 8px 14px 8px 18px; border-radius: 16px; border: 1.5px solid color-mix(in srgb, var(--tx-c, var(--line-strong)) 55%, transparent); background: color-mix(in srgb, var(--tx-c, var(--surface)) 6%, var(--surface)); transition: border-color .2s, background .2s, box-shadow .2s; }
.tx-sheet #txf .amount-box:focus-within { border-color: var(--tx-c, var(--accent)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tx-c, var(--accent)) 18%, transparent); }
.tx-sheet #txf .amount-box input { font-size: clamp(30px, 5vw, 40px) !important; font-weight: 760; letter-spacing: -.8px; padding: 8px 0 !important; }
.tx-sheet #txf .amount-box .cur-sel { background: var(--surface); border-color: color-mix(in srgb, var(--tx-c, var(--line-strong)) 45%, transparent); }
.tx-sheet #txf .amount-help { font-size: 12px; gap: 8px; }
.tx-sheet #txf .amount-help .hint { display: none; }
.tx-sheet #txf .price-box:empty, .tx-sheet #txf .plan-box:empty { display: none; }

/* Alanlar: sakin etiketler, aynı yükseklik */
.tx-sheet #txf .field > span { font-size: 12.5px; font-weight: 650; color: var(--slate); }
.tx-sheet #txf .picker-btn, .tx-sheet #txf .field input:not([type=checkbox]):not([type=radio]), .tx-sheet #txf .field select { min-height: 46px; border-radius: 12px; }
.tx-sheet #txf .date-chips { margin-top: 6px; }
.tx-sheet #txf .date-chips .chip { min-height: 32px; padding: 4px 10px; font-size: 12px; }
.tx-sheet #txf .chips.wrap .chip { min-height: 34px; padding: 5px 11px; font-size: 12.5px; }

/* Ödeme: ödeme şekli çipleri, kasa/banka yan yana */
.tx-sheet #txf #segMethod { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 0; background: transparent; }
.tx-sheet #txf #segMethod button { min-height: 42px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--surface); color: var(--ink-2); font-size: 13px; padding: 6px 8px; }
.tx-sheet #txf #segMethod button.on { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: none; }
[data-theme="dark"] .tx-sheet #txf #segMethod button.on { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--accent-ink); }
.tx-sheet #txf .tx-payment .form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.tx-sheet #txf .tx-payment .form-row > .field { margin: 0; min-width: 0; flex: none; }
@media (max-width: 560px) { .tx-sheet #txf .tx-payment .form-row { grid-template-columns: minmax(0, 1fr); } .tx-sheet #txf #segMethod { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Belge ve diğer bilgiler: katlanır satır */
.tx-sheet #txf #moreBtn { min-height: 40px; padding: 6px 10px; border: 1px dashed var(--line-strong); border-radius: 11px; color: var(--ink-2); font-size: 13px; }
.tx-sheet #txf #more { gap: 12px; padding-top: 4px; }

/* Alt şerit */
.tx-sheet .sheet-foot { gap: 10px; }
.tx-sheet .sheet-foot .tx-save-status { font-size: 12px; }
.tx-sheet .sheet-foot .btn { min-height: 46px; border-radius: 12px; }

/* Telefon: aynı düzen, daha dar boşluk; Belgeden doldur düğmeleri simge üstte */
@media (max-width: 767px) {
  .tx-sheet .sheet-body { padding: 10px 14px 20px; }
  .tx-sheet .scan-bar { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px; }
  .tx-sheet .scan-title { grid-column: 1; }
  .tx-sheet .scan-actions { grid-column: 1; }
  .tx-sheet .scan-btn { flex-direction: column; gap: 4px; min-height: 58px; padding: 6px 4px; }
  .tx-sheet .scan-btn b { font-size: 11.5px; }
  .tx-sheet #txf .tx-section { padding: 12px 0 14px; }
  .tx-sheet #txf #segType button { min-height: 54px; font-size: 11.5px; }
  .tx-sheet #txf .amount-box input { font-size: 32px !important; }
}
@media (max-width: 359px) { .tx-sheet .scan-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tx-sheet #txf #segType button { font-size: 10.5px; padding: 6px 1px; } }
@media (prefers-reduced-motion: reduce) { .tx-sheet #txf #segType button, .tx-sheet #txf .amount-box { transition: none; } }

/* ================================================================ fiyat listesi */
.search-row { margin: 0 0 12px; position: relative; }
.search-row input { width: 100%; box-sizing: border-box; min-height: 46px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); color: var(--ink); padding: 10px 14px 10px 42px; font: inherit; font-size: 15px; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A6879' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 14px center; background-size: 18px; }
[data-theme="dark"] .search-row input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239AA8B9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E"); }
.search-row input::placeholder { color: var(--muted); }
.search-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.search-row input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
#plList { display: grid; gap: 12px; margin-top: 12px; align-items: start; }
@media (min-width: 900px) { #plList { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1600px) { #plList { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
#plList > .empty { grid-column: 1 / -1; }
.workspace-page .pl-group, .pl-group { padding: 0 !important; overflow: hidden; border-radius: var(--radius-md); }
.pl-group .card-head { margin: 0; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); gap: 10px; align-items: center; flex-wrap: nowrap; }
.pl-group .card-head h3 { font-size: 14.5px; line-height: 1.35; min-width: 0; overflow-wrap: anywhere; }
.pl-group .card-head .sub { flex: none; font-size: 11.5px; font-weight: 650; padding: 2px 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--slate); white-space: nowrap; }
.pl-group .list { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.pl-row, .workspace-page .pl-row { padding: 10px 14px; min-height: 54px; gap: 12px; }
.pl-row .li-title { font-size: 13.5px; }
.pl-row .li-sub { font-size: 12px; }
/* tek firmalı grup: kalem adı başlıkta zaten var, satırda yalnız firma bilgisi kalır */
.pl-group .list .pl-row:only-child .li-title { display: none; }
.pl-group .list .pl-row:only-child .li-sub { font-size: 13px; color: var(--ink-2); white-space: normal; }
.pl-row .li-end { gap: 2px; max-width: 48%; }
.pl-row .li-amt { font-size: 15.5px; font-weight: 760; }
.pl-row .li-end .muted, .pl-row .li-end .small, .pl-row .li-end small { font-size: 11.5px; }
.pl-row .badge.green { margin-top: 2px; font-size: 11px; }
@media (max-width: 420px) { .pl-group .card-head { padding: 9px 12px; } .pl-row, .workspace-page .pl-row { padding: 9px 12px; } .pl-row .li-amt { font-size: 14.5px; } }

/* ================================================================ yasal bildirim şeridi ve belgeler kartı (js/legal.js) */
.legal-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px max(var(--gutter), env(safe-area-inset-right)) 8px max(var(--gutter), env(safe-area-inset-left)); font-size: var(--fs-sm); line-height: 1.45; background: var(--surface-2); border-bottom: 1px solid var(--line); color: var(--ink-2); }
.legal-bar > span { flex: 1 1 280px; min-width: 0; }
.legal-bar a { color: var(--accent); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.legal-bar .btn { min-height: 32px; padding: 4px 12px; font-size: 12.5px; }
.legal-card { margin-top: var(--sp-4); }
.legal-links { display: flex; flex-wrap: wrap; gap: 8px; }
.legal-links .btn { text-decoration: none; }
.legal-ai { margin: 0 0 var(--sp-4); }
.legal-ai a { color: inherit; font-weight: 650; }
.login-foot a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
@media (orientation: landscape) and (max-height: 560px) { .legal-bar { display: none; } }

/* ================================================================ v12.9 · aynı satırdaki kutular eşit boyutta
   Panel ızgarası v12411-workspace.css'te align-items:start ile her kartı kendi içeriği kadar yüksek bırakıyordu (aynı satırda 565 / 360 px);
   KPI kutuları panelde <a> içinde durduğundan ızgara hücresi uzasa da kutu uzamıyordu (dar ekranda 102–122 px). Genişlikler zaten eşit. */
.dashboard-page .dash-grid { align-items: stretch !important; }
.dashboard-page .dash-grid > .dash-card { align-self: stretch; height: auto; }
.kpi-grid > a, .w-kpi-row > a, .unit-grid > a, .grid-2 > a, .grid-3 > a, .grid-2-compact > a { display: grid !important; min-width: 0; } /* !important: panel KPI bağlantısı satır içi style ile block */
.kpi-grid > a > .kpi, .w-kpi-row > a > .kpi { height: auto; min-height: 100%; }

/* ================================================================ v12.9 · varsayılan KALFA logosu (assets/brand): kenar menüde kare sembol plakasız, açılış/giriş yatay logo */
.sb-mark.has-logo.is-default { background: transparent; padding: 0; box-shadow: none; }
.sb-mark.has-logo.is-default img { border-radius: 10px; }
.splash-logo { display: block; width: auto; height: auto; max-width: min(300px, 66vw); max-height: 100px; object-fit: contain; }
.lg-logo { max-width: min(200px, 52vw); max-height: 66px; }
@media (max-height: 430px) { .splash-logo { max-height: 64px; } }
/* giriş kartı: varsayılan KALFA logosunun açık temada lacivert, koyu temada beyaz yazılı sürümü */
.lg-logo.lg-logo-dark { display: none; }
html[data-theme="dark"] .lg-logo.lg-logo-light { display: none; }
html[data-theme="dark"] .lg-logo.lg-logo-dark { display: block; }
