:root {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --green: #16a34a;
  --green-bg: #dcfce7;
  --amber: #d97706;
  --amber-bg: #fef3c7;
  --red: #dc2626;
  --red-bg: #fee2e2;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- layout ---- */
.app, #app { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px;
  background: #0f172a;
  color: #e2e8f0;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  padding: 4px 8px 18px;
}

.sidebar .brand .logo { width: 28px; height: 28px; }

.sidebar a.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #cbd5e1;
  font-weight: 500;
}
.sidebar a.nav:hover { background: #1e293b; color: #fff; text-decoration: none; }
.sidebar a.nav.active { background: var(--primary); color: #fff; }

.sidebar .spacer { flex: 1; }
.sidebar .user-info { padding: 10px 12px; font-size: 13px; color: #94a3b8; border-top: 1px solid #1e293b; }
.sidebar .user-info strong { color: #e2e8f0; display: block; }

.main { flex: 1; padding: 24px 32px; max-width: 1100px; }

.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 700; }

/* ---- cards ---- */
.summary-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.summary-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.summary-card .label { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.summary-card .value { font-size: 22px; font-weight: 700; }
.summary-card.ok .value { color: var(--green); }
.summary-card.pending .value { color: var(--amber); }
.summary-card.warn .value { color: var(--red); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 24px; }
.card-head { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-head h2 { font-size: 16px; font-weight: 600; }
.card-body { padding: 18px; }

/* ---- table ---- */
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
table.data th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; }
table.data tr:hover td { background: #f8fafc; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
td .muted { color: var(--muted); font-size: 12px; }

/* ---- table column filters ---- */
tr.filters td { padding: 6px 8px; background: #f8fafc; border-bottom: 1px solid var(--border); }
tr.filters td input, tr.filters td select {
  width: 100%;
  min-width: 70px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  background: #fff;
  color: var(--text);
}
tr.filters td input::placeholder { color: #94a3b8; }
tr.filters td input:focus, tr.filters td select:focus { outline: 2px solid var(--primary); outline-offset: -1px; }

/* ---- badges / status ---- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.paid { background: var(--green-bg); color: var(--green); }
.badge.paid-early { background: #ecfdf5; color: #0f9d58; }
.badge.paid-late { background: #d1fae5; color: #065f46; }
.badge.pending { background: var(--amber-bg); color: var(--amber); }
.badge.overdue { background: var(--red-bg); color: var(--red); }

/* son ödeme günü bugün olan, ödenmemiş kayıt satırı */
tr.due-today > td {
  background: #fef3c7; /* amber-100 */
}
tr.due-today:hover > td { background: #fef3c7; }
.due-now {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  margin-right: 6px;
  vertical-align: 1px;
}
.due-now-date { color: var(--red); font-weight: 700; }

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: #f1f5f9; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.danger { color: var(--red); border-color: #fecaca; }
.btn.danger:hover { background: var(--red-bg); }
.btn.small { padding: 5px 10px; font-size: 13px; border-radius: 6px; }
.btn.tiny { padding: 2px 6px; font-size: 11px; border-radius: 5px; line-height: 1.4; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn.icon {
  width: 30px;
  height: 30px;
  padding: 0;
  justify-content: center;
  border-radius: 7px;
  flex: none;
}
.btn.icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn.icon.danger:hover { background: var(--red-bg); }
.btn.icon.primary:disabled {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  opacity: 0.35;
}

/* ---- forms ---- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: -1px;
  border-color: var(--primary);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .form-row, .form-row-3 { grid-template-columns: 1fr; } }

/* ---- modal ---- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
  z-index: 50;
  overflow: auto;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
}
.modal.modal-wide { max-width: 760px; }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { font-size: 17px; font-weight: 600; }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

.close-x { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--muted); line-height: 1; }
.close-x:hover { color: var(--text); }

/* ---- auth pages ---- */
.auth-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }
.auth-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(255,255,255,0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}
.auth-top .land-brand { font-size: 18px; }
.auth-top .land-brand .logo { width: 24px; height: 24px; }
.auth-top-spacer { height: 58px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); width: 100%; max-width: 400px; padding: 32px; }
.auth-logo { text-align: center; margin-bottom: 8px; }
.auth-logo .logo { width: 40px; height: 40px; }
.auth-title { text-align: center; font-size: 22px; font-weight: 700; margin: 10px 0 4px; }
.auth-sub { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.btn.google { width: 100%; justify-content: center; }
.btn.google svg { width: 18px; height: 18px; }
.alert { padding: 10px 12px; border-radius: 8px; font-size: 14px; margin-bottom: 14px; }
.alert.error { background: var(--red-bg); color: var(--red); }
.alert.success { background: var(--green-bg); color: var(--green); }
.auth-switch { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }

/* ---- toolbar ---- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar select { padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: 14px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.hint { font-size: 13px; color: var(--muted); }

/* pills for month nav */
.pill { display: inline-flex; align-items: center; gap: 4px; }

/* ---- history modal ---- */
.hist-chart {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 16px;
  overflow-x: auto;
}
.hist-link {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
  margin-top: 2px;
}
.hist-link:hover { text-decoration: underline; }
.tag.tpl {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
}
.tag.autopay {
  background:#e7f7ee;
  color:#166534;
  border:1px solid #2f9e44;
  font-weight:600;
}
.tag.autopay::before {
  content:"✔ ";
}

.tag.auto {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(16,185,129,0.14);
  color: var(--green, #10b981);
  border: 1px solid rgba(16,185,129,0.35);
}

/* ---- name suggest autocomplete ---- */
.suggest-wrap { position: relative; }
.suggest-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  max-height: 240px;
  overflow-y: auto;
  z-index: 60;
  margin-top: 4px;
}
.suggest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.suggest-item:last-child { border-bottom: none; }
.suggest-item.focus, .suggest-item:hover { background: var(--primary); color: #fff; }
.suggest-item.focus .muted, .suggest-item:hover .muted { color: #dbeafe; }

/* ---- table paging ---- */
.pager { padding: 16px; border-top: 1px solid var(--border); background: #f8fafc; }
.pager-inner { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; }
.page-size {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 8px;
}
.page-size select {
  padding: 4px 8px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
}
.page-btns { display: flex; align-items: center; gap: 8px; }
.page-btns .btn {
  border: 1px solid var(--primary);
  background: var(--surface);
  color: var(--primary);
  font-weight: 600;
}
.page-btns .btn:hover:not(:disabled) { background: var(--primary); color: #fff; }
.page-btns .btn:disabled { border-color: var(--border); color: var(--muted); background: var(--surface); cursor: not-allowed; }
.page-info {
  font-size: 14px; font-weight: 700; color: var(--text);
  background: var(--primary);
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
}

/* ================= landing page ================= */
body.landing {
  background: linear-gradient(180deg, #f8fafc 0%, #eff6ff 45%, #f8fafc 100%);
  color: var(--text);
}

.land-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 32px;
  max-width: 1200px;
  margin: 0 auto;
}
.land-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}
.land-brand:hover { text-decoration: none; }
.land-brand .logo { width: 30px; height: 30px; }
.land-links { flex: 1; display: flex; gap: 18px; justify-content: center; }
.land-links a { color: var(--muted); font-weight: 500; }
.land-links a:hover { color: var(--primary); text-decoration: none; }

.land-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 32px 72px;
}
.land-hero-text h1 {
  font-size: 44px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 16px 0;
}
.grad {
  background: linear-gradient(90deg, var(--primary), #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.land-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
}
.land-lead { font-size: 17px; color: var(--muted); line-height: 1.6; max-width: 540px; margin-bottom: 24px; }
.land-cta { display: flex; gap: 12px; margin-bottom: 28px; flex-wrap: wrap; }
.land-cta .btn { padding: 12px 22px; font-size: 15px; }
.land-points { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.land-points li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); }
.land-points svg { width: 20px; height: 20px; fill: none; stroke: var(--green); stroke-width: 2.4; flex: none; }

/* login card */
.land-auth .auth-card { max-width: 400px; margin: 0 auto; box-shadow: 0 10px 40px rgba(37, 99, 235, 0.12); }
.auth-switch { text-align: center; font-size: 14px; color: var(--muted); margin-top: 14px; }

.land-section { padding: 64px 32px; text-align: center; max-width: 1200px; margin: 0 auto; }
.land-section h2 { font-size: 32px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.01em; }
.land-sub { color: var(--muted); font-size: 16px; margin-bottom: 40px; }
.land-alt { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); max-width: none; }

.land-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  text-align: left;
}
.land-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.land-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1); }
.land-card h3 { font-size: 17px; font-weight: 700; margin: 14px 0 6px; }
.land-card p { color: var(--muted); font-size: 14px; line-height: 1.55; }
.land-ico {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.land-ico svg { width: 24px; height: 24px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico-blue { background: #dbeafe; color: var(--primary); }
.ico-purple { background: #ede9fe; color: #7c3aed; }
.ico-green { background: #dcfce7; color: var(--green); }
.ico-red { background: #fee2e2; color: var(--red); }
.ico-amber { background: #fef3c7; color: var(--amber); }
.ico-gray { background: #e2e8f0; color: #475569; }

.land-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}
.land-step { padding: 8px; }
.land-step-num {
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.land-step h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.land-step p { color: var(--muted); font-size: 14px; line-height: 1.55; }

.land-cta-inner {
  background: linear-gradient(135deg, #1e40af, #7c3aed);
  border-radius: 20px;
  padding: 48px 40px;
  color: #fff;
}
.land-cta-inner h2 { font-size: 28px; font-weight: 800; margin-bottom: 20px; }
.land-cta-inner .btn { background: #fff; color: var(--primary-dark); border: none; padding: 14px 28px; font-size: 16px; font-weight: 700; }

.land-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 28px 32px;
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}
.land-footer > div { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.land-footer .logo { width: 20px; height: 20px; }
.land-footer nav { display: flex; gap: 16px; }

@media (max-width: 900px) {
  .land-hero { grid-template-columns: 1fr; padding: 32px 20px 48px; gap: 36px; }
  .land-hero-text h1 { font-size: 32px; }
  .land-links { display: none; }
  .land-section { padding: 40px 20px; }
}
/* ---- şirket harcamaları (PDF + OCR) ---- */
.modal.modal-xl { max-width: 1120px; }
.scan-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 900px) { .scan-grid { grid-template-columns: 1fr; } }
.scan-preview { border: 1px solid var(--border); border-radius: 8px; background: #f8fafc; min-height: 560px; overflow: hidden; }
.scan-preview iframe { width: 100%; height: 640px; border: 0; display: block; }
.scan-preview .empty { padding-top: 220px; }
.field.ocr-low input, .field.ocr-low select { background: var(--amber-bg); border-color: #fcd34d; }
.field.ocr-none input, .field.ocr-none select { border-color: #fca5a5; }
.ocr-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.ocr-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 1px solid var(--border); }
.ocr-legend .lg-low::before { background: var(--amber-bg); border-color: #fcd34d; }
.ocr-legend .lg-none::before { background: #fff; border-color: #fca5a5; }
.items-wrap { margin-bottom: 14px; }
.items-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.items-head label { font-size: 13px; font-weight: 600; color: var(--text); }
table.items { width: 100%; border-collapse: collapse; font-size: 13px; }
table.items th { font-size: 11px; font-weight: 600; color: var(--muted); text-align: left; padding: 4px 4px; border-bottom: 1px solid var(--border); }
table.items th.num, table.items td.num { text-align: right; }
table.items td { padding: 3px 4px; border-bottom: 1px solid var(--border); }
table.items input { width: 100%; padding: 5px 6px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
table.items td.num input { text-align: right; }
.items-wrap.ocr-low table.items input { background: var(--amber-bg); border-color: #fcd34d; }
.items-foot { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.items-foot .warn { color: var(--amber); }
.items-toggle { font-size: 12px; color: var(--primary); cursor: pointer; user-select: none; }
tr.items-row > td { background: #f8fafc; padding-top: 4px; padding-bottom: 10px; }
tr.items-row table.items td, tr.items-row table.items th { border-bottom-color: #e2e8f0; }
.stmt-panel { padding: 4px 4px 2px; }
.stmt-scan { margin-bottom: 14px; }
.stmt-scan #scanInfo:not(:empty) { margin-top: 8px; }
.stmt-scan-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stmt-scan .hint { font-size: 12px; }
.scan-summary { margin-top: 8px; font-size: 13px; }
.field.ocr-ok input, .field.ocr-ok select { background: #f0fdf4; border-color: #86efac; }
.scan-results { margin: 12px 14px 4px; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 13px; background: #f8fafc; }
.scan-results-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.scan-results .sr { padding: 3px 0; }
.scan-results .sr.ok { color: #166534; }
.scan-results .sr.warn { color: var(--amber); }
.stmt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.stmt-chip { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; display: flex; flex-direction: column; min-width: 110px; }
.stmt-chip span { font-size: 11px; color: var(--muted); }
.stmt-chip strong { font-size: 14px; }
table.stmt-items td { vertical-align: middle; }
table.stmt-items tr.card-row td { background: #eef2ff; font-weight: 600; font-size: 12px; padding: 6px 8px; }
table.stmt-items tr.card-row td span { float: right; font-weight: 500; color: var(--muted); }
table.stmt-items tr.k-payment td, table.stmt-items tr.k-credit td { color: #15803d; }
table.stmt-items tr.k-carry td { color: var(--muted); font-style: italic; }
table.stmt-items input.stmt-note { background: transparent; border-color: transparent; }
table.stmt-items input.stmt-note:hover, table.stmt-items input.stmt-note:focus { background: #fff; border-color: var(--border); }
table.stmt-items input.stmt-note.saved { border-color: #86efac; background: #f0fdf4; }
/* taksit serisinden otomatik dolan not: hafif gri/italik; tıklayınca normal edit */
table.stmt-items input.stmt-note.auto { color: #64748b; font-style: italic; }
table.stmt-items input.stmt-note.auto::placeholder { color: #94a3b8; }
table.stmt-items .plan-x { margin-left: 4px; color: #94a3b8; border: none; background: none; cursor: pointer; }
table.stmt-items .plan-x:hover { color: #dc2626; background: #fef2f2; }
.ocr-text { margin-top: 6px; }
.ocr-text summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.ocr-text pre { max-height: 220px; overflow: auto; background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 10px; font-size: 11px; white-space: pre-wrap; margin-top: 8px; }
.dropzone { border: 2px dashed var(--border); border-radius: 10px; padding: 22px; text-align: center; color: var(--muted); cursor: pointer; transition: background .15s, border-color .15s; }
.dropzone:hover, .dropzone.drag { background: #eff6ff; border-color: var(--primary); color: var(--primary); }
.dropzone strong { color: var(--text); }
.scan-busy { display: flex; align-items: center; justify-content: center; gap: 10px; height: 100%; min-height: 200px; color: var(--muted); }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* KK: seçili kartların toplamı */
th.selcol, td.selcol { width: 34px; text-align: center; padding-left: 10px; padding-right: 0; }
td.selcol input, th.selcol input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary, #2563eb); }
tr.selected > td { background: #eff6ff; }
.selbar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; width: min(760px, calc(100vw - 32px));
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 16px;
  background: #fff; border: 1px solid #bfdbfe; border-left: 4px solid var(--primary); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .18); }
body.has-selbar { padding-bottom: 90px; }
.selbar[hidden] { display: none; }
.selbar-count { font-weight: 600; }
.selbar-names { color: var(--muted); flex: 1 1 200px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selbar-total { white-space: nowrap; }
.selbar-total b { font-size: 17px; }

/* Harcama paylaşımı */
.tag.shared { border: 0; cursor: pointer; background: #eef2ff; color: #4338ca; margin-right: 6px; font: inherit; font-size: 12px; }
.tag.shared:hover { background: #e0e7ff; }
.share-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.share-item span { overflow-wrap: anywhere; }
.seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.tag.sent { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; margin-right: 6px; font-size: 12px; font-weight: 600; }

/* Kişiler ve gruplar */
.sub-h { font-size: 15px; margin: 8px 0; }
.cell-in { width: 100%; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; }
.grp-box { border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin-top: 10px; }
.grp-members { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px;
        background: var(--surface); font: inherit; font-size: 13px; cursor: pointer; }
.chip.on { background: #eff6ff; border-color: var(--primary); color: var(--primary-dark); font-weight: 600; }
.chip .muted { font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* Tarih alanı GG.AA.YYYY (app.js enhanceDateInput) */
.trdate { position: relative; display: block; }
.trdate > input[type="text"] { width: 100%; padding-right: 32px; }
.trdate > input.invalid { border-color: var(--red) !important; background: #fef2f2; }
.trdate-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; padding: 4px;
              color: var(--muted); cursor: pointer; line-height: 0; }
.trdate-btn:hover { color: var(--primary); }
.trdate-native { position: absolute; right: 0; bottom: 0; width: 1px !important; height: 1px !important; opacity: 0;
                 pointer-events: none; border: 0 !important; padding: 0 !important; }
.stmt-drop { padding: 14px; font-size: 14px; background: #fff; }
.stmt-drop.busy { opacity: .6; pointer-events: none; }
