/* ============================================================
   BRIEFING INTELLIGENCE — bi-* bileşenleri (Chunk 6.4 + polish pass)
   Bağımlılık: yalnız tokens.css değişkenleri.
   App durumuna bağlı DEĞİL — landing'de yeniden kullanılabilir
   (render fonksiyonları veri objesi alır, bkz. main.js).
   Glass efekti: kartların arkasındaki renk, body'nin sabit aurora
   katmanından (style.css ::before/::after) süzülür — yeni öğe gerekmez.
   ============================================================ */

.bi-dashboard { display: flex; flex-direction: column; gap: 14px; }

.bi-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 2px;
}
.bi-month { white-space: nowrap; color: var(--ink-55); font-size: 0.82rem; }
.bi-head-right { display: flex; align-items: center; gap: 8px; }

/* Etiketler: örnek görünüm / bu oturum (veri dürüstlüğü) */
.bi-tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.65);
    color: var(--ink-55);
    white-space: nowrap;
}
.bi-tag--live {
    background: rgba(90, 95, 224, 0.14);
    border-color: rgba(90, 95, 224, 0.28);
    color: var(--indigo-deep);
}

/* ---------- Kartlar: cam yüzey, katmanlı derinlik ---------- */
.bi-card {
    position: relative;
    isolation: isolate;
    background: var(--bi-glass-bg);
    border: 1px solid var(--bi-glass-border);
    border-radius: var(--r-card);
    backdrop-filter: var(--bi-glass-blur);
    -webkit-backdrop-filter: var(--bi-glass-blur);
    box-shadow: var(--shadow-float), inset 0 1px 0 rgba(255, 255, 255, 0.65);
    padding: 20px;
    overflow: hidden;
}
/* Üst-sol köşede yumuşak parlaklık — "cam" hissinin can damarı */
.bi-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(130% 100% at 14% -15%, rgba(255, 255, 255, 0.65), transparent 55%);
    pointer-events: none;
    z-index: -1;
}
.bi-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}
.bi-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.bi-card-hint {
    font-size: 0.78rem;
    color: var(--ink-55);
    margin-bottom: 14px;
}

/* ---------- A · Değer şeridi ---------- */
.bi-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.bi-stat {
    position: relative;
    isolation: isolate;
    background: var(--bi-glass-bg);
    border: 1px solid var(--bi-glass-border);
    border-radius: var(--r-card);
    backdrop-filter: var(--bi-glass-blur);
    -webkit-backdrop-filter: var(--bi-glass-blur);
    box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
}
.bi-stat::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 100% at 10% -20%, rgba(255, 255, 255, 0.6), transparent 55%);
    pointer-events: none;
    z-index: -1;
}
.bi-stat--hero {
    /* Apple Numbers polish: eski koyu/doygun menekşe+mercan yerine
       çok daha açık, havadar pastel ışıma (lilac + peach, düşük opaklık) */
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(180, 140, 222, 0.16), transparent 55%),
        radial-gradient(120% 140% at 0% 100%, rgba(234, 148, 112, 0.14), transparent 55%),
        var(--bi-glass-bg);
    border-color: rgba(255, 255, 255, 0.85);
    box-shadow: var(--shadow-float), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
.bi-stat-value {
    font-size: 1.65rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
    line-height: 1.1;
}
.bi-stat-label {
    font-size: 0.72rem;
    color: var(--ink-55);
}

/* Premium "değer" hissi: hero rakam + halka merkezi gradyan metin.
   Desteklenmeyen tarayıcıda düz ink renk olarak kalır (güvenli fallback). */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .bi-stat--hero .bi-stat-value,
    .bi-ring-total {
        background: linear-gradient(120deg, var(--chart-1), var(--chart-5));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
}

/* ---------- B · Bilgi Profilin / Knowledge Mix: Halo Ring ---------- */
.bi-mix-body {
    display: flex;
    align-items: center;
    gap: 20px;
}
.bi-ring-wrap {
    position: relative;
    flex-shrink: 0;
    width: 156px;
    height: 156px;
}
/* Not (Apple Numbers polish): renkli dış "glow" halesi (.bi-ring-glow)
   KALDIRILDI — halkanın maskelenmiş şeffaf deliğinden sızıp merkez
   rakamın arkasında renkli bir blob/gölge gibi görünüyordu. Merkez artık
   temiz, düz ve okunur; halka daha dolgun (hole %56→%46 — daha kalın bant). */
.bi-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    /* conic-gradient JS'te veri ile kurulur */
    -webkit-mask: radial-gradient(circle, transparent 46%, #000 48%, #000 100%);
    mask: radial-gradient(circle, transparent 46%, #000 48%, #000 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}
/* Sabit, veri-bağımsız cam parıltısı — halkaya ince bir "ışık vuruşu" verir */
.bi-ring-sheen {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from -100deg, rgba(255, 255, 255, 0.55) 0deg 8deg, transparent 26deg 360deg);
    -webkit-mask: radial-gradient(circle, transparent 46%, #000 48%, #000 100%);
    mask: radial-gradient(circle, transparent 46%, #000 48%, #000 100%);
    mix-blend-mode: overlay;
    pointer-events: none;
}
.bi-ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}
/* Merkez madalyonu: düz, opak, gölgesiz — "temiz ve okunur" hedefi.
   Halkanın kalınlaşması (hole %46) ile boyutu uyumlu, küçük bir pay bırakır. */
.bi-ring-center::before {
    content: "";
    position: absolute;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    z-index: -1;
}
.bi-ring-total {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
}
.bi-ring-unit {
    font-size: 0.7rem;
    color: var(--ink-55);
    font-weight: 500;
    margin-top: 4px;
}

.bi-legend {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.bi-legend li {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.82rem;
}
.bi-dot {
    width: 11px;
    height: 11px;
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(22, 22, 28, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.bi-legend-label {
    color: var(--ink);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bi-legend-value { color: var(--ink-55); white-space: nowrap; font-weight: 500; }

/* ---------- C · Kaynak Etkisi / Signal Sources: cam kapsül metreler ---------- */
.bi-source-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.bi-source-row:last-child { margin-bottom: 0; }
.bi-source-name {
    width: 6.8rem;
    flex-shrink: 0;
    font-size: 0.82rem;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bi-capsule {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 26px;
    border-radius: 999px;
    background: var(--bi-track);
    box-shadow: inset 0 1px 3px rgba(22, 22, 28, 0.12), inset 0 -1px 0 rgba(255, 255, 255, 0.5);
    overflow: hidden;
}
.bi-capsule-fill {
    position: relative;
    height: 100%;
    width: 0; /* JS hedef genişliğe animasyonla getirir */
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 10px;
    min-width: 2.7rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.98);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
    /* Apple-tarzı: daha hafif gölge — "gamified progress bar" değil premium cam metre */
    box-shadow: 0 1px 4px rgba(22, 22, 28, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transition: width 700ms var(--ease-soft);
    overflow: hidden;
}
/* Üstte ince parlaklık şeridi — kapsülü "cam/parlak" yapan detay */
.bi-capsule-fill::before {
    content: "";
    position: absolute;
    inset: 0 0 55% 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent);
    pointer-events: none;
}

/* ---------- D · Son Briefing (hafif dokunuş — yapı korunuyor) ---------- */
.bi-latest-cover {
    position: relative;
    height: 56px;
    border-radius: 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 14px rgba(22, 22, 28, 0.10);
}
.bi-latest-cover::before,
.bi-latest-cover::after { filter: blur(22px); }
.bi-latest-cover .wave { color: rgba(255, 255, 255, 0.95); height: 26px; }
.bi-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.bi-meta-chip {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--ink-70);
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    padding: 4px 11px;
    white-space: nowrap;
}
.bi-meta-chip--mode {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--on-ink);
}
.bi-theme {
    font-size: 0.84rem;
    color: var(--ink-70);
    line-height: 1.5;
    margin-bottom: 12px;
}
.bi-theme b { color: var(--ink); font-weight: 600; }
.bi-empty {
    font-size: 0.84rem;
    color: var(--ink-55);
    line-height: 1.6;
}
.bi-actions { display: flex; gap: 8px; }

/* Kart-içi transkript akordeonu (temizlik chunk'ı, 2026-07-06) */
.bi-transcript {
    margin-top: 10px;
    max-height: 240px;
    overflow-y: auto;
    padding: 12px 14px;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--ink-55);
    text-align: left;
    white-space: pre-wrap;
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid var(--line-strong);
    border-radius: 12px;
}

.bi-btn {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 7px 15px;
    cursor: pointer;
    transition: border-color var(--t-fast) var(--ease-soft),
                background-color var(--t-fast) var(--ease-soft),
                transform var(--t-fast) var(--ease-soft),
                box-shadow var(--t-fast) var(--ease-soft);
}
.bi-btn:hover {
    border-color: var(--ink);
    background: rgba(255, 255, 255, 0.78);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 22, 28, 0.10);
}
.bi-btn:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 379px) {
    .bi-stats { grid-template-columns: 1fr; }
    .bi-mix-body { flex-direction: column; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .bi-capsule-fill { transition: none; }
    .bi-btn { transition: none; }
    .bi-btn:hover { transform: none; }
}
