/* AutoKredim.com — acik tema, modern, mobil oncelikli */
:root {
  --bg: #ffffff;
  --fg: #14181f;
  --muted: #5b6672;
  --accent: #0aa5a0;
  --accent-dark: #078a86;
  --accent-soft: #e5f8f7;
  --border: #e4e9ee;
  --card: #f7f9fb;
  --danger: #b42318;
  --warn-bg: #fff7ed;
  --warn-bd: #f5d9b8;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--fg); line-height: 1.6; font-size: 16px;
  color-scheme: light;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.75rem; letter-spacing: -.6px; margin: 0 0 10px; }
h1, h2, h3, .logo { font-family: 'Plus Jakarta Sans', -apple-system, "Segoe UI", Roboto, sans-serif; }
h1 { font-weight: 800; }
h2 { font-size: 1.2rem; letter-spacing: -.2px; font-weight: 700; }
h3 { font-size: 1.02rem; font-weight: 700; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 18px; }
.wrap.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.tiny { font-size: .78rem; color: var(--muted); margin-top: 12px; }
.nowrap { white-space: nowrap; }

/* ---------- Topbar ---------- */
.topbar { border-bottom: 1px solid var(--border); background: #fff; position: sticky; top: 0; z-index: 50; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.logo {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  font-size: 1.42rem; font-weight: 800; letter-spacing: -1.1px; text-decoration: none;
  background: linear-gradient(100deg, #0aa5a0 0%, #04635f 70%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.logo span { color: #0aa5a0; -webkit-text-fill-color: #0aa5a0; }
.logo small { font-weight: 600; color: var(--muted); -webkit-text-fill-color: var(--muted); font-size: .8rem; letter-spacing: 0; }
nav a { margin-left: 16px; color: var(--muted); font-size: .95rem; font-weight: 500; }
nav a.active, nav a:hover { color: var(--accent); text-decoration: none; }
nav a.logout { color: var(--danger); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--fg); }
.theme-toggle { background: none; border: 0; font-size: 1.2rem; cursor: pointer; margin-left: 10px; color: var(--fg); line-height: 1; }
.theme-toggle:hover { transform: scale(1.12); }

/* ---------- Hero & ana sayfa ---------- */
main { padding: 28px 18px 50px; }
.hero { margin-bottom: 22px; }
.hero h1 { font-size: 2.05rem; margin: 0 0 8px; }
.hero h1 strong { color: var(--accent); }
.hero p { color: var(--muted); margin: 0; max-width: 640px; }

.hero-photo, .page-banner {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background-size: cover; background-position: center;
  color: #fff; padding: 46px 34px;
}
.hero-photo::before, .page-banner::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8,18,14,.85) 0%, rgba(8,18,14,.6) 45%, rgba(8,18,14,.15) 100%);
}
.hero-photo > *, .page-banner > * { position: relative; }
.hero-photo h1, .page-banner h1 { color: #fff; }
.hero-photo h1 strong, .page-banner h1 strong { color: #3fe0d6; }
.hero-photo p, .page-banner p { color: #d9e5de; }
.page-banner { margin-bottom: 20px; }

.cta-split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; align-items: center; }
.cta-split img { width: 100%; height: 250px; object-fit: cover; border-radius: 10px; }
@media (max-width: 700px) { .cta-split { grid-template-columns: 1fr; } .cta-split img { height: 190px; } }

.grid { display: grid; grid-template-columns: 330px 1fr; gap: 18px; align-items: start; }
.grid > * { min-width: 0; } /* genis tablolarin grid kolonunu tasirmasini onler */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid2 > * { min-width: 0; }
@media (max-width: 860px) { .grid, .grid2 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; margin-bottom: 18px;
}
.card h2 { margin: 0 0 14px; }
label { display: block; margin-bottom: 14px; font-size: .92rem; font-weight: 600; }
input, select, textarea {
  width: 100%; margin-top: 6px; padding: 11px 12px; font-size: 1rem; font-family: inherit;
  border: 1px solid var(--border); border-radius: 9px; background: #fff; color: var(--fg);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }

.btn {
  display: inline-block; width: 100%; padding: 13px 18px; border: 0; border-radius: 9px;
  background: var(--accent); color: #fff; font-size: 1rem; font-weight: 700; cursor: pointer;
  text-align: center; text-decoration: none; transition: background .15s;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; }
.btn-outline { background: #fff; color: var(--accent); border: 1.5px solid var(--accent); }
.btn-outline:hover { background: var(--accent-soft); }
.btn-sm { width: auto; padding: 8px 14px; font-size: .85rem; }
.btn-del { background: #fff; color: var(--danger); border: 1px solid #f3c9c9; border-radius: 7px; padding: 4px 10px; cursor: pointer; font-size: .8rem; }
.btn-del:hover { background: #fdf1f1; }

.note { margin: 12px 0 0; padding: 11px 13px; border-radius: 9px; background: var(--warn-bg); border: 1px solid var(--warn-bd); font-size: .9rem; }
.note.err { background: #fdf1f1; border-color: #f3c9c9; color: var(--danger); }
.note.ok { background: var(--accent-soft); border-color: #bfe6d4; color: var(--accent-dark); }
.success { background: var(--accent-soft); border-color: #bfe6d4; }
.success h2 { color: var(--accent-dark); }

/* ---------- Sonuc tablosu & logolar ---------- */
.bank-logo { height: 26px; width: auto; max-width: 110px; object-fit: contain; vertical-align: middle; }
.bank-logo.sm { height: 22px; }
.bank-logo.lg { height: 40px; }
.bank-logo.xl { height: 56px; }
.bank-name { display: inline-block; margin-left: 10px; vertical-align: middle; font-weight: 600; }

.rtable-wrap { overflow-x: auto; }
.rtable { width: 100%; border-collapse: collapse; min-width: 620px; }
.rtable th, .rtable td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--border); }
.rtable th { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .4px; }
.rtable tr:hover td { background: #f2f7f4; }
.rtable .best td { background: var(--accent-soft); }
.rtable .best td:first-child { border-left: 3px solid var(--accent); }
.tag { display: inline-block; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; margin-left: 7px; vertical-align: middle; }
.tag.top { position: absolute; top: 10px; right: 10px; }

/* ---------- Banka kartlari ---------- */
.bank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin: 20px 0; }
.bank-card {
  position: relative; display: block; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; color: var(--fg); transition: transform .12s, box-shadow .12s;
}
.bank-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(11,122,94,.12); text-decoration: none; border-color: #bfe6d4; }
.bank-card h3 { margin: 12px 0 4px; }
.rate-line { margin: 0; font-weight: 700; font-size: 1.05rem; color: var(--accent-dark); }
.rate-line.big { font-size: 1.35rem; }
.bank-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }

/* ---------- Adimlar & CTA ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  background: var(--accent); color: #fff; border-radius: 50%; font-weight: 700; margin-bottom: 8px;
}
.step h3 { margin: 0 0 6px; }
.step p { margin: 0; color: var(--muted); font-size: .9rem; }
.cta { text-align: center; padding: 30px; }
.cta p { color: var(--muted); margin: 0 0 16px; }
.cta .btn { max-width: 340px; margin: 0 auto; }

/* ---------- Icerik sayfalari ---------- */
.prose h2 { margin-top: 26px; }
.prose p, .prose li { color: #2a3440; }
.note-box { background: #fff; }
.faq { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; padding: 14px 18px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq[open] summary { color: var(--accent-dark); margin-bottom: 8px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 7px 14px; font-size: .88rem; color: var(--fg); }
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.calc-result { margin-top: 14px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 16px; font-size: 1.05rem; overflow-x: auto; }
.calc-result strong { color: var(--accent-dark); font-size: 1.35rem; }
.plan-wrap { max-height: 430px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.plan-tbl { min-width: 480px; }
.plan-tbl td, .plan-tbl th { padding: 8px 10px; font-size: .88rem; }

/* ---------- Admin ---------- */
.admin-top { background: #fafbfc; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }
@media (max-width: 640px) { .stat-row { grid-template-columns: 1fr; } }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; }
.stat-num { display: block; font-size: 1.9rem; font-weight: 800; color: var(--accent-dark); }
.stat-label { color: var(--muted); font-size: .85rem; }
.admin-tools { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.filter-form { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.filter-form input { margin: 0; width: 220px; }
.filter-form select { margin: 0; width: 160px; }
.admin-tbl input, .admin-tbl select { margin: 0; padding: 7px 8px; font-size: .85rem; min-width: 70px; }
.admin-tbl td { vertical-align: top; }
.admin-tbl .status-sel { min-width: 130px; }
.src-cell { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.msg-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .92rem; }
.msg-head .btn-del { margin-left: auto; }
.msg-subject { font-weight: 700; margin: 8px 0 4px; }
.login-wrap { display: flex; justify-content: center; padding-top: 60px; }
.login-card { width: 100%; max-width: 380px; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.06); }
.login-card h1 { font-size: 1.4rem; margin-bottom: 18px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); background: #fafbfc; margin-top: 30px; padding: 34px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; padding-bottom: 22px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer a { display: block; color: var(--muted); font-size: .88rem; margin: 5px 0; }
.footer a:hover { color: var(--accent); }
.footer p { color: var(--muted); font-size: .88rem; margin: 6px 0; }
.flogo { font-size: 1.2rem; font-weight: 800; color: var(--fg) !important; }
.flogo span { color: var(--accent); }
.fhead { font-weight: 700; color: var(--fg) !important; margin-bottom: 10px; }
.disclaimer { border-top: 1px solid var(--border); padding: 16px 18px 22px; }
.disclaimer p { font-size: .75rem; }

/* ---------- Mobil nav ---------- */
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  nav { display: none; position: absolute; top: 60px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); flex-direction: column; padding: 10px 18px; }
  nav.open { display: flex; }
  nav a { margin: 8px 0; }
  .topbar-in { position: relative; }
  /* dar ekranlarda tablo hucrelerine nefes alani */
  .rtable th, .rtable td { padding: 10px 8px; }
  .rtable .btn-sm { white-space: nowrap; }
  .hero-photo, .page-banner { padding: 30px 20px; }
  .hero h1, .hero-photo h1, .page-banner h1 { font-size: 1.5rem; }
}

/* ============ Koyu tema ============ */
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"] body { background: #0c1217; color: #e6edf3; }
html[data-theme="dark"] .topbar, html[data-theme="dark"] .admin-top, html[data-theme="dark"] nav.open { background: #10171d; }
html[data-theme="dark"] .footer { background: #0e151a; }
html[data-theme="dark"] .card { background: #131b21; border-color: #233039; }
html[data-theme="dark"] .bank-card, html[data-theme="dark"] .step, html[data-theme="dark"] .faq,
html[data-theme="dark"] .chip, html[data-theme="dark"] .msg, html[data-theme="dark"] .note-box,
html[data-theme="dark"] .calc-result, html[data-theme="dark"] .login-card, html[data-theme="dark"] .stat {
  background: #131b21; border-color: #233039;
}
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea {
  background: #0f161c; border-color: #2a3944; color: #e6edf3;
}
html[data-theme="dark"] input[readonly] { background: #1b262e; color: #93a1ad; }
html[data-theme="dark"] .btn-outline, html[data-theme="dark"] .btn-del { background: #131b21; }
html[data-theme="dark"] .btn-outline { color: #17c3bd; border-color: #17c3bd; }
html[data-theme="dark"] .btn-outline:hover { background: #12282a; }
html[data-theme="dark"] .btn-del:hover { background: #2a1414; }
html[data-theme="dark"] a { color: #17c3bd; }
html[data-theme="dark"] nav a { color: #93a1ad; }
html[data-theme="dark"] nav a.active, html[data-theme="dark"] nav a:hover { color: #17c3bd; }
html[data-theme="dark"] .rtable tr:hover td { background: #1b262e; }
html[data-theme="dark"] .rtable .best td { background: #12282a; }
html[data-theme="dark"] .rtable th { color: #7d8b96; }
html[data-theme="dark"] .note { background: #241c10; border-color: #4d3a14; color: #e8d5a8; }
html[data-theme="dark"] .note.err { background: #2a1414; border-color: #5c2323; color: #f0a8a0; }
html[data-theme="dark"] .note.ok { background: #12282a; border-color: #1e4a44; color: #6fe3da; }
html[data-theme="dark"] .success { background: #12282a; border-color: #1e4a44; }
html[data-theme="dark"] .success h2 { color: #6fe3da; }
html[data-theme="dark"] .prose p, html[data-theme="dark"] .prose li { color: #c3cdd6; }
html[data-theme="dark"] .bank-card:hover { border-color: #1e4a44; box-shadow: 0 8px 20px rgba(23,195,189,.15); }
html[data-theme="dark"] .chip:hover { border-color: #17c3bd; color: #17c3bd; }
html[data-theme="dark"] .faq[open] summary { color: #6fe3da; }
html[data-theme="dark"] .stat-num { color: #6fe3da; }
html[data-theme="dark"] .logo span { color: #17c3bd; -webkit-text-fill-color: #17c3bd; }
html[data-theme="dark"] .footer p, html[data-theme="dark"] .footer a { color: #93a1ad; }
html[data-theme="dark"] .flogo, html[data-theme="dark"] .fhead { color: #e6edf3 !important; }
html[data-theme="dark"] .disclaimer { border-color: #233039; }
html[data-theme="dark"] .muted { color: #93a1ad; }
html[data-theme="dark"] .hero p { color: #93a1ad; }
html[data-theme="dark"] .calc-result strong { color: #6fe3da; }
html[data-theme="dark"] .step p { color: #93a1ad; }
html[data-theme="dark"] .admin-tbl input, html[data-theme="dark"] .admin-tbl select { background: #0f161c; color: #e6edf3; }
html[data-theme="dark"] .filter-form input, html[data-theme="dark"] .filter-form select { background: #0f161c; color: #e6edf3; }
html[data-theme="dark"] .bank-head, html[data-theme="dark"] .crumbs a { color: #17c3bd; }
html[data-theme="dark"] .hero-photo h1 strong, html[data-theme="dark"] .page-banner h1 strong { color: #17c3bd; }
