/* Sofinos App — marka paleti (sofinoslogo.png + sofinosuisample.png'den türetildi) */
:root {
  --brand-cyan: #22D3EE;
  --brand-blue: #6366F1;
  --brand-violet: #8B5CF6;
  --brand-magenta: #D946EF;
  --brand-gradient: linear-gradient(135deg, #22D3EE 0%, #6366F1 45%, #D946EF 100%);

  --primary: #7C3AED;
  --primary-hover: #6D28D9;
  --primary-contrast: #FFFFFF;

  --bg: #F6F5FB;
  --surface: #FFFFFF;
  --border: #ECEAF3;
  --text: #1E1B2E;
  --text-muted: #6B7280;

  --income: #10B981;
  --expense: #EC4899;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #38BDF8;

  --radius: 16px;
  --shadow-card: 0 1px 3px rgba(30, 27, 46, .06), 0 8px 24px rgba(30, 27, 46, .05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* Üst çubuk */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--brand-gradient);
  display: grid; place-items: center; color: #fff; font-weight: 800;
  box-shadow: 0 4px 14px rgba(124, 58, 237, .35);
}
.topnav { display: flex; gap: 18px; align-items: center; }
.topnav a { color: var(--text-muted); font-weight: 500; }
.topnav a:hover { color: var(--text); text-decoration: none; }

/* Yerleşim */
.container { max-width: 1100px; margin: 0 auto; padding: 28px 24px; }
.page-title { margin: 0 0 4px; font-size: 26px; font-weight: 700; }
.page-sub { margin: 0 0 24px; color: var(--text-muted); }

/* Kartlar */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 20px;
}
.card h2 { margin: 0 0 14px; font-size: 16px; font-weight: 600; }
.stat { font-size: 28px; font-weight: 700; }
.muted { color: var(--text-muted); font-size: 14px; }
.income { color: var(--income); }
.expense { color: var(--expense); }

/* İlerleme çubuğu */
.progress { height: 10px; background: var(--border); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand-gradient); }

/* Listeler */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; }
.badge { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.badge.upcoming { background: #EEF2FF; color: var(--brand-blue); }
.badge.duesoon { background: #FEF3C7; color: #B45309; }
.badge.duetoday { background: #FCE7F3; color: #BE185D; }
.badge.overdue { background: #FEE2E2; color: #B91C1C; }
.badge.done { background: #D1FAE5; color: #065F46; }
.badge.todo { background: #F3F4F6; color: var(--text-muted); }

/* Bar grafiği (gelir trendi) */
.list.bars li { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 10px; }
.bar-label { font-size: 13px; color: var(--text-muted); }
.bar-track { height: 10px; background: var(--border); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--brand-gradient); }
.bar-value { font-size: 13px; font-weight: 600; white-space: nowrap; }

/* Formlar */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 400px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 15px; background: #fff; color: var(--text);
}
.field input:focus, .field select:focus { outline: 2px solid var(--brand-violet); border-color: transparent; }
.btn {
  display: inline-block; width: 100%; padding: 11px 16px; border: 0; border-radius: 10px;
  background: var(--primary); color: var(--primary-contrast); font-size: 15px; font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: var(--primary-hover); }
.btn-ghost { background: transparent; color: var(--primary); border: 1px solid var(--border); }
.error { background: #FEE2E2; color: #B91C1C; padding: 10px 12px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; }
.info { background: #EEF2FF; color: var(--brand-blue); padding: 10px 12px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; }

/* Responsive — mobil-öncelikli (NFR-013, Android tamponu) */
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; gap: 10px 16px; padding: 12px 16px; }
  .topnav { flex-wrap: wrap; gap: 10px 14px; }
  .container { padding: 20px 16px; }
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .page-title { font-size: 22px; }
  .stat { font-size: 24px; }
  .list.bars li { grid-template-columns: 52px 1fr auto; gap: 8px; }
  .bar-value { font-size: 12px; }
}
