/* artıyageç tasarım sistemi — "Filiz" kimliği (1a)
   Renkler ve bileşenler _sample/artiyagecnew tasarımından birebir alınmıştır. */

:root {
  --green: #33865a;
  --green-hover: #2a6e4a;
  --amber: #d9973a;
  --ink: #22301f;
  --cream: #faf6ee;
  --muted: #5b6656;
  --faint: #a8a394;
  --tint-green: #eef2e6;
  --tint-warm: #f3efe4;
  --tint-amber: #f5ead6;
  --tint-red: #f3e2dc;
  --neutral: #eceae4;
  --amber-text: #8a5f1f;
  --red: #b5533c;
  --gold: #f5d9a8;
  --disabled: #b8c4ae;
  --border: rgba(34, 48, 31, 0.08);
  --border-mid: rgba(34, 48, 31, 0.15);
  --border-strong: rgba(34, 48, 31, 0.18);
  --shadow-pop: 0 8px 24px rgba(34, 48, 31, 0.25);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  font-family: Lexend, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}
a { color: var(--green); }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; color: var(--ink); }

/* ---------- Logo ---------- */
.logo-row { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.logo-word { font-size: 22.5px; font-weight: 600; letter-spacing: -0.3px; }
.logo-word b { color: var(--green); font-weight: 600; }

/* ---------- Üst çubuk ---------- */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky; top: 0; z-index: 20;
}
.topbar-in {
  max-width: 1180px; margin: 0 auto; height: 68px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.topbar-in .logo-row { flex: none; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex: none; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  font-size: 13px; font-weight: 500; color: var(--muted);
  text-decoration: none; padding: 8px 10px; border-radius: 999px; white-space: nowrap;
}
.nav a:hover { background: var(--tint-warm); }
.nav a.active { background: var(--tint-green); color: var(--ink); font-weight: 600; }
/* Uygulama menüsü: tek satırda kalır; sığmazsa app.js .stacked ile kendi satırına indirir. */
.nav-app {
  gap: 2px; flex: 1 1 0; min-width: 0; justify-content: center;
  flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
}
.nav-app::-webkit-scrollbar { display: none; }
.topbar-in.stacked { height: auto; padding: 10px 0; flex-wrap: wrap; }
.topbar-in.stacked .nav-app { order: 3; flex-basis: 100%; justify-content: flex-start; }
.date-pill {
  font-size: 12px; color: var(--muted); background: var(--tint-warm);
  padding: 7px 12px; border-radius: 999px; white-space: nowrap;
}

/* ---------- Kullanıcı menüsü (sağ üst: Ayarlar / Yardım / Yönetim / Çıkış) ---------- */
.user-wrap { position: relative; flex: none; }
.user-chip {
  width: 40px; height: 40px; border-radius: 999px; border: 1.5px solid var(--border-mid);
  background: var(--tint-green); color: var(--green); font-size: 15px; font-weight: 700;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit;
}
.user-chip:hover, .user-chip.active { border-color: var(--green); }
.user-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 10px 30px rgba(34, 48, 31, 0.12);
  min-width: 200px; padding: 6px; display: flex; flex-direction: column;
}
.user-menu-head { padding: 10px 12px 8px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.user-menu a, .user-menu button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 9px;
  font-size: 13px; font-weight: 500; color: var(--ink); text-decoration: none;
  background: none; border: none; cursor: pointer; font-family: inherit;
}
.user-menu a:hover, .user-menu button:hover { background: var(--tint-warm); }
.user-menu .logout { color: var(--red); border-top: 1px solid var(--border); border-radius: 0 0 9px 9px; margin-top: 6px; }

/* ---------- Ana yerleşim ---------- */
.main { max-width: 1180px; margin: 0 auto; padding: 28px 24px 64px; display: flex; flex-direction: column; gap: 22px; }
.main.narrow { max-width: 760px; }
.main.mid { max-width: 1020px; }
.page-h1 { font-size: 24px; font-weight: 600; margin: 0 0 4px; letter-spacing: -0.3px; }
.page-sub { font-size: 14px; color: var(--muted); margin: 0; }
.two-col { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }

/* ---------- Kart ---------- */
.card { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 22px 24px; }
.card.sm { border-radius: 14px; padding: 16px 20px; }
.card.green { background: var(--green); border: none; color: #fff; }
.card.dark { background: var(--ink); border: none; color: var(--cream); }
.card-title { font-size: 16px; font-weight: 600; }

/* ---------- İstatistik kutusu ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 20px 22px; }
.stat-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; }
.stat-value { font-size: 27px; font-weight: 700; margin-top: 6px; }
.stat-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 13.5px; font-weight: 600; border: none; cursor: pointer;
  background: var(--green); color: #fff; padding: 12px 20px; min-height: 44px;
  border-radius: 999px; text-decoration: none; transition: background 0.15s;
  white-space: nowrap;
}
.btn:hover { background: var(--green-hover); }
.btn.big { font-size: 15px; padding: 15px 28px; min-height: 50px; }
.btn.outline {
  background: transparent; color: var(--ink); border: 1.5px solid rgba(34, 48, 31, 0.2);
}
.btn.outline:hover { background: var(--tint-warm); }
.btn.soft { background: var(--tint-green); color: var(--green); }
.btn.soft:hover { background: #e2ead4; }
.btn.dark { background: var(--ink); color: var(--cream); }
.btn.dark:hover { background: var(--green); }
.btn.danger-outline { background: transparent; color: var(--red); border: 1.5px solid var(--red); }
.btn.danger { background: var(--red); color: #fff; }
.btn.sq { border-radius: 12px; }
.btn:disabled { background: var(--disabled); cursor: default; }
.btn.small { padding: 9px 14px; min-height: 36px; font-size: 12.5px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; border: none; background: var(--tint-warm);
  color: var(--muted); font-size: 14px; cursor: pointer; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--tint-green); color: var(--green); }
.icon-btn.del:hover { background: var(--tint-red); color: var(--red); }

/* ---------- Form ---------- */
.field-label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.input, .select, textarea.input {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid var(--border-strong); font-size: 14px; background: #fff;
}
.input:focus, .select:focus, textarea.input:focus { outline: 2px solid rgba(51, 134, 90, 0.35); outline-offset: 0; }
.input.err { border-color: var(--red); }
.err-text { font-size: 12px; color: var(--red); margin: 6px 0 0; }
input[type="range"] { width: 100%; accent-color: var(--green); cursor: pointer; }
.type-btns { display: flex; gap: 8px; }
.type-btn {
  flex: 1; padding: 11px 4px; min-height: 44px; border-radius: 10px;
  border: 1.5px solid var(--border-strong); background: #fff; color: var(--ink);
  font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.type-btn.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Çipler ---------- */
.chip { font-size: 10.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; flex: none; white-space: nowrap; }
.chip.kart { background: var(--tint-amber); color: var(--amber-text); }
.chip.kredi { background: var(--tint-green); color: var(--green); }
.chip.kmh { background: var(--tint-red); color: var(--red); }
.chip.hesap { background: var(--neutral); color: var(--muted); }
.chip.gelir { background: var(--gold); color: var(--amber-text); }
.chip.ekstre { background: #fff; color: var(--amber-text); border: 1px solid var(--amber); }
.chip.elle { background: var(--tint-amber); color: var(--amber-text); }
.chip.auto { background: var(--neutral); color: var(--muted); }
.chip.ok { background: var(--tint-green); color: var(--green); }
.chip.warn { background: var(--tint-red); color: var(--red); }

/* ---------- Banka monogramı ---------- */
.bank-avatar {
  width: 36px; height: 36px; border-radius: 11px; background: var(--ink); color: var(--cream);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; flex: none;
}

/* ---------- Gün rozeti ---------- */
.day-badge {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.day-badge .d { font-size: 16px; font-weight: 700; line-height: 1; }
.day-badge .m { font-size: 9px; font-weight: 600; text-transform: uppercase; }
.tone-green { background: var(--tint-green); color: var(--green); }
.tone-amber { background: var(--tint-amber); color: var(--amber-text); }
.tone-red { background: var(--tint-red); color: var(--red); }
.tone-outline { background: #fff; color: var(--amber-text); box-shadow: inset 0 0 0 1px var(--amber); }

/* ---------- Ödendi tiki ---------- */
.tick {
  width: 34px; height: 34px; border-radius: 999px; border: 2px solid rgba(34, 48, 31, 0.25);
  background: #fff; color: #fff; font-size: 15px; cursor: pointer; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.tick.on { background: var(--green); border-color: var(--green); }

/* ---------- Liste satırı ---------- */
.row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid rgba(34, 48, 31, 0.06); }
.row:last-child { border-bottom: none; }
.row .grow { flex: 1; min-width: 0; }
.row-title { font-size: 14px; font-weight: 500; }
.row-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.row-amt { font-size: 15px; font-weight: 600; white-space: nowrap; }
.row.paid { opacity: 0.45; }
.row.paid .row-title { text-decoration: line-through; }

/* ---------- Rehber kartı ---------- */
.advice-badge {
  font-size: 12px; font-weight: 600; background: var(--amber); color: var(--ink);
  padding: 5px 12px; border-radius: 999px; display: inline-block;
}
.advice-title { font-size: 25px; font-weight: 600; line-height: 1.3; margin-top: 14px; letter-spacing: -0.3px; }
.advice-sub { font-size: 14px; line-height: 1.6; color: rgba(255, 255, 255, 0.85); margin-top: 8px; max-width: 560px; }
.advice-stats { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.2); padding-top: 16px; }
.advice-stats .l { font-size: 11.5px; color: rgba(255, 255, 255, 0.7); }
.advice-stats .v { font-size: 17px; font-weight: 600; margin-top: 2px; }

/* ---------- İlerleme çubuğu ---------- */
.bar { height: 8px; border-radius: 999px; background: var(--neutral); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--green); transition: width 0.3s; }
.bar.amber > i { background: var(--amber); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: var(--cream); border-radius: 999px;
  padding: 13px 22px; font-size: 13px; box-shadow: var(--shadow-pop);
  z-index: 60; display: flex; align-items: center; gap: 14px; max-width: min(92vw, 560px);
}
.toast .btn { padding: 8px 14px; min-height: 34px; font-size: 12.5px; }

/* ---------- Modal ---------- */
.modal-scrim {
  position: fixed; inset: 0; background: rgba(34, 48, 31, 0.45);
  display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px;
}
.modal {
  background: #fff; border-radius: 20px; padding: 24px;
  width: 430px; max-width: 100%; max-height: 90vh; overflow: auto;
}

/* ---------- Filtre hapları ---------- */
.filter-pill {
  padding: 9px 16px; min-height: 40px; border-radius: 999px;
  border: 1.5px solid var(--border-mid); background: #fff; color: var(--ink);
  font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.filter-pill.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Takvim ---------- */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-wd { font-size: 11px; font-weight: 600; color: var(--faint); text-transform: uppercase; text-align: center; padding: 4px 0; }
.cal-cell {
  min-height: 88px; border-radius: 12px; border: 1px solid var(--border);
  padding: 6px; cursor: pointer; background: #fff; text-align: left; font-family: inherit;
}
.cal-cell:hover { border-color: var(--border-strong); }
.cal-cell.sel { background: var(--tint-green); border: 2px solid var(--green); }
.cal-cell.empty { background: transparent; border: none; cursor: default; }
.cal-daynum {
  width: 24px; height: 24px; border-radius: 999px; font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.cal-daynum.today { background: var(--green); color: #fff; }
.cal-ev {
  font-size: 9.5px; font-weight: 600; padding: 2px 6px; border-radius: 999px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px;
}

/* ---------- Geçiş anahtarı ---------- */
.switch { width: 48px; height: 28px; border-radius: 999px; background: #d5d1c4; border: none; cursor: pointer; position: relative; transition: background 0.15s; flex: none; }
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: 999px; background: #fff; transition: left 0.15s;
}
.switch.on { background: var(--green); }
.switch.on::after { left: 23px; }

/* ---------- Skeleton ---------- */
@keyframes ag-shimmer { from { background-position: 130% 0; } to { background-position: -30% 0; } }
.skel {
  background: linear-gradient(90deg, var(--neutral) 25%, #f6f3ea 45%, var(--neutral) 65%);
  background-size: 200% 100%; animation: ag-shimmer 1.6s infinite; border-radius: 8px;
}
@keyframes ag-fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fadein { animation: ag-fadein 0.3s ease-out; }
@keyframes ag-pop { 0% { transform: scale(0.6); opacity: 0; } 70% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }
.pop { animation: ag-pop 0.45s ease-out; }
@keyframes ag-fall {
  from { transform: translateY(-6vh) rotate(0); opacity: 1; }
  to { transform: translateY(108vh) rotate(680deg); opacity: 0.4; }
}
@keyframes ag-spin { to { transform: rotate(360deg); } }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 999px; animation: ag-spin 0.8s linear infinite; }

/* ---------- Boş durum ---------- */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; gap: 6px; }
.empty-icon {
  width: 68px; height: 68px; border-radius: 999px; font-size: 26px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; margin-bottom: 8px;
}
.empty-title { font-size: 16.5px; font-weight: 600; }
.empty-sub { font-size: 13px; color: var(--muted); max-width: 340px; }

/* ---------- Dipnot ---------- */
.disclaimer { font-size: 11.5px; color: var(--faint); margin: 0; text-align: center; }
.foot-note { font-size: 11px; color: var(--faint); line-height: 1.5; }

/* ---------- Yardımcılar ---------- */
.g-6 { display: flex; flex-direction: column; gap: 6px; }
.g-10 { display: flex; flex-direction: column; gap: 10px; }
.g-14 { display: flex; flex-direction: column; gap: 14px; }
.r-8 { display: flex; align-items: center; gap: 8px; }
.r-10 { display: flex; align-items: center; gap: 10px; }
.r-12 { display: flex; align-items: center; gap: 12px; }
.sb { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.green { color: var(--green); }
.red { color: var(--red); }
.amber-t { color: var(--amber-text); }
.w600 { font-weight: 600; }
.w700 { font-weight: 700; }
.fs12 { font-size: 12px; }
.fs13 { font-size: 13px; }
.mt0 { margin-top: 0; }

@media (max-width: 720px) {
  .topbar-in { height: auto; padding: 10px 0; flex-wrap: wrap; }
  .date-pill { display: none; }
  .main { padding: 20px 14px 56px; }
  .advice-title { font-size: 21px; }
  .stat-value { font-size: 23px; }
  .cal-cell { min-height: 64px; }
}
