/*
 * Araç sayfaları tasarım seti (tk-*)
 * Tüm panel araçları aynı başlık, kart, form, sonuç ve durum bileşenlerini kullanır.
 * Renkler app.css'teki değişkenlerden gelir; karanlık tema body.theme-dark ile.
 */

/* ---------- Seviye renkleri ---------- */
.is-good, .is-success { --lv: #059669; --lv-bg: rgba(5, 150, 105, 0.09); }
.is-avg, .is-warning { --lv: #b45309; --lv-bg: rgba(217, 119, 6, 0.1); }
.is-bad, .is-error { --lv: #dc2626; --lv-bg: rgba(220, 38, 38, 0.08); }
.is-info { --lv: var(--primary); --lv-bg: var(--tint); }
.is-none { --lv: var(--gray); --lv-bg: var(--gray-100); }

body.theme-dark .is-good, body.theme-dark .is-success { --lv: #34d399; --lv-bg: rgba(52, 211, 153, 0.12); }
body.theme-dark .is-avg, body.theme-dark .is-warning { --lv: #fbbf24; --lv-bg: rgba(251, 191, 36, 0.12); }
body.theme-dark .is-bad, body.theme-dark .is-error { --lv: #f87171; --lv-bg: rgba(248, 113, 113, 0.12); }
body.theme-dark .is-info { --lv: #6ea8fe; --lv-bg: rgba(110, 168, 254, 0.12); }

/* ---------- Sayfa başlığı ---------- */
.tk-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.tk-head-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--tint); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tk-head-kicker { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); margin-bottom: 2px; }
.tk-head h1 { font-size: 1.625rem; font-weight: 700; color: var(--dark); margin: 0 0 4px; letter-spacing: -0.015em; line-height: 1.25; }
.tk-head p { margin: 0; color: var(--text-secondary, var(--gray)); font-size: 15px; line-height: 1.55; }

/* ---------- Kartlar ---------- */
.tk-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: 10px; padding: 22px; box-shadow: var(--shadow-xs); }
/* hidden özniteliği, display kuralı olan kit öğelerinde de geçerli olsun */
.tk-card [hidden], .tk-results[hidden] { display: none !important; }
.tk-card + .tk-card, .tk-card + .tk-results, .tk-results + .tk-card { margin-top: 20px; }
.tk-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.tk-card-head h2, .tk-card-head h3 { font-size: 1.0625rem; font-weight: 700; color: var(--dark); margin: 0; }
.tk-muted { color: var(--gray); font-size: 13px; }
.tk-help { color: var(--gray); font-size: 13px; margin-top: 6px; line-height: 1.5; }

/* ---------- Form ---------- */
.tk-form { display: grid; gap: 16px; }
.tk-field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.tk-field > label, .tk-label { font-weight: 600; font-size: 14px; color: var(--dark); }
.tk-input, .tk-select, .tk-textarea {
    width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid var(--gray-300); border-radius: 8px;
    background: var(--white); color: var(--dark); font: inherit; font-size: 15px; outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.tk-textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.tk-textarea.is-code, .tk-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.tk-input:focus, .tk-select:focus, .tk-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 90, 224, 0.12); }
.tk-input[readonly], .tk-textarea[readonly] { background: var(--gray-100); }
.tk-row { display: flex; gap: 10px; align-items: stretch; }
.tk-row > .tk-input, .tk-row > .tk-select { flex: 1; min-width: 0; }
.tk-grid-2, .tk-grid-3, .tk-grid-4 { display: grid; gap: 14px; }
.tk-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tk-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tk-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tk-check { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--gray-200); border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--dark); }
.tk-check input { width: 18px; height: 18px; accent-color: var(--primary); flex-shrink: 0; }
.tk-range { width: 100%; accent-color: var(--primary); }

/* ---------- Düğmeler ---------- */
.tk-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px;
    border-radius: 8px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 14px;
    text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .2s, border-color .2s, color .2s, opacity .2s;
}
.tk-btn:disabled { opacity: .6; cursor: not-allowed; }
.tk-btn-primary { background: var(--primary); color: #fff; }
.tk-btn-primary:hover:not(:disabled) { background: var(--primary-dark); color: #fff; }
.tk-btn-outline { background: var(--white); color: var(--dark); border-color: var(--gray-300); }
.tk-btn-outline:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.tk-btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.tk-btn-block { width: 100%; }
.tk-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tk-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: tk-spin .7s linear infinite; display: inline-block; flex-shrink: 0; }
@keyframes tk-spin { to { transform: rotate(360deg); } }

/* ---------- Sonuç alanı ---------- */
.tk-results { margin-top: 20px; }
.tk-results:empty { display: none; }
.tk-reveal { animation: tk-fade-up .45s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes tk-fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.tk-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 8px; background: var(--lv-bg); color: var(--dark); border-left: 4px solid var(--lv); font-size: 14px; line-height: 1.55; }
.tk-alert strong { color: var(--lv); }
/* Uyarıdan sonra gelen içerik ona yapışmasın */
.tk-alert + * { margin-top: 16px; }
.tk-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 28px; color: var(--gray); font-size: 14px; }
.tk-loading .tk-spinner { width: 22px; height: 22px; color: var(--primary); border-width: 3px; }
.tk-empty { padding: 24px; text-align: center; color: var(--gray); font-size: 14px; }

/* İstatistik kutuları */
.tk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tk-stat { padding: 14px; border: 1px solid var(--gray-200); border-radius: 8px; background: var(--white); min-width: 0; }
.tk-stat-label { font-size: 12px; font-weight: 600; color: var(--gray); }
.tk-stat-value { font-size: 1.35rem; font-weight: 800; color: var(--dark); margin: 4px 0 2px; font-variant-numeric: tabular-nums; word-break: break-word; }
.tk-stat-value.is-long { font-size: 1rem; line-height: 1.35; font-weight: 700; word-break: normal; overflow-wrap: anywhere; }
.tk-stat-hint { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--lv, var(--gray)); }
.tk-stat-hint::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--lv, var(--gray-300)); flex-shrink: 0; }
.tk-stat.is-plain .tk-stat-hint::before { display: none; }

/* Kontrol listesi (başarılı / uyarı / hata satırları) */
.tk-list { display: grid; }
.tk-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--gray-100); }
.tk-item:last-child { border-bottom: 0; }
.tk-item-icon { width: 24px; height: 24px; border-radius: 50%; background: var(--lv-bg); color: var(--lv); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 13px; font-weight: 800; margin-top: 1px; }
.tk-item-body { min-width: 0; flex: 1; }
.tk-item-title { font-weight: 700; color: var(--dark); font-size: 14px; }
.tk-item-value { font-size: 13px; color: var(--dark); margin-top: 2px; word-break: break-word; }
.tk-item-text { font-size: 13px; color: var(--text-secondary, var(--gray)); margin-top: 2px; line-height: 1.5; }

/* Rozet */
.tk-badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; background: var(--lv-bg, var(--gray-100)); color: var(--lv, var(--gray)); font-size: 12px; font-weight: 700; white-space: nowrap; }

/* Anahtar-değer listesi */
.tk-kv { display: grid; gap: 0; margin: 0; }
.tk-kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--gray-100); font-size: 14px; }
.tk-kv > div:last-child { border-bottom: 0; }
.tk-kv dt { color: var(--gray); flex-shrink: 0; }
.tk-kv dd { margin: 0; font-weight: 600; color: var(--dark); text-align: right; word-break: break-word; min-width: 0; }

/* Tablo */
.tk-table-wrap { overflow-x: auto; border: 1px solid var(--gray-200); border-radius: 8px; }
.tk-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tk-table th { background: var(--gray-100); color: var(--gray); font-weight: 700; text-align: left; padding: 10px 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.tk-table td { padding: 10px 12px; border-top: 1px solid var(--gray-100); color: var(--dark); vertical-align: top; word-break: break-word; }
.tk-table tr:hover td { background: var(--tint); }

/* Kod / çıktı kutusu */
.tk-output { position: relative; }
.tk-output pre, .tk-pre { margin: 0; padding: 14px 16px; border-radius: 8px; background: #0b1220; color: #e5e7eb; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.6; overflow-x: auto; white-space: pre-wrap; word-break: break-word; max-height: 460px; }
.tk-output .tk-copy { position: absolute; top: 8px; right: 8px; }

/* Dosya bırakma alanı */
.tk-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 32px 20px; border: 2px dashed var(--gray-300); border-radius: 10px; background: var(--gray-100); text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.tk-drop:hover, .tk-drop.is-over { border-color: var(--primary); background: var(--tint); }
.tk-drop-icon { color: var(--primary); }
.tk-drop strong { color: var(--dark); }
.tk-files { display: grid; gap: 8px; margin-top: 12px; }
.tk-file { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--gray-200); border-radius: 8px; font-size: 13px; background: var(--white); }
.tk-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--dark); }

/* İlerleme çubuğu */
.tk-progress { height: 8px; border-radius: 999px; background: var(--gray-200); overflow: hidden; }
.tk-progress > span { display: block; height: 100%; background: var(--lv, var(--primary)); border-radius: 999px; transition: width .6s ease; }

/* Skor halkası */
.tk-score { display: flex; align-items: center; gap: 18px; }
.tk-ring { position: relative; width: 96px; height: 96px; flex-shrink: 0; }
.tk-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tk-ring circle { fill: none; stroke-width: 10; }
.tk-ring .tk-ring-track { stroke: var(--gray-200); }
.tk-ring .tk-ring-value { stroke: var(--lv); stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(.22, 1, .36, 1); }
.tk-ring-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 800; color: var(--dark); }
.tk-score-verdict { font-size: 1.15rem; font-weight: 800; color: var(--lv); }

/* Skor + sayı kutuları yan yana özet */
.tk-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; }
.tk-summary .tk-stats { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
@media (max-width: 640px) { .tk-summary { grid-template-columns: minmax(0, 1fr); } }

/* Bölüm başlığı (sonuç içinde) */
.tk-section-title { font-size: 14px; font-weight: 700; color: var(--dark); margin: 18px 0 10px; }
.tk-section-title:first-child { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
    .tk-reveal { animation: none; }
    .tk-ring .tk-ring-value, .tk-progress > span { transition: none; }
}

@media (max-width: 760px) {
    .tk-grid-3, .tk-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .tk-head { gap: 12px; }
    .tk-head-icon { width: 42px; height: 42px; }
    .tk-head h1 { font-size: 1.375rem; }
    .tk-card { padding: 16px; }
    .tk-row { flex-direction: column; }
    .tk-row > .tk-btn { width: 100%; }
    .tk-grid-2, .tk-grid-3, .tk-grid-4 { grid-template-columns: minmax(0, 1fr); }
    .tk-kv > div { flex-direction: column; gap: 2px; }
    .tk-kv dd { text-align: left; }
    .tk-score { flex-direction: column; text-align: center; }
}

/* "Bu araç hakkında" açılır bilgi kartı */
.tk-info > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 700; color: var(--dark); }
.tk-info > summary::-webkit-details-marker { display: none; }
.tk-info > summary::after { content: '+'; font-size: 20px; line-height: 1; color: var(--gray); }
.tk-info[open] > summary::after { content: '−'; }
.tk-info-body { margin-top: 14px; color: var(--text-secondary); font-size: 14px; line-height: 1.7; }
.tk-info-body h3 { font-size: 15px; font-weight: 700; color: var(--dark); margin: 18px 0 6px; }
.tk-info-body h3:first-child { margin-top: 0; }
.tk-info-body h4 { font-size: 14px; font-weight: 700; color: var(--dark); margin: 12px 0 4px; }
.tk-info-body p { margin: 0 0 8px; }
.tk-info-body ul, .tk-info-body ol { margin: 0 0 8px; padding-left: 20px; }
.tk-info-body li { margin: 2px 0; }
.tk-info-body > div > p:first-child { font-weight: 700; color: var(--dark); margin-bottom: 2px; }

/* ===== Yönetim sayfaları (liste, filtre, form) ===== */
.tk-head-main { flex: 1; min-width: 0; }
.tk-head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-left: auto; align-self: center; }
.tk-btn-danger { background: var(--white); color: #b91c1c; border-color: rgba(220, 38, 38, .35); }
.tk-btn-danger:hover:not(:disabled) { background: #fef2f2; border-color: #dc2626; color: #b91c1c; }
body.theme-dark .tk-btn-danger { background: transparent; color: #f87171; border-color: rgba(248, 113, 113, .4); }
.tk-btn-ghost { background: transparent; color: var(--gray); border-color: transparent; }
.tk-btn-ghost:hover:not(:disabled) { color: var(--primary); background: var(--tint); }
.tk-btn-icon { min-height: 34px; width: 34px; padding: 0; }

.tk-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.tk-filters .tk-field > label { font-size: 12px; font-weight: 600; color: var(--gray); }
.tk-filters .tk-input { min-height: 42px; }
.tk-filters-actions { display: flex; gap: 8px; }
.tk-filters-actions .tk-btn { min-height: 42px; flex: 1; }

.tk-table td.is-num, .tk-table th.is-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tk-table td.is-center, .tk-table th.is-center { text-align: center; }
.tk-table td { vertical-align: middle; }
.tk-table a.tk-link { color: var(--dark); font-weight: 700; text-decoration: none; }
.tk-table a.tk-link:hover { color: var(--primary); }
.tk-table .tk-sub { display: block; font-size: 12px; color: var(--gray); font-weight: 400; margin-top: 2px; }
.tk-row-actions { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: nowrap; }
.tk-row-actions form { margin: 0; }

.tk-pagination { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; font-size: 13px; color: var(--gray); }
.tk-pagination nav { display: flex; gap: 4px; flex-wrap: wrap; }
.tk-pagination a, .tk-pagination span.is-page { min-width: 34px; height: 34px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--gray-200); border-radius: 8px; color: var(--dark); text-decoration: none; background: var(--white); }
.tk-pagination a:hover { border-color: var(--primary); color: var(--primary); }
.tk-pagination span.is-current { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.tk-pagination span.is-disabled { opacity: .45; }

.tk-empty-state { text-align: center; padding: 40px 20px; }
.tk-empty-state svg { color: var(--gray-300); margin-bottom: 10px; }
.tk-empty-state h3 { font-size: 1.05rem; color: var(--dark); margin: 0 0 6px; }
.tk-empty-state p { color: var(--gray); margin: 0 0 16px; font-size: 14px; }

.tk-error { color: #b91c1c; font-size: 12px; font-weight: 600; }
body.theme-dark .tk-error { color: #f87171; }
.tk-input.is-invalid, .tk-textarea.is-invalid { border-color: #dc2626; }
.tk-form-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; padding-top: 16px; border-top: 1px solid var(--gray-200); margin-top: 4px; }
.tk-required::after { content: ' *'; color: #dc2626; }

.tk-detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.tk-detail-grid.is-even { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
/* Eşit kartlarda form düğmeleri aynı hizada, kartın altında durur */
.tk-detail-grid.is-even > .tk-card { display: flex; flex-direction: column; }
.tk-detail-grid.is-even > .tk-card > .tk-form { display: flex; flex-direction: column; flex: 1; }
.tk-detail-grid.is-even > .tk-card > .tk-form > .tk-form-actions { margin-top: auto; }
/* Izgara içindeki kartlar yan yana durur; ".tk-card + .tk-card" boşluğu burada uygulanmaz */
.tk-detail-grid > * + *, .tk-detail-grid > .tk-card + .tk-card { margin-top: 0; }
.tk-stack > * + * { margin-top: 20px; }
/* Formdaki gizli alanlar (CSRF vb.) boşluk hesabına girmesin; ilk kart yanındaki sütunla aynı hizada başlasın */
.tk-stack > input[type="hidden"] + :not(input) { margin-top: 0; }

@media (max-width: 860px) {
    .tk-detail-grid, .tk-detail-grid.is-even { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
    .tk-head { flex-wrap: wrap; }
    .tk-head-actions { width: 100%; margin-left: 0; }
    .tk-head-actions .tk-btn { flex: 1; }
    .tk-form-actions .tk-btn { flex: 1; }
    /* Dar ekranda tablolar kart listesine dönüşür */
    .tk-table.is-stack thead { display: none; }
    .tk-table.is-stack, .tk-table.is-stack tbody, .tk-table.is-stack tr, .tk-table.is-stack td { display: block; width: 100%; }
    .tk-table.is-stack tr { border-top: 1px solid var(--gray-200); padding: 8px 0; }
    .tk-table.is-stack td { border: 0; padding: 4px 12px; text-align: left !important; }
    .tk-table.is-stack td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 700; color: var(--gray); text-transform: uppercase; letter-spacing: .03em; }
    .tk-table.is-stack .tk-row-actions { justify-content: flex-start; padding-top: 4px; }
}

/* Sekmeler: [data-tabs] içinde [data-tab] düğmeleri ve [data-tab-panel] bölümleri */
.tk-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--gray-200); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tk-tabs::-webkit-scrollbar { display: none; }
.tk-tab { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; font: inherit; font-size: 14px; font-weight: 600; color: var(--gray); cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; margin-bottom: -1px; }
.tk-tab:hover { color: var(--dark); }
.tk-tab.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.tk-tab-count { background: var(--gray-100); color: var(--gray); border-radius: 999px; padding: 0 7px; font-size: 11px; line-height: 18px; }
.tk-tab.is-active .tk-tab-count { background: var(--tint); color: var(--primary); }
[data-tab-panel][hidden] { display: none !important; }
.tk-tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: color-mix(in srgb, var(--tag, #64748b) 14%, transparent); color: var(--tag, #64748b); white-space: nowrap; }
.tk-tag::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--tag, #64748b); }
.tk-inline-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; align-items: end; padding: 12px; background: var(--gray-100); border-radius: 8px; margin-top: 8px; }
.tk-inline-form .tk-input { min-height: 40px; }
.tk-table tr[hidden] { display: none !important; }
.tk-table td.is-nowrap, .tk-table th.is-nowrap { white-space: nowrap; word-break: normal; }

/* Aylık gelir/gider çubuk grafiği (tek eksen, gruplu çubuklar) */
.tk-chart { --series-1: #2a78d6; --series-2: #eb6834; position: relative; }
body.theme-dark .tk-chart { --series-1: #3987e5; --series-2: #d95926; }
.tk-chart-legend { display: flex; gap: 16px; font-size: 13px; color: var(--text-secondary, var(--gray)); margin-bottom: 10px; }
.tk-chart-legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; background: var(--c); }
.tk-chart-plot { position: relative; height: 180px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; align-items: end; padding-left: 52px; border-bottom: 1px solid var(--gray-300); }
.tk-chart-grid { position: absolute; inset: 0 0 0 52px; pointer-events: none; }
.tk-chart-grid div { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--gray-200); }
.tk-chart-grid span { position: absolute; left: -52px; width: 46px; text-align: right; font-size: 11px; color: var(--gray); transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.tk-chart-group { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; cursor: default; outline: none; }
.tk-chart-group:hover, .tk-chart-group:focus-visible { background: var(--tint); border-radius: 6px 6px 0 0; }
.tk-chart-bar { width: min(18px, 38%); min-height: 0; border-radius: 4px 4px 0 0; background: var(--c); }
.tk-chart-tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 2; min-width: 150px; padding: 8px 10px; border-radius: 8px; background: #111827; color: #fff; border: 1px solid rgba(255,255,255,.12); font-size: 12px; line-height: 1.6; white-space: nowrap; box-shadow: 0 6px 20px rgba(0,0,0,.18); opacity: 0; visibility: hidden; transition: opacity .12s; pointer-events: none; }
.tk-chart-group:hover .tk-chart-tip, .tk-chart-group:focus-visible .tk-chart-tip { opacity: 1; visibility: visible; }
.tk-chart-tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--c); margin-right: 6px; }
.tk-chart-labels { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; padding-left: 52px; margin-top: 6px; font-size: 11px; color: var(--gray); text-align: center; }
/* Kenardaki çubuklarda ipucu grafiğin dışına taşmasın (ilk çocuk ızgara katmanıdır) */
.tk-chart-group:nth-child(2) .tk-chart-tip, .tk-chart-group:nth-child(3) .tk-chart-tip { left: 0; transform: none; }
.tk-chart-group:nth-last-child(1) .tk-chart-tip, .tk-chart-group:nth-last-child(2) .tk-chart-tip { left: auto; right: 0; transform: none; }

/* Destek yazışması */
.tk-thread { display: grid; gap: 14px; }
.tk-msg { max-width: 82%; padding: 12px 14px; border-radius: 12px; background: var(--gray-100); border: 1px solid var(--gray-200); }
.tk-msg.is-staff { justify-self: end; background: var(--tint); border-color: color-mix(in srgb, var(--primary) 25%, transparent); }
.tk-msg-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12px; color: var(--gray); margin-bottom: 6px; }
.tk-msg-head strong { color: var(--dark); font-size: 13px; }
.tk-msg-body { font-size: 14px; line-height: 1.6; color: var(--dark); white-space: pre-wrap; word-break: break-word; }
@media (max-width: 640px) { .tk-msg { max-width: 100%; } }
