/* Dealer portal: account statement, payments, transfer notices and reconciliation (/hesabim/...) */

/* ---------------------------------------------------------------- summary cards */
.fin-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fin-kpi { padding: 20px 22px; min-width: 0; }
.fin-kpi + .fin-kpi { border-left: 1px solid var(--line-2); }
.fin-kpi-l { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 650; color: var(--muted); }
.fin-kpi-l .ti { width: 30px; height: 30px; }
.fin-kpi strong { display: block; margin-top: 12px; font-family: var(--font-display); font-size: 28px; font-stretch: var(--display-stretch); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fin-kpi small { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.fin-kpi.is-soon strong { color: var(--warning); }
.fin-kpi.is-late strong { color: var(--danger); }
.fin-meter { margin-top: 10px; height: 8px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.fin-meter i { display: block; height: 100%; border-radius: 5px; background: var(--success-bright); transition: width 0.6s var(--ease); }
.fin-meter.is-mid i { background: var(--tape); }
.fin-meter.is-low i { background: var(--danger-bright); }
.fin-alert { margin-top: 18px; text-decoration: none !important; align-items: center; }
.fin-alert > .icon:last-child { margin-left: auto; flex: none; opacity: 0.7; }

/* ---------------------------------------------------------------- main card + side */
.fin-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 18px; }
.fin-main { overflow: hidden; }
.fin-side { display: grid; gap: 18px; min-width: 0; }
.fin-tabs { display: flex; gap: 4px; padding: 0 20px; border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; }
.fin-tabs::-webkit-scrollbar { display: none; }
.fin-tab { height: 46px; padding: 0 12px; border-bottom: 2.5px solid transparent; font-weight: 650; font-size: 14.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; }
.fin-tab:hover { color: var(--ink); }
.fin-tab .icon { width: 16px; height: 16px; }
.fin-tab.is-active { color: var(--brand-text); border-bottom-color: var(--brand); font-weight: 750; }
.fin-tab .badge { height: 18px; min-width: 18px; font-size: 11px; padding: 0 5px; }

/* period filter */
.fin-period { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 20px; border-bottom: 1px solid var(--line-2); }
.fin-presets { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.fin-presets::-webkit-scrollbar { display: none; }
.fin-dates { display: flex; align-items: center; gap: 6px; margin-left: auto; color: var(--faint); }
.fin-dates .input { width: 142px; }

/* statement table */
.fin-tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fin-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.fin-tbl th { text-align: left; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.fin-tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; white-space: nowrap; }
.fin-tbl th:first-child, .fin-tbl td:first-child { padding-left: 20px; }
.fin-tbl th:last-child, .fin-tbl td:last-child { padding-right: 20px; }
.fin-tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.fin-tbl tbody tr:last-child td { border-bottom: 0; }
.fin-doc b, .fin-doc a { display: block; font-weight: 700; color: var(--ink); }
.fin-doc a:hover { color: var(--brand-text); }
.fin-doc small { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.fin-cr { color: var(--success); font-weight: 700; }
.fin-bal { font-weight: 800; }
.fin-tbl tr.is-open td { background: color-mix(in srgb, var(--tape-soft) 55%, var(--surface)); }
.fin-tbl tfoot td { background: var(--surface-2); font-weight: 750; border-top: 1px solid var(--line-2); border-bottom: 0; }
.fin-duechip { display: inline-flex; align-items: center; margin-left: 6px; padding: 2px 7px; border-radius: 7px; font-size: 12px; font-weight: 750; color: var(--warning); background: var(--tape-soft); }
.fin-duechip.is-late { color: var(--danger); background: var(--danger-soft); }
.fin-empty-row td { white-space: normal; }

/* payment and notice lists */
.fin-sumline { display: flex; justify-content: space-between; gap: 12px; padding: 12px 20px; font-size: 13.5px; font-weight: 650; color: var(--muted); border-bottom: 1px solid var(--line-2); background: var(--surface-2); }
.fin-sumline b { color: var(--ink); font-variant-numeric: tabular-nums; }
.fin-pl { list-style: none; margin: 0; padding: 6px 20px 16px; }
.fin-pl li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.fin-pl li:first-child { border-top: 0; }
.fin-pl .ti { width: 38px; height: 38px; border-radius: 11px; }
.fin-pl .ti .icon { width: 18px; height: 18px; }
.fin-pl-main { flex: 1; min-width: 160px; line-height: 1.35; }
.fin-pl-main b { font-weight: 700; }
.fin-pl-main small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.fin-pl-main .fin-pl-why { color: var(--danger); }
.fin-pl strong { font-weight: 800; font-variant-numeric: tabular-nums; }
.fin-pl-act { color: var(--muted); }
.fin-inline-note, .fin-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; color: var(--ink-2); line-height: 1.45; }
.fin-inline-note { margin: 16px 20px 0; }
.fin-note .icon, .fin-inline-note .icon { margin-top: 1px; flex: none; color: var(--muted); }

/* reconciliation */
.fin-mut { padding: 22px 20px; }
.fin-mut-box { padding: 20px; border-radius: 18px; background: var(--surface-2); display: grid; gap: 6px; }
.fin-mut-box small { font-size: 13px; color: var(--muted); font-weight: 650; }
.fin-mut-box strong { font-family: var(--font-display); font-size: 30px; font-stretch: var(--display-stretch); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.fin-mut-box p { margin-top: 4px; font-size: 13.5px; color: var(--ink-2); font-weight: 550; line-height: 1.5; }
.fin-mut-box .fin-mut-diff { color: var(--warning); font-weight: 650; }
.fin-mut-form { margin-top: 16px; display: grid; gap: 12px; }
.fin-mut-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.fin-okline { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: var(--success-soft); color: var(--success); font-weight: 650; font-size: 13.5px; line-height: 1.45; }
.fin-okline .icon { margin-top: 1px; flex: none; }
.fin-okline.is-no { background: var(--tape-soft); color: var(--tape-ink); }
.fin-okline.is-neutral { background: var(--surface-2); color: var(--ink-2); }
.fin-mut-rows { margin-top: 22px; }
.fin-mut-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; font-size: 14px; }
.fin-mut-rows ul { list-style: none; margin: 0; padding: 0; }
.fin-mut-rows li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line-2); font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.fin-mut-rows li span { min-width: 0; }
.fin-mut-rows li small { display: block; font-size: 12px; color: var(--muted); }
.fin-mut-rows li b { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fin-mut-rows li b.fin-cr { color: var(--success); }
.fin-mut-rows li.is-total { font-weight: 750; color: var(--ink); }

/* ---------------------------------------------------------------- online payment */
.fin-pay, .fin-hv { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.fin-hv { gap: 12px; }
.fin-pay h2, .fin-hv h2 { font-size: 16.5px; font-weight: 750; }
.fin-pay > p, .fin-hv > p { margin-top: -8px; font-size: 13px; color: var(--muted); font-weight: 550; }
.fin-pay-form, .fin-hv-form { display: flex; flex-direction: column; gap: 14px; }
.fin-hv-form { gap: 12px; }
.fin-opts { display: grid; gap: 8px; }
.fin-opt { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s; }
.fin-opt:hover { border-color: color-mix(in srgb, var(--line-strong) 70%, var(--faint)); }
.fin-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.fin-opt:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 4%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent); }
.fin-opt:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); outline-offset: 2px; }
.fin-opt .ck-rd { margin-top: 0; }
.fin-opt:has(input:checked) .ck-rd { border-color: var(--brand); }
.fin-opt:has(input:checked) .ck-rd::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.fin-opt-body { flex: 1; min-width: 0; line-height: 1.35; }
.fin-opt-body b { font-weight: 700; }
.fin-opt-body small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-opt strong { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fin-amt { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 800; font-size: 18px; }
.fin-amt[hidden] { display: none; }
.fin-amt:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.fin-amt input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; color: var(--ink); font-variant-numeric: tabular-nums; }
.fin-err { margin-top: -6px; font-size: 12.5px; color: var(--danger); font-weight: 700; }
.fin-secure { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--success-soft); color: var(--success); font-size: 13px; font-weight: 650; line-height: 1.45; }
.fin-secure .icon { margin-top: 1px; flex: none; }
.fin-pay .btn-lg, .fin-hv .btn-lg { width: 100%; }
.fin-hint { margin-top: -6px; font-size: 12.5px; color: var(--muted); font-weight: 600; text-align: center; }

/* transfer notice */
.fin-iban { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.fin-iban > .icon { color: var(--brand); }
.fin-iban > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fin-iban small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.fin-iban .btn { margin-left: auto; }
.fin-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fin-fld { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); min-width: 0; align-content: start; }
.fin-fld .opt { font-weight: 500; color: var(--faint); }
.fin-fld .input, .fin-fld .select { height: 44px; border: 1.5px solid var(--line); font-size: 14px; font-weight: 600; }
.fin-fld .textarea { border: 1.5px solid var(--line); font-size: 14px; min-height: 72px; }
.fin-fld.is-invalid .input, .fin-fld.is-invalid .select, .fin-fld.is-invalid .textarea { border-color: var(--danger); }
.fin-drop { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 1.5px dashed var(--line-strong); background: var(--surface-2); cursor: pointer; font-size: 13.5px; font-weight: 650; color: var(--ink-2); transition: border-color 0.15s, background 0.15s; }
.fin-drop:hover, .fin-drop.is-over { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 4%, var(--surface)); }
.fin-drop:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.fin-drop.has-file { border-style: solid; }
.fin-drop.is-invalid { border-color: var(--danger); }
.fin-drop .ti { width: 38px; height: 38px; border-radius: 11px; }
.fin-drop-text { min-width: 0; overflow-wrap: anywhere; }
.fin-drop small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.fin-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }

@media (max-width: 1180px) {
  .fin-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fin-kpi:nth-child(3) { border-left: 0; }
  .fin-kpi:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .fin-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .fin-dates { margin-left: 0; width: 100%; flex-wrap: wrap; }
  .fin-dates > span { display: none; }
  .fin-dates .input { flex: 1 1 140px; width: auto; min-width: 0; }
}
@media (max-width: 640px) {
  .fin-kpis { grid-template-columns: minmax(0, 1fr); }
  .fin-kpi + .fin-kpi { border-left: 0; border-top: 1px solid var(--line-2); }
  .fin-grid2 { grid-template-columns: minmax(0, 1fr); }
  .fin-tabs { padding: 0 12px; }
}

/* ---------------------------------------------------------------- card payment page and result (/odeme/...) */
.pay-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.pay-frame-card { overflow: hidden; }
.pay-frame-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line-2); }
.pay-frame-head h2 { font-size: 16.5px; font-weight: 750; }
.pay-frame-head p { margin-top: 2px; font-size: 13px; color: var(--muted); font-weight: 550; }
.pay-frame { display: block; width: 100%; min-height: 680px; border: 0; background: var(--surface); }
.pay-sum { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.pay-sum-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pay-sum-h h2 { font-size: 16.5px; font-weight: 750; }
.pay-sl { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ink-2); font-weight: 600; }
.pay-sl b { color: var(--ink); text-align: right; }
.pay-grand { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
.pay-grand span { font-weight: 700; }
.pay-grand strong { font-family: var(--font-display); font-size: 28px; font-stretch: var(--display-stretch); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pay-secure { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--success-soft); color: var(--success); font-size: 13px; font-weight: 650; line-height: 1.45; }
.pay-secure .icon { margin-top: 1px; flex: none; }
.pay-hint { font-size: 12.5px; color: var(--muted); font-weight: 550; line-height: 1.5; }
.pay-result { max-width: 760px; margin: 10px auto 0; padding: 40px; text-align: center; }
.pay-ring { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto; background: var(--surface-3); color: var(--muted); }
.pay-ring.is-ok { background: var(--success-soft); color: var(--success); }
.pay-ring.is-wait { background: var(--tape-soft); color: var(--warning); }
.pay-ring.is-fail { background: var(--danger-soft); color: var(--danger); }
.pay-ring .icon { stroke-width: 2.6; }
.pay-result h1 { margin: 20px 0 6px; font-family: var(--font-display); font-size: 34px; font-stretch: 118%; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.pay-result > p { color: var(--muted); font-weight: 550; font-size: 15.5px; max-width: 60ch; margin: 0 auto; }
.pay-result-grid { margin-top: 26px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; text-align: left; }
.pay-result-grid div { padding: 14px; border-radius: 16px; background: var(--surface-2); }
.pay-result-grid small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 650; }
.pay-result-grid b { display: block; margin-top: 3px; font-weight: 750; line-height: 1.35; overflow-wrap: anywhere; }
.pay-result-acts { display: flex; justify-content: center; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.pay-result-acts form { display: contents; }
@media (max-width: 1180px) {
  .pay-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .pay-result { padding: 28px 18px; }
  .pay-result h1 { font-size: 27px; }
  .pay-result-grid { grid-template-columns: minmax(0, 1fr); }
  .pay-frame { min-height: 620px; }
}
