/* ====================================================
   BASELINE KARŞILAŞTIRMASI ve GÖRÜNÜM ARAÇLARI (Faz 6c) — js/baseline.js, js/export-*.js
   ==================================================== */

/* Alt çubuktaki araçlar: Karşılaştır, Excel, PDF */
.view-tools { display: inline-flex; align-items: center; gap: 6px; }
.view-tools .btn-clean { padding: 5px 10px; font-size: 12px; }
.view-tools .btn-clean svg { width: 13px; height: 13px; }
.view-tools .bl-tool-active { background: var(--accent-purple-light); color: var(--accent-purple); border-color: rgba(124, 58, 237, 0.35); font-weight: 600; }
.view-tools .bl-tool-loading { opacity: 0.65; cursor: progress; }

/* Menü */
.bl-menu {
    position: fixed; z-index: 1500; width: 360px; max-width: calc(100vw - 24px);
    background: var(--bg-shell); color: var(--text-primary);
    border: 1px solid var(--border-light); border-radius: 12px; box-shadow: var(--shadow-hover);
    padding: 12px 14px 14px; font-size: 12.5px;
}
.bl-menu[hidden] { display: none; }
.bl-menu-head { font-weight: 700; font-size: 13px; margin-bottom: 10px; }
.bl-menu-presets { display: flex; gap: 8px; margin-bottom: 4px; }
.bl-preset {
    flex: 1; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border-light);
    background: var(--bg-canvas); color: var(--text-primary); font: inherit; font-weight: 600; cursor: pointer;
}
.bl-preset:hover { border-color: var(--accent-purple); color: var(--accent-purple); }
.bl-menu-sec { border-top: 1px solid var(--border-subtle); padding-top: 9px; margin-top: 9px; }
.bl-menu-label { font-size: 11px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; }
.bl-menu-row { display: flex; gap: 6px; align-items: center; }
.bl-menu-row-end { justify-content: flex-end; margin-top: 6px; }
.bl-menu-grid { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center; }
.bl-menu-grid span { font-size: 11.5px; color: var(--text-secondary); }
.bl-menu input, .bl-menu select {
    height: 30px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--border-light);
    background: var(--bg-shell); color: var(--text-primary); font: inherit; min-width: 0;
}
.bl-menu-row input[type=date], .bl-menu-row select { flex: 1; }
.bl-menu .bl-go { padding: 5px 10px; font-weight: 600; color: var(--accent-purple); white-space: nowrap; }
.bl-menu-error { margin-top: 10px; padding: 7px 9px; border-radius: 8px; background: rgba(244, 63, 94, 0.08); color: #be123c; font-size: 12px; }
.bl-menu-error[hidden] { display: none; }

/* Bant */
.bl-banner {
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.07), rgba(124, 58, 237, 0.02));
    padding: 8px 22px; font-size: 12.5px; color: var(--text-primary); z-index: 8;
}
.bl-banner[hidden] { display: none; }
.bl-banner-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bl-banner-icon {
    width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent-purple); color: #fff; font-weight: 700; flex: none;
}
.bl-banner-text { display: flex; flex-direction: column; min-width: 220px; flex: 1; }
.bl-banner-text strong { font-weight: 700; }
.bl-banner-sub { font-size: 11px; color: var(--text-secondary); }
.bl-banner-counts { display: flex; gap: 6px; flex-wrap: wrap; }
.bl-count {
    border: none; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer;
}
.bl-count-new { background: rgba(16, 185, 129, 0.14); color: #047857; }
.bl-count-changed { background: rgba(245, 158, 11, 0.16); color: #b45309; }
.bl-count-removed { background: rgba(244, 63, 94, 0.12); color: #be123c; }
.bl-banner-actions { display: flex; gap: 6px; }
.bl-btn { padding: 4px 10px; font-size: 12px; }
.bl-exit { color: var(--accent-rose); }

.bl-details { margin-top: 8px; max-height: 240px; overflow: auto; border-top: 1px dashed var(--border-light); padding-top: 6px; }
.bl-details[hidden] { display: none; }
.bl-sec { margin: 4px 0 8px; }
.bl-sec-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-secondary); margin: 6px 0 3px; }
.bl-sec-title span { color: var(--text-muted); }
.bl-sec-new { color: #047857; }
.bl-sec-changed { color: #b45309; }
.bl-sec-removed { color: #be123c; }
.bl-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.bl-table td { padding: 4px 8px 4px 0; border-bottom: 1px solid var(--border-subtle); vertical-align: top; }
.bl-c-code { white-space: nowrap; font-weight: 700; width: 1%; }
.bl-c-title { min-width: 180px; }
.bl-c-where, .bl-c-due { white-space: nowrap; color: var(--text-secondary); width: 1%; }
.bl-item-open { cursor: pointer; }
.bl-item-open:hover td { background: var(--accent-purple-light); }
.bl-flash td { animation: bl-flash 1.6s ease-out; }
@keyframes bl-flash { from { background: rgba(124, 58, 237, 0.22); } to { background: transparent; } }
.bl-empty { padding: 8px 0; color: var(--text-secondary); }
.bl-tag { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(16, 185, 129, 0.14); color: #047857; margin-right: 6px; }
.bl-tag-removed { background: rgba(244, 63, 94, 0.12); color: #be123c; }
.bl-muted { color: var(--text-muted); font-size: 11px; }
.bl-diff { display: inline-block; max-width: 100%; margin-right: 10px; vertical-align: top; overflow-wrap: anywhere; }
.bl-diff-k { font-weight: 600; color: var(--text-secondary); }

/* Eski değer üstü çizili, yeni değer vurgulu */
.bl-banner del, .bl-drawer-box del, .bl-pop del { color: #be123c; text-decoration: line-through; background: rgba(244, 63, 94, 0.08); border-radius: 3px; padding: 0 3px; }
.bl-banner ins, .bl-drawer-box ins, .bl-pop ins { color: #047857; text-decoration: none; background: rgba(16, 185, 129, 0.12); border-radius: 3px; padding: 0 3px; font-weight: 600; }

/* Kart rozetleri (kartın kendi taşma kırpması rozet için kapatılır; iç içerik zaten kendini kırpar) */
.task-card-float.bl-card-new, .task-card-float.bl-card-changed { overflow: visible; }
.task-card-float.bl-card-new { box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.6), var(--shadow-card); }
.task-card-float.bl-card-changed { box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.65), var(--shadow-card); }
.bl-card-badge {
    position: absolute; top: -8px; right: 12px; z-index: 6;
    font-size: 9.5px; font-weight: 800; letter-spacing: 0.3px; line-height: 15px;
    padding: 0 7px; border-radius: 999px; color: #fff; white-space: nowrap; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.bl-card-badge.bl-new { background: #10b981; }
.bl-card-badge.bl-changed { background: #f59e0b; }
.bl-card-badge.bl-removed { background: #f43f5e; }
.bl-card-badge.bl-inline { position: static; display: inline-block; box-shadow: none; }

/* Artık olmayan kayıt: soluk kart */
/* z-index yok: kart gövdesi canlı kartların altında, rozeti (z-index 6) üstünde kalır */
.bl-ghost-card {
    position: absolute; height: 48px; border-radius: 12px; cursor: pointer;
    border: 1.5px dashed rgba(244, 63, 94, 0.7); background: rgba(244, 63, 94, 0.04);
    padding: 6px 12px 6px 14px; display: flex; flex-direction: column; justify-content: center; overflow: visible;
}
.bl-ghost-card[data-bl-reason="unmatched"] { border-color: rgba(148, 163, 184, 0.9); background: rgba(148, 163, 184, 0.06); }
.bl-ghost-card[data-bl-reason="unmatched"] .bl-card-badge { background: #64748b; }
.bl-ghost-title { font-size: 12px; font-weight: 600; color: var(--text-muted); text-decoration: line-through; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-ghost-sub { font-size: 10.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Detay çekmecesi */
.bl-drawer-box { border: 1px solid rgba(245, 158, 11, 0.4); background: rgba(245, 158, 11, 0.06); border-radius: 10px; padding: 10px 12px; margin: 10px 0 14px; font-size: 12.5px; }
.bl-drawer-box.bl-new { border-color: rgba(16, 185, 129, 0.4); background: rgba(16, 185, 129, 0.06); }
.bl-drawer-head { display: flex; align-items: center; gap: 8px; }
.bl-drawer-title { font-weight: 700; }
.bl-drawer-sub { font-size: 11px; color: var(--text-secondary); margin: 2px 0 6px; }
.bl-drawer-note { margin: 4px 0; }
.bl-diff-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px; padding: 3px 0; border-top: 1px dashed rgba(0, 0, 0, 0.06); }
.bl-diff-label { color: var(--text-secondary); font-weight: 600; }
.bl-diff-vals { overflow-wrap: anywhere; }

/* Açılır kart özeti */
.bl-pop { margin: 8px 0 2px; padding: 7px 9px; border-radius: 8px; background: rgba(245, 158, 11, 0.07); font-size: 11.5px; display: flex; flex-wrap: wrap; gap: 4px 0; align-items: center; }
.bl-pop .bl-card-badge { margin-right: 8px; }

/* Karanlık tema: okunur renkler */
body.dark-mode .bl-count-new, body.dark-mode .bl-sec-new, body.dark-mode .bl-tag { color: #34d399; }
body.dark-mode .bl-count-changed, body.dark-mode .bl-sec-changed { color: #fbbf24; }
body.dark-mode .bl-count-removed, body.dark-mode .bl-sec-removed, body.dark-mode .bl-tag-removed, body.dark-mode .bl-menu-error { color: #fb7185; }
body.dark-mode .bl-banner del, body.dark-mode .bl-drawer-box del, body.dark-mode .bl-pop del { color: #fb7185; }
body.dark-mode .bl-banner ins, body.dark-mode .bl-drawer-box ins, body.dark-mode .bl-pop ins { color: #34d399; }
