/* Anasayfa — Fynex Dashboard mockup'i */
@layer views {
  .home-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
  }
  .home-greet { font-size: 14.5px; color: var(--text-2); font-weight: 600; }
  .home-date { font-size: 13px; color: var(--faint); font-weight: 500; }

  /* --- Bugunun basliklari banner'i --- */
  .fab-banner {
    position: relative;
    overflow: hidden;
    background: var(--banner-grad);
    border: 1px solid var(--banner-border);
    border-radius: var(--r-xl);
    padding: 18px 22px 6px;
    box-shadow: var(--shadow-card);
  }
  .fab-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--banner-line);
  }
  .fab-title {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.1;
  }
  .fab-title span {
    background: linear-gradient(120deg, var(--primary), var(--primary-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .fab-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 2px;
    border-bottom: 1px solid var(--banner-line);
  }
  .fab-row:last-child { border-bottom: 0; }
  .fab-ico {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: var(--r-icon);
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .fab-ico .fab-square {
    width: 14px;
    height: 14px;
    border: 2.5px solid var(--primary);
    border-radius: var(--r-xs);
    display: block;
  }
  .fab-ico.danger { background: var(--danger-soft); }
  .fab-ico .fab-alert {
    width: 15px;
    height: 15px;
    background: var(--danger);
    transform: rotate(45deg);
    border-radius: var(--r-xs);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .fab-ico .fab-alert::before {
    content: "!";
    transform: rotate(-45deg);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
  }
  .fab-body { flex: 1; min-width: 0; }
  .fab-row-title { font-size: var(--text-base); font-weight: 600; }
  .fab-row-sub { font-size: var(--text-sm); color: var(--muted); margin-top: 1px; }

  /* --- icerik gridi --- */
  .home-grid {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: var(--gap-panel);
    align-items: start;
  }

  /* son gelen faturalar */
  .inv-row {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 20px;
    border-bottom: 1px solid var(--line-soft);
  }
  .inv-row:last-child { border-bottom: 0; }
  .inv-avatar {
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: var(--r-btn);
    font-size: var(--text-2xs);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .inv-avatar.info { background: var(--primary-soft); color: var(--primary); }
  .inv-avatar.amber { background: var(--chip-amber-bg); color: var(--chip-amber-fg); }
  .inv-avatar.danger { background: var(--danger-soft); color: var(--danger); }
  .inv-main { flex: 1; min-width: 0; }
  .inv-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .inv-date { font-size: var(--text-xs); color: var(--faint); }
  .inv-side { text-align: right; }
  .inv-amount { font-size: 13px; font-weight: 700; }
  .inv-status { font-size: 11px; font-weight: 600; }
  .inv-status.warn { color: var(--warn); }
  .inv-status.danger { color: var(--danger); }
  .inv-status.muted { color: var(--faint); }

  /* nakit akisi */
  .cf-panel { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; overflow: visible; }
  .cf-head { display: flex; align-items: center; justify-content: space-between; }
  .cf-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--text-xs);
    color: var(--muted);
    font-weight: 500;
  }
  .cf-legend span { display: inline-flex; align-items: center; gap: 5px; }
  .cf-legend i { width: 8px; height: 8px; border-radius: 2.5px; font-style: normal; }
  .cf-legend .income { background: var(--chart-income); }
  .cf-legend .expense { background: var(--chart-expense); }
  .cf-legend .net { background: var(--chart-net); border-radius: 50%; }

  /* Sol cetvel (2026-07-18): 0 / orta / tepe değer + hizalı kılavuz çizgileri. */
  .cf-wrap { display: flex; gap: 8px; align-items: stretch; }
  .cf-ruler { position: relative; flex: none; width: 46px; height: 150px; }
  .cf-tick {
    position: absolute;
    right: 4px;
    transform: translateY(50%);
    font-size: 10px;
    font-weight: 600;
    color: var(--faint);
    white-space: nowrap;
  }
  .cf-grid {
    position: absolute;
    left: 0;
    right: 0;
    height: 0;
    border-top: 1px dashed rgba(22, 24, 43, .08);
    pointer-events: none;
  }
  .cf-area { position: relative; height: 150px; }
  .cf-bars {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    align-items: end;
    padding: 0 4px;
  }
  .cf-col { display: flex; align-items: flex-end; justify-content: center; gap: 5px; height: 100%; }
  .cf-bar { position: relative; width: 11px; border-radius: 3px; cursor: pointer; }
  .cf-bar.income { background: var(--chart-income); }
  .cf-bar.expense { background: var(--chart-expense); }
  .cf-area svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }

  /* --- grafik tooltip'leri (mockup: Asistan Geliştirmesi) --- */
  .cf-tip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    background: var(--ink);
    color: #fff;
    border-radius: 6px;
    padding: 5px 8px;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 10px 22px -10px rgba(22, 24, 43, .5);
    pointer-events: none;
    opacity: 0;
    transition: opacity .12s ease;
  }
  .cf-tip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--ink);
    border-bottom: 0;
  }
  .cf-tip b { font-weight: inherit; }
  .cf-tip b.pos { color: var(--success); }
  .cf-tip b.neg { color: var(--danger-strong); }
  .cf-bar:hover > .cf-tip,
  .cf-dot-hit:hover > .cf-tip { opacity: 1; }
  /* net noktası isabet alanı — svg üstünde görünmez daire */
  .cf-dot-hit {
    position: absolute;
    width: 18px;
    height: 18px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
  }
  .cf-labels {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    font-size: var(--text-xs);
    color: var(--faint);
    text-align: center;
    font-weight: 500;
  }

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