@property --tk-sweep { syntax: "<angle>"; inherits: false; initial-value: 360deg; }

/* Labim Dashboard - tasarim sistemi.
 * Renkler --tk-* degiskenleriyle tanimlanir; karanlik mod yalnizca bu
 * degiskenleri yeniden tanimlar ([data-theme="dark"]). */

:root {
  --tk-bg: #fbfbfc;
  --tk-surface: #ffffff;
  --tk-sidebar: #f8f9fb;
  --tk-border: #eceef2;
  --tk-border-strong: #e2e5ea;
  --tk-text: #151a28;
  --tk-text-2: #2b3140;
  --tk-muted: #6b7280;
  --tk-soft: #f5f6f8;
  --tk-brand: #f27a1a;
  --tk-brand-soft: #fff1e7;
  --tk-brand-text: #e8620c;
  --tk-good: #16a36b;
  --tk-bad: #e5484d;
  --tk-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  --tk-promo: #eef0f4;
  --tk-info-bg: rgba(28, 131, 225, 0.1);
  --tk-info-fg: #0f4d8a;
  --tk-warn-bg: rgba(255, 189, 69, 0.18);
  --tk-warn-fg: #7a4b00;
  --tk-ok-bg: rgba(33, 195, 84, 0.12);
  --tk-ok-fg: #14602f;
  --tk-err-bg: rgba(255, 43, 43, 0.09);
  --tk-err-fg: #8f1d1d;
  --tk-radius: 12px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --tk-bg: #14151a; --tk-surface: #1c1e24; --tk-sidebar: #111217; --tk-border: #2a2d35; --tk-border-strong: #343844;
  --tk-text: #f4f5f7; --tk-text-2: #d8dbe2; --tk-muted: #9aa1ad; --tk-soft: #23262e;
  --tk-brand-soft: rgba(242, 122, 26, 0.16); --tk-brand-text: #ff9a4d; --tk-good: #34c98a; --tk-bad: #ff6b6f;
  --tk-shadow: none;
  --tk-promo: #23262e;
  --tk-info-bg: rgba(61, 157, 243, 0.16); --tk-info-fg: #c7e3ff;
  --tk-warn-bg: rgba(255, 189, 69, 0.16); --tk-warn-fg: #ffe2a8;
  --tk-ok-bg: rgba(33, 195, 84, 0.16); --tk-ok-fg: #b9f2cb;
  --tk-err-bg: rgba(255, 108, 108, 0.16); --tk-err-fg: #ffd0d0;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Noto Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--tk-bg); color: var(--tk-text); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--tk-brand-text); }

/* ---------- Iskelet ---------- */
.tk-app { display: flex; min-height: 100vh; }
.tk-main { flex: 1; min-width: 0; padding: 1.4rem 2rem 2.5rem 2rem; position: relative; }

/* ---------- Kenar cubugu ---------- */
.tk-sidebar {
  width: 18rem; flex-shrink: 0; background: var(--tk-sidebar); border-right: 1px solid var(--tk-border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 40;
}
.tk-sidebar-header { padding: 1.6rem 1.25rem 0.6rem 1.25rem; display: flex; align-items: center; justify-content: space-between; }
.tk-brand { line-height: 1.15; display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.tk-brand-logo { width: 3.4rem; height: 3.4rem; object-fit: contain; flex-shrink: 0; margin: -0.3rem 0 -0.3rem -0.35rem; }
.tk-brand-name { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; color: var(--tk-text); }
.tk-brand-sub { font-size: 0.95rem; color: var(--tk-muted); margin-top: 0.2rem; }
.tk-nav { padding: 0.6rem 0.7rem 0 0.7rem; display: flex; flex-direction: column; gap: 0.3rem; }
.tk-nav a {
  display: flex; align-items: center; gap: 0.85rem; padding: 0.72rem 0.95rem; border-radius: 12px;
  text-decoration: none; color: var(--tk-text-2); font-weight: 500; font-size: 1rem; transition: background .15s ease;
}
.tk-nav a svg { color: var(--tk-muted); flex-shrink: 0; }
.tk-nav a:hover { background: rgba(242, 122, 26, 0.06); }
.tk-nav a[aria-current="page"] { background: var(--tk-brand-soft); color: var(--tk-brand-text); font-weight: 600; }
.tk-nav a[aria-current="page"] svg { color: var(--tk-brand-text); }
.tk-sidebar-bottom { margin-top: auto; padding: 1rem 1.1rem 1.4rem 1.1rem; }
.tk-sync { font-size: 0.78rem; color: var(--tk-muted); margin: 0 0 0.4rem 0.1rem; }
.tk-promo { background: var(--tk-promo); border-radius: 16px; padding: 1.1rem 1.1rem 1.2rem 1.1rem; margin-top: 0.8rem; }
.tk-promo-icon {
  width: 34px; height: 34px; border-radius: 9px; background: var(--tk-brand-soft);
  color: var(--tk-brand); display: flex; align-items: center; justify-content: center; margin-bottom: 0.9rem;
}
.tk-promo-title { font-weight: 700; font-size: 1.02rem; color: var(--tk-text); line-height: 1.35; margin-bottom: 0.45rem; }
.tk-promo-text { font-size: 0.84rem; color: var(--tk-muted); line-height: 1.45; }
.tk-icon-btn.tk-menu-btn, .tk-icon-btn.tk-sidebar-close { display: none; }
.tk-sidebar-backdrop { display: none; }

/* ---------- Dugmeler / form ogeleri ---------- */
.tk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 2.6rem;
  padding: 0 1rem; border-radius: 10px; border: 1px solid var(--tk-border-strong); background: var(--tk-surface);
  color: var(--tk-text); cursor: pointer; font-weight: 500; font-size: 0.95rem; text-decoration: none; white-space: nowrap;
}
.tk-btn:hover:not(:disabled) { border-color: var(--tk-brand); color: var(--tk-brand-text); }
.tk-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.tk-btn.tk-primary { background: var(--tk-brand); border-color: var(--tk-brand); color: #fff; }
.tk-btn.tk-primary:hover:not(:disabled) { filter: brightness(0.95); color: #fff; }
.tk-btn.tk-block { width: 100%; }
.tk-icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: 10px;
  border: 1px solid var(--tk-border-strong); background: var(--tk-surface); color: var(--tk-text); cursor: pointer; font-size: 1.3rem;
}
.tk-input, .tk-select {
  width: 100%; min-height: 2.6rem; padding: 0.45rem 0.8rem; border-radius: var(--tk-radius);
  border: 1px solid var(--tk-border-strong); background: var(--tk-surface); color: var(--tk-text);
}
.tk-input:focus, .tk-select:focus, .tk-btn:focus-visible, .tk-icon-btn:focus-visible, .tk-nav a:focus-visible {
  outline: 2px solid var(--tk-brand); outline-offset: 1px;
}
.tk-label { display: block; font-size: 0.86rem; color: var(--tk-text-2); font-weight: 500; margin-bottom: 0.3rem; }
.tk-field { margin-bottom: 0.9rem; }
.tk-caption { font-size: 0.84rem; color: var(--tk-muted); margin: 0.4rem 0; }
.tk-error-text { font-size: 0.84rem; color: var(--tk-bad); margin: 0.3rem 0; }

/* Anahtar (toggle) */
.tk-toggle { display: flex; align-items: center; gap: 0.7rem; cursor: pointer; margin: 0.6rem 0; font-size: 0.95rem; }
.tk-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tk-toggle-track { width: 2.4rem; height: 1.35rem; border-radius: 999px; background: var(--tk-border-strong); position: relative; transition: background .15s; flex-shrink: 0; }
.tk-toggle-track::after {
  content: ""; position: absolute; top: 0.15rem; left: 0.15rem; width: 1.05rem; height: 1.05rem; border-radius: 50%;
  background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.tk-toggle input:checked + .tk-toggle-track { background: var(--tk-brand); }
.tk-toggle input:checked + .tk-toggle-track::after { transform: translateX(1.05rem); }
.tk-toggle input:focus-visible + .tk-toggle-track { outline: 2px solid var(--tk-brand); outline-offset: 2px; }

/* ---------- Acilir panel (popover) ---------- */
.tk-popover { position: relative; }
.tk-popover-btn {
  width: 100%; min-height: 3.5rem; background: var(--tk-surface); border: 1px solid var(--tk-border-strong);
  border-radius: 12px; display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  padding: 0 0.9rem; box-shadow: var(--tk-shadow); cursor: pointer; font-size: 0.98rem; font-weight: 500; color: var(--tk-text-2);
  text-align: left;
}
.tk-popover-btn .tk-popover-label { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.tk-popover-btn .tk-popover-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-popover-btn svg { flex-shrink: 0; color: var(--tk-muted); }
.tk-popover-btn.tk-compact { min-height: 2.6rem; border-radius: 10px; box-shadow: none; }
.tk-popover-panel {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 100%; width: max-content; max-width: min(92vw, 26rem);
  background: var(--tk-surface); border: 1px solid var(--tk-border-strong); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.14); padding: 0.9rem; z-index: 60; display: none;
}
.tk-popover.tk-open .tk-popover-panel { display: block; }
.tk-popover-panel.tk-align-right { left: auto; right: 0; }
.tk-popover-panel.tk-up { top: auto; bottom: calc(100% + 6px); }
.tk-radio-list { display: flex; flex-direction: column; gap: 0.15rem; max-height: 22rem; overflow-y: auto; margin: 0.3rem 0 0.6rem 0; }
.tk-radio { display: flex; align-items: center; gap: 0.55rem; padding: 0.3rem 0.35rem; border-radius: 8px; cursor: pointer; font-size: 0.95rem; }
.tk-radio:hover { background: var(--tk-soft); }
.tk-radio input { accent-color: var(--tk-brand); margin: 0; }
.tk-check { display: flex; align-items: center; gap: 0.55rem; padding: 0.35rem 0.35rem; border-radius: 8px; cursor: pointer; font-size: 0.95rem; }
.tk-check:hover { background: var(--tk-soft); }
.tk-check input { accent-color: var(--tk-brand); margin: 0; width: 1rem; height: 1rem; }
.tk-two-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.4rem; }

/* Coklu secim kutusu (Sipariş Durumu, Kategori...) */
.tk-multiselect .tk-popover-btn { min-height: 2.75rem; border-radius: 12px; font-size: 0.95rem; }
.tk-multiselect .tk-popover-panel { min-width: 100%; max-height: 22rem; overflow-y: auto; }
.tk-ms-placeholder { color: var(--tk-muted); }
.tk-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; min-width: 0; }
.tk-chip { background: var(--tk-brand-soft); color: var(--tk-brand-text); border-radius: 6px; padding: 0.05rem 0.5rem; font-size: 0.82rem; font-weight: 600; white-space: nowrap; }

/* ---------- Sayfa basligi ---------- */
.tk-header { display: grid; grid-template-columns: 1.05fr 1fr; gap: 1rem; align-items: center; margin-bottom: 1.2rem; }
.tk-header.tk-header-wide { grid-template-columns: 1fr 1.45fr; }
.tk-header-filters { display: grid; grid-template-columns: 1fr 1.25fr; gap: 0.75rem; align-items: end; }
.tk-header-filters.tk-cols-4 { grid-template-columns: 1.55fr 0.95fr 0.95fr 1.05fr; }
.tk-title { font-size: 2.05rem; font-weight: 800; color: var(--tk-text); letter-spacing: -0.02em; line-height: 1.15; margin: 0.1rem 0 0.35rem 0; }
.tk-subtitle { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; color: var(--tk-muted); font-size: 1rem; }
.tk-badge {
  background: var(--tk-brand-soft); color: var(--tk-brand-text); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.05em; padding: 0.32rem 0.7rem; border-radius: 7px; text-transform: uppercase;
}
.tk-float-select { position: relative; }
.tk-float-select label {
  position: absolute; top: 0.45rem; left: 0.95rem; z-index: 2; font-size: 0.8rem; color: var(--tk-text-2); font-weight: 500; pointer-events: none;
}
.tk-float-select select {
  width: 100%; min-height: 3.5rem; border-radius: 12px; background: var(--tk-surface); border: 1px solid var(--tk-border-strong);
  box-shadow: var(--tk-shadow); padding: 1.25rem 2rem 0.45rem 0.9rem; font-size: 0.95rem; color: var(--tk-text-2);
  text-overflow: ellipsis; cursor: pointer;
}

/* ---------- Yerlesim ---------- */
.tk-grid { display: grid; gap: 1rem; margin-bottom: 0; }
.tk-grid.tk-g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tk-grid.tk-g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tk-grid.tk-g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tk-grid.tk-main-side { grid-template-columns: minmax(0, 3.05fr) minmax(0, 1fr); }
.tk-grid.tk-left-right { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.tk-spacer { height: 0.35rem; }
.tk-filters-row { display: grid; gap: 0.75rem; margin-bottom: 1rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }

/* ---------- Kartlar ---------- */
.tk-card {
  background: var(--tk-surface); border: 1px solid var(--tk-border); border-radius: 18px;
  padding: 1.25rem 1.35rem; box-shadow: var(--tk-shadow); margin-bottom: 1rem; min-width: 0;
}
.tk-card.tk-flush { padding: 1.25rem 0 0 0; overflow: hidden; }
.tk-card .tk-pad { padding: 0 1.35rem 0.4rem 1.35rem; }
.tk-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.tk-section-title { font-size: 1.28rem; font-weight: 700; color: var(--tk-text); display: flex; align-items: center; gap: 0.5rem; margin: 0; }
.tk-info { color: var(--tk-muted); display: inline-flex; cursor: help; }
.tk-legend { display: flex; justify-content: flex-end; gap: 1.2rem; flex-wrap: wrap; font-size: 0.9rem; color: var(--tk-text-2); }
.tk-legend-item { display: inline-flex; align-items: center; gap: 0.45rem; }
.tk-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.tk-note {
  display: flex; gap: 0.6rem; align-items: center; background: var(--tk-soft); border-radius: 12px;
  padding: 0.8rem 0.95rem; font-size: 0.84rem; color: var(--tk-muted); margin-top: 0.6rem;
}
.tk-note svg { flex-shrink: 0; }
.tk-card-link {
  display: flex; align-items: center; justify-content: space-between; text-decoration: none; color: var(--tk-text);
  font-size: 1.28rem; font-weight: 700; margin-bottom: 0.8rem;
}
.tk-card-link::after { content: "›"; font-size: 1.7rem; line-height: 1; color: var(--tk-text-2); }
.tk-chart { width: 100%; min-height: 200px; }
.tk-chart-caption { font-size: 0.84rem; color: var(--tk-muted); margin: 0.2rem 0 0 0; }

/* Gunluk/Haftalik gecis dugmesi (segmented control) */
.tk-segmented { display: inline-flex; border: 1px solid var(--tk-border-strong); border-radius: 10px; overflow: hidden; background: var(--tk-surface); }
.tk-segmented button {
  min-height: 2.4rem; padding: 0 1.1rem; font-size: 0.92rem; background: transparent; border: none; cursor: pointer; color: var(--tk-text-2);
}
.tk-segmented button + button { border-left: 1px solid var(--tk-border-strong); }
.tk-segmented button[aria-pressed="true"] { background: var(--tk-brand-soft); color: var(--tk-brand-text); font-weight: 600; }

/* ---------- KPI karti ---------- */
.tk-kpi {
  display: flex; gap: 1.1rem; align-items: flex-start; background: var(--tk-surface);
  border: 1px solid var(--tk-border); border-radius: 18px; padding: 1.2rem 1.25rem; height: 100%;
  box-shadow: var(--tk-shadow); min-height: 8.4rem; margin-bottom: 0.9rem; min-width: 0;
}
.tk-icon-tile {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0; display: flex; align-items: center;
  justify-content: center; background: var(--tone-bg); color: var(--tone-fg);
}
.tk-kpi-body { min-width: 0; }
.tk-kpi-label { font-size: 1rem; color: var(--tk-text-2); font-weight: 500; margin-top: 0.1rem; }
.tk-kpi-value { font-size: 1.95rem; font-weight: 800; color: var(--tk-text); letter-spacing: -0.02em; line-height: 1.25; margin: 0.2rem 0 0.35rem 0; white-space: nowrap; }
.tk-kpi-body { flex: 1; overflow: hidden; }
.tk-kpi-foot { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; }
.tk-delta { display: inline-flex; align-items: center; gap: 0.15rem; font-weight: 600; font-size: 0.92rem; }
.tk-delta.tk-good { color: var(--tk-good); }
.tk-delta.tk-bad { color: var(--tk-bad); }
.tk-delta-note { color: var(--tk-muted); font-size: 0.9rem; }
.tk-kpi.tk-tinted { background: linear-gradient(180deg, var(--tone-tint) 0%, var(--tk-surface) 100%); border-color: var(--tone-border); }
.tk-kpi[title] { cursor: help; }

.tk-tone-orange { --tone-bg: #ffe6d5; --tone-fg: #f27a1a; --tone-tint: #fff7f1; --tone-border: #fbe6d8; }
.tk-tone-red    { --tone-bg: #fde0e0; --tone-fg: #e5484d; --tone-tint: #fff6f6; --tone-border: #f8e1e1; }
.tk-tone-peach  { --tone-bg: #ffe2cf; --tone-fg: #f06a1d; --tone-tint: #fff7f2; --tone-border: #fbe5d7; }
.tk-tone-green  { --tone-bg: #d5f2e4; --tone-fg: #14a067; --tone-tint: #eefaf5; --tone-border: #d3eee1; }
.tk-tone-teal   { --tone-bg: #d3f1ea; --tone-fg: #0f9a80; --tone-tint: #effaf7; --tone-border: #d2ede6; }
.tk-tone-violet { --tone-bg: #e9e7fe; --tone-fg: #5847e0; --tone-tint: #f7f6ff; --tone-border: #e6e3fb; }
.tk-tone-blue   { --tone-bg: #deebfd; --tone-fg: #2a78d6; --tone-tint: #f4f8ff; --tone-border: #dee8f8; }

:root[data-theme="dark"] .tk-tone-orange, :root[data-theme="dark"] .tk-tone-red, :root[data-theme="dark"] .tk-tone-peach,
:root[data-theme="dark"] .tk-tone-green, :root[data-theme="dark"] .tk-tone-teal, :root[data-theme="dark"] .tk-tone-violet,
:root[data-theme="dark"] .tk-tone-blue { --tone-tint: #1c1e24; --tone-border: #2a2d35; }
:root[data-theme="dark"] .tk-tone-orange { --tone-bg: rgba(242,122,26,.18); --tone-fg: #ff9a4d; }
:root[data-theme="dark"] .tk-tone-red    { --tone-bg: rgba(229,72,77,.18);  --tone-fg: #ff7b7f; }
:root[data-theme="dark"] .tk-tone-peach  { --tone-bg: rgba(240,106,29,.18); --tone-fg: #ff9a5c; }
:root[data-theme="dark"] .tk-tone-green  { --tone-bg: rgba(20,160,103,.2);  --tone-fg: #3fd198; }
:root[data-theme="dark"] .tk-tone-teal   { --tone-bg: rgba(15,154,128,.2);  --tone-fg: #3ccfb2; }
:root[data-theme="dark"] .tk-tone-violet { --tone-bg: rgba(88,71,224,.22);  --tone-fg: #a79cff; }
:root[data-theme="dark"] .tk-tone-blue   { --tone-bg: rgba(42,120,214,.22); --tone-fg: #6aa8f0; }

/* Mini metrik karti (sag panel: Harcama / ROAS) */
.tk-kpi.tk-mini { min-height: 0; background: var(--tk-soft); border-radius: 16px; padding: 1.1rem; margin-bottom: 0.75rem; gap: 1rem; }
.tk-kpi.tk-mini.tk-tinted { background: linear-gradient(180deg, var(--tone-tint) 0%, var(--tk-surface) 100%); border-color: var(--tone-border); }
.tk-kpi.tk-mini .tk-kpi-value { font-size: 1.75rem; }

/* ---------- Detay tablosu (HTML) ---------- */
.tk-table-wrap { overflow-x: auto; }
.tk-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 0; }
.tk-table th {
  background: var(--tk-soft); color: var(--tk-text-2); font-weight: 600; text-align: left;
  padding: 0.8rem 1rem; border-top: 1px solid var(--tk-border); border-bottom: 1px solid var(--tk-border); white-space: nowrap;
}
.tk-table th .tk-sort { color: var(--tk-muted); margin-left: 0.25rem; font-size: 0.8rem; }
.tk-table td { padding: 0.9rem 1rem; border-bottom: 1px solid var(--tk-border); color: var(--tk-text); vertical-align: middle; white-space: nowrap; }
.tk-table tr:last-child td { border-bottom: none; }
.tk-table td:first-child, .tk-table th:first-child { padding-left: 1.35rem; }
.tk-table td.tk-chev { color: var(--tk-muted); width: 2rem; text-align: right; padding-right: 1.35rem; }
.tk-table .tk-num { display: inline-block; min-width: 4.6rem; }
.tk-table .tk-delta { font-size: 0.85rem; margin-left: 0.4rem; }
.tk-camp { display: flex; align-items: center; gap: 0.85rem; }
.tk-camp .tk-icon-tile { width: 38px; height: 38px; border-radius: 10px; }
.tk-camp-name { font-weight: 600; color: var(--tk-text); }
.tk-camp-desc { font-size: 0.82rem; color: var(--tk-muted); margin-top: 0.1rem; }

/* ---------- Veri tablosu ---------- */
.tk-dt-toolbar { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.6rem; }
.tk-dt-toolbar .tk-input { max-width: 22rem; }
.tk-dt-count { color: var(--tk-muted); font-size: 0.85rem; margin-left: auto; }
.tk-dt-scroll { overflow: auto; max-height: 34rem; border: 1px solid var(--tk-border); border-radius: 10px; }
.tk-dt { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 0.86rem; }
.tk-dt th {
  position: sticky; top: 0; background: var(--tk-soft); color: var(--tk-text-2); font-weight: 600; text-align: left;
  padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--tk-border); white-space: nowrap; cursor: pointer; user-select: none; z-index: 1;
}
.tk-dt th:hover { color: var(--tk-brand-text); }
.tk-dt th .tk-sort-ind { color: var(--tk-brand-text); margin-left: 0.25rem; }
.tk-dt td { padding: 0.42rem 0.7rem; border-bottom: 1px solid var(--tk-border); white-space: nowrap; max-width: 24rem; overflow: hidden; text-overflow: ellipsis; }
.tk-dt td.tk-right, .tk-dt th.tk-right { text-align: right; font-variant-numeric: tabular-nums; }
.tk-dt tr:hover td { background: var(--tk-soft); }
.tk-dt td.tk-null { color: var(--tk-muted); }
.tk-dt-pager { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin: 0.6rem 0; flex-wrap: wrap; }
.tk-dt-downloads { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 0.6rem; }

/* Sekmeler */
.tk-tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--tk-border); margin-bottom: 1rem; }
.tk-tabs button {
  background: none; border: none; padding: 0.6rem 0.9rem; cursor: pointer; font-size: 0.95rem; color: var(--tk-text-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tk-tabs button[aria-selected="true"] { color: var(--tk-brand-text); border-bottom-color: var(--tk-brand); font-weight: 600; }

/* Uyari kutulari (bilgi / uyari / basari / hata) */
.tk-alert { border-radius: 10px; padding: 0.85rem 1rem; font-size: 0.95rem; margin: 0.4rem 0 1rem 0; }
.tk-alert.tk-info-box { background: var(--tk-info-bg); color: var(--tk-info-fg); }
.tk-alert.tk-warn-box { background: var(--tk-warn-bg); color: var(--tk-warn-fg); }
.tk-alert.tk-ok-box { background: var(--tk-ok-bg); color: var(--tk-ok-fg); }
.tk-alert.tk-err-box { background: var(--tk-err-bg); color: var(--tk-err-fg); }

/* Acilir bolum */
.tk-expander { border: 1px solid var(--tk-border); border-radius: 12px; margin-bottom: 0.6rem; background: var(--tk-surface); }
.tk-expander summary { padding: 0.8rem 1rem; cursor: pointer; font-weight: 500; }
.tk-expander > div { padding: 0 1rem 1rem 1rem; }
.tk-divider { border: none; border-top: 1px solid var(--tk-border); margin: 1.5rem 0; }
.tk-subheader { font-size: 1.35rem; font-weight: 700; margin: 0 0 0.8rem 0; }

/* Yukleniyor */
.tk-loading { display: flex; align-items: center; gap: 0.7rem; color: var(--tk-muted); padding: 2rem 0.2rem; }
/* Kosan tavsan: yukseklik JS ile (fitLoaders) ekranin altina kadar; JS yuklenmeden once
 * (ilk acilis) icerik alaninin tamami - main ust/alt boslugu (1.4rem + 2.5rem) dusulur. */
.tk-loading.tk-loading-anim { justify-content: center; padding: 0; min-height: 260px; height: calc(100vh - 3.9rem); height: calc(100dvh - 3.9rem); }
/* Gorselin zemini (#fcfbfc) sayfa zeminiyle ayni tonda; kenarlar yumusak gecisle kaybolur. */
.tk-loading-img { display: block; width: min(560px, 90%); height: auto;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 48%, transparent 74%); mask-image: radial-gradient(ellipse at center, #000 48%, transparent 74%); }
:root[data-theme="dark"] .tk-loading-img { -webkit-mask-image: none; mask-image: none; border-radius: 18px; }

/* Bildirimler */
.tk-toasts { position: fixed; right: 1.2rem; bottom: 1.2rem; display: flex; flex-direction: column; gap: 0.5rem; z-index: 100; }
.tk-toast {
  background: var(--tk-surface); color: var(--tk-text); border: 1px solid var(--tk-border-strong); border-radius: 12px;
  padding: 0.75rem 1rem; box-shadow: 0 10px 30px rgba(16,24,40,.15); max-width: 22rem; font-size: 0.92rem;
  animation: tk-toast-in .2s ease-out;
}
@keyframes tk-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Profil */
.tk-profile { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1rem; }
.tk-avatar { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.tk-avatar-fallback { background: #2a78d6; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; font-weight: 700; }
.tk-profile-name { font-size: 1.5rem; font-weight: 700; margin: 0; }
code { background: var(--tk-soft); padding: 0.1rem 0.35rem; border-radius: 5px; font-size: 0.88em; }

/* ---------- Duyarli (mobil) yerlesim ---------- */
@media (max-width: 1500px) {
  .tk-header.tk-header-wide { grid-template-columns: 1fr; }
}
@media (max-width: 1200px) {
  .tk-header { grid-template-columns: minmax(0, 1fr); }
  .tk-grid.tk-g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tk-grid.tk-main-side, .tk-grid.tk-left-right { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .tk-sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s ease; box-shadow: none; }
  .tk-sidebar.tk-open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.25); }
  .tk-sidebar-backdrop.tk-open { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 35; }
  .tk-icon-btn.tk-menu-btn { display: inline-flex; margin-bottom: 0.8rem; }
  .tk-icon-btn.tk-sidebar-close { display: inline-flex; }
  .tk-main { padding: 1rem 16px 2rem 16px; }
  .tk-grid.tk-g2, .tk-grid.tk-g3 { grid-template-columns: minmax(0, 1fr); }
  .tk-header-filters, .tk-header-filters.tk-cols-4 { grid-template-columns: 1fr; }
  .tk-title { font-size: 1.7rem; }
}
@media (max-width: 600px) {
  .tk-grid.tk-g4 { grid-template-columns: minmax(0, 1fr); }
  .tk-kpi-value { font-size: 1.6rem; }
  .tk-dt-downloads { grid-template-columns: 1fr; }
}

/* ---------- Tek takvimli tarih araligi secici (Özel Tarih) ---------- */
.tk-cal { width: 17.5rem; margin: 0.2rem 0 0.4rem 0; }
.tk-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.4rem; }
.tk-cal-title { font-weight: 600; font-size: 0.95rem; }
.tk-cal-nav {
  width: 2rem; height: 2rem; border-radius: 8px; border: 1px solid var(--tk-border-strong); background: var(--tk-surface);
  cursor: pointer; font-size: 1.1rem; line-height: 1; color: var(--tk-text);
}
.tk-cal-nav:hover { border-color: var(--tk-brand); color: var(--tk-brand-text); }
.tk-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px 0; }
.tk-cal-wd { font-size: 0.72rem; color: var(--tk-muted); text-align: center; padding: 0.2rem 0; font-weight: 600; }
.tk-cal-day {
  height: 2.2rem; border: none; background: transparent; cursor: pointer; font-size: 0.86rem; color: var(--tk-text);
  border-radius: 8px; font-variant-numeric: tabular-nums;
}
.tk-cal-day:hover { background: var(--tk-soft); }
.tk-cal-today { font-weight: 700; color: var(--tk-brand-text); }
.tk-cal-in { background: var(--tk-brand-soft); border-radius: 0; }
.tk-cal-start, .tk-cal-end { background: var(--tk-brand) !important; color: #fff !important; font-weight: 700; }
.tk-cal-start:not(.tk-cal-end) { border-radius: 8px 0 0 8px; }
.tk-cal-end:not(.tk-cal-start) { border-radius: 0 8px 8px 0; }
.tk-cal-day:focus-visible, .tk-cal-nav:focus-visible { outline: 2px solid var(--tk-brand); outline-offset: 1px; }
.tk-cal-summary { display: flex; flex-direction: column; gap: 0.1rem; margin-top: 0.5rem; font-size: 0.85rem; color: var(--tk-muted); }
.tk-cal-summary strong { color: var(--tk-text); font-weight: 600; }

/* ---------- Kampanya raporlari (Trendyol Kampanya Verileri) ---------- */
.tk-report-table { font-size: 0.88rem; }
.tk-report-table th, .tk-report-table td { padding: 0.7rem 0.8rem; }
.tk-report-table td:first-child { white-space: normal; min-width: 16rem; max-width: 26rem; }
.tk-table th.tk-right, .tk-table td.tk-right { text-align: right; font-variant-numeric: tabular-nums; }
.tk-pill { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.tk-pill-ok { background: var(--tk-ok-bg); color: var(--tk-ok-fg); }
.tk-pill-bad { background: var(--tk-err-bg); color: var(--tk-err-fg); }
.tk-pill-muted { background: var(--tk-soft); color: var(--tk-muted); }
[data-role="creports"] .tk-tabs { margin-bottom: 0; }
[data-role="creports"] [role="tabpanel"] { margin: 0 -1.35rem; }

/* ---------- Musteri Analizi (CRM) ---------- */
.tk-grid.tk-g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tk-header-filters.tk-cols-3 { grid-template-columns: 1fr 1.25fr 1fr; }
.tk-freq { display: flex; flex-direction: column; gap: 1.1rem; margin-top: 0.8rem; }
.tk-freq-row { display: grid; grid-template-columns: 5.5rem 1fr 5.5rem; gap: 0.8rem; align-items: center; }
.tk-freq-label { font-weight: 600; font-size: 0.92rem; }
.tk-freq-track { height: 1.6rem; background: var(--tk-soft); border-radius: 6px; overflow: hidden; }
.tk-freq-bar { height: 100%; width: 0; border-radius: 6px; transition: width 1.1s cubic-bezier(0.65, 0, 0.35, 1); }
.tk-freq-val { text-align: right; line-height: 1.2; }
.tk-freq-val strong { display: block; font-size: 1rem; }
.tk-freq-val span { font-size: 0.78rem; color: var(--tk-muted); }
.tk-transitions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 0.8rem; }
.tk-transition { background: var(--tk-soft); border-radius: 14px; padding: 1rem 1.1rem; }
.tk-transition-title { font-size: 0.9rem; color: var(--tk-text-2); font-weight: 600; }
.tk-transition-rate { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.02em; margin: 0.2rem 0; }
.tk-transition-meta { font-size: 0.82rem; color: var(--tk-muted); }
.tk-cohort { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: 0.88rem; }
.tk-cohort th { font-weight: 600; color: var(--tk-text-2); padding: 0.45rem; text-align: center; background: var(--tk-soft); border-radius: 6px; }
.tk-cohort th:first-child, .tk-cohort td:first-child { text-align: left; }
.tk-cohort td { padding: 0.55rem 0.5rem; text-align: center; border-radius: 6px; font-variant-numeric: tabular-nums; }
.tk-cohort td.tk-na { background: var(--tk-soft); color: var(--tk-muted); font-size: 0.75rem; }
.tk-cohort td.tk-cohort-size { color: var(--tk-muted); text-align: right; }
.tk-seg-row { cursor: pointer; }
.tk-seg-row:hover td { background: var(--tk-soft); }
.tk-seg-row[aria-selected="true"] td { background: var(--tk-brand-soft); }
.tk-seg-row[aria-selected="true"] td:first-child { box-shadow: inset 3px 0 0 var(--tk-brand); }
@media (max-width: 1400px) { .tk-grid.tk-g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .tk-grid.tk-g5, .tk-transitions { grid-template-columns: minmax(0, 1fr); }
  .tk-header-filters.tk-cols-3 { grid-template-columns: 1fr; }
}

/* 5'li KPI satirinda ikon ustte - dar kartlarda metin kirilmasin */
.tk-grid.tk-g5 .tk-kpi { flex-direction: column; gap: 0.7rem; min-height: 0; }
.tk-grid.tk-g5 .tk-icon-tile { width: 42px; height: 42px; border-radius: 12px; }
.tk-grid.tk-g5 .tk-kpi-body { width: 100%; }
.tk-seg-table th, .tk-seg-table td { padding-left: 0.8rem; padding-right: 0.8rem; }

/* Logo varken marka adi kenar cubuguna sigsin */
.tk-brand:has(.tk-brand-logo) .tk-brand-name { font-size: 1.3rem; white-space: nowrap; }

/* ---------- Reklam Analizi: donusum hunisi ---------- */
.tk-funnel { display: grid; grid-template-columns: minmax(0, 1fr) 8.5rem; gap: 0.6rem 1rem; align-items: center; margin-top: 0.8rem; }
.tk-funnel-step {
  display: flex; align-items: center; gap: 0.8rem; padding: 0.75rem 1rem; border-radius: 12px;
  background: var(--tone-bg); color: var(--tk-text); margin: 0 auto; width: 100%;
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 14px 100%);
}
.tk-funnel-step:nth-child(3) { width: 88%; }
.tk-funnel-step:nth-child(5) { width: 76%; }
.tk-funnel-step svg { color: var(--tone-fg); flex-shrink: 0; }
.tk-funnel-step span { display: block; font-size: 0.8rem; color: var(--tk-text-2); }
.tk-funnel-step strong { font-size: 1.25rem; font-weight: 800; }
.tk-funnel-ratio { background: var(--tk-soft); border-radius: 10px; padding: 0.55rem 0.75rem; }
.tk-funnel-ratio span { display: block; font-size: 0.76rem; color: var(--tk-muted); }
.tk-funnel-ratio strong { font-size: 1.1rem; color: var(--tk-brand-text); }
.tk-funnel-extra { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 0.9rem; }

/* Kampanya Analizi: diger filtrelerden ayri, tek secimli satis kanali cubugu */
.tk-channel-bar { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin: -0.4rem 0 1.2rem 0; }
.tk-channel-bar .tk-label { margin: 0; font-weight: 600; }
.tk-channel-bar .tk-caption { margin: 0; }

/* Uzun aciklamali ilk sutun (orn. Web kampanyasi kupon kodlari) alt satira gecer - tablo tasmaz. */
.tk-table.tk-wrap-first td:first-child { white-space: normal; min-width: 16rem; }

/* Grafik indirme dugmesi (sag ust) - Plotly arac cubugu varsa onun soluna kayar */
.tk-chart-wrap { position: relative; }
.tk-chart-wrap .modebar-container { right: 2.6rem !important; }
.tk-chart-dl { position: absolute; top: 0.1rem; right: 0.1rem; z-index: 6; }
.tk-chart-dl-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 8px;
  border: 1px solid var(--tk-border); background: var(--tk-surface); color: var(--tk-muted); cursor: pointer; opacity: 0.75;
}
.tk-chart-wrap:hover .tk-chart-dl-btn, .tk-chart-dl-btn:focus-visible, .tk-chart-dl-btn[aria-expanded="true"] { opacity: 1; color: var(--tk-brand-text); border-color: var(--tk-brand); }
.tk-chart-dl-btn:disabled { cursor: progress; opacity: 0.5; }
.tk-chart-dl-menu {
  position: absolute; top: 2.3rem; right: 0; min-width: 15rem; padding: 0.3rem; border-radius: 10px;
  border: 1px solid var(--tk-border-strong); background: var(--tk-surface); box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}
.tk-chart-dl-menu button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; width: 100%; padding: 0.5rem 0.65rem;
  border: 0; border-radius: 7px; background: transparent; color: var(--tk-text); cursor: pointer; text-align: left; font: inherit;
}
.tk-chart-dl-menu button:hover, .tk-chart-dl-menu button:focus-visible { background: var(--tk-soft); }
.tk-chart-dl-menu button span { font-size: 0.8rem; color: var(--tk-muted); }

/* --- Siparisler tablosu (ikas stili) ------------------------------------------------ */
.tk-ot { display: flex; flex-direction: column; gap: 0.75rem; }
.tk-ot.tk-ot-loading .tk-ot-scroll { opacity: 0.55; transition: opacity 0.15s; }
.tk-ot-toolbar { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.tk-ot-spacer { flex: 1 1 auto; }
.tk-ot-search {
  display: flex; align-items: center; gap: 0.5rem; flex: 0 1 24rem; min-width: 12rem; height: 2.75rem; padding: 0 0.85rem;
  border: 1px solid var(--tk-border-strong); border-radius: 10px; background: var(--tk-surface); color: var(--tk-muted);
}
.tk-ot-search:focus-within { outline: 2px solid var(--tk-brand); outline-offset: 1px; }
.tk-ot-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--tk-text); font: inherit; }
.tk-ot-btn {
  display: inline-flex; align-items: center; gap: 0.45rem; height: 2.75rem; padding: 0 0.95rem; border-radius: 10px; white-space: nowrap;
  border: 1px solid var(--tk-border-strong); background: var(--tk-surface); color: var(--tk-text); font: inherit; font-weight: 600; cursor: pointer;
}
.tk-ot-btn:hover:not(:disabled), .tk-ot-btn[aria-expanded="true"] { border-color: var(--tk-brand); color: var(--tk-brand-text); }
.tk-ot-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.tk-ot-btn:focus-visible { outline: 2px solid var(--tk-brand); outline-offset: 1px; }
.tk-ot-icon { width: 2.75rem; justify-content: center; padding: 0; }
.tk-ot-badge { min-width: 1.3rem; height: 1.3rem; padding: 0 0.35rem; border-radius: 999px; background: var(--tk-brand); color: #fff; font-size: 0.75rem; display: inline-flex; align-items: center; justify-content: center; }
.tk-ot-drop { position: relative; }
.tk-ot-panel {
  position: absolute; top: calc(100% + 0.4rem); left: 0; z-index: 20; width: min(22rem, 90vw); max-height: 70vh; overflow: auto; padding: 0.85rem;
  border: 1px solid var(--tk-border-strong); border-radius: 12px; background: var(--tk-surface); box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}
.tk-ot-panel.tk-ot-right { left: auto; right: 0; width: min(16rem, 90vw); }
.tk-ot-group { border: 0; margin: 0 0 0.8rem 0; padding: 0; }
.tk-ot-group legend { font-weight: 700; font-size: 0.86rem; color: var(--tk-text-2); margin-bottom: 0.35rem; }
.tk-ot-check { display: flex; align-items: center; gap: 0.55rem; padding: 0.35rem 0.25rem; border-radius: 7px; cursor: pointer; }
.tk-ot-check:hover { background: var(--tk-soft); }
.tk-ot-check input { accent-color: var(--tk-brand); width: 1rem; height: 1rem; }
.tk-ot-check span:nth-of-type(1) { flex: 1; }
.tk-ot-count { color: var(--tk-muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.tk-ot-range-inputs { display: flex; align-items: center; gap: 0.5rem; }
.tk-ot-range-inputs .tk-input { min-height: 2.3rem; }
.tk-ot-actions { display: flex; justify-content: flex-end; gap: 0.5rem; position: sticky; bottom: -0.85rem; padding: 0.6rem 0 0.1rem; background: var(--tk-surface); }
.tk-ot-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.tk-ot-chip {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.55rem 0.3rem 0.7rem; border-radius: 999px; cursor: pointer; font: inherit; font-size: 0.84rem;
  border: 1px solid var(--tk-brand); background: var(--tk-brand-soft); color: var(--tk-brand-text);
}
.tk-ot-link { display: inline-flex; align-items: center; gap: 0.3rem; border: 0; background: none; padding: 0; color: var(--tk-brand-text); font: inherit; font-size: 0.86rem; cursor: pointer; }
.tk-ot-link:hover { text-decoration: underline; }
.tk-ot-selbar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 0.6rem 0.9rem; border-radius: 10px; background: var(--tk-brand-soft); }
.tk-ot-scroll { overflow-x: auto; border: 1px solid var(--tk-border); border-radius: 12px; }
.tk-ot-table { width: 100%; min-width: 68rem; border-collapse: collapse; font-size: 0.92rem; }
.tk-ot-table thead th {
  position: sticky; top: 0; background: var(--tk-soft); color: var(--tk-text-2); font-weight: 600; text-align: left; white-space: nowrap;
  padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--tk-border);
}
.tk-ot-table td { padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--tk-border); vertical-align: middle; white-space: nowrap; }
.tk-ot-table tbody tr:hover > td { background: var(--tk-soft); }
.tk-ot-table tr.tk-selected > td { background: var(--tk-brand-soft); }
.tk-ot-sel { width: 2.6rem; }
.tk-ot-sel input { accent-color: var(--tk-brand); width: 1.05rem; height: 1.05rem; cursor: pointer; }
.tk-ot-sort { display: inline-flex; align-items: center; gap: 0.45rem; border: 0; background: none; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.tk-ot-sort svg { color: var(--tk-muted); }
.tk-ot-sort.tk-active, .tk-ot-sort.tk-active svg { color: var(--tk-brand-text); }
.tk-ot-id { font-weight: 700; font-variant-numeric: tabular-nums; }
.tk-ot-main { color: var(--tk-text); }
.tk-ot-sub { color: var(--tk-muted); font-size: 0.82rem; }
.tk-ot-customer { max-width: 17rem; }
.tk-ot-customer > div { overflow: hidden; text-overflow: ellipsis; }
.tk-ot-items { font-size: 0.82rem; }
.tk-ot-pill { display: inline-block; padding: 0.18rem 0.5rem; border-radius: 6px; font-size: 0.8rem; font-weight: 600; border: 1px solid currentColor; }
.tk-ot-ok { color: var(--tk-ok-fg); background: var(--tk-ok-bg); }
.tk-ot-err { color: var(--tk-err-fg); background: var(--tk-err-bg); }
.tk-ot-warn { color: var(--tk-warn-fg); background: var(--tk-warn-bg); }
.tk-ot-info { color: var(--tk-info-fg); background: var(--tk-info-bg); }
.tk-ot-brand { color: var(--tk-brand-text); background: var(--tk-brand-soft); }
.tk-ot-muted { color: var(--tk-muted); background: var(--tk-soft); }
.tk-ot-channel { display: inline-flex; align-items: center; gap: 0.55rem; }
.tk-ot-chicon { display: inline-flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem; border-radius: 7px; border: 1px solid var(--tk-border); }
.tk-ot-ch-trendyol { background: #f27a1a; border-color: #f27a1a; color: #fff; }
.tk-ot-ch-web { background: var(--tk-surface); color: var(--tk-text-2); }
.tk-ot-ch-hepsiburada { background: #7b3fe4; border-color: #7b3fe4; color: #fff; }
.tk-ot-detail > td { background: var(--tk-soft); padding: 0.5rem 0.9rem 0.9rem 3.5rem; white-space: normal; }
.tk-ot-items-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.tk-ot-items-table th { text-align: left; color: var(--tk-muted); font-weight: 600; padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--tk-border); }
.tk-ot-items-table td { padding: 0.4rem 0.5rem; border-bottom: 0; white-space: normal; }
.tk-ot-items-table .tk-right { text-align: right; font-variant-numeric: tabular-nums; }
.tk-ot-footer { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.tk-ot-size { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--tk-muted); }
.tk-ot-size select { height: 2.4rem; padding: 0 0.6rem; border-radius: 8px; border: 1px solid var(--tk-border-strong); background: var(--tk-surface); color: var(--tk-text); font: inherit; }
.tk-ot-range { color: var(--tk-muted); font-variant-numeric: tabular-nums; }
.tk-ot-footer .tk-ot-btn { height: 2.4rem; font-weight: 500; }
/* hidden ozniteligi, yukaridaki display: flex / inline-flex kurallarina baskin gelsin */
.tk-ot [hidden] { display: none !important; }

/* --- Siparis detay sayfasi ----------------------------------------------------------- */
.tk-od-top { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.tk-od-top a.tk-ot-btn { text-decoration: none; }
.tk-od-crumb { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; min-width: 0; }
.tk-od-crumb a { color: var(--tk-brand-text); font-size: 1.35rem; font-weight: 600; text-decoration: none; }
.tk-od-crumb a:hover { text-decoration: underline; }
.tk-od-crumb .tk-od-sep { color: var(--tk-muted); font-size: 1.3rem; }
.tk-od-crumb h1 { margin: 0; font-size: 1.45rem; font-weight: 800; color: var(--tk-text); }
.tk-od-pos { color: var(--tk-muted); font-variant-numeric: tabular-nums; font-size: 0.88rem; }
.tk-od-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem); gap: 1.2rem; align-items: start; }
.tk-od-main { display: flex; flex-direction: column; min-width: 0; }
.tk-od-side { position: sticky; top: 1rem; }
.tk-od-cardhead { display: flex; align-items: center; gap: 0.6rem; padding: 1.1rem 1.35rem; border-bottom: 1px solid var(--tk-border); color: var(--tk-text-2); }
.tk-od-cardhead h2 { margin: 0; font-size: 1.12rem; font-weight: 700; color: var(--tk-text); }
.tk-od-headicon { display: inline-flex; padding: 0.3rem; border-radius: 8px; border: 1px solid currentColor; }
.tk-od-muted { color: var(--tk-muted); font-weight: 500; }
.tk-od-pad { padding: 1rem 1.35rem; }
.tk-od-pad0 { padding: 0.8rem 1.35rem 0; margin: 0; }
.tk-od-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tk-od-table th { background: var(--tk-soft); color: var(--tk-text-2); font-weight: 600; text-align: left; padding: 0.7rem 1rem; white-space: nowrap; }
.tk-od-table td { padding: 0.8rem 1rem; border-bottom: 1px solid var(--tk-border); vertical-align: middle; }
.tk-od-table .tk-right { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tk-od-table th:first-child, .tk-od-table td:first-child { padding-left: 1.35rem; }
.tk-od-product { font-weight: 600; color: var(--tk-text); }
.tk-od-facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.2rem; margin: 0; padding: 1rem 1.35rem 1.2rem; }
.tk-od-facts dt { color: var(--tk-muted); }
.tk-od-facts dd { margin: 0; color: var(--tk-text); }
.tk-od-mono { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.tk-od-customer { padding: 1rem 1.35rem 0; display: flex; flex-direction: column; gap: 0.3rem; }
.tk-od-cname { color: var(--tk-brand-text); font-weight: 700; font-size: 1.05rem; }
.tk-od-member { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.86rem; color: var(--tk-text-2); }
.tk-od-note { padding: 0 1.35rem 1rem; margin: 0; }
.tk-od-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 0.75rem; padding: 1rem 1.35rem; }
.tk-od-stat { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.75rem 0.9rem; border: 1px solid var(--tk-border); border-radius: 10px; background: var(--tk-soft); }
.tk-od-stat span { color: var(--tk-muted); font-size: 0.82rem; }
.tk-od-stat strong { color: var(--tk-text); font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.tk-od-stat small { color: var(--tk-muted); font-size: 0.78rem; }
.tk-od-history td { white-space: nowrap; }
.tk-od-history td.tk-od-products { white-space: normal; min-width: 9rem; color: var(--tk-text-2); }
.tk-od-history th, .tk-od-history td { padding-left: 0.75rem; padding-right: 0.75rem; }
.tk-od-history tr.tk-od-current > td { background: var(--tk-brand-soft); }
.tk-od-this { display: inline-block; margin-left: 0.3rem; padding: 0.05rem 0.4rem; border-radius: 6px; font-size: 0.74rem; background: var(--tk-brand); color: #fff; }
.tk-od-when { font-size: 1.02rem; color: var(--tk-text); margin-bottom: 0.6rem; }
.tk-od-lines { padding: 0.2rem 1.35rem 1rem; }
.tk-od-line { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-top: 1px solid var(--tk-border); font-variant-numeric: tabular-nums; }
.tk-od-muted-line { color: var(--tk-muted); }
.tk-od-total { font-size: 1.1rem; color: var(--tk-text); }
.tk-ot-table a.tk-ot-id { color: var(--tk-text); text-decoration: none; }
.tk-ot-table a.tk-ot-id:hover { color: var(--tk-brand-text); text-decoration: underline; }
.tk-ot-table tbody tr[data-key] { cursor: pointer; }
@media (max-width: 1100px) {
  .tk-od-grid { grid-template-columns: minmax(0, 1fr); }
  .tk-od-side { position: static; order: -1; }
}
/* Sayfalama cubugu tek sayfada gizlenir - display: flex kuralina baskin gelsin */
.tk-dt-pager[hidden] { display: none; }
/* Gecmis tablosunda "bu sipariş" etiketi numaranin altina gecebilir - tablo tasmaz */
.tk-od-history td:nth-child(2) { white-space: normal; }
.tk-od-history td:last-child, .tk-od-history th:last-child { padding-right: 1.35rem; }

/* Siparisler > supheli hesaplar tablosu */
#sp-suspicious { margin-top: 1.2rem; }
.tk-sus-list { margin: 0 0 1rem 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.35rem; }
.tk-sus-list li { padding: 0.45rem 0.75rem; border-radius: 8px; background: var(--tk-soft); }
.tk-sus-count { color: var(--tk-text-2); font-variant-numeric: tabular-nums; }

/* Tiklanabilir tablo satiri (orn. musteri -> son siparis detayi) */
.tk-dt tr.tk-dt-link { cursor: pointer; }
.tk-dt tr.tk-dt-link td:first-child a { color: var(--tk-brand-text); font-weight: 600; text-decoration: none; }
.tk-dt tr.tk-dt-link td:first-child a:hover { text-decoration: underline; }
#crm-suspicious { margin-top: 1.2rem; }

/* Genel Bakis > Giderler dokumu */
.tk-ovp-list { display: flex; flex-direction: column; gap: 0.45rem; margin-top: 1rem; }
.tk-ovp-row { display: grid; grid-template-columns: 10rem minmax(4rem, 1fr) 4.5rem 9.5rem 5rem; align-items: center; gap: 0.75rem; font-size: 0.9rem; }
.tk-ovp-name { color: var(--tk-text-2); }
.tk-ovp-bar { height: 0.55rem; border-radius: 999px; background: var(--tk-soft); overflow: hidden; }
.tk-ovp-bar span { display: block; height: 100%; border-radius: 999px; background: var(--tk-bad); opacity: 0.75; }
.tk-ovp-share, .tk-ovp-val, .tk-ovp-ch { text-align: right; font-variant-numeric: tabular-nums; }
.tk-ovp-share { color: var(--tk-muted); }
.tk-ovp-ch.tk-good { color: var(--tk-good); }
.tk-ovp-ch.tk-bad { color: var(--tk-bad); }
@media (max-width: 720px) { .tk-ovp-row { grid-template-columns: 1fr 4rem 7.5rem; } .tk-ovp-bar, .tk-ovp-ch { display: none; } }

/* Urun Analizi > ROM hesaplayici */
.tk-rom-controls { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.tk-rom-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.tk-rom-table td, .tk-rom-table th { white-space: nowrap; }
.tk-rom-input { width: 6.2rem; min-height: 2.2rem; padding: 0.35rem 0.55rem; text-align: right; font-variant-numeric: tabular-nums; }
.tk-rom-table th, .tk-rom-table td { padding-left: 0.6rem; padding-right: 0.6rem; }
.tk-rom-table th:first-child, .tk-rom-table td:first-child { padding-left: 1rem; }
.tk-rom-table .tk-good, .tk-rom-val.tk-good { color: var(--tk-good); }
.tk-rom-table .tk-bad, .tk-rom-val.tk-bad { color: var(--tk-bad); }
.tk-rom-val { font-size: 1.02rem; }

/* Genel Bakis > gider grafikleri (kartin altinda yan yana) */
.tk-ovp-charts { margin-top: 1.4rem; }
.tk-ovp-chart { min-width: 0; padding-top: 1rem; border-top: 1px solid var(--tk-border); }
.tk-ovp-empty { min-height: 8rem; display: flex; align-items: center; justify-content: center; }
/* Dar ekranda (<=900px) sayfanin ustunde menu dugmesi var: ilk acilista (JS'den once)
 * yukleme alani main bosluklari (1rem + 2rem) + dugme (2.4rem + 0.8rem) kadar kisalir. */
@media (max-width: 900px) {
  .tk-loading.tk-loading-anim { height: calc(100vh - 6.2rem); height: calc(100dvh - 6.2rem); }
}
.tk-rom-input.tk-rom-rate { width: 5.2rem; }
.tk-rom-auto { color: var(--tk-text-2); }
/* ROM tablosu (komisyon orani sutunuyla) karta sigsin: urun adi iki satira gecebilir, girdiler dar */
.tk-rom-table td:first-child { white-space: normal; min-width: 8.5rem; }
.tk-rom-input { width: 5.4rem; padding: 0.35rem 0.45rem; }
.tk-rom-input.tk-rom-rate { width: 4.4rem; }
.tk-rom-table th { white-space: normal; vertical-align: bottom; }

/* Kampanya Analizi > İndirim Kuponları > Kupon Etkisi */
.tk-dc-impact { scroll-margin-top: 1rem; }
.tk-dc-impact-controls { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; margin-bottom: 1rem; }
.tk-dc-impact-controls .tk-field { margin-bottom: 0; flex: 1 1 18rem; max-width: 30rem; }
.tk-dc-impact-controls .tk-segmented { flex-wrap: wrap; }
.tk-clickable .nsewdrag, .tk-clickable .bars path { cursor: pointer !important; }

/* ---------- Giris sayfasi ve hesap karti ---------- */
.tk-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem 1rem; }
.tk-login-card { width: 100%; max-width: 25rem; padding: 2rem 1.75rem 1.5rem 1.75rem; }
.tk-login-brand { margin-bottom: 1.6rem; }
.tk-login-title { font-size: 1.25rem; font-weight: 700; margin: 0 0 1.1rem 0; }
.tk-login-note { margin-top: 1rem; text-align: center; }
.tk-account { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.2rem 0.8rem 0.1rem; }
.tk-account-avatar {
  width: 2.3rem; height: 2.3rem; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: var(--tk-brand-soft); color: var(--tk-brand-text); font-weight: 700;
}
.tk-account-text { min-width: 0; flex: 1; line-height: 1.25; }
.tk-account-name { font-weight: 600; font-size: 0.95rem; color: var(--tk-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-account-role { font-size: 0.78rem; color: var(--tk-muted); }
.tk-account-actions { display: flex; gap: 0.4rem; margin-bottom: 0.4rem; }
.tk-account-actions .tk-btn { flex: 1; min-height: 2.2rem; font-size: 0.85rem; padding: 0 0.6rem; }
.tk-user-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }
.tk-user-actions .tk-btn { min-height: 2rem; font-size: 0.82rem; padding: 0 0.7rem; }
.tk-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0 1rem; }

/* --- Ödeme Takvimi ------------------------------------------------------------------- */
.tk-pay-explain { font-size: 0.95rem; line-height: 1.55; color: var(--tk-text); }
.tk-pay-explain p { margin: 0.5rem 0; }
.tk-pay-explain ul { margin: 0.3rem 0 0.7rem; padding-left: 1.3rem; }
.tk-pay-explain li { margin: 0.25rem 0; }
.tk-pay-explain + .tk-note span { min-width: 0; overflow-wrap: anywhere; }
.tk-pay-rules { max-width: 640px; margin: 0.6rem 0 0.8rem; }
.tk-pay-rules td, .tk-pay-rules th { padding: 0.6rem 1rem; }
.tk-pay-rules .tk-dot, .tk-pay-src .tk-dot { display: inline-block; vertical-align: middle; }
.tk-pay-table td { vertical-align: top; }
.tk-pay-table td.tk-pay-sources { white-space: normal; min-width: min(360px, 55vw); }
.tk-pay-src { display: flex; align-items: baseline; gap: 0.5rem; margin: 0.15rem 0; white-space: normal; }
.tk-pay-src .tk-dot { flex-shrink: 0; transform: translateY(-1px); }
.tk-pay-skip { font-size: 0.82rem; color: var(--tk-muted); margin-top: 0.3rem; white-space: normal; }
.tk-pay-table tr.tk-pay-past td { color: var(--tk-text-2, var(--tk-text)); }
.tk-pay-table tr.tk-pay-today td { background: var(--tk-brand-soft); }
.tk-pay-table tr.tk-pay-today td:first-child { box-shadow: inset 3px 0 0 var(--tk-brand); }
@media (max-width: 640px) {
  .tk-pay-table thead { display: none; }
  .tk-pay-table tr { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--tk-border); }
  .tk-pay-table td { border-bottom: 0; padding: 0.7rem 0.9rem 0.2rem; }
  .tk-pay-table td:first-child { padding-left: 0.9rem; }
  .tk-pay-table td.tk-pay-sources { grid-column: 1 / -1; min-width: 0; padding-top: 0.2rem; padding-bottom: 0.8rem; }
}
.tk-pay-table tr.tk-pay-weekend td { background: var(--tk-soft); }
