/* nexR Bütçe - Modern, Soft, Açık Renkli Tema */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-subtle: #e2e8f0;
  --border-focus: #cbd5e1;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --primary: #2563eb;
  --primary-soft: #eff6ff;
  --primary-border: #bfdbfe;

  --income: #059669;
  --income-soft: #ecfdf5;
  --income-border: #a7f3d0;

  --expense: #e11d48;
  --expense-soft: #fff1f2;
  --expense-border: #fecdd3;

  --gold: #d97706;
  --gold-soft: #fffbeb;
  --gold-border: #fde68a;

  --indigo: #4f46e5;
  --indigo-soft: #eef2ff;
  --indigo-border: #c7d2fe;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 25px -3px rgba(15, 23, 42, 0.06), 0 4px 10px -2px rgba(15, 23, 42, 0.03);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 4rem;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Container */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.brand-text h1 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Month Selector */
.month-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.month-selector {
  border: none;
  background: transparent;
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

/* Rates Widget */
.rates-ticker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.rate-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.rate-code {
  color: var(--text-muted);
  font-weight: 600;
}

.rate-val {
  font-weight: 700;
  color: var(--text-main);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--income);
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
}

/* Hero Cards */
.hero-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.75rem 0;
}

.summary-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.summary-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.card-income::before { background: var(--income); }
.card-expense::before { background: var(--expense); }
.card-net::before { background: linear-gradient(90deg, #2563eb, #059669); }
.card-extra::before { background: var(--indigo); }

.card-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.825rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.card-value {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.2rem;
}

.card-subtext {
  font-size: 0.775rem;
  color: var(--text-muted);
}

.text-income { color: var(--income); }
.text-expense { color: var(--expense); }
.text-indigo { color: var(--indigo); }

/* Main Grid Layout */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 960px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
}

/* Section Box */
.section-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.section-header {
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafcff;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.section-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.icon-income { background: var(--income-soft); color: var(--income); }
.icon-expense { background: var(--expense-soft); color: var(--expense); }
.icon-extra { background: var(--indigo-soft); color: var(--indigo); }

.badge-total {
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
}

.badge-income { background: var(--income-soft); color: var(--income); border: 1px solid var(--income-border); }
.badge-expense { background: var(--expense-soft); color: var(--expense); border: 1px solid var(--expense-border); }
.badge-extra { background: var(--indigo-soft); color: var(--indigo); border: 1px solid var(--indigo-border); }

/* Table Styles */
.budget-table {
  width: 100%;
  border-collapse: collapse;
}

.budget-table th {
  text-align: left;
  padding: 0.75rem 1.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.budget-table th.text-right,
.budget-table td.text-right {
  text-align: right;
}

.budget-table td {
  padding: 0.9rem 1.35rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.925rem;
}

.budget-table tr:last-child td {
  border-bottom: none;
}

.budget-table tr:hover td {
  background-color: #fbfcfe;
}

.item-title {
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.item-converted {
  font-size: 0.775rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.15rem;
}

.item-amount {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
}

/* Target Note Card */
.target-banner {
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  border: 1px solid var(--indigo-border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  margin: 1.15rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #3730a3;
  font-weight: 600;
  font-size: 0.875rem;
}

/* Subheaders inside sections */
.sub-group-title {
  padding: 0.6rem 1.35rem;
  background: var(--bg-subtle);
  font-size: 0.775rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Badges for status */
.status-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  display: inline-block;
}

.status-completed {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.status-planned {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

/* Summary Footer inside Section */
.section-footer {
  padding: 1rem 1.35rem;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
}

.footer-label {
  font-weight: 600;
  color: var(--text-muted);
}

.footer-value {
  font-weight: 800;
  font-size: 1.15rem;
}

/* Empty State */
.empty-state {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  text-align: center;
  color: var(--text-light);
  font-size: 0.8rem;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: #0f172a;
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideIn 0.25s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
