/* KASA TAKİP — koyu tema, altın vurgu */

:root {
  --bg: #0c0c0f;
  --bg-elevated: #141419;
  --bg-card: linear-gradient(145deg, #18181f 0%, #121218 100%);
  --border: rgba(255, 255, 255, 0.08);
  --gold: #d4a853;
  --gold-dim: rgba(212, 168, 83, 0.35);
  --gold-glow: rgba(212, 168, 83, 0.15);
  --text: #f4f4f5;
  --muted: #9ca3af;
  --green: #10b981;
  --red: #ef4444;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}

body.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(ellipse at top, #1a1520 0%, var(--bg) 55%);
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 88px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(12, 12, 15, 0.92);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.top-bar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(145deg, #e8c066, var(--gold));
  color: #1a1508;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--gold-glow);
}

.logo-circle--large {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
}

.brand-text {
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
}

.top-bar__actions {
  display: flex;
  gap: 8px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-icon:hover {
  border-color: var(--gold-dim);
  text-decoration: none;
}

.btn-icon--danger:hover {
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.btn-icon--small {
  width: 32px;
  height: 32px;
  font-size: 1rem;
  padding: 0;
}

.main-content {
  padding: 16px 18px 24px;
}

/* Hızlı aksiyonlar */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}

.quick-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}

.quick-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-1px);
  text-decoration: none;
}

.quick-card__icon {
  font-size: 1.25rem;
  opacity: 0.9;
}

.quick-card__text {
  flex: 1;
  min-width: 0;
}

.quick-card__text strong {
  display: block;
  font-size: 0.9rem;
}

.quick-card__text span {
  font-size: 0.75rem;
  color: var(--muted);
}

.quick-card__go {
  color: var(--gold);
  font-size: 1.2rem;
}

/* Bölümler */
.section {
  margin-bottom: 26px;
}

.section__title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 12px;
}

.card {
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 18px;
}

.card--gold {
  background: linear-gradient(135deg, rgba(212, 168, 83, 0.22) 0%, rgba(20, 20, 25, 0.95) 45%);
  border-color: rgba(212, 168, 83, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.total-kasa__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.total-kasa__label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.wallet-icon {
  font-size: 1.25rem;
}

.total-kasa__amount {
  font-size: 1.85rem;
  font-weight: 700;
  margin-top: 8px;
  letter-spacing: -0.02em;
}

.total-kasa__amount.is-pos {
  color: var(--gold);
}

.total-kasa__amount.is-neg {
  color: #f87171;
}

.total-kasa__hint {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.grid-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.mini-card {
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: rgba(20, 20, 26, 0.8);
}

.mini-card__label {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.mini-card__value {
  font-size: 1rem;
  font-weight: 600;
}

.mini-card--income .mini-card__value {
  color: var(--green);
}

.mini-card--expense .mini-card__value {
  color: #ef4444;
}

/* Filtreler */
.filters-section .filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 400px) {
  .filters-section .filters {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
}

.field--grow {
  flex: 1 1 200px;
}

.field span {
  color: var(--muted);
}

.field input,
.field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
}

.date-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-range input {
  flex: 1;
  min-width: 0;
}

.date-range__sep {
  color: var(--muted);
  flex-shrink: 0;
}

.filters__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

@media (min-width: 400px) {
  .filters__actions {
    width: auto;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn--primary {
  background: linear-gradient(180deg, #e4bc6a, var(--gold));
  color: #1a1508;
  border-color: rgba(255, 255, 255, 0.12);
}

.btn--primary:hover {
  filter: brightness(1.05);
  text-decoration: none;
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--muted);
  text-decoration: none;
}

.btn--block {
  width: 100%;
}

/* Grafik */
.chart-card {
  padding: 12px 8px 8px;
}

/* İşlem listesi */
.empty-state {
  text-align: center;
  padding: 28px 16px;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.tx-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tx-row {
  display: grid;
  grid-template-columns: 36px 1fr auto 36px;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.tx-row:last-child {
  border-bottom: none;
}

.tx-row__icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.tx-row--income .tx-row__icon {
  background: rgba(16, 185, 129, 0.2);
  color: var(--green);
}

.tx-row--expense .tx-row__icon {
  background: rgba(239, 68, 68, 0.2);
  color: var(--red);
}

.tx-row__title {
  font-weight: 600;
  font-size: 0.92rem;
}

.tx-row__meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

.tx-row__amt {
  text-align: right;
}

.tx-row__amt span {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
}

.tx-row--income .tx-row__amt span {
  color: var(--green);
}

.tx-row--expense .tx-row__amt span {
  color: #fca5a5;
}

.tx-row__amt small {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 2px;
}

.tx-row__del {
  margin: 0;
}

/* Alt navigasyon */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr auto 1fr 1fr;
  align-items: end;
  gap: 4px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(12, 12, 15, 0.96);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
  z-index: 30;
}

.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  font-size: 0.62rem;
  color: var(--muted);
  text-decoration: none;
}

.bottom-nav__item:hover {
  color: var(--text);
  text-decoration: none;
}

.bottom-nav__item.is-active {
  color: var(--gold);
}

.bottom-nav__icon {
  font-size: 1.1rem;
}

.bottom-nav__item--muted {
  opacity: 0.45;
  pointer-events: none;
}

.bottom-nav__fab-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin-bottom: 18px;
}

.bottom-nav__fab {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(180deg, #e4bc6a, var(--gold));
  color: #1a1508;
  font-size: 1.75rem;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px var(--gold-glow);
  text-decoration: none;
  line-height: 1;
}

.bottom-nav__fab:hover {
  filter: brightness(1.08);
  text-decoration: none;
}

/* Form */
.form-card {
  padding: 20px;
}

.field--segmented > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.8rem;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 4px;
}

.form-card .segmented + .segmented {
  margin-top: 14px;
}

.segmented--type {
  margin-bottom: 6px;
}

.segmented__item {
  cursor: pointer;
}

.segmented__item input {
  display: none;
}

.segmented__item span {
  display: block;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--muted);
  font-size: 0.9rem;
}

.segmented__item input:checked + span {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(212, 168, 83, 0.12);
}

.form-hint {
  text-align: center;
  margin-top: 18px;
  font-size: 0.9rem;
}

/* Login */
.login-card {
  width: 100%;
  max-width: 380px;
  padding: 32px 28px;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.login-card__logo {
  text-align: center;
  margin-bottom: 24px;
}

.login-card__logo h1 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
}

.muted {
  color: var(--muted);
  font-size: 0.88rem;
}

.login-form .field {
  margin-bottom: 16px;
}

.alert {
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 0.88rem;
}

.alert--error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
}

.alert--success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #a7f3d0;
}
