/* =========================================================
   Arkyazılım Soru AI – tema
   ========================================================= */
:root {
  --sa-bg: #f4f6fb;
  --sa-surface: #ffffff;
  --sa-border: #e3e8f0;
  --sa-text: #0f172a;
  --sa-muted: #64748b;
  --sa-primary: #2f5bea;
  --sa-primary-600: #2448c4;
  --sa-primary-soft: #e8eefc;
  --sa-navy: #0b1220;
  --sa-navy-2: #111a2e;
  --sa-success: #16a34a;
  --sa-warning: #d97706;
  --sa-danger: #dc2626;
  --sa-radius: 14px;
  --sa-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .18);
  --sa-shadow-lg: 0 20px 50px -20px rgba(15, 23, 42, .35);
}

html { font-size: 15px; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--sa-bg);
  color: var(--sa-text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
h1, h2, h3, h4, h5 { font-weight: 700; letter-spacing: -.01em; }
a { color: var(--sa-primary); text-decoration: none; }
a:hover { color: var(--sa-primary-600); }
code { color: #be185d; background: #fdf2f8; padding: .1em .35em; border-radius: 4px; font-size: .9em; }

/* ---------- Üst çubuk ---------- */
.sa-navbar {
  background: linear-gradient(90deg, var(--sa-navy) 0%, var(--sa-navy-2) 100%);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: .55rem 0;
}
.sa-brand { display: flex; align-items: center; gap: .65rem; color: #fff !important; font-weight: 700; }
.sa-brand .mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: grid; place-items: center; color: #fff; font-size: 1rem;
  box-shadow: 0 6px 16px -6px rgba(59,130,246,.8);
}
.sa-brand small { display: block; font-size: .68rem; font-weight: 500; color: #94a3b8; letter-spacing: .04em; text-transform: uppercase; }
.sa-navbar .nav-link { color: #cbd5e1 !important; font-weight: 500; padding: .5rem .85rem !important; border-radius: 8px; display: flex; align-items: center; gap: .4rem; }
.sa-navbar .nav-link:hover, .sa-navbar .nav-link.active { color: #fff !important; background: rgba(255,255,255,.08); }
.sa-navbar .navbar-toggler { border-color: rgba(255,255,255,.2); }
.sa-navbar .navbar-toggler-icon { filter: invert(1); }
.sa-user { display: flex; align-items: center; gap: .6rem; color: #e2e8f0; font-size: .9rem; }
.sa-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #22d3ee, #3b82f6);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .85rem;
}
.btn-ghost-light { color: #cbd5e1; border: 1px solid rgba(255,255,255,.15); border-radius: 8px; padding: .35rem .8rem; font-size: .85rem; background: transparent; }
.btn-ghost-light:hover { color: #fff; background: rgba(255,255,255,.08); }

main { flex: 1; }
.sa-page { padding: 2rem 0 3rem; }
.sa-page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.sa-page-head h1 { font-size: 1.6rem; margin: 0; }
.sa-page-head p { margin: .25rem 0 0; color: var(--sa-muted); }
.sa-eyebrow { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--sa-primary); margin-bottom: .35rem; }

.sa-footer { border-top: 1px solid var(--sa-border); color: var(--sa-muted); font-size: .82rem; padding: 1.2rem 0; background: #fff; }

/* ---------- Kartlar ---------- */
.sa-card {
  background: var(--sa-surface);
  border: 1px solid var(--sa-border);
  border-radius: var(--sa-radius);
  box-shadow: var(--sa-shadow);
}
.sa-card-head { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--sa-border); }
.sa-card-head h2 { font-size: 1rem; margin: 0; }
.sa-card-head p { margin: 0; font-size: .82rem; color: var(--sa-muted); }
.sa-card-body { padding: 1.25rem; }
.sa-step {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: var(--sa-primary-soft); color: var(--sa-primary);
  display: grid; place-items: center; font-weight: 700; font-size: .85rem;
}

.form-label { font-weight: 600; font-size: .85rem; color: #334155; margin-bottom: .35rem; }
.form-select, .form-control { border-color: var(--sa-border); border-radius: 10px; padding: .6rem .85rem; font-size: .92rem; }
.form-select:focus, .form-control:focus { border-color: var(--sa-primary); box-shadow: 0 0 0 4px rgba(47,91,234,.12); }
.form-select:disabled { background-color: #f8fafc; color: #94a3b8; }

.btn { border-radius: 10px; font-weight: 600; }
.btn-primary { background: var(--sa-primary); border-color: var(--sa-primary); box-shadow: 0 8px 20px -10px rgba(47,91,234,.9); }
.btn-primary:hover { background: var(--sa-primary-600); border-color: var(--sa-primary-600); }
.btn-outline-secondary { border-color: var(--sa-border); color: #334155; background: #fff; }
.btn-outline-secondary:hover { background: #f8fafc; color: var(--sa-text); border-color: #cbd5e1; }
.btn-lg { padding: .8rem 1.4rem; font-size: 1rem; }

.alert { border-radius: 12px; border: 1px solid transparent; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

.badge { font-weight: 600; border-radius: 6px; padding: .35em .6em; }
.badge-soft { background: var(--sa-primary-soft); color: var(--sa-primary); }
.badge-soft-gray { background: #f1f5f9; color: #475569; }
.badge-soft-green { background: #ecfdf5; color: #047857; }
.badge-soft-amber { background: #fffbeb; color: #b45309; }
.badge-soft-red { background: #fef2f2; color: #b91c1c; }

/* ---------- Seçilebilir kartlar (yön / kademe) ---------- */
.sa-choice { position: relative; }
.sa-choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.sa-choice-box {
  border: 1.5px solid var(--sa-border); border-radius: 12px; padding: .9rem 1rem;
  background: #fff; transition: border-color .15s, box-shadow .15s, background .15s; height: 100%;
}
.sa-choice input:hover + .sa-choice-box { border-color: #c7d2fe; }
.sa-choice input:checked + .sa-choice-box {
  border-color: var(--sa-primary);
  background: linear-gradient(0deg, rgba(47,91,234,.03), rgba(47,91,234,.03)), #fff;
  box-shadow: 0 0 0 4px rgba(47,91,234,.12);
}
.sa-choice input:focus-visible + .sa-choice-box { outline: 2px solid var(--sa-primary); outline-offset: 2px; }
.sa-choice-title { font-weight: 700; font-size: .95rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.sa-choice-desc { color: var(--sa-muted); font-size: .8rem; margin-top: .2rem; }
.sa-check { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #cbd5e1; flex: none; position: relative; }
.sa-choice input:checked + .sa-choice-box .sa-check { border-color: var(--sa-primary); background: var(--sa-primary); }
.sa-choice input:checked + .sa-choice-box .sa-check::after {
  content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* Yön önizleme */
.yon-preview { display: flex; align-items: center; justify-content: center; height: 70px; margin-bottom: .6rem; }
.yon-shape { background: #fff; border: 1.5px solid #94a3b8; border-radius: 6px; position: relative; overflow: hidden; }
.yon-shape::before { content: ""; position: absolute; left: 10%; right: 10%; top: 14%; height: 4px; border-radius: 2px; background: #cbd5e1; box-shadow: 0 8px 0 #e2e8f0, 0 16px 0 #e2e8f0; }
.yon-shape.yatay { width: 104px; height: 58px; }
.yon-shape.dikey { width: 46px; height: 62px; }
.yon-shape.dikey::before { height: 3px; box-shadow: 0 7px 0 #e2e8f0, 0 14px 0 #e2e8f0, 0 21px 0 #e2e8f0; }

/* Kademe kartı */
.kademe-fiyat { display: flex; align-items: baseline; gap: .35rem; margin-top: .5rem; }
.kademe-fiyat strong { font-size: 1.25rem; letter-spacing: -.02em; }
.kademe-fiyat span { font-size: .75rem; color: var(--sa-muted); }
.kademe-meta { display: flex; gap: .75rem; font-size: .75rem; color: var(--sa-muted); margin-top: .35rem; flex-wrap: wrap; }
.kademe-meta b { color: #334155; font-weight: 600; }
.kademe-tag { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .2em .5em; border-radius: 6px; }
.kademe-Pahali { background: #fdf4ff; color: #a21caf; }
.kademe-Uygun { background: #eff6ff; color: #1d4ed8; }
.kademe-Ucuz { background: #ecfdf5; color: #047857; }

.sa-sticky { position: sticky; top: 1.25rem; }
.sa-note { font-size: .78rem; color: var(--sa-muted); line-height: 1.5; }

/* ---------- Soru kartı (sonuç) ---------- */
.soru-kart {
  background: #fff; border: 1px solid var(--sa-border); border-radius: 16px;
  box-shadow: var(--sa-shadow-lg); margin: 0 auto; display: flex; flex-direction: column; overflow: hidden;
}
.soru-yatay { width: 100%; aspect-ratio: 16 / 9; }
.soru-dikey { max-width: 440px; aspect-ratio: 3 / 4; }
.soru-ust {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .75rem 1.25rem; background: #f8fafc; border-bottom: 1px solid var(--sa-border); font-size: .78rem; color: var(--sa-muted);
}
.soru-ust .sol { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.soru-govde { padding: 1.4rem 1.6rem; flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: auto; }
.soru-no { font-size: .72rem; font-weight: 700; letter-spacing: .12em; color: var(--sa-primary); text-transform: uppercase; margin-bottom: .5rem; }
.soru-koku { font-size: 1.08rem; line-height: 1.65; white-space: pre-wrap; }
.soru-dikey .soru-koku { font-size: .98rem; }
.soru-secenekler { margin-top: auto; padding-top: 1.2rem; }
.soru-secenekler.yanyana { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .6rem 1.2rem; }
.soru-secenekler.altalta { display: flex; flex-direction: column; gap: .55rem; }
.secenek { display: flex; align-items: flex-start; gap: .6rem; line-height: 1.45; }
.secenek .harf {
  width: 26px; height: 26px; flex: none; border-radius: 50%; border: 1.5px solid #cbd5e1;
  display: grid; place-items: center; font-size: .8rem; font-weight: 700; color: #334155;
}
.soru-alt { padding: .6rem 1.25rem; border-top: 1px solid var(--sa-border); font-size: .72rem; color: #94a3b8; display: flex; justify-content: space-between; }

.cozum-kutu { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 12px; padding: 1rem 1.25rem; }
.cozum-kutu summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.cozum-kutu summary::-webkit-details-marker { display: none; }
.cozum-kutu[open] summary { margin-bottom: .75rem; }

/* ---------- Maliyet paneli ---------- */
.maliyet-buyuk { font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--sa-text); }
.maliyet-buyuk small { font-size: 1rem; font-weight: 600; color: var(--sa-muted); margin-left: .25rem; }
.maliyet-satir { display: flex; justify-content: space-between; align-items: center; padding: .55rem 0; border-bottom: 1px solid #f1f5f9; font-size: .88rem; }
.maliyet-satir:last-child { border-bottom: 0; }
.maliyet-satir .ad { color: var(--sa-muted); }
.maliyet-satir .deger { font-variant-numeric: tabular-nums; font-weight: 600; }
.maliyet-satir .deger small { color: var(--sa-muted); font-weight: 500; margin-left: .3rem; }
.maliyet-satir.toplam { border-top: 2px solid var(--sa-border); margin-top: .3rem; padding-top: .8rem; }
.maliyet-satir.toplam .ad, .maliyet-satir.toplam .deger { color: var(--sa-text); font-weight: 700; }
.token-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: #eef2f7; margin: .75rem 0 .5rem; }
.token-bar span { display: block; height: 100%; }
.tb-girdi { background: #3b82f6; } .tb-cikti { background: #8b5cf6; } .tb-cache { background: #10b981; }
.token-legend { display: flex; gap: 1rem; font-size: .72rem; color: var(--sa-muted); flex-wrap: wrap; }
.token-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: .3rem; vertical-align: middle; }

/* ---------- KPI kutuları ---------- */
.kpi { background: #fff; border: 1px solid var(--sa-border); border-radius: var(--sa-radius); padding: 1.1rem 1.25rem; box-shadow: var(--sa-shadow); display: flex; gap: 1rem; align-items: center; height: 100%; }
.kpi-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; flex: none; }
.kpi-icon.blue { background: #eff6ff; color: #1d4ed8; }
.kpi-icon.violet { background: #f5f3ff; color: #6d28d9; }
.kpi-icon.green { background: #ecfdf5; color: #047857; }
.kpi-icon.amber { background: #fffbeb; color: #b45309; }
.kpi-label { font-size: .76rem; color: var(--sa-muted); font-weight: 500; }
.kpi-value { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: .74rem; color: var(--sa-muted); }

/* ---------- Tablo ---------- */
.sa-table { margin: 0; }
.sa-table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--sa-muted); font-weight: 600; border-bottom: 1px solid var(--sa-border); background: #f8fafc; padding: .75rem 1rem; white-space: nowrap; }
.sa-table tbody td { padding: .8rem 1rem; vertical-align: middle; border-color: #f1f5f9; font-size: .88rem; }
.sa-table tbody tr:hover { background: #f8fafc; }
.num { font-variant-numeric: tabular-nums; text-align: right; }

/* ---------- Ana sayfa ---------- */
.hero {
  background: radial-gradient(1200px 400px at 10% -20%, rgba(59,130,246,.35), transparent 60%),
              radial-gradient(900px 400px at 90% 0%, rgba(139,92,246,.35), transparent 60%),
              linear-gradient(180deg, var(--sa-navy) 0%, #0f1a33 100%);
  color: #fff; border-radius: 20px; padding: 3.5rem 3rem; position: relative; overflow: hidden;
}
.hero h1 { font-size: 2.4rem; letter-spacing: -.03em; margin-bottom: .75rem; }
.hero p { color: #cbd5e1; font-size: 1.05rem; max-width: 560px; }
.hero .btn-light { color: var(--sa-navy); font-weight: 700; }
.feature { background: #fff; border: 1px solid var(--sa-border); border-radius: var(--sa-radius); padding: 1.4rem; height: 100%; box-shadow: var(--sa-shadow); }
.feature .ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 1.15rem; margin-bottom: .9rem; background: var(--sa-primary-soft); color: var(--sa-primary); }
.feature h5 { font-size: 1rem; }
.feature p { color: var(--sa-muted); font-size: .88rem; margin: 0; }

/* ---------- Identity sayfaları ---------- */
.sa-auth { max-width: 440px; margin: 2rem auto; }
.sa-auth h1, .sa-auth h2 { font-size: 1.4rem; }
.sa-auth hr { display: none; }
.sa-auth .col-md-4, .sa-auth .col-md-6 { width: 100%; }
.sa-auth section:last-child h3 { font-size: .9rem; color: var(--sa-muted); }

@media (max-width: 991px) { .sa-sticky { position: static; } .hero { padding: 2.2rem 1.5rem; } .hero h1 { font-size: 1.8rem; } }

/* ---------- Soru görseli (SVG) ---------- */
.soru-govde.gorselli-yatay { flex-direction: row; gap: 1.5rem; }
.soru-govde.gorselli-yatay .soru-metin { flex: 1 1 55%; display: flex; flex-direction: column; min-width: 0; }
.soru-metin { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.soru-gorsel { margin: 0; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--sa-border); border-radius: 10px; padding: .6rem; }
.soru-gorsel.yan { flex: 0 0 40%; max-width: 40%; align-self: center; }
.soru-dikey .soru-gorsel { margin: .9rem 0 .2rem; max-height: 42%; }
.soru-gorsel svg { width: 100%; height: auto; max-height: 100%; display: block; }
@media (max-width: 767px) { .soru-govde.gorselli-yatay { flex-direction: column; } .soru-gorsel.yan { max-width: 100%; flex-basis: auto; } }

/* ---------- Bakiye rozeti ---------- */
.sa-bakiye { display: inline-flex; align-items: center; gap: .35rem; background: rgba(16,185,129,.15); color: #6ee7b7; border: 1px solid rgba(16,185,129,.35); border-radius: 999px; padding: .3rem .75rem; font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums; }
.sa-bakiye:hover { color: #a7f3d0; background: rgba(16,185,129,.25); }
.alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }

/* ---------- Analiz yükleme alanı ---------- */
.yukleme-alani { border: 2px dashed #cbd5e1; border-radius: 14px; padding: 2rem 1rem; text-align: center; cursor: pointer; background: #f8fafc; transition: border-color .15s, background .15s; }
.yukleme-alani:hover, .yukleme-alani.surukle { border-color: var(--sa-primary); background: var(--sa-primary-soft); }
.yukleme-alani img { max-width: 100%; max-height: 420px; border-radius: 10px; box-shadow: var(--sa-shadow); }
.sa-choice input[type="checkbox"] + .sa-choice-box .sa-check { border-radius: 5px; }
.onay-kutu { border-left: 4px solid #16a34a; }
