:root {
  --tk-bg: #ffffff;
  --tk-panel: #ffffff;
  --tk-text: #14532d;
  --tk-muted: #64748b;
  --tk-border: #e2e8f0;
  --tk-primary: #059669;
  --tk-primary-dark: #047857;
  --tk-accent: #f97316;
  --tk-accent-dark: #ea580c;
  --tk-danger: #ef4444;
  --tk-ok: #16a34a;
  --tk-rail: #064e3b;
  --tk-shadow: 0 18px 40px rgba(5, 150, 105, 0.10);
  --tk-radius: 18px;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.tk-body {
  font-family: var(--font);
  color: var(--tk-text);
  background:
    radial-gradient(circle at 92% 4%, rgba(249, 115, 22, 0.14), transparent 34%),
    radial-gradient(circle at 8% 12%, rgba(5, 150, 105, 0.12), transparent 32%),
    linear-gradient(165deg, #ffffff 0%, #f8fafc 48%, #ecfdf5 100%);
}

.tk-rail {
  position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 80;
  background: linear-gradient(180deg, #064e3b 0%, #047857 48%, #059669 100%);
  color: #ecfdf5; padding: 22px 16px; display: flex; flex-direction: column; gap: 18px;
  transition: transform .22s ease, width .2s ease;
}
.tk-brand { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.tk-brand strong { display: block; font-size: 1rem; }
.tk-brand small { opacity: .75; }
.tk-brand-text { min-width: 0; }

/* Mobile top bar — hidden on desktop */
.tk-mobile-bar {
  display: none;
  position: sticky; top: 0; z-index: 70;
  align-items: center; gap: 10px;
  padding: 10px 12px;
  padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--tk-border);
}
.tk-nav-toggle {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--tk-border);
  background: #fff; color: #064e3b; font-size: 1.1rem; cursor: pointer;
  display: grid; place-items: center; flex-shrink: 0;
}
.tk-mobile-brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: #064e3b;
  font-weight: 800; min-width: 0; flex: 1;
}
.tk-mobile-brand .tk-brand-mark { width: 34px; height: 34px; border-radius: 10px; font-size: .95rem; }
.tk-mobile-brand strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-mobile-quick {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--tk-border);
  background: #fff; color: #059669; display: grid; place-items: center; text-decoration: none; flex-shrink: 0;
}
.tk-nav-backdrop {
  position: fixed; inset: 0; z-index: 75;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(2px);
}
.tk-brand-mark {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, #f97316, #fb923c); color: #fff; font-weight: 800;
  border: 1px solid rgba(255,255,255,.22);
}
.tk-brand-mark.lg { width: 56px; height: 56px; font-size: 1.35rem; }
.tk-nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tk-nav a {
  color: #d1fae5; text-decoration: none; padding: 12px 14px; border-radius: 12px;
  display: flex; gap: 12px; align-items: center; font-weight: 600; font-size: .92rem;
  border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s;
}
.tk-nav a i { width: 20px; text-align: center; font-size: 1.05rem; opacity: .92; }
.tk-nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.tk-nav a.active {
  background: rgba(255,255,255,.2);
  color: #fff;
  font-weight: 800;
  border-color: rgba(255,255,255,.22);
  box-shadow: inset 3px 0 0 #f97316;
}
.tk-rail-foot { border-top: 1px solid rgba(255,255,255,.14); padding-top: 14px; display: grid; gap: 10px; }
.tk-user { display: flex; gap: 10px; align-items: center; }
.tk-user strong { display: block; font-size: .92rem; }
.tk-user small { opacity: .7; font-size: .78rem; }
.tk-link-btn {
  background: transparent; border: 1px solid rgba(255,255,255,.25); color: #ecfdf5;
  border-radius: 10px; padding: 8px 10px; cursor: pointer; width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 600;
}

.tk-main { margin-left: 260px; padding: 28px; min-height: 100vh; min-width: 0; }
.tk-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; gap: 16px; }
.tk-top-copy { min-width: 0; flex: 1; }
.tk-top-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex-shrink: 0; }
.tk-top h1 { margin: 0 0 4px; font-size: clamp(1.35rem, 4vw, 1.7rem); letter-spacing: -.02em; color: #064e3b; }
.tk-top p { margin: 0; color: var(--tk-muted); max-width: 52ch; line-height: 1.45; }

.tk-btn {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 12px; border: 0;
  padding: 11px 16px; font-weight: 700; cursor: pointer; text-decoration: none; font-family: inherit;
}
.tk-btn.sm { padding: 8px 12px; font-size: .88rem; }
.tk-btn.block { width: 100%; justify-content: center; }
.tk-btn-primary { background: var(--tk-primary); color: #fff; box-shadow: 0 10px 24px rgba(5,150,105,.28); }
.tk-btn-primary:hover { background: var(--tk-primary-dark); }
.tk-btn-accent { background: var(--tk-accent); color: #fff; box-shadow: 0 10px 24px rgba(249,115,22,.28); }
.tk-btn-accent:hover { background: var(--tk-accent-dark); }
.tk-btn-ghost { background: #fff; color: var(--tk-text); border: 1px solid var(--tk-border); }

.tk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tk-stats article {
  background: var(--tk-panel); border: 1px solid var(--tk-border); border-radius: var(--tk-radius);
  padding: 18px; box-shadow: var(--tk-shadow);
}
.tk-stats span { color: var(--tk-muted); font-size: .86rem; font-weight: 600; }
.tk-stats strong { display: block; margin-top: 8px; font-size: 1.8rem; letter-spacing: -.03em; color: #064e3b; }
.tk-stats strong.warn { color: #ea580c; }

.tk-panel {
  background: var(--tk-panel); border: 1px solid var(--tk-border); border-radius: var(--tk-radius);
  box-shadow: var(--tk-shadow); padding: 18px; margin-bottom: 16px;
}
.tk-panel.narrow { max-width: 720px; }
.tk-panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.tk-panel-head h2 { margin: 6px 0 0; font-size: 1.25rem; color: #064e3b; }
.tk-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tk-settings-grid { display: grid; grid-template-columns: 1.2fr .9fr; gap: 18px; align-items: start; }
.tk-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tk-hr { border: 0; border-top: 1px solid var(--tk-border); margin: 22px 0; }
.tk-preview-wrap {
  position: sticky; top: 20px; min-height: 520px;
  background: linear-gradient(160deg, #ecfdf5, #fff7ed 55%, #ffffff);
}
.tk-preview-widget {
  width: min(320px, 100%); margin: 18px auto 0; background: #fff; border-radius: 20px;
  overflow: hidden; box-shadow: 0 24px 50px rgba(6,78,59,.14); border: 1px solid #e2e8f0;
}
.tk-preview-head {
  display: flex; gap: 10px; align-items: center; padding: 14px; color: #fff;
  background: linear-gradient(135deg, #059669, #10b981);
}
.tk-preview-avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.2); font-weight: 800;
}
.tk-preview-head strong { display: block; }
.tk-preview-head small { opacity: .85; }
.tk-preview-body { padding: 14px; background: #f8fafc; min-height: 220px; }
.tk-preview-bubble {
  background: #fff; border-radius: 14px; padding: 12px; font-size: .9rem; line-height: 1.45;
  box-shadow: 0 6px 16px rgba(15,23,42,.06); margin-bottom: 10px; border: 1px solid #e2e8f0;
}
.tk-preview-replies { display: flex; flex-wrap: wrap; gap: 6px; }
.tk-preview-chip {
  border: 1px solid #86efac; background: #fff; border-radius: 999px; padding: 7px 12px;
  font-size: .78rem; font-weight: 600; color: #065f46; cursor: default;
}
.tk-preview-composer {
  display: flex; justify-content: space-between; align-items: center; padding: 10px 12px;
  border-top: 1px solid #e2e8f0; color: #94a3b8; font-size: .88rem;
}
.tk-preview-send {
  width: 36px; height: 36px; border-radius: 50%; border: 0; color: #fff; font-weight: 800;
  background: #f97316; cursor: default;
}
.tk-preview-fab {
  position: absolute; right: 28px; bottom: 28px; width: 56px; height: 56px; border: 0;
  border-radius: 50%; background: #f97316; color: #fff; font-size: 1.15rem; font-weight: 800;
  box-shadow: 0 14px 30px rgba(249,115,22,.35);
}

.tk-table-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 0 4px;
}
.tk-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.tk-table th, .tk-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--tk-border); vertical-align: top; }
.tk-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--tk-muted); }
.tk-table a { color: var(--tk-primary-dark); font-weight: 700; text-decoration: none; }
.tk-pill {
  display: inline-flex; padding: 4px 10px; border-radius: 999px; background: #dcfce7;
  color: #047857; font-size: .78rem; font-weight: 700;
}
.tk-pill.status { background: #ffedd5; color: #c2410c; }
.tk-dept {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .88rem;
  color: var(--dept-color, var(--tk-primary-dark));
}
.tk-dept::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--dept-color, var(--tk-accent));
}
.tk-dept-bars { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.tk-dept-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 14px; border: 1px solid var(--tk-border);
  text-decoration: none; color: inherit; background: #fff; font-weight: 600;
}
.tk-dept-bar:hover { border-color: var(--tk-primary); background: #ecfdf5; }
.tk-dept-bar strong { color: var(--tk-primary-dark); font-size: 1.2rem; }

/* Dashboard — Jivo-style KPI + period tabs */
.tk-dash-toolbar { margin-bottom: 16px; }
.tk-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tk-tab {
  display: inline-flex; align-items: center; padding: 8px 16px;
  border-radius: 999px; text-decoration: none; font-weight: 700; font-size: .88rem;
  color: #475569; background: #fff; border: 1px solid var(--tk-border);
}
.tk-tab:hover { border-color: #86efac; color: #047857; background: #f0fdf4; }
.tk-tab.active {
  background: #064e3b; color: #fff; border-color: #064e3b;
  box-shadow: 0 8px 20px rgba(6, 78, 59, .22);
}
.tk-kpi-row {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px;
}
.tk-kpi {
  display: flex; gap: 14px; align-items: flex-start;
  background: #fff; border: 1px solid var(--tk-border); border-radius: var(--tk-radius);
  padding: 18px; box-shadow: var(--tk-shadow);
}
.tk-kpi-icon {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.tk-kpi-icon.green { background: #dcfce7; color: #059669; }
.tk-kpi-icon.orange { background: #ffedd5; color: #ea580c; }
.tk-kpi-icon.live { background: #ecfdf5; color: #10b981; }
.tk-kpi-icon.warn { background: #fee2e2; color: #dc2626; }

/* Reporting — AdminUI-inspired KPI + charts */
.tk-report-toolbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
}
.tk-report-filters label {
  display: flex; flex-direction: column; gap: 4px; font-size: .78rem; font-weight: 700; color: var(--tk-muted);
}
.tk-report-filters select {
  min-width: 200px; min-height: 44px; border-radius: 12px; border: 1px solid var(--tk-border);
  padding: 11px 40px 11px 12px; font: inherit; font-weight: 600; color: var(--tk-text);
}
.tk-kpi-row-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tk-kpi-row-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tk-report-toolbar-right { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.tk-toast-host {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  left: auto;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  max-width: min(360px, calc(100vw - 24px));
  pointer-events: none;
}
.tk-toast {
  pointer-events: auto;
  display: block; text-decoration: none; color: #ecfdf5;
  background: linear-gradient(135deg, #064e3b, #047857); border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px; padding: 12px 14px; box-shadow: 0 16px 36px rgba(6,78,59,.28);
  opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s;
}
.tk-toast.show { opacity: 1; transform: none; }
.tk-toast strong { display: block; font-size: .92rem; }
.tk-toast span { display: block; margin-top: 4px; font-size: .8rem; opacity: .88; }
.tk-canned { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.tk-canned > span { font-size: .78rem; font-weight: 700; color: var(--tk-muted); }
.tk-chip {
  border: 1px solid #bbf7d0; background: #fff; color: #065f46; border-radius: 999px;
  padding: 6px 12px; font-size: .78rem; font-weight: 700; cursor: pointer;
}
.tk-chip:hover { background: #ecfdf5; }
.tk-pagepath { margin-top: 12px; border-top: 1px solid var(--tk-border); padding-top: 10px; }
.tk-pagepath h4 { margin: 0 0 8px; font-size: .88rem; color: #064e3b; }
.tk-pagepath ul { margin: 0; padding-left: 16px; font-size: .78rem; }
.tk-pagepath a { color: #047857; word-break: break-all; }
.tk-online-badge.off { opacity: .45; }
.tk-report-grid {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; margin-bottom: 18px;
}
.tk-report-chart-panel .tk-panel-head { margin-bottom: 8px; }
.tk-report-chart-panel .tk-muted { font-size: .82rem; font-weight: 600; }
.tk-chart-wrap { position: relative; height: 260px; }
.tk-pill.warn { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.tk-kpi span { display: block; color: var(--tk-muted); font-size: .84rem; font-weight: 700; }
.tk-kpi strong { display: block; margin-top: 4px; font-size: 1.65rem; letter-spacing: -.03em; color: #064e3b; }
.tk-kpi small { display: block; margin-top: 4px; color: #94a3b8; font-size: .76rem; }

/* Widget onboarding checklist */
.tk-onboard {
  background: linear-gradient(160deg, #f0fdf4, #fff7ed 55%, #fff);
  border: 1px solid #bbf7d0; border-radius: 16px; padding: 18px; margin-bottom: 18px;
}
.tk-onboard-head h3 { margin: 0 0 4px; font-size: 1.05rem; color: #064e3b; }
.tk-onboard-head p { margin: 0 0 14px; }
.tk-onboard-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tk-onboard-step {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px; border-radius: 14px; background: rgba(255,255,255,.75);
  border: 1px solid #e2e8f0;
}
.tk-onboard-step.done { border-color: #86efac; background: #ecfdf5; }
.tk-onboard-step.done .tk-onboard-num { background: #059669; color: #fff; }
.tk-onboard-num {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 800; font-size: .82rem;
  background: #e2e8f0; color: #475569;
}
.tk-onboard-step strong { display: block; margin-bottom: 4px; }
.tk-onboard-step p { margin: 0 0 8px; font-size: .86rem; }

/* Visitor panel */
.tk-visitor-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px;
}
.tk-visitor-head h3 { margin: 0; }
.tk-online-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800;
  background: #dcfce7; color: #166534; white-space: nowrap;
}
.tk-visitor-search { position: relative; margin-bottom: 10px; }
.tk-visitor-search i {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: #94a3b8; font-size: .85rem;
}
.tk-visitor-search input {
  width: 100%; padding: 9px 12px 9px 34px; border-radius: 12px;
  border: 1px solid var(--tk-border); font: inherit; font-size: .84rem; background: #f8fafc;
}
.tk-visitor-search input:focus {
  outline: none; border-color: #86efac; background: #fff;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, .1);
}
.tk-visitor-rows {
  max-height: min(36vh, 280px);
  overflow-y: auto;
  padding-right: 2px;
}
.tk-visitor-rows p.is-hidden { display: none; }

.tk-sla {
  display: inline-block; font-size: .72rem; font-weight: 800; padding: 3px 8px;
  border-radius: 999px; white-space: nowrap;
}
.tk-sla.FR-overdue, .tk-sla.RES-overdue { background: #fef2f2; color: #b91c1c; }
.tk-sla.FR-soon { background: #fff7ed; color: #c2410c; }
.tk-attach-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.tk-attach-list a { color: #0f766e; font-weight: 600; font-size: .88rem; text-decoration: none; }
.tk-attach-list a:hover { text-decoration: underline; }

.tk-row-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.tk-muted { color: var(--tk-muted); }
.tk-toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.tk-filters { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; }
.tk-filters input, .tk-filters select, .tk-form input, .tk-form textarea, .tk-form select, .tk-reply textarea, .tk-side select, .tk-side input, .tk-login input {
  border: 1px solid var(--tk-border); border-radius: 12px; padding: 11px 12px; font: inherit; background: #fff;
  max-width: 100%; color: var(--tk-text);
}
.tk-filters input { min-width: min(260px, 100%); flex: 1 1 180px; }
.tk-filters select { flex: 1 1 140px; min-width: 0; }

/* Select — input ile aynı yükseklik / radius; native ok gizle */
.tk-form select,
.tk-filters select,
.tk-side select,
.tk-report-filters select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  min-height: 44px;
  padding: 11px 40px 11px 12px;
  line-height: 1.35;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
}
.tk-form select,
.tk-side select {
  width: 100%;
}
.tk-form select:hover,
.tk-filters select:hover,
.tk-side select:hover,
.tk-report-filters select:hover {
  border-color: #94a3b8;
}
.tk-form select:focus,
.tk-filters select:focus,
.tk-side select:focus,
.tk-report-filters select:focus,
.tk-form input:focus,
.tk-form textarea:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .15);
}

.tk-alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; font-weight: 600; }
.tk-alert.ok { background: #dcfce7; color: var(--tk-ok); border: 1px solid #86efac; }
.tk-alert.err { background: #fef2f2; color: var(--tk-danger); border: 1px solid #fecaca; }

/* ── Login (split screen, Jivo-inspired) ── */
.tk-login-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--tk-text);
  background: #f8fafc;
}

.tk-login-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

@media (min-width: 992px) {
  .tk-login-shell {
    display: grid;
    grid-template-columns: minmax(300px, 1.05fr) minmax(340px, 1fr);
  }
}

.tk-login-hero {
  position: relative;
  overflow: hidden;
  min-height: auto;
  background:
    radial-gradient(circle at 20% 80%, rgba(249, 115, 22, .35), transparent 42%),
    radial-gradient(circle at 85% 15%, rgba(16, 185, 129, .4), transparent 38%),
    linear-gradient(155deg, #022c22 0%, #064e3b 38%, #047857 72%, #065f46 100%);
  color: #ecfdf5;
  padding: clamp(28px, 4vw, 48px);
}

@media (min-width: 992px) {
  .tk-login-hero { min-height: 100vh; }
}

.tk-login-hero--compact .tk-login-showcase { display: none; }

.tk-login-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 560px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.tk-login-hero-glow {
  position: absolute;
  inset: auto -20% -30% -10%;
  height: 55%;
  background: radial-gradient(ellipse, rgba(249, 115, 22, .22), transparent 68%);
  pointer-events: none;
}

.tk-login-logo {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}
.tk-login-logo strong { display: block; font-size: 1.05rem; }
.tk-login-logo small { opacity: .78; font-size: .82rem; }

.tk-login-hero-copy h1 {
  margin: 14px 0 12px;
  font-size: clamp(1.85rem, 3.2vw, 2.65rem);
  line-height: 1.12;
  letter-spacing: -.03em;
  font-weight: 800;
}
.tk-login-hero-copy p {
  margin: 0;
  max-width: 46ch;
  line-height: 1.6;
  color: rgba(236, 253, 245, .82);
  font-size: 1rem;
}

.tk-login-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  font-size: .82rem;
  font-weight: 700;
}

.tk-login-showcase {
  position: relative;
  flex: 1;
  min-height: 280px;
  margin-top: 8px;
}

.tk-login-card-float {
  position: absolute;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 28px 60px rgba(2, 44, 34, .35);
  color: #0f172a;
}

.tk-login-card-ticket {
  left: 0;
  top: 12px;
  width: min(300px, 88%);
  padding: 16px;
  transform: rotate(-2deg);
  animation: tk-float-a 6s ease-in-out infinite;
}
.tk-login-card-ticket header {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.tk-login-card-ticket header i {
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center;
  background: #ecfdf5; color: #059669;
}
.tk-login-card-ticket header strong { display: block; font-size: .88rem; }
.tk-login-card-ticket header small { color: #64748b; font-size: .76rem; }
.tk-login-card-ticket p { margin: 0 0 12px; font-size: .86rem; color: #334155; line-height: 1.45; }
.tk-login-card-ticket footer {
  display: flex; gap: 12px; font-size: .76rem; color: #64748b;
}
.tk-login-card-ticket footer i { color: #059669; margin-right: 4px; }

.tk-login-badge {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.tk-login-badge.open { background: #dcfce7; color: #166534; }

.tk-login-card-chat {
  right: 0;
  bottom: 0;
  width: min(290px, 82%);
  padding: 14px;
  transform: rotate(2deg);
  animation: tk-float-b 7s ease-in-out infinite;
}
.tk-login-chat-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}
.tk-login-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff; font-weight: 800;
}
.tk-login-chat-head strong { display: block; font-size: .88rem; }
.tk-login-chat-head small { color: #64748b; font-size: .76rem; display: flex; align-items: center; gap: 6px; }
.tk-login-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .25);
}
.tk-login-bubble {
  font-size: .82rem;
  line-height: 1.45;
  padding: 10px 12px;
  border-radius: 14px;
  margin-bottom: 8px;
  max-width: 92%;
}
.tk-login-bubble.agent {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  margin-right: auto;
}
.tk-login-bubble.customer {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  margin-left: auto;
}
.tk-login-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tk-login-chips span {
  font-size: .72rem;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.tk-login-stat {
  position: absolute;
  left: 38%;
  bottom: 38%;
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 16px;
  padding: 14px 18px;
  color: #fff;
  text-align: center;
  animation: tk-float-c 5s ease-in-out infinite;
}
.tk-login-stat strong { display: block; font-size: 1.5rem; letter-spacing: -.02em; }
.tk-login-stat span { font-size: .78rem; opacity: .85; }

@keyframes tk-float-a {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-10px) rotate(-1deg); }
}
@keyframes tk-float-b {
  0%, 100% { transform: translateY(0) rotate(2deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}
@keyframes tk-float-c {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.tk-login-panel {
  display: grid;
  place-items: center;
  padding: clamp(24px, 4vw, 48px);
  background: #fff;
}

.tk-login-form-wrap {
  width: min(400px, 100%);
}

.tk-login-form-head h2 {
  margin: 0 0 6px;
  font-size: 1.75rem;
  letter-spacing: -.03em;
  color: #064e3b;
  font-weight: 800;
}
.tk-login-form-head p {
  margin: 0 0 28px;
  color: var(--tk-muted);
  font-size: .95rem;
}

.tk-login-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--tk-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: .88rem;
}
.tk-login-back:hover { color: var(--tk-primary); }

.tk-login-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 20px;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.45;
}
.tk-login-alert.err { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.tk-login-alert.ok { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.tk-login-alert i { margin-top: 2px; }

.tk-login-form label {
  display: block;
  margin: 0 0 8px;
  font-weight: 700;
  font-size: .88rem;
  color: #334155;
}
.tk-login-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: 18px;
}
.tk-login-label-row label { margin: 0; }

.tk-login-field {
  position: relative;
  display: flex;
  align-items: center;
}
.tk-login-field > i {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  font-size: .95rem;
  pointer-events: none;
}
.tk-login-field input {
  width: 100%;
  padding: 13px 44px 13px 42px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  font: inherit;
  font-size: .95rem;
  color: #0f172a;
  background: #f8fafc;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.tk-login-field input:focus {
  outline: none;
  border-color: #6ee7b7;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, .12);
}
.tk-login-eye {
  position: absolute;
  right: 8px;
  width: 36px; height: 36px;
  border: 0; border-radius: 10px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
}
.tk-login-eye:hover { color: #059669; background: #ecfdf5; }

.tk-login-link {
  color: var(--tk-primary);
  text-decoration: none;
  font-size: .84rem;
  font-weight: 700;
}
.tk-login-link:hover { text-decoration: underline; color: var(--tk-primary-dark); }

.tk-login-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 22px;
  font-size: .88rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
}
.tk-login-remember input {
  width: 18px; height: 18px;
  accent-color: var(--tk-primary);
}

.tk-login-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #059669 0%, #10b981 55%, #34d399 100%);
  box-shadow: 0 14px 32px rgba(5, 150, 105, .32);
  transition: transform .12s, box-shadow .12s;
}
.tk-login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(5, 150, 105, .38);
}
.tk-login-submit:active { transform: translateY(0); }

.tk-login-foot {
  margin: 24px 0 0;
  text-align: center;
  font-size: .8rem;
  color: var(--tk-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.tk-login-foot.muted { flex-direction: column; gap: 6px; line-height: 1.5; }

/* legacy single-card login (unused) */
.tk-login {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
}
.tk-login-card {
  width: min(440px, 100%); background: #fff; border-radius: 24px; padding: 28px;
}
.tk-login-brand { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.tk-login-brand h1 { margin: 0; font-size: 1.35rem; color: #064e3b; }
.tk-login-brand p { margin: 4px 0 0; color: var(--tk-muted); }
.tk-hint { margin-top: 14px; color: var(--tk-muted); font-size: .82rem; }

@media (max-width: 991px) {
  .tk-login-hero { min-height: auto; padding-bottom: 40px; }
  .tk-login-showcase { min-height: 240px; }
  .tk-login-card-chat { right: 4%; width: 72%; }
}
@media (max-width: 560px) {
  .tk-login-showcase { display: none; }
  .tk-login-hero-copy h1 { font-size: 1.65rem; }
  .tk-login-panel { padding-top: 0; }
}

.tk-login label, .tk-form label, .tk-reply label, .tk-side label { display: block; margin: 12px 0 6px; font-weight: 700; font-size: .9rem; }
.tk-login input, .tk-form input, .tk-form textarea, .tk-form select { width: 100%; }

.tk-detail-grid { display: grid; grid-template-columns: 1.5fr .7fr; gap: 16px; align-items: stretch; }
.tk-thread { display: grid; gap: 12px; margin: 16px 0; }
.tk-msg { border: 1px solid var(--tk-border); border-radius: 16px; padding: 14px; background: #f8fafc; }
.tk-msg.customer { background: #fff7ed; border-color: #fdba74; }
.tk-msg.agent { background: #fff; }
.tk-msg.ai, .tk-msg.internal { background: #ecfdf5; border-color: #86efac; }
.tk-msg header { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.tk-msg header span, .tk-msg header time { color: var(--tk-muted); font-size: .8rem; }
.tk-msg p { margin: 0; white-space: pre-wrap; line-height: 1.55; }
.tk-ai-box { background: #ecfdf5; border: 1px dashed #6ee7b7; border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.tk-ai-box.suggest { background: #fff7ed; border-color: #fb923c; }
.tk-ai-box pre { white-space: pre-wrap; font-family: inherit; margin: 8px 0; }
.tk-reply-actions { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 10px; }
.tk-check { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; color: var(--tk-muted); }
.tk-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: stretch;
  min-height: 100%;
}
.tk-side .tk-panel { margin-bottom: 0; }
.tk-side .tk-visitor-pin {
  margin-top: auto;
  position: sticky;
  bottom: 16px;
  z-index: 4;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
  flex-shrink: 0;
}
.tk-side select, .tk-side input { width: 100%; margin-bottom: 8px; }
.tk-side-actions { display: grid; gap: 8px; margin-top: 12px; }
.tk-side.meta p, .tk-panel.meta p { display: flex; justify-content: space-between; gap: 10px; color: var(--tk-text); }
.tk-side.meta span, .tk-panel.meta span { color: var(--tk-muted); }
.tk-code {
  background: #064e3b; color: #ecfdf5; padding: 14px; border-radius: 12px; overflow: auto;
  font-size: .82rem; line-height: 1.5;
}
.tk-live-bar {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  padding: 10px 12px; border-radius: 12px; background: #dcfce7; border: 1px solid #86efac;
  font-size: .86rem; font-weight: 600; color: #166534;
}
.tk-live-dot {
  width: 9px; height: 9px; border-radius: 50%; background: #94a3b8;
}
.tk-live-dot.on {
  background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.2);
}
.tk-thread { max-height: min(52vh, 520px); overflow: auto; }

@media (max-width: 1200px) {
  .tk-kpi-row-5, .tk-kpi-row-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tk-report-grid { grid-template-columns: 1fr; }
}

/* Tablet: icon rail */
@media (max-width: 1100px) and (min-width: 901px) {
  .tk-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .tk-kpi-row { grid-template-columns: 1fr; }
  .tk-kpi-row-5, .tk-kpi-row-6 { grid-template-columns: 1fr 1fr; }
  .tk-detail-grid { grid-template-columns: 1fr; }
  .tk-settings-grid { grid-template-columns: 1fr; }
  .tk-rail { width: 84px; padding: 16px 10px; }
  .tk-brand-text,
  .tk-nav a span,
  .tk-user-text,
  .tk-link-btn span { display: none; }
  .tk-nav a { justify-content: center; padding: 12px; }
  .tk-nav a i { font-size: 1.1rem; width: auto; }
  .tk-brand { justify-content: center; }
  .tk-user { justify-content: center; }
  .tk-link-btn { padding: 10px; }
  .tk-main { margin-left: 84px; }
}

/* Phone / small tablet: drawer nav */
@media (max-width: 900px) {
  .tk-mobile-bar { display: flex; }
  .tk-rail {
    width: min(300px, 86vw);
    transform: translateX(-105%);
    box-shadow: 18px 0 40px rgba(6, 78, 59, .28);
    padding-top: max(22px, env(safe-area-inset-top));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  body.tk-nav-open .tk-rail { transform: translateX(0); }
  body.tk-nav-open { overflow: hidden; }
  .tk-main {
    margin-left: 0;
    padding: 16px 14px 28px;
    padding-bottom: max(28px, env(safe-area-inset-bottom));
  }
  .tk-brand-text,
  .tk-nav a span,
  .tk-user-text,
  .tk-link-btn span { display: initial; }
  .tk-nav a { justify-content: flex-start; font-size: .92rem; }
  .tk-nav a span { display: inline; font-size: inherit; }
  .tk-user-text { display: block; }
  .tk-link-btn span { display: inline; }

  .tk-top { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 16px; }
  .tk-top p { font-size: .9rem; }
  .tk-top-actions .tk-btn span { display: none; }
  .tk-hide-sm { display: none !important; }

  .tk-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .tk-kpi-row,
  .tk-kpi-row-5,
  .tk-kpi-row-6 { grid-template-columns: 1fr; }
  .tk-detail-grid,
  .tk-settings-grid { grid-template-columns: 1fr; }
  .tk-row2 { grid-template-columns: 1fr; }
  .tk-report-toolbar { align-items: stretch; flex-direction: column; }
  .tk-report-toolbar-right { width: 100%; }
  .tk-report-filters { width: 100%; }
  .tk-report-filters select { width: 100%; min-width: 0; }
  .tk-chart-wrap { height: 220px; }

  .tk-filters { width: 100%; }
  .tk-filters input,
  .tk-filters select,
  .tk-filters .tk-btn { width: 100%; flex: 1 1 100%; }
  .tk-preview-wrap { position: static; min-height: 0; }
  .tk-preview-fab { display: none; }

  .tk-side .tk-visitor-pin {
    position: static;
    margin-top: 0;
    bottom: auto;
  }
  .tk-thread { max-height: min(48vh, 420px); }
  .tk-reply-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .tk-reply-actions .tk-btn { width: 100%; justify-content: center; }
  .tk-panel-head { flex-direction: column; align-items: stretch; }
  .tk-code { font-size: .76rem; word-break: break-word; white-space: pre-wrap; }

  .tk-toast-host {
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    max-width: none;
  }
}

@media (max-width: 560px) {
  .tk-stats { grid-template-columns: 1fr; }
  .tk-table { min-width: 560px; }
  .tk-table th, .tk-table td { padding: 10px 8px; font-size: .88rem; }
  .tk-msg { padding: 12px; border-radius: 14px; }
  .tk-login-panel { padding-left: 16px; padding-right: 16px; }
}

/* Doğrulamalar */
.tk-sec-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; flex-wrap:wrap; margin-bottom:18px; }
.tk-sec-head h2 { margin:0 0 4px; }
.tk-sec-stack { display:flex; flex-direction:column; gap:12px; }
.tk-sec-row {
  display:flex; justify-content:space-between; align-items:center; gap:14px; flex-wrap:wrap;
  padding:16px; border:1px solid var(--tk-border); border-radius:14px; background:var(--tk-panel);
}
.tk-sec-main { display:flex; gap:12px; align-items:flex-start; flex:1; min-width:220px; }
.tk-sec-main h3 { margin:0 0 4px; font-size:1rem; }
.tk-sec-main p { margin:0; font-size:.88rem; }
.tk-sec-icon {
  width:40px; height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center;
  background: color-mix(in srgb, var(--tk-accent, #f97316) 14%, transparent); color: var(--tk-accent, #f97316);
  flex-shrink:0;
}
.tk-sec-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.tk-sec-actions-col { flex-direction:column; align-items:flex-end; }
.tk-sec-inline { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.tk-sec-inline input {
  width:140px; padding:8px 10px; border:1px solid var(--tk-border); border-radius:10px; background:transparent; color:inherit;
}
.tk-sec-recovery {
  margin-bottom:16px; padding:14px 16px; border-radius:12px;
  border:1px dashed color-mix(in srgb, #f59e0b 50%, var(--tk-border));
  background: color-mix(in srgb, #f59e0b 8%, transparent);
}
.tk-sec-recovery ul { columns:2; gap:12px; margin:10px 0 0; padding-left:18px; }
.tk-sec-recovery code { letter-spacing:.04em; }
.tk-challenge-methods { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
@media (max-width: 640px) {
  .tk-sec-recovery ul { columns:1; }
  .tk-sec-actions-col { align-items:stretch; width:100%; }
  .tk-sec-inline input { width:100%; }
}
