/* ==========================================================================
   Tikti Design System
   Simple, clean, elegant. Loaded after the legacy theme (style.css) and
   overrides it so every existing page picks up the new look.
   ========================================================================== */

:root {
    --tk-bg: #f6f7f9;
    --tk-surface: #ffffff;
    --tk-surface-2: #f9fafb;
    --tk-border: #e5e7eb;
    --tk-border-strong: #d1d5db;

    --tk-text: #111827;
    --tk-text-2: #374151;
    --tk-muted: #6b7280;
    --tk-faint: #9ca3af;

    --tk-primary: #4f46e5;
    --tk-primary-hover: #4338ca;
    --tk-primary-soft: #eef2ff;
    --tk-primary-ring: rgba(79, 70, 229, 0.18);

    --tk-success: #16a34a;
    --tk-success-soft: #dcfce7;
    --tk-success-text: #166534;
    --tk-warning: #d97706;
    --tk-warning-soft: #fef3c7;
    --tk-warning-text: #92400e;
    --tk-danger: #dc2626;
    --tk-danger-soft: #fee2e2;
    --tk-danger-text: #991b1b;
    --tk-info: #0284c7;
    --tk-info-soft: #e0f2fe;
    --tk-info-text: #075985;
    --tk-slate: #334155;
    --tk-slate-soft: #e2e8f0;
    --tk-slate-text: #1e293b;
    --tk-neutral-soft: #f1f5f9;
    --tk-neutral-text: #475569;
    --tk-sk-base: #e9edf3;
    --tk-sk-shine: #f6f8fb;

    --tk-radius: 12px;
    --tk-radius-sm: 8px;
    --tk-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
    --tk-shadow-md: 0 4px 12px -2px rgba(16, 24, 40, 0.08), 0 2px 4px -2px rgba(16, 24, 40, 0.06);

    --tk-sidebar-w: 256px;
    --tk-topbar-h: 60px;
    --tk-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ---------- Base ---------- */
html { -webkit-text-size-adjust: 100%; }

body.tk-body,
body.tk-auth {
    font-family: var(--tk-font);
    font-size: 14px;
    line-height: 1.55;
    color: var(--tk-text-2);
    background: var(--tk-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.tk-body h1, .tk-body h2, .tk-body h3, .tk-body h4, .tk-body h5, .tk-body h6,
.tk-body .h1, .tk-body .h2, .tk-body .h3, .tk-body .h4, .tk-body .h5, .tk-body .h6 {
    font-family: var(--tk-font);
    color: var(--tk-text);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.tk-body a { color: var(--tk-primary); }
.tk-body a:hover { color: var(--tk-primary-hover); text-decoration: none; }
.tk-body p { line-height: 1.65; }
.tk-body .text-muted { color: var(--tk-muted) !important; }
.tk-body hr { border-top-color: var(--tk-border); }
.tk-body ::selection { background: var(--tk-primary-soft); color: var(--tk-primary-hover); }

.tk-body *::-webkit-scrollbar { width: 10px; height: 10px; }
.tk-body *::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }
.tk-body *::-webkit-scrollbar-thumb:hover { background: #9ca3af; background-clip: content-box; border: 2px solid transparent; }
.tk-body *::-webkit-scrollbar-track { background: transparent; }

/* ==========================================================================
   Layout
   ========================================================================== */
.tk-app { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.tk-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--tk-sidebar-w);
    background: var(--tk-surface);
    border-right: 1px solid var(--tk-border);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: transform .25s ease;
}

.tk-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    height: var(--tk-topbar-h);
    padding: 0 20px;
    border-bottom: 1px solid var(--tk-border);
    text-decoration: none !important;
    flex-shrink: 0;
}
.tk-brand-mark {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: var(--tk-primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 19px;
    box-shadow: 0 1px 2px rgba(79, 70, 229, .35);
}
/* The hexagon inside the SVG sits above the viewBox centre, so nudge it down to look centred. */
.tk-brand-logo { width: 36px; height: 36px; flex-shrink: 0; display: block; transform: translateY(2px); }
.tk-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.tk-brand-name { font-size: 16px; font-weight: 700; color: var(--tk-text); letter-spacing: -0.02em; }
.tk-brand-sub { font-size: 11px; color: var(--tk-muted); font-weight: 500; margin-top: 2px; }

.tk-nav { flex: 1; overflow-y: auto; padding: 14px 12px 12px; }
.tk-nav-label {
    padding: 14px 12px 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--tk-faint);
}
.tk-nav-label:first-child { padding-top: 4px; }

.tk-nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 12px;
    margin-bottom: 2px;
    border-radius: var(--tk-radius-sm);
    color: var(--tk-text-2) !important;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none !important;
    transition: background .15s ease, color .15s ease;
}
.tk-nav-link i { font-size: 19px; line-height: 1; color: var(--tk-faint); transition: color .15s ease; }
.tk-nav-link:hover { background: var(--tk-neutral-soft); color: var(--tk-text) !important; }
.tk-nav-link:hover i { color: var(--tk-muted); }
.tk-nav-link.active { background: var(--tk-primary-soft); color: var(--tk-primary) !important; font-weight: 600; }
.tk-nav-link.active i { color: var(--tk-primary); }

.tk-user-name { font-size: 13px; font-weight: 600; color: var(--tk-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tk-avatar {
    width: 34px; height: 34px; flex-shrink: 0;
    border-radius: 50%;
    background: var(--tk-primary-soft);
    color: var(--tk-primary);
    font-weight: 600; font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    text-transform: uppercase;
}

/* ---------- Main ---------- */
.tk-main {
    flex: 1;
    min-width: 0;
    margin-left: var(--tk-sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.tk-topbar {
    position: sticky; top: 0;
    z-index: 1030;
    height: var(--tk-topbar-h);
    padding: 0 28px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: rgba(255, 255, 255, .85);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--tk-border);
}
.tk-topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tk-topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.tk-theme-btn {
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--tk-border);
    border-radius: 999px;
    background: var(--tk-surface);
    color: var(--tk-text-2);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    transition: background .15s ease, color .15s ease;
}
.tk-theme-btn:hover { background: var(--tk-neutral-soft); color: var(--tk-text); }
.tk-theme-btn:focus { outline: 0; box-shadow: 0 0 0 3px var(--tk-primary-ring); }
.tk-theme-light-icon { display: none; }
[data-theme="dark"] .tk-theme-dark-icon { display: none; }
[data-theme="dark"] .tk-theme-light-icon { display: inline; }
.tk-topbar-logo { display: none; }
.tk-menu-btn {
    display: none;
    width: 36px; height: 36px;
    border: 1px solid var(--tk-border);
    border-radius: var(--tk-radius-sm);
    background: var(--tk-surface);
    color: var(--tk-text-2);
    font-size: 20px;
    align-items: center; justify-content: center;
    cursor: pointer;
    padding: 0;
}
.tk-menu-btn:hover { background: var(--tk-neutral-soft); }

.tk-user-menu {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 8px 4px 4px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    color: var(--tk-text) !important;
    text-decoration: none !important;
    transition: background .15s ease, border-color .15s ease;
}
.tk-user-menu:hover, .tk-user-menu[aria-expanded="true"] { background: var(--tk-neutral-soft); border-color: var(--tk-border); }
.tk-user-menu .tk-user-name { max-width: 180px; }
.tk-user-menu > i { color: var(--tk-faint); font-size: 18px; }

.tk-content { flex: 1; padding: 28px; width: 100%; max-width: 1480px; margin: 0 auto; transition: opacity .15s ease; }
.tk-content.is-loading { opacity: .55; pointer-events: none; }
.tk-progress {
    position: fixed; top: 0; left: 0; z-index: 2000;
    width: 0; height: 2px;
    background: var(--tk-primary);
    box-shadow: 0 0 8px var(--tk-primary-ring);
    opacity: 0; pointer-events: none;
    transition: width .3s ease, opacity .25s ease;
}
.tk-progress.is-active { opacity: 1; }

.tk-footer {
    padding: 16px 28px 22px;
    font-size: 12px;
    color: var(--tk-muted);
    text-align: center;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 6px 16px;
}
.tk-footer-copy { grid-column: 2; }
.tk-footer-version { grid-column: 3; justify-self: end; font-weight: 500; }
@media (max-width: 575px) {
    .tk-footer { grid-template-columns: 1fr; }
    .tk-footer-copy, .tk-footer-version { grid-column: 1; justify-self: center; }
}
.tk-footer a { color: var(--tk-muted) !important; font-weight: 500; }
.tk-footer a:hover { color: var(--tk-primary) !important; }

.tk-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(17, 24, 39, .45);
    z-index: 1035;
}

@media (max-width: 991.98px) {
    .tk-sidebar { transform: translateX(-100%); box-shadow: var(--tk-shadow-md); }
    .tk-nav-open .tk-sidebar { transform: translateX(0); }
    .tk-nav-open .tk-backdrop { display: block; }
    .tk-nav-open { overflow: hidden; }
    .tk-main { margin-left: 0; }
    .tk-menu-btn { display: inline-flex; }
    .tk-topbar { padding: 0 16px; }
    .tk-topbar-logo { display: block; width: 30px; height: 30px; }
    .tk-content { padding: 18px 16px; }
    .tk-user-menu .tk-user-name, .tk-user-menu > i { display: none; }
}

/* ==========================================================================
   Cards
   ========================================================================== */
.tk-content .grid-margin { margin-bottom: 20px; }

.tk-content .card {
    background: var(--tk-surface);
    border: 1px solid var(--tk-border);
    border-radius: var(--tk-radius);
    box-shadow: var(--tk-shadow-sm);
    transition: none;
    transform: none;
    overflow: visible;
}
.tk-content .card:hover { transform: none; box-shadow: var(--tk-shadow-sm); }
.tk-content .card .card-body { padding: 24px; }
.tk-content .card .card-body .card { box-shadow: none; }

.tk-content .card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--tk-text);
    margin-bottom: 18px;
    letter-spacing: -0.01em;
}
.tk-content .card-title::after { display: none; }
.tk-content .card-subtitle { color: var(--tk-muted); font-size: 12.5px; }
.tk-content .tk-card-heading { margin-bottom: 22px; min-width: 0; }
.tk-content .d-flex > .tk-card-heading,
.tk-content .card-header .tk-card-heading { margin-bottom: 0; }
.tk-content .tk-card-heading > h4 { margin-bottom: 0 !important; }
.tk-content .card-body > .d-flex:has(> .tk-card-heading) { align-items: flex-start !important; gap: 12px 16px; margin-bottom: 20px !important; }
.tk-content .card-header .d-flex:has(> .tk-card-heading) { align-items: flex-start !important; gap: 14px 16px; }
.tk-content .card-header .d-flex > .tk-card-heading + div { margin-top: 0 !important; }
.tk-content .d-flex > .tk-card-heading { flex: 1 1 280px; }
.tk-content .card-body > .d-flex > .tk-card-heading + div { flex: 0 0 auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.tk-content .card-body > .d-flex > .tk-card-heading + div > .btn { margin: 0 !important; }
.tk-content .tk-card-heading .tk-card-subtitle {
    margin: 4px 0 0;
    color: var(--tk-muted);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
}
.tk-content .card-header {
    background: var(--tk-surface);
    border-bottom: 1px solid var(--tk-border);
    padding: 18px 24px;
    border-radius: var(--tk-radius) var(--tk-radius) 0 0;
}
.tk-content .card-footer { background: var(--tk-surface-2); border-top: 1px solid var(--tk-border); }

/* Neutralise legacy colourful cards */
.tk-content .card[class*="bg-gradient-"] {
    background: var(--tk-surface) !important;
    color: var(--tk-text-2) !important;
    border: 1px solid var(--tk-border) !important;
    box-shadow: var(--tk-shadow-sm) !important;
}

/* ---------- Page header helper ---------- */
.tk-page-head {
    display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap;
    gap: 12px; margin-bottom: 22px;
}
.tk-page-head h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.tk-page-head p { margin: 4px 0 0; color: var(--tk-muted); font-size: 13.5px; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.tk-body .btn {
    font-family: var(--tk-font);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    white-space: nowrap;
    border-radius: var(--tk-radius-sm);
    border: 1px solid transparent;
    box-shadow: var(--tk-shadow-sm);
    transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
    transform: none;
    letter-spacing: 0;
    text-transform: none;
}
.tk-body .btn:hover { transform: none; }
.tk-body .btn:focus, .tk-body .btn.focus { box-shadow: 0 0 0 3px var(--tk-primary-ring) !important; outline: 0; }
/* One size for every button; sm/lg variants are intentionally identical */
.tk-body .btn-sm, .tk-body .btn-lg, .tk-body .btn-group-sm > .btn { height: 36px; padding: 0 16px; font-size: 13.5px; border-radius: var(--tk-radius-sm); }
.tk-body .btn-block { display: flex; width: 100%; }
.tk-body .btn i { font-size: 16px; line-height: 1; margin: 0; vertical-align: 0; }
.tk-body .btn:disabled, .tk-body .btn.disabled { opacity: .5; box-shadow: none; pointer-events: none; }

/* Colour carries meaning; shape, size and weight are shared by every button */
.tk-body .btn-primary { background: var(--tk-primary) !important; border-color: var(--tk-primary) !important; color: #fff !important; }
.tk-body .btn-primary:hover { background: var(--tk-primary-hover) !important; border-color: var(--tk-primary-hover) !important; box-shadow: var(--tk-shadow-sm) !important; }

.tk-body .btn-success { background: var(--tk-success) !important; border-color: var(--tk-success) !important; color: #fff !important; }
.tk-body .btn-success:hover { background: #15803d !important; border-color: #15803d !important; box-shadow: var(--tk-shadow-sm) !important; }

.tk-body .btn-danger { background: var(--tk-danger) !important; border-color: var(--tk-danger) !important; color: #fff !important; }
.tk-body .btn-danger:hover { background: #b91c1c !important; border-color: #b91c1c !important; box-shadow: var(--tk-shadow-sm) !important; }

.tk-body .btn-warning { background: #f59e0b !important; border-color: #f59e0b !important; color: #fff !important; }
.tk-body .btn-warning:hover { background: #d97706 !important; border-color: #d97706 !important; box-shadow: var(--tk-shadow-sm) !important; }

.tk-body .btn-info { background: var(--tk-info) !important; border-color: var(--tk-info) !important; color: #fff !important; }
.tk-body .btn-info:hover { background: #0369a1 !important; border-color: #0369a1 !important; box-shadow: var(--tk-shadow-sm) !important; }

.tk-body .btn-dark { background: var(--tk-slate) !important; border-color: var(--tk-slate) !important; color: #fff !important; }
.tk-body .btn-dark:hover { background: #1e293b !important; border-color: #1e293b !important; box-shadow: var(--tk-shadow-sm) !important; }

.tk-body .btn-secondary,
.tk-body .btn-light,
.tk-body .btn-default {
    background: var(--tk-surface) !important;
    border-color: var(--tk-border-strong) !important;
    color: var(--tk-text-2) !important;
}
.tk-body .btn-secondary:hover,
.tk-body .btn-light:hover,
.tk-body .btn-default:hover { background: var(--tk-neutral-soft) !important; color: var(--tk-text) !important; box-shadow: var(--tk-shadow-sm) !important; }

.tk-body .btn-outline-primary { background: transparent !important; color: var(--tk-primary) !important; border-color: var(--tk-primary) !important; }
.tk-body .btn-outline-primary:hover { background: var(--tk-primary-soft) !important; }
.tk-body .btn-outline-secondary { background: transparent !important; color: var(--tk-text-2) !important; border-color: var(--tk-border-strong) !important; }
.tk-body .btn-outline-secondary:hover { background: var(--tk-neutral-soft) !important; }
.tk-body .btn-outline-danger { background: transparent !important; color: var(--tk-danger) !important; border-color: var(--tk-danger) !important; }
.tk-body .btn-outline-danger:hover { background: var(--tk-danger-soft) !important; }
.tk-body .btn-link { color: var(--tk-primary); box-shadow: none; }

.tk-body .btn-group > .btn { box-shadow: none; }
.tk-body .btn-group > .btn:not(:last-child):not(.dropdown-toggle) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.tk-body .btn-group > .btn:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }

/* ==========================================================================
   Badges (soft pills)
   ========================================================================== */
.tk-body .badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--tk-font);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
    padding: 4px 10px;
    border-radius: 999px;
    box-shadow: none !important;
    border: 0;
    text-transform: none;
    white-space: nowrap;
}
.tk-body .badge-primary   { background: var(--tk-primary-soft) !important; color: var(--tk-primary-hover) !important; }
.tk-body .badge-success   { background: var(--tk-success-soft) !important; color: var(--tk-success-text) !important; }
.tk-body .badge-warning   { background: var(--tk-warning-soft) !important; color: var(--tk-warning-text) !important; }
.tk-body .badge-danger    { background: var(--tk-danger-soft) !important; color: var(--tk-danger-text) !important; }
.tk-body .badge-info      { background: var(--tk-info-soft) !important; color: var(--tk-info-text) !important; }
.tk-body .badge-dark      { background: var(--tk-slate-soft) !important; color: var(--tk-slate-text) !important; }
.tk-body .badge-secondary,
.tk-body .badge-light     { background: var(--tk-neutral-soft) !important; color: var(--tk-neutral-text) !important; }
.tk-body .badge-custom    { padding: 4px 10px; font-size: 12px; border-radius: 999px; }

/* ==========================================================================
   Forms
   ========================================================================== */
.tk-body label {
    font-size: 13px;
    font-weight: 500;
    color: var(--tk-text-2);
    margin-bottom: 6px;
}
.tk-body .form-group { margin-bottom: 18px; }

.tk-body .form-control,
.tk-body .custom-select,
.tk-body select.form-control {
    font-family: var(--tk-font);
    font-size: 14px;
    color: var(--tk-text);
    background-color: var(--tk-surface);
    border: 1px solid var(--tk-border-strong);
    border-radius: var(--tk-radius-sm);
    padding: 8px 12px;
    height: auto;
    min-height: 40px;
    line-height: 1.5;
    box-shadow: var(--tk-shadow-sm);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.tk-body textarea.form-control { min-height: 110px; resize: vertical; }
.tk-body {
    --tk-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2364748b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
}
.tk-body select.form-control,
.tk-body .custom-select {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    padding-right: 36px;
    background-image: var(--tk-chevron);
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px 14px;
}
.tk-body input[type="file"].form-control-file,
.tk-body input[type="file"].form-control {
    display: block; width: 100%; height: auto; min-height: 40px;
    padding: 5px 10px; line-height: 1.5;
    font-family: var(--tk-font); font-size: 13.5px; color: var(--tk-text-2);
    background: var(--tk-surface);
    border: 1px solid var(--tk-border-strong);
    border-radius: var(--tk-radius-sm);
    box-shadow: var(--tk-shadow-sm);
}
.tk-body select.form-control.is-invalid { background-image: var(--tk-chevron); padding-right: 36px; }
.tk-body .form-check-input { accent-color: var(--tk-primary); }
.tk-body .form-check-label { font-size: 14px; color: var(--tk-text); }
.tk-body .form-control::placeholder { color: var(--tk-faint); }
.tk-body .form-control:focus,
.tk-body .custom-select:focus {
    border-color: var(--tk-primary);
    box-shadow: 0 0 0 3px var(--tk-primary-ring);
    outline: 0;
    background: var(--tk-surface);
    color: var(--tk-text);
}
.tk-body .form-control:disabled,
.tk-body .form-control[readonly] { background: var(--tk-neutral-soft); color: var(--tk-muted); box-shadow: none; }
.tk-body .form-control.is-invalid { border-color: var(--tk-danger); background-image: none; padding-right: 12px; }
.tk-body .form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, .15); }
.tk-body .invalid-feedback { color: var(--tk-danger); font-size: 12.5px; margin-top: 5px; }
.tk-body small.text-muted, .tk-body .form-text { font-size: 12.5px; margin-top: 5px; display: block; }

.tk-body input[type="file"].form-control { padding: 7px 10px; }
.tk-body input[type="file"]::file-selector-button {
    border: 1px solid var(--tk-border-strong);
    background: var(--tk-surface-2);
    color: var(--tk-text-2);
    border-radius: 6px;
    padding: 4px 10px;
    margin-right: 10px;
    font-family: var(--tk-font);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
}
.tk-body input[type="file"]::file-selector-button:hover { background: var(--tk-neutral-soft); }

.tk-body input[type="checkbox"],
.tk-body input[type="radio"] { accent-color: var(--tk-primary); }
.tk-body .input-group-text { background: var(--tk-surface-2); border-color: var(--tk-border-strong); color: var(--tk-muted); border-radius: var(--tk-radius-sm); }
.tk-body .form-check-label { font-size: 13.5px; }

.tk-check-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 575.98px) { .tk-check-options { grid-template-columns: 1fr; } }
.tk-body .tk-check-option {
    display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 12px; cursor: pointer;
    background: var(--tk-surface); border: 1px solid var(--tk-border-strong); border-radius: var(--tk-radius-sm); box-shadow: var(--tk-shadow-sm);
    transition: border-color .15s, background-color .15s;
}
.tk-body .tk-check-option:hover { border-color: var(--tk-primary); }
.tk-body .tk-check-option:has(input:checked) { border-color: var(--tk-primary); background: var(--tk-primary-soft); }
.tk-body .tk-check-option:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--tk-primary-ring); }
.tk-check-option input { flex: 0 0 auto; width: 16px; height: 16px; margin: 0; }
.tk-check-option strong { display: block; color: var(--tk-text); font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.tk-check-option small { display: block; margin-top: 2px; color: var(--tk-muted); font-size: 12px; line-height: 1.45; }

/* ==========================================================================
   Tables
   ========================================================================== */
.tk-content .table { color: var(--tk-text-2); margin-bottom: 0; font-size: 13.5px; border-radius: 0; }
.tk-content .table thead th {
    background: var(--tk-surface-2) !important;
    color: var(--tk-muted) !important;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    border-top: 0 !important;
    border-bottom: 1px solid var(--tk-border) !important;
    padding: 11px 14px;
    vertical-align: middle;
    white-space: nowrap;
}
.tk-content .table td, .tk-content .table tbody th {
    padding: 13px 14px;
    vertical-align: middle;
    border-top: 1px solid var(--tk-neutral-soft);
    color: var(--tk-text-2);
}
.tk-content .table tbody tr:last-child td { border-bottom: 0 !important; }
.tk-content .table td, .tk-content .table tbody th { white-space: normal; word-break: break-word; line-height: 1.5; }
.tk-content .table tbody th { word-break: normal; overflow-wrap: normal; }
.tk-content .table td:last-child { white-space: nowrap; }
.tk-content .table.tk-info-table td:last-child { white-space: normal; }
.tk-content .table tbody tr:first-child td { border-top: 0; }
.tk-content .table tbody tr { transition: background .12s ease; }
.tk-content .table-hover tbody tr:hover,
.tk-content .table tbody tr:hover { background: var(--tk-surface-2) !important; box-shadow: none !important; }
.tk-content .table-striped tbody tr:nth-of-type(odd) { background: transparent; }
.tk-content .table-bordered, .tk-content .table-bordered th, .tk-content .table-bordered td { border-left: 0; border-right: 0; }
.tk-content .table-bordered { border: 0; }
.tk-content .table-borderless th { color: var(--tk-muted); font-weight: 500; font-size: 13px; text-transform: none; letter-spacing: 0; background: transparent !important; border: 0 !important; padding: 10px 14px 10px 0; }
.tk-content .table-borderless td { border: 0; padding: 10px 0; color: var(--tk-text); font-weight: 500; }
.tk-content .table-borderless tbody tr { border-bottom: 1px solid var(--tk-border); }
.tk-content .table-borderless tbody tr:last-child { border-bottom: 0; }
.tk-content .table-responsive { border-radius: var(--tk-radius-sm); }
.tk-content .table-responsive { border: 0; }
.tk-content table.dataTable,
.tk-content table.dataTable.no-footer { border: 0 !important; }
.tk-content .dataTables_wrapper,
.tk-content .dataTables_wrapper .table-responsive { border: 0; box-shadow: none; }

/* Merged ticket list cells */
.tk-content .table td.tk-col-check, .tk-content .table th.tk-col-check { width: 36px; padding-right: 0; }
.tk-content .table td.tk-col-ticket { min-width: 280px; max-width: 520px; }
.tk-content .tk-recent-table td.tk-col-ticket { min-width: 220px; }
.tk-content .table td.tk-col-status { white-space: nowrap; width: 1%; }
.tk-content .table td.tk-col-user { white-space: nowrap; width: 1%; }
.tk-content .table td.tk-col-actions, .tk-content .table th.tk-col-actions { width: 1%; text-align: right; }
.tk-content .table td.tk-col-name { min-width: 150px; }
.tk-content .table td.tk-col-unit { min-width: 130px; }

/* Riwayat perubahan: date/status/user hug their content, the note takes the rest and wraps */
.tk-content .table.tk-history-table td { vertical-align: top; }
.tk-content .table.tk-history-table :is(th, td):not(:last-child) { white-space: nowrap; width: 1%; }
.tk-content .table.tk-history-table td.tk-history-note {
    min-width: 260px;
    white-space: pre-line;
    overflow-wrap: anywhere;
    word-break: normal;
    line-height: 1.55;
    color: var(--tk-text-2);
}
.tk-content .table-responsive:has(> .tk-history-table) { container: tk-history / inline-size; }
@container tk-history (max-width: 760px) {
    .tk-content .table.tk-history-table thead { display: none; }
    .tk-content .table.tk-history-table,
    .tk-content .table.tk-history-table tbody { display: block; width: 100%; }
    .tk-content .table.tk-history-table tbody tr {
        display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
        padding: 14px 4px; border-bottom: 1px solid var(--tk-border);
    }
    .tk-content .table.tk-history-table tbody tr:last-child { border-bottom: 0; }
    .tk-content .table.tk-history-table tbody td {
        display: block; width: auto !important; padding: 0 !important; border: 0 !important;
    }
    .tk-content .table.tk-history-table tbody td:first-child { color: var(--tk-muted); font-size: 12.5px; }
    .tk-content .table.tk-history-table tbody td:nth-child(3) { font-weight: 600; color: var(--tk-text); }
    .tk-content .table.tk-history-table td.tk-history-note { flex: 1 1 100%; min-width: 0; }
}
.tk-cell-ticket, .tk-cell-user { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tk-cell-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; font-weight: 500; color: var(--tk-text-2); letter-spacing: .02em; }
.tk-content .table td a.tk-cell-title, .tk-cell-title { color: var(--tk-text); font-weight: 600; font-size: 13.5px; line-height: 1.45; }
.tk-content .table td a.tk-cell-title:hover { color: var(--tk-primary); text-decoration: none; }
.tk-cell-meta { font-size: 12px; color: var(--tk-muted); line-height: 1.4; }
.tk-cell-prio { display: inline-flex; vertical-align: 1px; margin-right: 8px; }
.tk-body .tk-content .tk-cell-prio .badge { font-size: 10.5px !important; padding: 2px 7px !important; line-height: 1.35; }
.tk-cell-name { color: var(--tk-text); font-weight: 500; }
.tk-cell-badges { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.tk-row-actions { display: inline-flex; gap: 6px; justify-content: flex-end; }
.tk-body .tk-content .table td .btn.tk-icon-btn { width: 32px; height: 32px; padding: 0 !important; display: inline-flex; align-items: center; justify-content: center; margin: 0 !important; font-size: 16px; }
.tk-body .tk-content .table td .btn.tk-icon-btn i { margin: 0; line-height: 1; }

/* Row actions: compact soft-tinted buttons, one tint per colour */
.tk-body .tk-content .table td .btn { height: 32px; padding: 0 12px; font-size: 13px; box-shadow: none !important; border-color: transparent !important; }
.tk-body .tk-content .table td .btn-primary { background: var(--tk-primary-soft) !important; color: var(--tk-primary-hover) !important; }
.tk-body .tk-content .table td .btn-primary:hover { background: #e0e7ff !important; }
.tk-body .tk-content .table td .btn-info { background: var(--tk-info-soft) !important; color: var(--tk-info-text) !important; }
.tk-body .tk-content .table td .btn-info:hover { background: #bae6fd !important; }
.tk-body .tk-content .table td .btn-success { background: var(--tk-success-soft) !important; color: var(--tk-success-text) !important; }
.tk-body .tk-content .table td .btn-success:hover { background: #bbf7d0 !important; }
.tk-body .tk-content .table td .btn-warning { background: var(--tk-warning-soft) !important; color: var(--tk-warning-text) !important; }
.tk-body .tk-content .table td .btn-warning:hover { background: #fde68a !important; }
.tk-body .tk-content .table td .btn-danger { background: var(--tk-danger-soft) !important; color: var(--tk-danger-text) !important; }
.tk-body .tk-content .table td .btn-danger:hover { background: #fecaca !important; }
.tk-body .tk-content .table td .btn-dark { background: var(--tk-slate-soft) !important; color: var(--tk-slate-text) !important; }
.tk-body .tk-content .table td .btn-dark:hover { background: #cbd5e1 !important; }
.tk-body .tk-content .table td .btn-secondary,
.tk-body .tk-content .table td .btn-light { background: var(--tk-neutral-soft) !important; color: var(--tk-neutral-text) !important; }
.tk-content .table td a { font-weight: 500; }

/* ---------- DataTables ---------- */
.dataTables_wrapper { font-size: 13.5px; color: var(--tk-muted); }
.dataTables_wrapper .row { align-items: center; }
.dataTables_wrapper > .row:first-child { margin-bottom: 14px; }
.dataTables_wrapper > .row:last-child { margin-top: 14px; }
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; color: var(--tk-muted); }
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    height: 36px !important;
    min-height: 36px !important;
    padding: 6px 12px !important;
    margin: 0 !important;
    width: auto;
    font-size: 13.5px;
    background-color: var(--tk-surface);
    border: 1px solid var(--tk-border-strong);
    border-radius: var(--tk-radius-sm);
    color: var(--tk-text);
}
.dataTables_wrapper .dataTables_filter input { min-width: 220px; }
.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus { border-color: var(--tk-primary); box-shadow: 0 0 0 3px var(--tk-primary-ring); outline: 0; }
.dataTables_wrapper .dataTables_info { color: var(--tk-muted); padding-top: 0; font-size: 13px; }
.dataTables_wrapper .dt-buttons { margin: 0; display: inline-flex; align-items: center; gap: 8px; }
.dataTables_wrapper .dt-buttons .btn { margin: 0; }

/* Toolbar: search, filters and export share one control style */
.dataTables_wrapper { container-type: inline-size; }
.dataTables_wrapper .tk-dt-top {
    display: flex; align-items: center; flex-wrap: nowrap; gap: 8px;
    margin-bottom: 20px;
}
.dataTables_wrapper .tk-dt-top .dataTables_filter { flex: 1 1 240px; min-width: 120px; max-width: 360px; margin: 0; padding: 0; text-align: left; float: none; }
.dataTables_wrapper .tk-dt-top .dataTables_filter label { display: flex; width: 100%; }
.dataTables_wrapper .tk-dt-top .dataTables_length { flex: 0 0 auto; margin: 0; padding: 0; float: none; }
.dataTables_wrapper .tk-dt-filters {
    flex: 0 1 auto; min-width: auto;
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(140px, 190px); align-items: center; gap: 8px;
}
.dataTables_wrapper .tk-dt-filters:empty { display: none; }
.dataTables_wrapper .tk-dt-filters .select2-container { min-width: 0; }
.dataTables_wrapper .tk-dt-top .dt-buttons { flex: 0 0 auto; width: auto !important; margin: 0 0 0 auto !important; float: none; }
.dataTables_wrapper .tk-dt-top .dataTables_filter input,
.dataTables_wrapper .tk-dt-top .dt-buttons .btn,
.dataTables_wrapper .tk-dt-filters .select2-container--default .select2-selection--single {
    box-sizing: border-box;
    height: 36px !important; min-height: 36px !important;
    margin: 0 !important;
    font-size: 13.5px !important; font-weight: 500;
    color: var(--tk-text) !important;
    background-color: var(--tk-surface) !important;
    border: 1px solid var(--tk-border-strong) !important;
    border-radius: var(--tk-radius-sm) !important;
    box-shadow: var(--tk-shadow-sm) !important;
}
.dataTables_wrapper .tk-dt-filters .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 34px !important; font-size: 13.5px !important;
    padding-left: 11px !important; padding-right: 28px !important;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dataTables_wrapper .tk-dt-filters .select2-container--default .select2-selection--single .select2-selection__arrow { width: 28px !important; background-position: right 10px center; }
.dataTables_wrapper .tk-dt-top .dataTables_filter input { min-width: 0 !important; width: 100% !important; padding: 6px 12px !important; font-weight: 400; }
.dataTables_wrapper .tk-dt-top .dataTables_filter input::placeholder { color: var(--tk-faint); }
.dataTables_wrapper .tk-dt-top .dt-buttons .btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 0 14px !important;
    white-space: nowrap;
}
.dataTables_wrapper .tk-dt-top .dt-buttons .btn i { color: var(--tk-success); font-size: 16px; margin: 0; }
.dataTables_wrapper .tk-dt-top .dataTables_filter input:hover,
.dataTables_wrapper .tk-dt-filters .select2-container--default:not(.select2-container--open):not(.select2-container--focus) .select2-selection--single:hover { border-color: var(--tk-faint) !important; }
.dataTables_wrapper .tk-dt-top .dt-buttons .btn:hover { background-color: var(--tk-neutral-soft) !important; }
.dataTables_wrapper .tk-dt-top .dataTables_filter input:focus,
.dataTables_wrapper .tk-dt-top .dt-buttons .btn:focus-visible,
.dataTables_wrapper .tk-dt-filters .select2-container--focus .select2-selection--single,
.dataTables_wrapper .tk-dt-filters .select2-container--open .select2-selection--single {
    border-color: var(--tk-primary) !important;
    box-shadow: 0 0 0 3px var(--tk-primary-ring) !important;
    outline: 0;
}
@container (max-width: 900px) {
    .dataTables_wrapper .tk-dt-top .dt-buttons .tk-label-long { display: none; }
}
@container (max-width: 650px) {
    .dataTables_wrapper .tk-dt-top { flex-wrap: wrap; }
    .dataTables_wrapper .tk-dt-top .dataTables_filter { order: 1; flex: 1 1 auto; max-width: none; }
    .dataTables_wrapper .tk-dt-top .dataTables_length { order: 2; }
    .dataTables_wrapper .tk-dt-top .dt-buttons { order: 3; margin-left: 0 !important; }
    .dataTables_wrapper .tk-dt-filters { order: 4; flex: 1 1 100%; grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
}
.dataTables_wrapper .tk-dt-bottom {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
    margin-top: 20px; padding-top: 4px;
}
.dataTables_wrapper .tk-dt-bottom .dataTables_info,
.dataTables_wrapper .tk-dt-bottom .dataTables_paginate { margin: 0; padding: 0; float: none; }
.dataTables_wrapper .dataTables_processing {
    background: var(--tk-surface) !important;
    border: 1px solid var(--tk-border);
    border-radius: var(--tk-radius-sm);
    box-shadow: var(--tk-shadow-md);
    color: var(--tk-text-2);
    padding: 10px 18px;
    font-weight: 500;
}
table.dataTable { border-collapse: collapse !important; margin-top: 0 !important; margin-bottom: 0 !important; width: 100% !important; }
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc { cursor: pointer; }
table.dataTable thead > tr > th.sorting::before, table.dataTable thead > tr > th.sorting::after,
table.dataTable thead > tr > th.sorting_asc::before, table.dataTable thead > tr > th.sorting_asc::after,
table.dataTable thead > tr > th.sorting_desc::before, table.dataTable thead > tr > th.sorting_desc::after { opacity: .25; }
table.dataTable thead > tr > th.sorting_asc::before,
table.dataTable thead > tr > th.sorting_desc::after { opacity: .9; color: var(--tk-primary); }
table.dataTable td.dataTables_empty { padding: 40px 14px; color: var(--tk-muted); text-align: center; }

/* ---------- Pagination ---------- */
.tk-body .pagination { margin: 0; gap: 4px; }
.tk-body .page-item .page-link {
    border: 1px solid transparent;
    background: transparent;
    color: var(--tk-text-2);
    font-size: 13px;
    font-weight: 500;
    min-width: 34px;
    height: 34px;
    line-height: 1;
    padding: 0 10px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--tk-radius-sm) !important;
    margin: 0;
    box-shadow: none;
}
.tk-body .page-item .page-link:hover { background: var(--tk-neutral-soft); color: var(--tk-text); }
.tk-body .page-item.active .page-link { background: var(--tk-primary); border-color: var(--tk-primary); color: #fff; }
.tk-body .page-item.disabled .page-link { color: var(--tk-faint); background: transparent; }
.tk-body .page-link:focus { box-shadow: 0 0 0 3px var(--tk-primary-ring); }

/* ==========================================================================
   Alerts, progress, modals, dropdowns
   ========================================================================== */
.tk-body .alert {
    border: 1px solid transparent;
    border-left-width: 1px !important;
    border-radius: var(--tk-radius-sm);
    padding: 12px 16px;
    font-size: 13.5px;
    box-shadow: none !important;
}
.tk-body .alert-success { background: #f0fdf4 !important; border-color: #bbf7d0 !important; color: var(--tk-success-text); }
.tk-body .alert-danger  { background: #fef2f2 !important; border-color: #fecaca !important; color: var(--tk-danger-text); }
.tk-body .alert-warning { background: #fffbeb !important; border-color: #fde68a !important; color: var(--tk-warning-text); }
.tk-body .alert-info    { background: #f0f9ff !important; border-color: #bae6fd !important; color: var(--tk-info-text); }
.tk-body .alert .close { opacity: .5; font-weight: 400; text-shadow: none; padding: 12px 14px; }
.tk-body .alert .close:hover { opacity: .9; }
.tk-body .alert ul { padding-left: 18px; }

.tk-body .progress { background: var(--tk-neutral-soft) !important; border-radius: 999px; box-shadow: none !important; height: 6px; overflow: hidden; }
.tk-body .progress-bar { box-shadow: none !important; border-radius: 0; }

.tk-body .modal-content { border: 1px solid var(--tk-border); border-radius: 14px; box-shadow: 0 20px 40px -12px rgba(16, 24, 40, .25); overflow: hidden; }
.tk-body .modal-header { background: var(--tk-surface); border-bottom: 1px solid var(--tk-border); padding: 16px 22px; }
.tk-body .modal-title { font-size: 16px; font-weight: 600; color: var(--tk-text); }
.tk-body .modal-body { padding: 22px; }
.tk-body .modal-footer { border-top: 1px solid var(--tk-border); padding: 14px 22px; background: var(--tk-surface-2); }
.tk-body .modal-backdrop.show { opacity: .45; }
.tk-body .close { color: var(--tk-muted); text-shadow: none; opacity: .8; font-weight: 400; }
.tk-body .close:hover { color: var(--tk-text); opacity: 1; }
.tk-body .modal-header { align-items: center; }
.tk-body .modal-header .close {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 30px; height: 30px; margin: 0 4px 0 auto; padding: 0;
    border-radius: 50%; background: var(--tk-danger); color: #fff; opacity: 1;
    font-size: 20px; line-height: 1;
    transition: background-color .15s ease, box-shadow .15s ease;
}
.tk-body .modal-header .close span { display: block; line-height: 1; transform: translateY(-1px); }
.tk-body .modal-header .close:not(:disabled):not(.disabled):hover,
.tk-body .modal-header .close:not(:disabled):not(.disabled):focus { background: #b91c1c; color: #fff; opacity: 1; }
.tk-body .modal-header .close:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(220, 38, 38, .3); }

.tk-body .dropdown-menu {
    background: var(--tk-surface);
    color: var(--tk-text-2);
    border: 1px solid var(--tk-border);
    border-radius: 10px;
    box-shadow: var(--tk-shadow-md);
    padding: 6px;
    font-size: 13.5px;
    min-width: 200px;
    margin-top: 6px;
}
.tk-body .dropdown-item,
.tk-body .dropdown .dropdown-menu .dropdown-item {
    border-radius: 6px;
    padding: 7px 10px !important;
    color: var(--tk-text-2);
    font-weight: 500 !important;
    display: flex; align-items: center; gap: 8px;
    font-size: 13px !important;
    line-height: 1.35 !important;
}
.tk-body .dropdown .dropdown-menu {
    font-size: 13px !important;
}
.tk-body .dropdown-item i { font-size: 16px !important; color: var(--tk-faint); margin: 0 !important; }
.tk-body .dropdown-item:hover,
.tk-body .dropdown-item:focus,
.tk-body .dropdown-item:active { background: var(--tk-neutral-soft); color: var(--tk-text); outline: 0; }
.tk-body .dropdown-item.tk-danger:hover { background: var(--tk-danger-soft); color: var(--tk-danger-text); }
.tk-body .dropdown-item.tk-danger:hover i { color: var(--tk-danger); }
.tk-body .dropdown-divider { border-color: var(--tk-border); margin: 6px 0; }
.tk-dropdown-head { padding: 6px 10px 8px; line-height: 1.3; }
.tk-dropdown-head strong { display: block; color: var(--tk-text); font-size: 13px !important; font-weight: 600; }
.tk-dropdown-head span { display: block; max-width: 240px; margin-top: 2px; color: var(--tk-muted); font-size: 11.5px !important; white-space: normal; }

/* ==========================================================================
   Select2
   ========================================================================== */
.select2-container { width: 100% !important; display: block; }
.select2-container:has(> .select2-dropdown) { width: auto !important; }
.select2-container--default .select2-selection--single {
    height: 40px !important;
    border: 1px solid var(--tk-border-strong) !important;
    border-radius: var(--tk-radius-sm) !important;
    background: var(--tk-surface) !important;
    box-shadow: var(--tk-shadow-sm);
    display: flex !important;
    align-items: center;
    padding: 0 !important;
    font-size: 14px !important;
    font-family: var(--tk-font);
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--tk-text) !important;
    line-height: 38px !important;
    padding-left: 12px !important;
    padding-right: 32px !important;
    font-size: 14px;
    width: 100%;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--tk-faint) !important; }
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important; width: 32px !important; right: 0 !important; top: 0 !important;
    background: var(--tk-chevron) no-repeat right 12px center / 14px 14px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow b { display: none !important; }
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single { border-color: var(--tk-primary) !important; box-shadow: 0 0 0 3px var(--tk-primary-ring) !important; }
.select2-container--default.select2-container--error .select2-selection--single { border-color: var(--tk-danger) !important; }
.select2-container--default.select2-container--disabled .select2-selection--single { background: var(--tk-neutral-soft) !important; cursor: not-allowed; }
.select2-container--default .select2-selection--single .select2-selection__clear { margin-right: 22px !important; color: var(--tk-faint); font-size: 18px; }
.select2-dropdown {
    background: var(--tk-surface) !important;
    color: var(--tk-text-2);
    border: 1px solid var(--tk-border) !important;
    border-radius: 10px !important;
    box-shadow: var(--tk-shadow-md) !important;
    overflow: hidden; margin-top: 4px; z-index: 2000;
}
.select2-dropdown--above { margin-top: -4px; }
.select2-container--default .select2-search--dropdown { padding: 8px; background: var(--tk-surface); }
.select2-container--default .select2-search--dropdown .select2-search__field {
    background: var(--tk-surface) !important;
    color: var(--tk-text) !important;
    border: 1px solid var(--tk-border-strong) !important;
    border-radius: var(--tk-radius-sm) !important;
    padding: 7px 10px !important;
    font-size: 13.5px !important;
    margin: 0 !important;
    width: 100% !important;
}
.select2-container--default .select2-search--dropdown .select2-search__field:focus { border-color: var(--tk-primary) !important; box-shadow: 0 0 0 3px var(--tk-primary-ring) !important; outline: 0 !important; }
.select2-container--default .select2-search--dropdown .select2-search__field::placeholder { color: var(--tk-faint); }
.select2-container--default .select2-results__option { padding: 8px 12px !important; font-size: 13.5px !important; color: var(--tk-text-2); background: transparent; }
.select2-container--default .select2-results__option--selected,
.select2-container--default .select2-results__option[aria-selected=true] { background: var(--tk-neutral-soft) !important; color: var(--tk-text) !important; font-weight: 600 !important; }
.select2-container--default .select2-results__option--highlighted,
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable,
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--tk-primary-soft) !important; color: var(--tk-primary-hover) !important; }
.select2-container--default .select2-results__option--disabled { color: var(--tk-faint) !important; }
.select2-container--default .select2-results__message { color: var(--tk-muted) !important; }
.select2-container--default .select2-results > .select2-results__options { max-height: 240px !important; }
.form-control.select2-hidden-accessible { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; min-height: 0 !important; }

/* ==========================================================================
   Ticket detail pages (show.php) — overrides the per-page inline styles
   ========================================================================== */
.tk-content .ticket-detail-card { border: 1px solid var(--tk-border) !important; box-shadow: var(--tk-shadow-sm) !important; border-radius: var(--tk-radius) !important; margin-bottom: 20px; overflow: hidden; }
.tk-content .ticket-detail-card .card-header {
    background: var(--tk-surface) !important;
    color: var(--tk-text) !important;
    border: 0 !important;
    border-bottom: 1px solid var(--tk-border) !important;
    border-radius: 0 !important;
    padding: 20px 24px !important;
}
.tk-content .ticket-detail-card .card-header h4,
.tk-content .ticket-detail-card .card-header .text-white,
.tk-content .ticket-detail-card h4,
.tk-content .ticket-detail-card h5,
.tk-content .ticket-detail-card h6,
.tk-content .info-section h5,
.tk-content .description-card h6 {
    color: var(--tk-text) !important;
    font-size: 15px !important;
    font-weight: 600;
    line-height: 1.3;
}
.tk-content .ticket-detail-card .card-header .badge-light,
.tk-content .ticket-detail-card .card-header .badge-custom {
    background: var(--tk-primary-soft) !important;
    color: var(--tk-primary-hover) !important;
    font-weight: 600;
    letter-spacing: .02em;
}
.tk-content .ticket-detail-card .card-header .mt-md-0 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tk-content .ticket-detail-card .card-header form { margin: 0; }
.tk-content .ticket-detail-card .card-body { padding: 24px !important; }

.tk-content .info-section {
    background: var(--tk-surface) !important;
    border: 1px solid var(--tk-border) !important;
    border-left: 1px solid var(--tk-border) !important;
    border-radius: var(--tk-radius) !important;
    padding: 20px 22px !important;
    margin-bottom: 0 !important;
    transform: none !important;
    box-shadow: none !important;
    height: 100%;
}
.tk-content .info-section:hover { transform: none !important; box-shadow: none !important; }
.tk-content .info-section h5 {
    display: flex; align-items: center; gap: 8px;
    color: var(--tk-text) !important;
    font-size: 15px !important;
    font-weight: 600;
    margin-bottom: 14px !important;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--tk-border);
}
.tk-content .info-section h5 i { color: var(--tk-primary); font-size: 18px; }

.tk-content .info-table { width: 100%; }
.tk-content .info-table tr { border-bottom: 1px solid var(--tk-neutral-soft) !important; }
.tk-content .info-table tr:last-child { border-bottom: 0 !important; }
.tk-content .info-table tr:hover { background: transparent !important; }
.tk-content .info-table th {
    color: var(--tk-muted) !important;
    font-size: 13px;
    font-weight: 500 !important;
    text-transform: none;
    letter-spacing: 0;
    padding: 11px 14px 11px 0 !important;
    background: transparent !important;
    border: 0 !important;
    white-space: normal !important;
    word-break: normal !important;
}
.tk-content .info-table td { color: var(--tk-text) !important; font-weight: 500; padding: 11px 0 !important; border: 0 !important; background: transparent; }

.tk-content .description-card { background: var(--tk-surface-2) !important; border: 1px solid var(--tk-border) !important; border-radius: var(--tk-radius-sm) !important; padding: 18px 20px !important; margin-top: 4px !important; box-shadow: none !important; }
.tk-content .description-card:hover { box-shadow: none !important; }
.tk-content .description-card h6 { color: var(--tk-text) !important; font-size: 15px !important; font-weight: 600; margin-bottom: 14px !important; }
.tk-content .description-card p { color: var(--tk-text-2) !important; line-height: 1.7; }
.tk-content .description-card strong { color: var(--tk-text) !important; font-weight: 600; font-size: 13px; }
.tk-content .long-text[title]:hover::after { background: var(--tk-text); border-radius: 6px; box-shadow: var(--tk-shadow-md); }

#fileViewerModal .modal-body { background: var(--tk-neutral-soft) !important; }

/* Upload drop zone (laporan error create/edit) */
.tk-content .drop-zone {
    border: 1.5px dashed var(--tk-border-strong) !important;
    border-radius: var(--tk-radius) !important;
    background: var(--tk-surface-2) !important;
    padding: 32px 24px !important;
    transition: border-color .15s ease, background .15s ease !important;
}
.tk-content .drop-zone:hover,
.tk-content .drop-zone.drag-over { border-color: var(--tk-primary) !important; background: var(--tk-primary-soft) !important; }
.tk-content .drop-zone .mdi { color: var(--tk-primary) !important; font-size: 40px !important; margin-bottom: 10px !important; }
.tk-content .drop-zone p:first-of-type { color: var(--tk-text) !important; font-size: 14.5px !important; font-weight: 600 !important; }
.tk-content .drop-zone p { color: var(--tk-muted) !important; }
.tk-content .file-preview-item img { border-radius: var(--tk-radius-sm); border: 1px solid var(--tk-border); }

/* Attachment cards */
.tk-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 280px)); gap: 12px; }
.tk-file {
    display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 10px; row-gap: 10px;
    padding: 12px; background: var(--tk-surface-2);
    border: 1px solid var(--tk-border); border-radius: var(--tk-radius-sm);
    min-width: 0; align-items: start;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.tk-file:hover { border-color: var(--tk-border-strong); box-shadow: var(--tk-shadow-sm); }
.tk-file-thumb {
    width: 44px; height: 44px; border-radius: 8px; overflow: hidden;
    background: var(--tk-surface); border: 1px solid var(--tk-border);
    display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.tk-file-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tk-file-thumb i { font-size: 22px; color: var(--tk-primary); }
.tk-file-thumb.is-pdf i { color: var(--tk-danger); }
.tk-file-body { min-width: 0; }
.tk-file-name { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--tk-text); line-height: 1.35; word-break: break-word; }
.tk-file-meta { margin: 3px 0 0; font-size: 12px; color: var(--tk-muted); }
.tk-file-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.tk-file-actions .btn { height: 32px; padding: 0 10px; font-size: 12.5px; }
.tk-content .info-section .tk-files + .text-muted { margin: 0; }

/* Verify ticket panel */
.tk-verify { border-left: 3px solid var(--tk-primary) !important; }
.tk-verify h5 i { color: var(--tk-primary); }
.tk-verify .tk-verify-hint { margin: -4px 0 16px; font-size: 13px; color: var(--tk-muted); }
.tk-verify .form-group { margin-bottom: 16px; }
.tk-verify-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Percakapan dua arah tiket */
.tk-thread-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px;
    background: var(--tk-primary-soft); color: var(--tk-primary);
    font-size: 12px; font-weight: 600;
}
.tk-thread .tk-thread-hint { margin: -4px 0 16px; font-size: 13px; color: var(--tk-muted); }
.tk-tchat {
    display: flex; flex-direction: column;
    max-height: 560px; min-height: 140px; overflow-y: auto;
    padding: 6px 16px 16px;
    border: 1px solid var(--tk-border); border-bottom: 0;
    border-radius: var(--tk-radius-sm) var(--tk-radius-sm) 0 0;
    background: var(--tk-bg);
}
.tk-tchat-empty { margin: auto; padding: 24px 16px; text-align: center; color: var(--tk-muted); font-size: 13px; }
.tk-tchat-empty i { display: block; margin-bottom: 6px; font-size: 32px; color: var(--tk-faint); }
.tk-tchat-empty p { max-width: 380px; margin: 0 auto; }
.tk-tchat-day {
    display: flex; align-items: center; gap: 12px; margin: 14px 0 4px;
    color: var(--tk-faint); font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
}
.tk-tchat-day::before, .tk-tchat-day::after { content: ''; flex: 1; height: 1px; background: var(--tk-border); }
.tk-bubble-row { display: flex; align-items: flex-start; gap: 8px; margin-top: 4px; }
.tk-bubble-row.is-first { margin-top: 14px; }
.tk-bubble-row.is-mine { justify-content: flex-end; }
.tk-bubble-avatar {
    flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--tk-slate-soft); color: var(--tk-slate-text);
    font-size: 11.5px; font-weight: 600;
}
.tk-bubble-avatar.is-ghost { visibility: hidden; height: 0; }
.is-staff .tk-bubble-avatar { background: var(--tk-primary-soft); color: var(--tk-primary); }
.tk-bubble {
    max-width: min(72%, 560px); min-width: 120px;
    padding: 9px 12px 7px;
    background: var(--tk-surface); color: var(--tk-text-2);
    border: 1px solid var(--tk-border); border-radius: 14px;
    box-shadow: var(--tk-shadow-sm);
    font-size: 14px; line-height: 1.55;
}
.is-first.is-other .tk-bubble { border-top-left-radius: 4px; }
.is-mine .tk-bubble { background: var(--tk-primary); color: #fff; border-color: transparent; }
.is-first.is-mine .tk-bubble { border-top-right-radius: 4px; }
[data-theme="dark"] .is-mine .tk-bubble { background: #4f46e5; }
.tk-bubble-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 12.5px; font-weight: 600; color: var(--tk-text); }
.tk-bubble-name span {
    padding: 1px 7px; border-radius: 999px;
    background: var(--tk-neutral-soft); color: var(--tk-neutral-text);
    font-size: 10.5px; font-weight: 500;
}
.is-staff .tk-bubble-name span { background: var(--tk-primary-soft); color: var(--tk-primary); }
.tk-bubble-text { overflow-wrap: anywhere; }
.tk-bubble-meta { display: flex; align-items: center; justify-content: flex-end; gap: 3px; margin-top: 4px; }
.tk-bubble-time { display: block; text-align: right; font-size: 11px; line-height: 1; color: var(--tk-faint); }
.is-mine .tk-bubble-time { color: rgba(255, 255, 255, .72); }
.tk-bubble-check { font-size: 16px; line-height: 1; color: rgba(255, 255, 255, .5); transition: color .2s ease; }
.tk-bubble-check.is-read { color: #67e8f9; }
.tk-bubble-edited { font-size: 11px; line-height: 1; font-style: italic; color: var(--tk-faint); margin-right: 2px; }
.is-mine .tk-bubble-edited { color: rgba(255, 255, 255, .72); }
.tk-bubble-deleted { display: flex; align-items: center; gap: 5px; font-style: italic; opacity: .8; }
.is-deleted.is-mine .tk-bubble { background: var(--tk-primary-soft); color: var(--tk-muted); }
.is-deleted.is-mine .tk-bubble-time { color: var(--tk-faint); }
.tk-bubble-row[data-reply-id] .tk-bubble { transition: filter .15s ease, box-shadow .15s ease; }
.tk-bubble-row.is-menu-open .tk-bubble { filter: brightness(.92); box-shadow: 0 0 0 2px var(--tk-primary-soft); }
.tk-bubble-menu {
    position: fixed; z-index: 1060; min-width: 168px; padding: 6px;
    background: var(--tk-surface); border: 1px solid var(--tk-border); border-radius: var(--tk-radius-sm);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .16);
}
.tk-bubble-menu[hidden] { display: none; }
.tk-bubble-menu button {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px;
    border: 0; border-radius: 6px; background: none; color: var(--tk-text); font-size: 13.5px; text-align: left;
}
.tk-bubble-menu button i { font-size: 18px; color: var(--tk-muted); }
.tk-bubble-menu button:hover, .tk-bubble-menu button:focus-visible { background: var(--tk-surface-2); outline: none; }
.tk-bubble-menu button.is-danger, .tk-bubble-menu button.is-danger i { color: var(--tk-danger); }
.tk-reply-info-preview {
    margin-bottom: 14px; padding: 10px 12px; border-radius: var(--tk-radius-sm);
    background: var(--tk-primary); color: #fff; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px;
}
.tk-reply-info-preview:empty { display: none; }
.tk-reply-info { margin: 0; padding: 0; list-style: none; }
.tk-reply-info li { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--tk-border); }
.tk-reply-info li:first-child { border-top: 0; }
.tk-reply-info li[hidden] { display: none; }
.tk-reply-info li > i { font-size: 20px; line-height: 1.1; color: var(--tk-faint); }
.tk-reply-info li > i.is-read { color: #0ea5e9; }
.tk-reply-info li div { display: flex; flex-direction: column; }
.tk-reply-info li strong { font-size: 13.5px; font-weight: 600; color: var(--tk-text); }
.tk-reply-info li span { font-size: 12.5px; color: var(--tk-muted); }
.tk-bubble-img { display: block; margin-bottom: 8px; border-radius: var(--tk-radius-sm); overflow: hidden; }
.tk-bubble-img img { display: block; width: auto; min-width: 120px; max-width: min(280px, 100%); max-height: 300px; object-fit: cover; }
.tk-bubble-file {
    display: flex; align-items: center; gap: 10px; min-width: 230px;
    margin-bottom: 8px; padding: 8px 10px; border-radius: var(--tk-radius-sm);
    background: var(--tk-neutral-soft); border: 1px solid var(--tk-border);
}
.is-mine .tk-bubble-file { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .2); }
.tk-bubble-file > i { font-size: 28px; color: var(--tk-primary); }
.is-mine .tk-bubble-file > i { color: #fff; }
.tk-bubble-file a { color: inherit; text-decoration: none !important; }
.tk-bubble-file a:first-of-type { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.tk-bubble-file a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; }
.tk-bubble-file a small { font-size: 11px; color: var(--tk-muted); }
.is-mine .tk-bubble-file a small { color: rgba(255, 255, 255, .72); }
.tk-bubble-file .tk-bubble-dl {
    flex: 0 0 30px; height: 30px; border-radius: var(--tk-radius-sm);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--tk-muted);
}
.tk-bubble-file .tk-bubble-dl:hover { background: var(--tk-surface); color: var(--tk-primary); }
.is-mine .tk-bubble-file .tk-bubble-dl { color: #fff; }
.is-mine .tk-bubble-file .tk-bubble-dl:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.tk-composer {
    padding: 12px;
    border: 1px solid var(--tk-border);
    border-radius: 0 0 var(--tk-radius-sm) var(--tk-radius-sm);
    background: var(--tk-surface);
}
.tk-composer-bar { display: flex; align-items: flex-end; gap: 8px; }
.tk-composer .tk-composer-attach {
    flex: 0 0 40px; height: 40px; margin: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--tk-border); border-radius: var(--tk-radius-sm);
    background: var(--tk-surface); color: var(--tk-muted); cursor: pointer;
}
.tk-composer-attach .mdi { font-size: 19px; line-height: 1; }
.tk-composer-attach:hover { border-color: var(--tk-primary); color: var(--tk-primary); background: var(--tk-primary-soft); }
.tk-composer textarea {
    flex: 1; min-width: 0; height: 40px; min-height: 40px; max-height: 160px; margin: 0;
    box-sizing: border-box; overflow-y: hidden;
    padding: 9px 12px; border: 1px solid var(--tk-border-strong); border-radius: var(--tk-radius-sm);
    background: var(--tk-surface); color: var(--tk-text);
    font-size: 14px; line-height: 1.45; resize: none; outline: none;
}
.tk-composer textarea::placeholder { color: var(--tk-faint); }
.tk-composer textarea:focus { border-color: var(--tk-primary); box-shadow: 0 0 0 3px var(--tk-primary-ring); }
.tk-composer-send {
    flex: 0 0 auto; height: 40px; padding: 0 16px; border: 0; border-radius: var(--tk-radius-sm);
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--tk-primary); color: #fff; font-size: 14px; font-weight: 500; cursor: pointer;
}
.tk-composer-send .mdi { font-size: 16px; }
.tk-composer-send:hover { background: var(--tk-primary-hover); }
.tk-composer-send:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--tk-primary-ring); }
.tk-composer-send:disabled { opacity: .7; cursor: default; }
.tk-composer-note { display: block; margin: 6px 0 0 48px; color: var(--tk-faint); font-size: 11.5px; }
.tk-composer-error {
    margin-bottom: 8px; padding: 8px 12px; border-radius: var(--tk-radius-sm);
    background: var(--tk-danger-soft); color: var(--tk-danger-text); font-size: 13px;
}
.tk-composer-picked { list-style: none; margin: 0 0 8px 48px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tk-composer-picked li {
    display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
    padding: 4px 6px 4px 10px; border-radius: 999px;
    background: var(--tk-primary-soft); color: var(--tk-text); font-size: 12px;
}
.tk-composer-picked li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.tk-composer-picked li small { color: var(--tk-muted); }
.tk-composer-picked li button {
    border: 0; background: transparent; color: var(--tk-muted); padding: 0 4px; line-height: 1; cursor: pointer;
}
.tk-composer-picked li button:hover { color: var(--tk-danger); }
.tk-composer-picked li.is-warning { background: var(--tk-warning-soft); color: var(--tk-warning-text); padding-right: 10px; }
.tk-thread-locked {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 14px;
    border: 1px solid var(--tk-border);
    border-radius: 0 0 var(--tk-radius-sm) var(--tk-radius-sm);
    background: var(--tk-neutral-soft); color: var(--tk-neutral-text); font-size: 13px;
}
.tk-thread-locked i { font-size: 18px; }
@media (max-width: 576px) {
    .tk-tchat { padding: 8px 8px 12px; max-height: 70vh; }
    .tk-bubble { max-width: 85%; }
    .tk-bubble-file { min-width: 0; }
    .tk-composer-note { margin-left: 4px; }
    .tk-composer-picked { margin-left: 0; }
}

/* Rating kepuasan layanan */
.tk-stars { display: inline-flex; gap: 1px; color: #f59e0b; font-size: 15px; line-height: 1; white-space: nowrap; }
.tk-stars .mdi-star-outline { color: var(--tk-border-strong); }
.tk-stars.is-lg { font-size: 22px; gap: 2px; }
.tk-rating-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--tk-border);
}
.tk-content .tk-rating-head h5 { margin: 0 !important; padding: 0; border: 0; }
.tk-content .tk-rating-head h5 i { color: #f59e0b; }
.tk-rating-edit {
    display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px;
    border: 1px solid var(--tk-border); border-radius: var(--tk-radius-sm); background: var(--tk-surface);
    color: var(--tk-text-2); font-size: 12.5px; font-weight: 500; cursor: pointer;
}
.tk-rating-edit:hover { border-color: var(--tk-primary); color: var(--tk-primary); background: var(--tk-primary-soft); }
.tk-rating-score { display: flex; align-items: center; gap: 14px; }
.tk-rating-num { color: var(--tk-text); font-size: 34px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.tk-rating-num small { margin-left: 2px; color: var(--tk-muted); font-size: 15px; font-weight: 500; letter-spacing: 0; }
.tk-rating-score-body { display: flex; flex-direction: column; gap: 4px; }
.tk-rating-word { color: var(--tk-text); font-size: 14px; font-weight: 600; }
.tk-rating-quote {
    margin: 14px 0 0; padding: 10px 14px; border-left: 3px solid var(--tk-primary);
    border-radius: 0 var(--tk-radius-sm) var(--tk-radius-sm) 0; background: var(--tk-surface-2);
    color: var(--tk-text-2); font-size: 13.5px; line-height: 1.55; overflow-wrap: anywhere;
}
.tk-rating-meta { margin: 12px 0 0; color: var(--tk-muted); font-size: 12.5px; }
.tk-rating-meta b { color: var(--tk-text-2); font-weight: 600; }
.tk-rating-empty { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--tk-muted); font-size: 13.5px; }
.tk-rating-hint { margin: 0 0 10px; color: var(--tk-text-2); font-size: 13.5px; }
.tk-rating-error {
    margin-bottom: 10px; padding: 8px 12px; border-radius: var(--tk-radius-sm);
    background: var(--tk-danger-soft); color: var(--tk-danger-text); font-size: 13px;
}
.tk-rating-pick { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 12px; }
.tk-stars-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.tk-stars-input input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.tk-content .tk-stars-input label {
    margin: 0; padding: 0; color: var(--tk-border-strong); font-size: 32px; line-height: 1; cursor: pointer;
    transition: color .12s ease, transform .12s ease;
}
.tk-content .tk-stars-input input:checked ~ label,
.tk-content .tk-stars-input:hover label:hover,
.tk-content .tk-stars-input:hover label:hover ~ label { color: #f59e0b; }
.tk-content .tk-stars-input:hover label { color: var(--tk-border-strong); }
.tk-content .tk-stars-input label:hover { transform: scale(1.12); }
.tk-content .tk-stars-input input:focus-visible + label { outline: 2px solid var(--tk-primary-ring); outline-offset: 2px; border-radius: 4px; }
.tk-rating-pick-label { color: var(--tk-text); font-size: 14px; font-weight: 600; }
.tk-rating-form textarea { resize: vertical; min-height: 84px; }
.tk-rating-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tk-rating-note { margin-right: auto; color: var(--tk-muted); font-size: 12px; }

/* Rekap rating */
.tk-rating-overview { display: grid; grid-template-columns: minmax(160px, 200px) minmax(220px, 1fr) minmax(220px, 280px); gap: 24px 28px; align-items: center; }
.tk-rating-big { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.tk-rating-big-num { color: var(--tk-text); font-size: 46px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.tk-rating-big-num small { margin-left: 2px; color: var(--tk-muted); font-size: 18px; font-weight: 500; letter-spacing: 0; }
.tk-rating-big-note { color: var(--tk-muted); font-size: 12.5px; }
.tk-rating-dist { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.tk-rating-dist a, .tk-rating-dist-row {
    display: grid; grid-template-columns: 38px minmax(0, 1fr) 44px; align-items: center; gap: 10px;
    padding: 5px 8px; border-radius: var(--tk-radius-sm); color: var(--tk-text-2); font-size: 13px; text-decoration: none;
}
.tk-rating-dist a:hover { background: var(--tk-surface-2); color: var(--tk-text); }
.tk-rating-dist a.is-active { background: var(--tk-primary-soft); color: var(--tk-primary); }
.tk-rating-dist-star { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; }
.tk-rating-dist-star .mdi { color: #f59e0b; font-size: 14px; }
.tk-rating-dist-bar { height: 8px; border-radius: 999px; background: var(--tk-neutral-soft); overflow: hidden; }
.tk-rating-dist-bar > span { display: block; height: 100%; border-radius: inherit; background: #f59e0b; }
.tk-rating-dist-n { text-align: right; color: var(--tk-muted); font-variant-numeric: tabular-nums; }
.tk-rating-kpis { display: grid; gap: 12px; }
.tk-rating-none .mdi { color: #f59e0b; }
.tk-rating-filter { margin: 10px 0 0; }
.tk-sla-table-title.tk-profile-rating-sub { margin: 26px 0 10px; }
.tk-profile-rating-given {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
    background: var(--tk-neutral-soft); color: var(--tk-neutral-text); font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.tk-profile-rating-given .mdi { color: #f59e0b; font-size: 15px; }
.tk-profile-rating-list { padding: 0; border: 1px solid var(--tk-border); border-radius: 12px; }
.tk-profile-rating-list .tk-awaiting-item { border-radius: 0; }
.tk-profile-rating-list + .tk-awaiting-more { margin-top: 8px; border-radius: 10px; }
.tk-awaiting-time.tk-profile-rating-cta { background: var(--tk-warning-soft); color: var(--tk-warning-text); }
.tk-rating-avg { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.tk-rating-avg b { color: var(--tk-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.tk-reviews { margin: 0; padding: 0; list-style: none; border: 1px solid var(--tk-border); border-radius: 12px; overflow: hidden; }
.tk-review { padding: 14px 16px; }
.tk-review + .tk-review { border-top: 1px solid var(--tk-border); }
.tk-review.is-low { box-shadow: inset 3px 0 0 var(--tk-danger); }
.tk-review-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tk-review-top time { color: var(--tk-muted); font-size: 12px; white-space: nowrap; }
.tk-review-text { margin: 8px 0 0; color: var(--tk-text-2); font-size: 13.5px; line-height: 1.55; overflow-wrap: anywhere; }
.tk-review-text.is-empty { color: var(--tk-faint); font-style: italic; }
.tk-review-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 8px; color: var(--tk-muted); font-size: 12px; }
.tk-review-meta a { font-weight: 600; }
.tk-review-meta > * + *::before { content: ''; display: inline-block; width: 3px; height: 3px; margin: 0 8px 2px -6px; border-radius: 50%; background: var(--tk-faint); vertical-align: middle; }
@media (max-width: 1279px) {
    .tk-rating-overview { grid-template-columns: minmax(140px, 190px) minmax(0, 1fr); }
    .tk-rating-kpis { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 575px) {
    .tk-rating-overview, .tk-rating-kpis { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .tk-content .info-section { padding: 16px !important; }
    .tk-content .info-table tr { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 10px 0 !important; border-bottom: 1px solid var(--tk-neutral-soft) !important; }
    .tk-content .info-table th { color: var(--tk-muted) !important; font-size: 12px !important; border: 0 !important; padding: 0 0 2px !important; margin: 0 !important; }
    .tk-content .info-table td { padding: 0 !important; }
}

/* ==========================================================================
   Dashboard
   ========================================================================== */
.tk-filter {
    display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px;
}
.tk-filter .tk-field { display: flex; flex-direction: column; gap: 4px; }
.tk-filter .tk-field label { margin: 0; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--tk-muted); }
.tk-filter .form-control { min-height: 38px; padding: 6px 10px; font-size: 13.5px; width: auto; }
.tk-page-head .tk-filter--bar { flex: 1 1 100%; }
.tk-page-head:has(> .tk-filter--bar) { align-items: center; }
.tk-filter .tk-field--grow { flex: 1 1 220px; min-width: 200px; }
.tk-filter-actions { display: flex; gap: 10px; margin-left: auto; }
.tk-filter--bar .form-control,
.tk-filter--bar .btn,
.tk-filter-actions .btn,
.tk-filter--bar .select2-container--default .select2-selection--single { height: 40px !important; min-height: 40px; }
.tk-filter--bar .btn,
.tk-filter-actions .btn { display: inline-flex; align-items: center; gap: 6px; padding-top: 0; padding-bottom: 0; white-space: nowrap; }
.tk-filter--bar .select2-container--default .select2-selection--single .select2-selection__rendered { font-size: 13.5px; }
.tk-filter--bar .select2-container--default .select2-selection__rendered.is-placeholder { color: var(--tk-faint) !important; }

/* Multi-select with checkboxes (dashboard filter) */
.tk-multi-opt { display: flex; align-items: center; gap: 10px; }
.tk-multi-check {
    position: relative; flex: none; width: 16px; height: 16px;
    border: 1.5px solid var(--tk-border-strong); border-radius: 4px; background: var(--tk-surface);
    transition: background-color .12s, border-color .12s;
}
.tk-multi-check::after {
    content: ''; position: absolute; left: 4.5px; top: 1px; width: 4px; height: 8px;
    border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); opacity: 0;
}
.select2-results__option--selected .tk-multi-check,
.select2-results__option[aria-selected=true] .tk-multi-check { background: var(--tk-primary); border-color: var(--tk-primary); }
.select2-results__option--selected .tk-multi-check::after,
.select2-results__option[aria-selected=true] .tk-multi-check::after { opacity: 1; }
.select2-container--default .tk-multi-dropdown .select2-results__option--selected,
.select2-container--default .tk-multi-dropdown .select2-results__option[aria-selected=true] { background: transparent !important; color: var(--tk-text-2) !important; font-weight: 400 !important; }
.select2-container--default .tk-multi-dropdown .select2-results__option--highlighted[aria-selected],
.select2-container--default .tk-multi-dropdown .select2-results__option--highlighted.select2-results__option--selectable { background: var(--tk-primary-soft) !important; color: var(--tk-primary-hover) !important; }
.select2-container--default .tk-multi-dropdown .select2-results__group {
    padding: 10px 12px 4px !important; font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .04em; color: var(--tk-muted);
}
.select2-container--default .tk-multi-dropdown .select2-results__option .select2-results__option { padding-left: 12px !important; }
.select2-container--default .tk-multi-dropdown .select2-results > .select2-results__options { max-height: 300px !important; }
.tk-multi-actions {
    display: flex; align-items: center; gap: 4px;
    padding: 0 8px 8px; border-bottom: 1px solid var(--tk-border); background: var(--tk-surface);
}
.tk-multi-count { margin-right: auto; padding-left: 4px; font-size: 12px; color: var(--tk-muted); }
.tk-multi-actions button {
    display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0;
    border: 0; border-radius: 6px; background: transparent;
    font-size: 18px; line-height: 1; color: var(--tk-primary); cursor: pointer;
}
.tk-multi-actions button[data-act="none"] { color: var(--tk-danger); }
.tk-multi-actions button:hover:not(:disabled) { background: var(--tk-neutral-soft); }
.tk-multi-actions button:disabled { color: var(--tk-faint); cursor: default; }
.tk-filter-active {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    margin: -6px 0 18px; font-size: 13px; color: var(--tk-muted);
}
.tk-filter-active-label { font-weight: 600; }
.tk-filter-chip {
    padding: 3px 10px; border-radius: 999px; color: var(--tk-text);
    background: var(--tk-surface); border: 1px solid var(--tk-border);
}
.tk-filter-chip b { font-weight: 600; }
.tk-filter-clear { font-weight: 600; color: var(--tk-danger); }
.tk-filter-clear:hover { text-decoration: none; opacity: .8; }

.tk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 20px; }
.tk-stat {
    background: var(--tk-surface);
    border: 1px solid var(--tk-border);
    border-radius: var(--tk-radius);
    box-shadow: var(--tk-shadow-sm);
    padding: 18px 18px 16px;
    display: flex; flex-direction: column; gap: 14px;
}
.tk-stat-top { display: flex; align-items: center; justify-content: space-between; }
.tk-stat-label { font-size: 13px; font-weight: 500; color: var(--tk-muted); }
.tk-stat-icon {
    width: 34px; height: 34px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 19px;
}
.tk-stat-value { font-size: 30px; line-height: 1; font-weight: 700; color: var(--tk-text); letter-spacing: -0.03em; }
.tk-stat.is-warning { background: #fffbeb; border-color: #fde68a; }
.tk-stat.is-warning .tk-stat-label, .tk-stat.is-warning .tk-stat-value { color: var(--tk-warning-text); }
.tk-stat.is-warning .tk-stat-icon { background: var(--tk-warning-soft); color: var(--tk-warning); }
.tk-stat.is-info { background: #f0f9ff; border-color: #bae6fd; }
.tk-stat.is-info .tk-stat-label, .tk-stat.is-info .tk-stat-value { color: var(--tk-info-text); }
.tk-stat.is-info .tk-stat-icon { background: var(--tk-info-soft); color: var(--tk-info); }
.tk-stat.is-primary { background: var(--tk-primary-soft); border-color: #c7d2fe; }
.tk-stat.is-primary .tk-stat-label, .tk-stat.is-primary .tk-stat-value { color: var(--tk-primary-hover); }
.tk-stat.is-primary .tk-stat-icon { background: #e0e7ff; color: var(--tk-primary); }
.tk-stat.is-success { background: #f0fdf4; border-color: #bbf7d0; }
.tk-stat.is-success .tk-stat-label, .tk-stat.is-success .tk-stat-value { color: var(--tk-success-text); }
.tk-stat.is-success .tk-stat-icon { background: var(--tk-success-soft); color: var(--tk-success); }
.tk-stat.is-dark { background: #f8fafc; border-color: #cbd5e1; }
.tk-stat.is-dark .tk-stat-label, .tk-stat.is-dark .tk-stat-value { color: var(--tk-slate-text); }
.tk-stat.is-dark .tk-stat-icon { background: var(--tk-slate-soft); color: var(--tk-slate); }
.tk-stat.is-danger { background: #fef2f2; border-color: #fecaca; }
.tk-stat.is-danger .tk-stat-label, .tk-stat.is-danger .tk-stat-value { color: var(--tk-danger-text); }
.tk-stat.is-danger .tk-stat-icon { background: var(--tk-danger-soft); color: var(--tk-danger); }

.tk-chart { position: relative; height: 300px; }
.tk-chart-split .tk-chart { height: 190px; }
.tk-sla-badge { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.tk-sla-badge .mdi { font-size: 12px; line-height: 1; }
.tk-sla-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.tk-sla-detail { color: var(--tk-text-2); }
.tk-sla-target { flex-basis: 100%; color: var(--tk-muted); font-size: 12px; }
.tk-card-heading-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tk-sla-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 22px; }
.tk-sla-kpi { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--tk-border); border-radius: 12px; background: var(--tk-surface-2); }
.tk-sla-kpi-label { color: var(--tk-muted); font-size: 12px; font-weight: 500; }
.tk-sla-kpi-value { color: var(--tk-text); font-size: 24px; font-weight: 700; line-height: 1.1; }
.tk-sla-kpi.is-danger .tk-sla-kpi-value { color: var(--tk-danger); }
.tk-sla-kpi.is-warning .tk-sla-kpi-value { color: var(--tk-warning); }
.tk-sla-kpi .tk-sla-pct b { font-size: 24px; line-height: 1.1; }
.tk-sla-kpi .tk-sla-pct-bar { flex-basis: 100%; order: 3; }
.tk-sla-pct { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 120px; font-variant-numeric: tabular-nums; }
.tk-sla-pct b { font-weight: 700; }
.tk-sla-pct small { color: var(--tk-muted); font-size: 11.5px; }
.tk-sla-pct.is-empty { color: var(--tk-muted); }
.tk-sla-pct-bar { display: block; flex: 0 0 56px; height: 5px; border-radius: 999px; background: var(--tk-neutral-soft); overflow: hidden; }
.tk-sla-pct-bar > span { display: block; height: 100%; border-radius: inherit; }
.tk-c-text-success { color: var(--tk-success-text); }
.tk-c-text-warning { color: var(--tk-warning-text); }
.tk-c-text-danger { color: var(--tk-danger); }
.tk-sla-table-title { margin: 0 0 10px; color: var(--tk-text); font-size: 13px; font-weight: 600; }
.tk-sla-table { margin-bottom: 18px; font-size: 13px; }
.tk-sla-table th { color: var(--tk-muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tk-sla-table td, .tk-sla-table th { padding: 9px 10px; vertical-align: middle; }
.tk-sla-target-note { display: block; margin-top: 4px; color: var(--tk-muted); font-size: 11.5px; }
.tk-sla-footnote { margin: 0; color: var(--tk-muted); font-size: 12px; line-height: 1.6; }
.tk-sla-kpi-label .mdi { margin-right: 2px; font-size: 14px; vertical-align: -1px; }
.tk-sla-kpi-note { margin-top: -4px; color: var(--tk-muted); font-size: 11.5px; }
.tk-time-cell { display: inline-flex; flex-direction: column; gap: 1px; font-variant-numeric: tabular-nums; }
.tk-time-cell b { color: var(--tk-text); font-weight: 600; white-space: nowrap; }
.tk-time-cell small { color: var(--tk-muted); font-size: 11.5px; white-space: nowrap; }

/* Masalah berulang (dashboard) */
.tk-recur-range { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--tk-border); border-radius: 10px; background: var(--tk-surface-2); }
.tk-recur-range a { padding: 6px 12px; border-radius: 7px; color: var(--tk-muted); font-size: 12.5px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.tk-recur-range a:hover { color: var(--tk-text); }
.tk-recur-range a.is-active { background: var(--tk-surface); color: var(--tk-primary); font-weight: 600; box-shadow: var(--tk-shadow-sm); }
.tk-recur-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 16px; color: var(--tk-muted); text-align: center; }
.tk-recur-empty .mdi { color: var(--tk-success); font-size: 34px; line-height: 1; }
.tk-recur-empty p { margin: 0; font-size: 13.5px; }
.tk-recur-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--tk-border); border-radius: 12px; overflow: hidden; }
.tk-recur-list > li + li { border-top: 1px solid var(--tk-border); }
.tk-recur-list + .tk-recur-more { margin-top: -1px; border: 1px solid var(--tk-border); border-radius: 0 0 12px 12px; }
.tk-recur-list:has(+ .tk-recur-more) { border-radius: 12px 12px 0 0; }
.tk-recur-item > summary {
    display: grid; grid-template-columns: 56px minmax(0, 1fr) auto 20px; align-items: center; gap: 14px;
    padding: 12px 16px; cursor: pointer; list-style: none; transition: background .15s ease;
}
.tk-recur-item > summary::-webkit-details-marker { display: none; }
.tk-recur-item > summary:hover, .tk-recur-item[open] > summary { background: var(--tk-surface-2); }
.tk-recur-count {
    display: inline-flex; align-items: center; justify-content: center; height: 40px; border-radius: 10px;
    background: var(--tk-info-soft); color: var(--tk-info-text); font-size: 15px; font-variant-numeric: tabular-nums;
}
.tk-recur-count.is-mid { background: var(--tk-warning-soft); color: var(--tk-warning-text); }
.tk-recur-count.is-high { background: var(--tk-danger-soft); color: var(--tk-danger-text); }
.tk-recur-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tk-recur-title { color: var(--tk-text); font-size: 14px; font-weight: 600; line-height: 1.35; }
.tk-recur-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--tk-muted); font-size: 12px; }
.tk-recur-meta > span + span::before { content: ''; display: inline-block; width: 3px; height: 3px; margin: 0 8px 2px -6px; border-radius: 50%; background: var(--tk-faint); vertical-align: middle; }
.tk-recur-app { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; background: var(--tk-primary-soft); color: var(--tk-primary); font-weight: 600; }
.tk-recur-app .mdi { font-size: 13px; }
.tk-recur-meta > .tk-recur-app + span::before { display: none; }
.tk-recur-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.tk-recur-last { color: var(--tk-muted); font-size: 12px; white-space: nowrap; }
.tk-recur-chevron { color: var(--tk-faint); font-size: 20px; transition: transform .2s ease; }
.tk-recur-item[open] .tk-recur-chevron { transform: rotate(180deg); }
.tk-recur-tickets { margin: 0; padding: 4px 16px 12px 86px; list-style: none; background: var(--tk-surface-2); }
.tk-recur-tickets li { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto 82px; align-items: center; gap: 12px; padding: 7px 0; font-size: 12.5px; }
.tk-recur-tickets li + li { border-top: 1px dashed var(--tk-border); }
.tk-recur-code { color: var(--tk-primary); font-weight: 600; font-variant-numeric: tabular-nums; }
.tk-recur-judul { overflow: hidden; color: var(--tk-text-2); text-overflow: ellipsis; white-space: nowrap; }
.tk-recur-date { color: var(--tk-muted); text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 768px) {
    .tk-recur-item > summary { grid-template-columns: 48px minmax(0, 1fr) 20px; gap: 12px; }
    .tk-recur-side { grid-column: 2; grid-row: 2; flex-direction: row; align-items: center; }
    .tk-recur-chevron { grid-column: 3; grid-row: 1; }
    .tk-recur-tickets { padding-left: 16px; }
    .tk-recur-tickets li { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; }
    .tk-recur-judul { grid-column: 1 / -1; grid-row: 2; }
    .tk-recur-date { display: none; }
}
.tk-sla-form-table td { min-width: 150px; }
.tk-sla-form-table td:first-child { min-width: 0; width: 1%; white-space: nowrap; }
.tk-sla-hint { display: block; min-height: 16px; margin-top: 4px; color: var(--tk-muted); font-size: 11.5px; }
.tk-sla-holiday-form { display: grid; grid-template-columns: 150px 1fr auto; gap: 8px; margin-bottom: 16px; }
@media (max-width: 575.98px) { .tk-sla-holiday-form { grid-template-columns: 1fr; } }
.tk-sla-holidays { max-height: 420px; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.tk-sla-holidays li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--tk-border); line-height: 1.4; }
.tk-sla-holiday-date { display: block; color: var(--tk-text); font-size: 13px; font-weight: 600; }
.tk-sla-holiday-name { display: block; color: var(--tk-muted); font-size: 12px; }
.tk-jenis-services .list-group-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--tk-surface); color: var(--tk-text-2); font-size: 13.5px; }
.tk-jenis-services .list-group-item:hover { background: var(--tk-neutral-soft); }
.tk-jenis-services .list-group-item.active { background: var(--tk-primary-soft); border-color: var(--tk-border); color: var(--tk-primary-hover); font-weight: 600; }
.tk-jenis-services .list-group-item i { font-size: 18px; }
.tk-jenis-service-name { flex: 1 1 auto; min-width: 0; }
.tk-jenis-add-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 16px; }
.tk-jenis-add-form .btn,
.tk-sla-holiday-form .btn { height: auto; min-height: 40px; }
@media (max-width: 575.98px) { .tk-jenis-add-form { grid-template-columns: 1fr; } }
.tk-jenis-table td { vertical-align: middle; }
.tk-jenis-inactive td:nth-child(2) { color: var(--tk-muted); text-decoration: line-through; }
.tk-jenis-order { display: inline-flex; align-items: center; gap: 2px; }
.tk-jenis-order span { min-width: 18px; color: var(--tk-muted); font-size: 12.5px; }
.tk-jenis-move { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--tk-muted); line-height: 1; cursor: pointer; }
.tk-jenis-move:hover:not(:disabled) { background: var(--tk-neutral-soft); color: var(--tk-text); }
.tk-jenis-move:disabled { opacity: .3; cursor: default; }
.tk-card-fill { display: flex; flex-direction: column; }
.tk-chart.tk-chart-grow { flex: 1 1 0; height: auto; min-height: 220px; }
.tk-unit-rank { margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--tk-border); list-style: none; font-size: 12.5px; }
.tk-unit-rank li { padding: 5px 0; line-height: 1.4; }
.tk-unit-rank-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
.tk-unit-rank-name { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--tk-text-2); }
.tk-unit-rank-val { flex-shrink: 0; color: var(--tk-muted); font-variant-numeric: tabular-nums; }
.tk-unit-rank-val b { margin-right: 4px; color: var(--tk-text); font-weight: 600; }
.tk-unit-rank-bar { display: block; height: 6px; border-radius: 999px; background: var(--tk-neutral-soft); overflow: hidden; }
.tk-unit-rank-bar > span { display: block; height: 100%; border-radius: inherit; }
.tk-chart-legend {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); column-gap: 24px;
    margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--tk-border); list-style: none; font-size: 12.5px;
}
.tk-chart-legend li { display: flex; align-items: center; gap: 8px; padding: 3px 0; line-height: 1.4; color: var(--tk-text-2); }
.tk-chart-legend .tk-dot { flex-shrink: 0; }
.tk-chart-legend-name { flex: 1 1 auto; min-width: 0; }
.tk-chart-legend b { color: var(--tk-text); font-weight: 600; font-variant-numeric: tabular-nums; }

.tk-modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tk-module {
    border: 1px solid var(--tk-border);
    border-radius: var(--tk-radius-sm);
    padding: 16px;
    background: var(--tk-surface);
}
.tk-module-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.tk-module-name { font-size: 13.5px; font-weight: 600; color: var(--tk-text); }
.tk-module-total { font-size: 12.5px; color: var(--tk-muted); white-space: nowrap; }
.tk-module-total strong { color: var(--tk-text); font-size: 15px; }
.tk-seg { display: flex; height: 6px; border-radius: 999px; overflow: hidden; background: var(--tk-neutral-soft); margin-bottom: 12px; }
.tk-seg > span { display: block; height: 100%; }
.tk-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--tk-muted); }
.tk-legend span { display: inline-flex; align-items: center; gap: 5px; }
.tk-legend b { color: var(--tk-text); font-weight: 600; }
.tk-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.tk-c-warning { background: #f59e0b; }
.tk-c-info    { background: #0ea5e9; }
.tk-c-primary { background: #6366f1; }
.tk-c-success { background: #22c55e; }
.tk-c-dark    { background: #64748b; }
.tk-c-danger  { background: #ef4444; }

/* ==========================================================================
   Misc
   ========================================================================== */
.tk-body .spinner-border.text-primary { color: var(--tk-primary) !important; }
.tk-body .text-primary { color: var(--tk-primary) !important; }
.tk-body .text-danger { color: var(--tk-danger) !important; }
.tk-body .text-success { color: var(--tk-success) !important; }
.tk-body .text-warning { color: var(--tk-warning) !important; }
.tk-body .bg-primary { background: var(--tk-primary) !important; }
.tk-body .bg-warning { background: #f59e0b !important; }
.tk-body .bg-info { background: #0ea5e9 !important; }
.tk-body .bg-success { background: #22c55e !important; }
.tk-body .bg-danger { background: #ef4444 !important; }
.tk-body .bg-dark { background: #64748b !important; }

.tk-body .list-group-item { border-color: var(--tk-border); }
.tk-body .nav-tabs { border-bottom-color: var(--tk-border); }
.tk-body .nav-tabs .nav-link { color: var(--tk-muted); border: 0; border-bottom: 2px solid transparent; font-weight: 500; }
.tk-body .nav-tabs .nav-link.active { color: var(--tk-primary); border-bottom-color: var(--tk-primary); background: transparent; }

@media print {
    .tk-sidebar, .tk-topbar, .tk-footer, .tk-backdrop { display: none !important; }
    .tk-main { margin-left: 0; }
    .tk-content { padding: 0; }
}

/* ==========================================================================
   Auth (login)
   ========================================================================== */
body.tk-auth { background: var(--tk-surface); min-height: 100vh; }

.tk-auth-shell { position: relative; display: flex; min-height: 100vh; }
.tk-auth-version {
    position: absolute; right: 20px; bottom: 16px; z-index: 3;
    padding: 3px 10px; border-radius: 999px;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16);
    color: rgba(224, 231, 255, .85); font-size: 11.5px; font-weight: 500; letter-spacing: .02em;
    font-variant-numeric: tabular-nums; pointer-events: none;
}

.tk-auth-form-side {
    flex: 1 1 50%;
    display: flex; align-items: center; justify-content: center;
    padding: 40px 24px;
    background: var(--tk-surface);
}
.tk-auth-box { position: relative; z-index: 1; width: 100%; max-width: 380px; }

/* Drifting ornaments behind the login form */
.tk-auth-form-side { position: relative; overflow: hidden; isolation: isolate; }
.tk-auth-form-side::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(circle at 0% 0%, rgba(99, 102, 241, .09), transparent 38%),
        radial-gradient(circle at 100% 100%, rgba(56, 189, 248, .08), transparent 40%);
}
.tk-auth-form-side::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background-image: radial-gradient(rgba(79, 70, 229, .16) 1px, transparent 1px);
    background-size: 20px 20px;
    -webkit-mask-image: radial-gradient(ellipse at center, transparent 35%, #000 75%);
    mask-image: radial-gradient(ellipse at center, transparent 35%, #000 75%);
    opacity: .6;
}
.tk-auth-ornaments { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.tk-auth-ornaments span {
    --c: 99, 102, 241;
    position: absolute; left: var(--x); top: var(--y);
    width: var(--s); height: var(--s);
    animation: tk-orn-drift var(--t, 10s) ease-in-out var(--d, 0s) infinite;
}
.tk-auth-ornaments .is-sky { --c: 14, 165, 233; }
.tk-auth-ornaments .is-ring { border: 2px solid rgba(var(--c), .28); border-radius: 50%; }
.tk-auth-ornaments .is-dot {
    border-radius: 50%; background: rgba(var(--c), .35);
    animation-name: tk-orn-drift, tk-orn-twinkle;
    animation-duration: var(--t, 10s), 3.2s;
}
.tk-auth-ornaments .is-square { border: 2px solid rgba(var(--c), .26); border-radius: 4px; }
.tk-auth-ornaments .is-plus::before,
.tk-auth-ornaments .is-plus::after {
    content: ""; position: absolute; left: 50%; top: 50%;
    background: rgba(var(--c), .34); border-radius: 2px;
}
.tk-auth-ornaments .is-plus::before { width: 100%; height: 2px; transform: translate(-50%, -50%); }
.tk-auth-ornaments .is-plus::after { width: 2px; height: 100%; transform: translate(-50%, -50%); }

@keyframes tk-orn-drift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(10px, -14px) rotate(25deg); }
    66% { transform: translate(-8px, 8px) rotate(-15deg); }
}
@keyframes tk-orn-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.tk-auth-brand { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 36px; text-decoration: none !important; }
.tk-auth-logo { display: block; width: 44px; height: 44px; margin: 0 0 -6px -4px; }
.tk-auth-brand .tk-brand-name { font-size: 18px; font-weight: 700; color: var(--tk-text); letter-spacing: -0.02em; }

.tk-auth-title { margin: 0 0 6px; font-size: 26px; font-weight: 700; color: var(--tk-text); letter-spacing: -0.025em; }
.tk-auth-sub { margin: 0 0 28px; color: var(--tk-muted); font-size: 14px; }

.tk-auth-alert {
    display: flex; align-items: flex-start; gap: 10px;
    background: #fef2f2; border: 1px solid #fecaca; color: var(--tk-danger-text);
    border-radius: var(--tk-radius-sm);
    padding: 11px 14px; margin-bottom: 18px; font-size: 13.5px;
}
.tk-auth-alert i { font-size: 18px; line-height: 1.3; color: var(--tk-danger); }

.tk-auth-field { margin-bottom: 18px; }
.tk-auth-field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--tk-text-2); }
.tk-auth-input { position: relative; }
.tk-auth-input > i {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    font-size: 19px; color: var(--tk-faint); pointer-events: none;
}
.tk-auth-input input {
    width: 100%; height: 44px;
    padding: 0 40px 0 40px;
    font-family: var(--tk-font); font-size: 14px; color: var(--tk-text);
    background: var(--tk-surface);
    border: 1px solid var(--tk-border-strong);
    border-radius: 10px;
    box-shadow: var(--tk-shadow-sm);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.tk-auth-input input::placeholder { color: var(--tk-faint); }
.tk-auth-input input:focus { outline: 0; border-color: var(--tk-primary); box-shadow: 0 0 0 3px var(--tk-primary-ring); }
.tk-auth-input:focus-within > i { color: var(--tk-primary); }
.tk-auth-toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px; border: 0; background: transparent; border-radius: 8px;
    color: var(--tk-faint); font-size: 19px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; padding: 0;
}
.tk-auth-toggle:hover { color: var(--tk-text-2); background: var(--tk-neutral-soft); }
.tk-auth-toggle i { position: static; transform: none; color: inherit; pointer-events: none; }

.tk-auth-submit {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; height: 44px; margin-top: 8px;
    border: 0; border-radius: 10px;
    background: var(--tk-primary); color: #fff;
    font-family: var(--tk-font); font-size: 14.5px; font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(79, 70, 229, .4);
    transition: background .15s ease, box-shadow .15s ease;
}
.tk-auth-submit i { font-size: 18px; line-height: 1; transition: transform .15s ease; }
.tk-auth-submit:hover { background: var(--tk-primary-hover); }
.tk-auth-submit:hover .mdi-arrow-right { transform: translateX(3px); }
.tk-auth-submit.is-loading { cursor: progress; opacity: .85; }
.tk-auth-submit:focus { outline: 0; box-shadow: 0 0 0 3px var(--tk-primary-ring); }

/* Google allows hiding the badge when the attribution text below the form is shown */
.grecaptcha-badge { visibility: hidden !important; }
.tk-auth-recaptcha {
    display: flex; align-items: flex-start; gap: 6px;
    margin: 14px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--tk-muted);
}
.tk-auth-recaptcha i { font-size: 15px; line-height: 1.2; color: var(--tk-success); }
.tk-auth-recaptcha a { color: var(--tk-text-2); font-weight: 500; }
.tk-auth-recaptcha a:hover { color: var(--tk-primary); text-decoration: none; }

.tk-auth-foot { margin: 36px 0 0; text-align: center; font-size: 12px; color: var(--tk-muted); }
.tk-auth-foot a { color: var(--tk-muted); font-weight: 500; }
.tk-auth-foot a:hover { color: var(--tk-primary); text-decoration: none; }

.tk-auth-hero {
    position: relative; overflow: hidden; isolation: isolate;
    flex: 1 1 50%;
    display: flex; align-items: center; justify-content: center;
    padding: 40px 48px;
    background:
        radial-gradient(circle at 85% 10%, rgba(129, 140, 248, .45), transparent 42%),
        radial-gradient(circle at 10% 90%, rgba(56, 189, 248, .28), transparent 45%),
        linear-gradient(160deg, #3730a3 0%, #312e81 45%, #1e1b4b 100%);
    color: #e0e7ff;
}
.tk-auth-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(ellipse at 60% 35%, #000 10%, transparent 70%);
    mask-image: radial-gradient(ellipse at 60% 35%, #000 10%, transparent 70%);
}
.tk-auth-hero::after {
    content: ""; position: absolute; z-index: -1;
    width: 420px; height: 420px; right: -140px; bottom: -160px;
    border-radius: 50%; border: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 0 0 60px rgba(255, 255, 255, .025), 0 0 0 120px rgba(255, 255, 255, .02);
}
.tk-auth-hero-inner { position: relative; width: 100%; max-width: 460px; }
.tk-auth-hero-logo { height: 44px; width: auto; background: #fff; padding: 6px 8px; border-radius: 10px; margin-bottom: 8px; box-shadow: 0 8px 24px rgba(15, 23, 42, .25); }
.tk-auth-hero h2 { margin: 0 0 10px; color: #fff; font-size: 30px; font-weight: 700; letter-spacing: -0.025em; }
.tk-auth-hero p { margin: 0 0 24px; color: #c7d2fe; font-size: 15px; line-height: 1.7; }
.tk-auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tk-auth-points li {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: 12px;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08);
    font-size: 14px; color: #e0e7ff; line-height: 1.45;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.tk-auth-points i {
    flex: 0 0 32px; width: 32px; height: 32px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 18px; color: #fff; background: rgba(165, 180, 252, .22);
}

/* Asti stage */
.tk-auth-stage { position: relative; height: 290px; margin: 8px 0 22px; }
.tk-auth-asti { position: absolute; left: 0; bottom: 0; width: 250px; height: 250px; }
.tk-auth-asti::before {
    content: ""; position: absolute; inset: 18px; border-radius: 50%; z-index: -1;
    background: radial-gradient(circle, rgba(165, 180, 252, .55) 0%, rgba(99, 102, 241, .25) 45%, transparent 70%);
    animation: tk-auth-glow 4s ease-in-out infinite;
}
.tk-auth-asti::after {
    content: ""; position: absolute; left: 22%; right: 22%; bottom: -6px; height: 16px; z-index: -1;
    border-radius: 50%; background: rgba(15, 23, 42, .45); filter: blur(8px);
    animation: tk-auth-shadow 4s ease-in-out infinite;
}
.tk-auth-asti-body {
    position: relative;
    filter: drop-shadow(0 18px 30px rgba(15, 23, 42, .35));
    animation: tk-auth-float 4s ease-in-out infinite;
}
.tk-auth-asti-body > img { display: block; width: 100%; height: auto; }
/* Eye sprites are cut from asti-hero.png (640px); offsets are percentages of that canvas */
.tk-auth-asti-body > .tk-auth-asti-eye {
    position: absolute; height: auto;
    transform-origin: 50% 55%;
    animation: tk-auth-blink 7s ease-in-out infinite;
}
.tk-auth-asti-eye.is-left { left: 31.562%; top: 36.875%; width: 13.906%; }
.tk-auth-asti-eye.is-right { left: 59.688%; top: 40.156%; width: 13.75%; }
.tk-auth-bubble {
    position: absolute; top: 6px; right: 0; z-index: 2;
    width: 220px; padding: 11px 14px;
    background: #fff; color: #334155; border-radius: 14px 14px 14px 4px;
    font-size: 12.5px; line-height: 1.45;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .3);
    animation: tk-auth-pop .5s .3s cubic-bezier(.2, .9, .3, 1.3) both;
}
.tk-auth-bubble strong { display: block; margin-bottom: 2px; color: #312e81; font-size: 13.5px; }
.tk-auth-bubble span { display: block; }
.tk-auth-float {
    position: absolute; z-index: 2;
    display: flex; align-items: center; gap: 10px;
    padding: 9px 13px 9px 9px; border-radius: 12px;
    background: rgba(255, 255, 255, .95); color: #0f172a;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .28);
    animation: tk-auth-pop .5s cubic-bezier(.2, .9, .3, 1.3) both, tk-auth-bob 5s ease-in-out infinite;
}
.tk-auth-float strong { display: block; font-size: 12.5px; line-height: 1.3; }
.tk-auth-float small { display: block; font-size: 11px; color: #64748b; line-height: 1.3; }
.tk-auth-float.is-left { right: 24px; top: 132px; width: 196px; animation-delay: .55s, .55s; }
.tk-auth-float.is-right { right: 0; bottom: 22px; width: 196px; animation-delay: .75s, 1.8s; }
.tk-auth-float-icon {
    flex: 0 0 32px; width: 32px; height: 32px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
}
.tk-auth-float-icon.is-success { background: #dcfce7; color: #16a34a; }
.tk-auth-float-icon.is-warning { background: #fef3c7; color: #d97706; }

@keyframes tk-auth-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes tk-auth-blink {
    0%, 44%, 50%, 86%, 90.5%, 95%, 100% { transform: scaleY(1); }
    47%, 88%, 93% { transform: scaleY(.1); }
}
@keyframes tk-auth-shadow { 0%, 100% { transform: scaleX(1); opacity: .9; } 50% { transform: scaleX(.82); opacity: .55; } }
@keyframes tk-auth-glow { 0%, 100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes tk-auth-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes tk-auth-pop { from { opacity: 0; transform: translateY(10px) scale(.92); } to { opacity: 1; transform: none; } }

@media (max-height: 760px) {
    .tk-auth-stage { height: 230px; }
    .tk-auth-asti { width: 200px; height: 200px; }
    .tk-auth-bubble { top: 0; }
    .tk-auth-float.is-left { top: 108px; }
    .tk-auth-float.is-right { bottom: 0; }
    .tk-auth-stage { margin-bottom: 14px; }
    .tk-auth-hero h2 { font-size: 26px; margin-bottom: 6px; }
    .tk-auth-hero p { margin-bottom: 16px; font-size: 14px; line-height: 1.6; }
    .tk-auth-points { gap: 8px; }
    .tk-auth-points li { padding: 8px 12px; font-size: 13.5px; }
}
@media (max-height: 640px) {
    .tk-auth-stage { display: none; }
    .tk-auth-hero-logo { margin-bottom: 24px; }
}
@media (max-width: 1100px) {
    .tk-auth-hero { padding: 40px 32px; }
    .tk-auth-asti { width: 200px; height: 200px; }
    .tk-auth-bubble { width: 200px; }
    .tk-auth-float.is-left { right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .tk-auth-asti-body, .tk-auth-asti-eye, .tk-auth-asti::before, .tk-auth-asti::after, .tk-auth-bubble, .tk-auth-float,
    .tk-auth-ornaments span { animation: none; }
}

@media (max-width: 900px) {
    .tk-auth-hero { display: none; }
    .tk-auth-form-side { flex-basis: 100%; }
    .tk-auth-version { background: var(--tk-neutral-soft); border-color: var(--tk-border); color: var(--tk-muted); }
}

/* Login, dark theme */
[data-theme="dark"] .tk-auth-submit { background: #6366f1; box-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
[data-theme="dark"] .tk-auth-submit:hover { background: #4f46e5; }
[data-theme="dark"] .tk-auth-form-side::before {
    background:
        radial-gradient(circle at 0% 0%, rgba(129, 140, 248, .12), transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(56, 189, 248, .08), transparent 42%);
}
[data-theme="dark"] .tk-auth-form-side::after { background-image: radial-gradient(rgba(165, 180, 252, .14) 1px, transparent 1px); }
[data-theme="dark"] .tk-auth-ornaments span { --c: 165, 180, 252; }
[data-theme="dark"] .tk-auth-ornaments .is-sky { --c: 125, 211, 252; }
[data-theme="dark"] .tk-auth-hero {
    background:
        radial-gradient(circle at 85% 10%, rgba(99, 102, 241, .35), transparent 42%),
        radial-gradient(circle at 10% 90%, rgba(56, 189, 248, .16), transparent 45%),
        linear-gradient(160deg, #272366 0%, #1e1b4b 45%, #0f0d2a 100%);
    border-left: 1px solid var(--tk-border);
}
[data-theme="dark"] .tk-auth-bubble { background: var(--tk-surface-2); color: var(--tk-text-2); box-shadow: 0 14px 34px rgba(0, 0, 0, .45); }
[data-theme="dark"] .tk-auth-bubble strong { color: #a5b4fc; }
[data-theme="dark"] .tk-auth-float { background: rgba(22, 29, 45, .94); color: var(--tk-text); box-shadow: 0 12px 28px rgba(0, 0, 0, .45); }
[data-theme="dark"] .tk-auth-float small { color: var(--tk-muted); }
[data-theme="dark"] .tk-auth-float-icon.is-success { background: var(--tk-success-soft); color: var(--tk-success-text); }
[data-theme="dark"] .tk-auth-float-icon.is-warning { background: var(--tk-warning-soft); color: var(--tk-warning-text); }

/* WhatsApp contact pill */
.tk-content a.tk-wa-link {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px 5px 9px;
    background: var(--tk-success-soft);
    color: var(--tk-success-text);
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    font-size: 13px; font-weight: 600; line-height: 1.2;
    white-space: nowrap;
    transition: background .15s ease, border-color .15s ease;
}
.tk-content a.tk-wa-link i { font-size: 16px; line-height: 1; color: #16a34a; margin: 0; }
.tk-content a.tk-wa-link:hover { background: #dcfce7; border-color: #86efac; color: #166534; text-decoration: none; }

.tk-body .tk-content .tk-file-actions .btn-primary,
.tk-body .tk-content .tk-file-actions .btn-info { background: var(--tk-primary-soft) !important; color: var(--tk-primary-hover) !important; }
.tk-body .tk-content .tk-file-actions .btn-primary:hover,
.tk-body .tk-content .tk-file-actions .btn-info:hover { background: #e0e7ff !important; }
.tk-body .tk-content .tk-file-actions .btn-danger { background: var(--tk-danger-soft) !important; color: var(--tk-danger-text) !important; }
.tk-body .tk-content .tk-file-actions .btn-danger:hover { background: #fecaca !important; }
@media (max-width: 575.98px) { .tk-files { grid-template-columns: 1fr; } }

/* Empty / coming-soon state */
.tk-empty { text-align: center; padding: 48px 16px 40px; max-width: 460px; margin: 0 auto; }
.tk-empty-icon {
    width: 64px; height: 64px; margin: 0 auto 18px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 18px;
    background: var(--tk-primary-soft);
    color: var(--tk-primary);
    font-size: 32px;
}
.tk-content .tk-empty h5 { font-size: 16px; margin-bottom: 8px; }
.tk-empty p { color: var(--tk-muted); margin-bottom: 22px; }

/* Ticket confirmation / auto-close */
.tk-autoclose {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 20px; padding: 14px 16px;
    border: 1px solid transparent; border-radius: var(--tk-radius-sm);
    background: var(--tk-info-soft); color: var(--tk-info-text);
    font-size: 13px; line-height: 1.55;
}
.tk-autoclose > .mdi { flex-shrink: 0; font-size: 20px; line-height: 1; }
.tk-autoclose span { display: block; color: var(--tk-text-2); }
.tk-autoclose-title { display: block; margin-bottom: 2px; color: inherit; font-weight: 600; }
.tk-autoclose.is-urgent { background: var(--tk-warning-soft); color: var(--tk-warning-text); border-color: var(--tk-warning-soft); }

/* Template formulir layanan infrastruktur */
.tk-infra-template {
    display: flex; align-items: flex-start; gap: 12px;
    margin-bottom: 22px; padding: 14px 16px;
    border-radius: var(--tk-radius-sm);
    background: var(--tk-info-soft); color: var(--tk-info-text);
    font-size: 13px; line-height: 1.55;
}
.tk-infra-template > .mdi { flex-shrink: 0; font-size: 22px; line-height: 1.2; }
.tk-infra-template-body { flex: 1; min-width: 0; }
.tk-infra-template-body strong { display: block; margin-bottom: 4px; font-weight: 600; }
.tk-infra-template-body ol { margin: 0; padding-left: 18px; color: var(--tk-text-2); }
.tk-infra-template > .btn { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 575.98px) {
    .tk-infra-template { flex-wrap: wrap; }
    .tk-infra-template > .btn { width: 100%; }
}

.tk-unit-chip {
    display: inline-block; margin-left: 6px; padding: 1px 8px;
    border-radius: 999px; background: var(--tk-primary-soft); color: var(--tk-primary);
    font-size: 11px; font-weight: 600; vertical-align: middle;
}

.tk-awaiting {
    margin-bottom: 20px; overflow: hidden;
    border: 1px solid var(--tk-border); border-radius: var(--tk-radius);
    background: var(--tk-surface); box-shadow: var(--tk-shadow-sm);
}
.tk-awaiting-head {
    display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px;
    background: linear-gradient(90deg, var(--tk-warning-soft), transparent 75%);
    border-bottom: 1px solid var(--tk-border);
}
.tk-awaiting-icon {
    flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 12px;
    background: var(--tk-surface); color: var(--tk-warning); font-size: 20px;
    box-shadow: 0 0 0 1px var(--tk-warning-soft), var(--tk-shadow-sm);
}
.tk-awaiting-heading { min-width: 0; }
.tk-awaiting-heading h5 {
    display: flex; align-items: center; gap: 8px; margin: 2px 0 4px;
    font-size: 15px; font-weight: 700; color: var(--tk-text);
}
.tk-awaiting-count {
    display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px;
    border-radius: 999px; background: var(--tk-warning); color: #fff; font-size: 12px; font-weight: 700;
}
.tk-awaiting-heading p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--tk-muted); max-width: 760px; }

.tk-awaiting-list { list-style: none; margin: 0; padding: 6px 8px; }
.tk-awaiting-list.is-expanded { max-height: 440px; overflow-y: auto; }
.tk-awaiting-list li + li { border-top: 1px solid var(--tk-border); }
.tk-awaiting-item {
    display: grid; grid-template-columns: 38px minmax(0, 1fr) auto 18px; align-items: center; gap: 14px;
    padding: 11px 12px; border-radius: 10px; color: var(--tk-text); text-decoration: none;
    transition: background-color .15s ease;
}
.tk-awaiting-item:hover, .tk-awaiting-item:focus-visible { background: var(--tk-surface-2); color: var(--tk-text); text-decoration: none; }
.tk-awaiting-item:hover .tk-awaiting-title { color: var(--tk-primary); }
.tk-awaiting-item:hover .tk-awaiting-go { color: var(--tk-primary); transform: translateX(2px); }
.tk-awaiting-mod {
    display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
    border-radius: 10px; background: var(--tk-primary-soft); color: var(--tk-primary); font-size: 18px;
}
.tk-awaiting-body { min-width: 0; overflow: hidden; }
.tk-awaiting-title {
    display: block; font-size: 13.5px; font-weight: 600; line-height: 1.35; color: var(--tk-text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .15s ease;
}
.tk-awaiting-meta {
    display: flex; flex-wrap: wrap; align-items: center; margin: 3px 0 0 -16px;
    font-size: 12px; line-height: 1.6; color: var(--tk-muted);
}
.tk-awaiting-meta > span::before { content: "•"; display: inline-block; width: 16px; text-align: center; opacity: .6; }
.tk-awaiting-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; }
.tk-awaiting-time {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
    background: var(--tk-info-soft); color: var(--tk-info-text); font-size: 12px; font-weight: 600; white-space: nowrap;
}
.tk-awaiting-time.is-urgent { background: var(--tk-warning-soft); color: var(--tk-warning-text); }
.tk-awaiting-time.is-overdue { background: var(--tk-danger-soft); color: var(--tk-danger-text); }
.tk-awaiting-go { font-size: 18px; color: var(--tk-muted); transition: color .15s ease, transform .15s ease; }
.tk-awaiting-more {
    display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%;
    padding: 11px 16px; border: 0; border-top: 1px solid var(--tk-border);
    background: var(--tk-surface-2); color: var(--tk-primary); font-size: 13px; font-weight: 600; cursor: pointer;
}
.tk-awaiting-more:hover { background: var(--tk-primary-soft); }
.tk-awaiting-more .mdi { font-size: 18px; transition: transform .2s ease; }
.tk-awaiting-more[aria-expanded="true"] .mdi { transform: rotate(180deg); }
@media (max-width: 576px) {
    .tk-awaiting-head { padding: 14px 16px; }
    .tk-awaiting-item { grid-template-columns: 38px minmax(0, 1fr); row-gap: 8px; }
    .tk-awaiting-time { grid-column: 2; justify-self: start; }
    .tk-awaiting-go { display: none; }
}

/* ---------- Jumlah tiket belum selesai di menu (admin & pelaksana) ---------- */
.tk-nav-badge.tk-nav-badge-open {
    min-width: 16px; height: 16px; padding: 0 5px;
    background: var(--tk-primary); font-size: 9.5px; flex-shrink: 0;
}
.tk-nav-badge.tk-nav-badge-open[hidden] { display: none; }

/* ---------- Pengingat rating ---------- */
.tk-nav-link.tk-nav-link-rating { background: var(--tk-warning-soft); color: var(--tk-warning-text) !important; }
.tk-nav-link.tk-nav-link-rating i { color: var(--tk-warning); }
.tk-nav-link.tk-nav-link-rating:hover { filter: brightness(.97); }
.tk-nav-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 6px; margin-left: auto;
    border-radius: 999px; background: var(--tk-warning); color: #fff;
    font-size: 11px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
}
.tk-avatar { position: relative; }
.tk-avatar-dot {
    position: absolute; top: -1px; right: -1px;
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--tk-warning); border: 2px solid var(--tk-surface);
}
.tk-avatar-dot[hidden] { display: none; }
.tk-body .dropdown-item.tk-dropdown-rating { display: flex; align-items: center; gap: 4px; }
.tk-body .dropdown-item.tk-dropdown-rating[hidden] { display: none; }
.tk-unrated-chip { color: var(--tk-warning-text); font-weight: 600; }
.tk-awaiting-rating .tk-awaiting-icon { color: #f59e0b; }
a.tk-awaiting-more, a.tk-awaiting-more:hover { text-decoration: none; }

#tk-rating, #penilaian-saya { scroll-margin-top: calc(var(--tk-topbar-h) + 16px); }
.tk-hash-target { animation: tk-hash-flash 2.2s ease-out; }
@keyframes tk-hash-flash {
    0%, 35% { box-shadow: 0 0 0 3px var(--tk-warning); }
    100% { box-shadow: 0 0 0 3px transparent; }
}
@media (prefers-reduced-motion: reduce) {
    .tk-hash-target { animation: none; }
}

/* ==========================================================================
   Dark theme
   ========================================================================== */
[data-theme="dark"] {
    color-scheme: dark;
    --tk-bg: #0b0f17;
    --tk-surface: #121826;
    --tk-surface-2: #161d2d;
    --tk-border: #232c3d;
    --tk-border-strong: #2f3a4f;

    --tk-text: #f1f5f9;
    --tk-text-2: #cbd5e1;
    --tk-muted: #94a3b8;
    --tk-faint: #64748b;

    --tk-primary: #818cf8;
    --tk-primary-hover: #a5b4fc;
    --tk-primary-soft: rgba(129, 140, 248, .14);
    --tk-primary-ring: rgba(129, 140, 248, .28);

    --tk-success: #22c55e;
    --tk-success-soft: rgba(34, 197, 94, .14);
    --tk-success-text: #86efac;
    --tk-warning: #f59e0b;
    --tk-warning-soft: rgba(245, 158, 11, .14);
    --tk-warning-text: #fcd34d;
    --tk-danger: #ef4444;
    --tk-danger-soft: rgba(239, 68, 68, .14);
    --tk-danger-text: #fca5a5;
    --tk-info: #38bdf8;
    --tk-info-soft: rgba(56, 189, 248, .14);
    --tk-info-text: #7dd3fc;
    --tk-slate: #94a3b8;
    --tk-slate-soft: rgba(148, 163, 184, .16);
    --tk-slate-text: #e2e8f0;
    --tk-neutral-soft: #1b2333;
    --tk-neutral-text: #cbd5e1;
    --tk-sk-base: #222b3d;
    --tk-sk-shine: #2f3b54;

    --tk-shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --tk-shadow-md: 0 8px 20px -4px rgba(0, 0, 0, .5);
}
[data-theme="dark"] .tk-topbar { background: rgba(18, 24, 38, .85); }
[data-theme="dark"] .tk-body *::-webkit-scrollbar-thumb { background: #2f3a4f; background-clip: content-box; }
[data-theme="dark"] .tk-body .btn-primary { background: #6366f1 !important; border-color: #6366f1 !important; }
[data-theme="dark"] .tk-body .btn-dark { background: #334155 !important; border-color: #334155 !important; }
[data-theme="dark"] .tk-body .modal-content { background: var(--tk-surface); color: var(--tk-text); }

[data-theme="dark"] .tk-body .alert-success,
[data-theme="dark"] .tk-stat.is-success { background: var(--tk-success-soft) !important; border-color: rgba(34, 197, 94, .3) !important; }
[data-theme="dark"] .tk-body .alert-danger,
[data-theme="dark"] .tk-stat.is-danger { background: var(--tk-danger-soft) !important; border-color: rgba(239, 68, 68, .3) !important; }
[data-theme="dark"] .tk-body .alert-warning,
[data-theme="dark"] .tk-stat.is-warning { background: var(--tk-warning-soft) !important; border-color: rgba(245, 158, 11, .3) !important; }
[data-theme="dark"] .tk-body .alert-info,
[data-theme="dark"] .tk-stat.is-info { background: var(--tk-info-soft) !important; border-color: rgba(56, 189, 248, .3) !important; }
[data-theme="dark"] .tk-stat.is-primary { border-color: rgba(129, 140, 248, .3); }
[data-theme="dark"] .tk-stat.is-primary .tk-stat-icon { background: rgba(129, 140, 248, .2); }
[data-theme="dark"] .tk-stat.is-dark { background: var(--tk-slate-soft); border-color: rgba(148, 163, 184, .3); }

[data-theme="dark"] .tk-body .tk-content .table td .btn-primary:hover,
[data-theme="dark"] .tk-body .tk-content .tk-file-actions .btn-primary:hover,
[data-theme="dark"] .tk-body .tk-content .tk-file-actions .btn-info:hover { background: rgba(129, 140, 248, .24) !important; }
[data-theme="dark"] .tk-body .tk-content .table td .btn-info:hover { background: rgba(56, 189, 248, .24) !important; }
[data-theme="dark"] .tk-body .tk-content .table td .btn-success:hover { background: rgba(34, 197, 94, .24) !important; }
[data-theme="dark"] .tk-body .tk-content .table td .btn-warning:hover { background: rgba(245, 158, 11, .24) !important; }
[data-theme="dark"] .tk-body .tk-content .table td .btn-danger:hover,
[data-theme="dark"] .tk-body .tk-content .tk-file-actions .btn-danger:hover { background: rgba(239, 68, 68, .24) !important; }
[data-theme="dark"] .tk-body .tk-content .table td .btn-dark:hover { background: rgba(148, 163, 184, .24) !important; }

[data-theme="dark"] .tk-content a.tk-wa-link { border-color: rgba(34, 197, 94, .3); }
[data-theme="dark"] .tk-content a.tk-wa-link i { color: var(--tk-success); }
[data-theme="dark"] .tk-content a.tk-wa-link:hover { background: rgba(34, 197, 94, .22); border-color: rgba(34, 197, 94, .45); color: var(--tk-success-text); }

/* ==========================================================================
   Skeleton loading
   ========================================================================== */
@keyframes tk-sk-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

.tk-sk,
.tk-sk-text {
    background-color: var(--tk-sk-base);
    background-image: linear-gradient(90deg, transparent 0%, var(--tk-sk-shine) 50%, transparent 100%);
    background-size: 200% 100%;
    background-repeat: no-repeat;
    animation: tk-sk-shimmer 1.5s ease-in-out infinite;
}
.tk-sk { display: block; height: 10px; max-width: 100%; border-radius: 6px; }
.tk-sk-text {
    color: transparent !important;
    border-radius: 4px;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.tk-sk-line { margin: 5px 0; }
.tk-sk-sm { height: 8px; }
.tk-sk-lg { height: 13px; }
.tk-sk-xl { height: 28px; margin-top: 16px; }
.tk-sk-title { width: 220px; height: 20px; margin-bottom: 8px; }
.tk-sk-h2 { height: 26px; }
.tk-sk-sub { width: 360px; height: 11px; margin-bottom: 22px; }
.tk-sk-btn,
.tk-sk-input { height: 36px; border-radius: var(--tk-radius-sm); }
.tk-sk-block { width: 100%; }
.tk-sk-pill { height: 20px; border-radius: 999px; }
.tk-sk-check { width: 15px; height: 15px; border-radius: 4px; }
.tk-sk-icon { width: 32px; height: 32px; border-radius: var(--tk-radius-sm); flex: 0 0 auto; }
.tk-sk-sm-icon { width: 28px; height: 28px; }
.tk-sk-media { border-radius: var(--tk-radius-sm); }
.tk-sk-bar { width: 100%; height: 8px; border-radius: 999px; }
.tk-sk-block-line { height: 11px; margin: 12px 0; }

.tk-sk-row { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; }
.tk-sk-row > .tk-sk { margin: 0; }
.tk-sk-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; }
.tk-sk-toolbar > .tk-sk { margin: 0; }
.tk-sk-grow { flex: 1 1 240px; max-width: 360px; }
.tk-sk-push { margin-left: auto !important; }
.tk-sk-between { justify-content: space-between; margin: 18px 0 0; }
.tk-sk-card { height: 100%; padding: 20px; border: 1px solid var(--tk-border); border-radius: var(--tk-radius); background: var(--tk-surface); }
.tk-sk-card-head { display: flex; margin-bottom: 14px; }
.tk-sk-kv { display: grid; grid-template-columns: minmax(90px, 140px) 1fr; gap: 16px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--tk-border); }
.tk-sk-kv:last-child { border-bottom: 0; }
.tk-sk-kv > .tk-sk { margin: 0; }
.tk-stat .tk-sk-xl { margin-bottom: 0; }

/* Page skeleton: snapshot of the real page while the next one loads */
.tk-content.is-loading.tk-skel { opacity: 1; }
.tk-content.tk-skel { pointer-events: none; user-select: none; }

.tk-body :is(.tk-content.tk-skel.tk-skel.tk-skel, tbody.tk-skel-rows.tk-skel-rows.tk-skel-rows) :is(
    .badge, .btn, .dt-button, .page-link, .form-control, .custom-select, .select2-selection,
    .tk-avatar, .tk-stat-icon, .progress-bar, .tk-dot, input[type="checkbox"], input[type="radio"]
) {
    background-color: var(--tk-sk-base) !important;
    background-image: linear-gradient(90deg, transparent 0%, var(--tk-sk-shine) 50%, transparent 100%) !important;
    background-size: 200% 100% !important;
    background-repeat: no-repeat !important;
    animation: tk-sk-shimmer 1.5s ease-in-out infinite;
    border-color: transparent !important;
    box-shadow: none !important;
    color: transparent !important;
}
.tk-body :is(.tk-content.tk-skel.tk-skel.tk-skel, tbody.tk-skel-rows.tk-skel-rows.tk-skel-rows) :is(input[type="checkbox"], input[type="radio"]) {
    -webkit-appearance: none; appearance: none; width: 15px; height: 15px; border-radius: 4px;
}
.tk-body :is(.tk-content.tk-skel.tk-skel.tk-skel, tbody.tk-skel-rows.tk-skel-rows.tk-skel-rows) :is(
    .badge, .btn, .dt-button, .page-link, .form-control, .select2-selection, .tk-avatar, .tk-stat-icon
) :is(.tk-sk-text, .mdi) {
    background: none !important;
    animation: none;
}
.tk-body :is(.tk-content.tk-skel, tbody.tk-skel-rows) .mdi { color: transparent !important; }
.tk-body :is(.tk-content.tk-skel, tbody.tk-skel-rows) .select2-selection__arrow { visibility: hidden; }
.tk-body :is(.tk-content.tk-skel, tbody.tk-skel-rows) :is(.btn, .badge, .select2-selection, .form-control) * { color: transparent !important; text-overflow: clip !important; }
.tk-body .tk-content.tk-skel a { text-decoration: none; }

/* DataTables Ajax loading: skeleton rows replace the processing box */
.tk-dt-loading .dataTables_processing { display: none !important; }
tbody.tk-skel-rows { pointer-events: none; }
tbody.tk-skel-rows td .tk-cell-ticket > .tk-sk-row { display: flex; margin-bottom: 4px; }

/* File viewer: shimmer until the preview has loaded */
#fileViewerContent :is(iframe, img):not(.is-loaded) {
    background-color: var(--tk-sk-base);
    background-image: linear-gradient(90deg, transparent 0%, var(--tk-sk-shine) 50%, transparent 100%);
    background-size: 200% 100%;
    background-repeat: no-repeat;
    animation: tk-sk-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--tk-radius-sm);
}
#fileViewerContent img:not(.is-loaded) { width: 100%; min-height: 360px; }
#fileViewerContent iframe { min-height: 70vh; }

@media (prefers-reduced-motion: reduce) {
    .tk-sk, .tk-sk-text, #fileViewerContent :is(iframe, img),
    .tk-body :is(.tk-content.tk-skel, tbody.tk-skel-rows) * { animation: none !important; }
}

/* ==========================================================================
   Inbox notifications
   ========================================================================== */
.tk-notif-btn { position: relative; }
.tk-notif-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 999px;
    background: var(--tk-danger); color: #fff;
    font-size: 10.5px; font-weight: 700; line-height: 1;
    font-variant-numeric: tabular-nums;
}
.tk-notif-count { position: absolute; top: -4px; right: -5px; border: 2px solid var(--tk-surface); height: 20px; min-width: 20px; }
.tk-notif-count[hidden] { display: none; }

.tk-body .dropdown-menu.tk-notif-menu {
    width: 380px; max-width: calc(100vw - 24px);
    padding: 0; overflow: hidden;
    margin-top: 10px;
}
.tk-notif-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 16px; border-bottom: 1px solid var(--tk-border);
}
.tk-notif-head strong { color: var(--tk-text); font-size: 14px; font-weight: 600; }
.tk-notif-readall {
    border: 0; background: none; padding: 0;
    color: var(--tk-primary); font-size: 12.5px; font-weight: 500; cursor: pointer;
}
.tk-notif-readall:hover { text-decoration: underline; }
.tk-notif-readall:disabled { color: var(--tk-faint); cursor: default; text-decoration: none; }
.tk-notif-actions { display: flex; align-items: center; gap: 10px; }
.tk-notif-sound {
    width: 28px; height: 28px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--tk-border); border-radius: 999px;
    background: var(--tk-surface); color: var(--tk-primary);
    font-size: 15px; cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.tk-notif-sound:hover { background: var(--tk-neutral-soft); }
.tk-notif-sound:focus { outline: 0; box-shadow: 0 0 0 3px var(--tk-primary-ring); }
.tk-notif-sound.is-off { color: var(--tk-faint); }

@keyframes tk-bell-ring {
    0%, 100% { transform: rotate(0); }
    15% { transform: rotate(16deg); }
    30% { transform: rotate(-14deg); }
    45% { transform: rotate(10deg); }
    60% { transform: rotate(-8deg); }
    75% { transform: rotate(4deg); }
}
.tk-notif-btn > .mdi { display: inline-block; transform-origin: 50% 10%; }
.tk-notif-btn.is-ringing > .mdi { animation: tk-bell-ring 1s ease-in-out; color: var(--tk-primary); }
@media (prefers-reduced-motion: reduce) {
    .tk-notif-btn.is-ringing > .mdi { animation: none; }
}
.tk-notif-menu .tk-notif-list { max-height: min(440px, 65vh); overflow-y: auto; overscroll-behavior: contain; }
.tk-notif-foot {
    display: block; padding: 11px 16px; text-align: center;
    border-top: 1px solid var(--tk-border);
    color: var(--tk-primary) !important; font-size: 13px; font-weight: 500;
    text-decoration: none !important;
}
.tk-notif-foot:hover { background: var(--tk-surface-2); }

.tk-notif-item {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px;
    color: var(--tk-text-2) !important; text-decoration: none !important;
    border-bottom: 1px solid var(--tk-border);
    transition: background .12s ease;
}
.tk-notif-item:last-child { border-bottom: 0; }
a.tk-notif-item:hover { background: var(--tk-surface-2); }
.tk-notif-item.is-unread { background: color-mix(in srgb, var(--tk-primary-soft) 55%, transparent); }
a.tk-notif-item.is-unread:hover { background: var(--tk-primary-soft); }

.tk-notif-icon {
    flex: 0 0 34px; width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px; font-size: 18px;
    background: var(--tk-neutral-soft); color: var(--tk-neutral-text);
}
.tk-notif-icon.tone-primary { background: var(--tk-primary-soft); color: var(--tk-primary); }
.tk-notif-icon.tone-info { background: var(--tk-info-soft); color: var(--tk-info); }
.tk-notif-icon.tone-success { background: var(--tk-success-soft); color: var(--tk-success); }
.tk-notif-icon.tone-warning { background: var(--tk-warning-soft); color: var(--tk-warning); }
.tk-notif-icon.tone-danger { background: var(--tk-danger-soft); color: var(--tk-danger); }

.tk-notif-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tk-notif-title { color: var(--tk-text); font-size: 13px; font-weight: 600; line-height: 1.4; }
.tk-notif-item:not(.is-unread) .tk-notif-title { font-weight: 500; }
.tk-notif-ticket {
    font-size: 12.5px; color: var(--tk-text-2); line-height: 1.45;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tk-notif-ticket code {
    padding: 0; background: none; color: var(--tk-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px;
}
.tk-notif-msg {
    font-size: 12.5px; color: var(--tk-muted); line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    overflow-wrap: anywhere;
}
.tk-notif-meta { margin-top: 2px; font-size: 11.5px; color: var(--tk-faint); }
.tk-notif-dot {
    flex: 0 0 8px; width: 8px; height: 8px;
    border-radius: 50%; background: var(--tk-primary);
    visibility: hidden;
}
.tk-notif-item.is-unread .tk-notif-dot { visibility: visible; }
.tk-notif-item.is-skeleton .tk-notif-body { gap: 6px; padding-top: 2px; }
.tk-notif-item.is-skeleton .tk-sk-line { margin: 0; }

.tk-notif-empty {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 48px 16px; text-align: center; color: var(--tk-muted); font-size: 13px;
}
.tk-notif-empty strong { color: var(--tk-text); font-size: 14px; font-weight: 600; }
.tk-notif-empty-icon {
    width: 52px; height: 52px; margin-bottom: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--tk-neutral-soft); color: var(--tk-faint); font-size: 26px;
}
.tk-notif-empty.is-compact { padding: 32px 16px; }

/* Inbox page */
.tk-notif-tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--tk-border); }
.tk-notif-tab {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 12px; margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    color: var(--tk-muted) !important; font-size: 13.5px; font-weight: 500;
    text-decoration: none !important;
}
.tk-notif-tab span {
    padding: 1px 7px; border-radius: 999px;
    background: var(--tk-neutral-soft); color: var(--tk-neutral-text);
    font-size: 11.5px; font-weight: 600;
}
.tk-notif-tab:hover { color: var(--tk-text) !important; }
.tk-notif-tab.active { color: var(--tk-primary) !important; border-bottom-color: var(--tk-primary); }
.tk-notif-tab.active span { background: var(--tk-primary-soft); color: var(--tk-primary); }

.tk-notif-list.is-page { border: 1px solid var(--tk-border); border-radius: var(--tk-radius); overflow: hidden; }
.tk-notif-list.is-page .tk-notif-item { padding: 14px 18px; }
.tk-notif-list.is-page .tk-notif-ticket { white-space: normal; }
.tk-notif-list.is-page .tk-notif-msg { -webkit-line-clamp: unset; display: block; }
.tk-notif-day {
    padding: 8px 18px;
    background: var(--tk-surface-2); border-bottom: 1px solid var(--tk-border);
    color: var(--tk-muted); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
}
.tk-notif-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; color: var(--tk-muted); font-size: 13px; }

@media (max-width: 575px) {
    .tk-body .dropdown-menu.tk-notif-menu { position: fixed !important; top: var(--tk-topbar-h) !important; left: 12px !important; right: 12px !important; width: auto; transform: none !important; }
}

/* ==========================================================================
   Layanan infrastruktur
   ========================================================================== */
.tk-content .tk-form-title {
    margin: 26px 0 14px; padding-bottom: 10px;
    border-bottom: 1px solid var(--tk-border);
    color: var(--tk-text); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
}
.tk-content .tk-card-heading + form .tk-form-title:first-of-type,
.tk-content .alert + form .tk-form-title:first-of-type { margin-top: 8px; }
.tk-content .tk-form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
/* Attachment drop zone (partials/file_drop.php) */
.tk-drop-field { position: relative; }
.tk-drop {
    display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0;
    padding: 28px 24px; text-align: center; cursor: pointer;
    border: 1.5px dashed var(--tk-border-strong); border-radius: var(--tk-radius);
    background: var(--tk-surface-2); transition: border-color .15s ease, background .15s ease;
}
.tk-drop:hover, .tk-drop:focus-visible, .tk-drop.drag-over {
    border-color: var(--tk-primary); background: var(--tk-primary-soft); outline: none;
}
.tk-drop > .mdi { font-size: 40px; line-height: 1; margin-bottom: 8px; color: var(--tk-primary); }
.tk-drop-title { font-size: 14.5px; font-weight: 600; color: var(--tk-text); }
.tk-drop-sub { font-size: 12.5px; color: var(--tk-muted); }
.tk-drop-hint { margin-top: 4px; font-size: 12px; color: var(--tk-muted); }
.tk-drop-field.is-invalid .tk-drop { border-color: var(--tk-danger); }
.tk-drop-input {
    position: absolute; left: 50%; bottom: 0; width: 1px; height: 1px;
    opacity: 0; pointer-events: none;
}
.tk-drop-picked { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.tk-drop-picked li {
    display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px;
    padding: 8px 10px; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-sm);
    background: var(--tk-surface);
}
.tk-drop-thumb {
    display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
    overflow: hidden; border-radius: 8px; background: var(--tk-primary-soft); color: var(--tk-primary); font-size: 20px;
}
.tk-drop-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tk-drop-meta { min-width: 0; display: flex; flex-direction: column; }
.tk-drop-name { font-size: 13px; font-weight: 600; color: var(--tk-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-drop-size { font-size: 12px; color: var(--tk-muted); }
.tk-drop-remove {
    display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
    padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--tk-muted); font-size: 18px; cursor: pointer;
}
.tk-drop-remove:hover { background: var(--tk-danger-soft); color: var(--tk-danger); }

.tk-content .info-table.tk-infra-table { table-layout: fixed; }
.tk-content .info-table.tk-infra-table th { width: 38%; }
.tk-content .info-table.tk-infra-table td { overflow-wrap: anywhere; }

.tk-infra-detail {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 24px;
    margin: 0 0 18px; padding-bottom: 16px; border-bottom: 1px solid var(--tk-border);
}
.tk-infra-detail > div { min-width: 0; }
.tk-infra-detail > .is-wide { grid-column: 1 / -1; }
.tk-infra-detail dt { margin-bottom: 3px; color: var(--tk-muted); font-size: 12.5px; font-weight: 500; }
.tk-infra-detail dd { margin: 0; color: var(--tk-text); font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.tk-content .tk-infra-desc { white-space: normal; overflow-wrap: anywhere; }

.tk-infra-viewer { min-height: 320px; max-height: 80vh; overflow: auto; display: flex; align-items: center; justify-content: center; background: var(--tk-neutral-soft); }
.tk-infra-viewer iframe { width: 100%; height: 75vh; border: 0; }
.tk-infra-viewer img { max-width: 100%; height: auto; display: block; margin: 0 auto; }

@media (max-width: 768px) {
    .tk-content .info-table.tk-infra-table,
    .tk-content .info-table.tk-infra-table tbody,
    .tk-content .info-table.tk-infra-table tr,
    .tk-content .info-table.tk-infra-table th,
    .tk-content .info-table.tk-infra-table td { display: block; width: 100%; }
}

/* ==========================================================================
   Knowledge Base
   ========================================================================== */
.tk-kb-hero {
    margin-bottom: 18px; padding: 22px 24px;
    border: 1px solid var(--tk-border); border-radius: var(--tk-radius);
    background: linear-gradient(120deg, var(--tk-primary-soft), var(--tk-surface) 70%);
    box-shadow: var(--tk-shadow-sm);
}
.tk-kb-hero-text { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.tk-kb-hero-text h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--tk-text); }
.tk-kb-hero-text p { margin: 4px 0 0; color: var(--tk-muted); font-size: 13.5px; max-width: 640px; }
.tk-kb-hero-manage { margin-left: auto; flex-shrink: 0; }
.tk-kb-hero-icon {
    flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--tk-primary); color: #fff; font-size: 24px;
}

.tk-kb-search {
    position: relative; display: flex; gap: 8px; align-items: center;
    padding: 6px 6px 6px 44px; border: 1px solid var(--tk-border-strong); border-radius: 12px;
    background: var(--tk-surface); transition: border-color .15s, box-shadow .15s;
}
.tk-kb-search:focus-within { border-color: var(--tk-primary); box-shadow: 0 0 0 3px var(--tk-primary-ring); }
.tk-kb-search > .mdi { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--tk-muted); }
.tk-kb-search input {
    flex: 1; min-width: 0; height: 40px; border: 0; outline: 0; background: transparent;
    color: var(--tk-text); font-size: 14.5px;
}
.tk-kb-search input::placeholder { color: var(--tk-faint); }
.tk-kb-search .btn { height: 40px; padding: 0 20px; border-radius: 9px; }
.tk-kb-search.is-compact { margin-bottom: 14px; }
.tk-kb-search.is-compact input, .tk-kb-search.is-compact .btn { height: 36px; }

.tk-kb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tk-content a.tk-kb-chip, .tk-kb-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
    border: 1px solid var(--tk-border); border-radius: 999px; background: var(--tk-surface);
    color: var(--tk-text-2); font-size: 13px; font-weight: 500; text-decoration: none;
    transition: border-color .15s, background .15s, color .15s;
}
.tk-kb-chip .mdi { font-size: 16px; color: var(--tk-muted); }
.tk-kb-chip b { padding: 0 7px; border-radius: 999px; background: var(--tk-neutral-soft); color: var(--tk-neutral-text); font-size: 11.5px; font-weight: 600; }
.tk-content a.tk-kb-chip:hover { border-color: var(--tk-primary); color: var(--tk-primary); text-decoration: none; }
.tk-content a.tk-kb-chip.is-active { border-color: var(--tk-primary); background: var(--tk-primary-soft); color: var(--tk-primary); }
.tk-kb-chip.is-active .mdi { color: inherit; }
.tk-kb-chip.is-active b { background: var(--tk-primary); color: #fff; }

.tk-kb-result-info { margin: -6px 0 14px; color: var(--tk-muted); font-size: 13.5px; }
.tk-kb-result-info strong { color: var(--tk-text); }

.tk-kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 20px; }
.tk-kb-dash .tk-kb-grid { margin-bottom: 0; }
.tk-content a.tk-kb-card, .tk-kb-card {
    display: flex; gap: 14px; padding: 16px;
    border: 1px solid var(--tk-border); border-radius: var(--tk-radius);
    background: var(--tk-surface); color: var(--tk-text); text-decoration: none;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.tk-content a.tk-kb-card:hover { border-color: var(--tk-primary); box-shadow: var(--tk-shadow-md); transform: translateY(-1px); text-decoration: none; color: var(--tk-text); }
.tk-kb-card-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tk-kb-card-cat { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 3px; color: var(--tk-muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.tk-kb-pin { display: inline-flex; align-items: center; gap: 2px; color: var(--tk-warning); text-transform: none; letter-spacing: 0; }
.tk-kb-card-title { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--tk-text); }
.tk-content a.tk-kb-card:hover .tk-kb-card-title { color: var(--tk-primary); }
.tk-kb-card-sum {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    margin-top: 4px; color: var(--tk-muted); font-size: 13px; line-height: 1.5;
}
.tk-kb-card-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: auto; padding-top: 10px; color: var(--tk-faint); font-size: 12px; }
.tk-kb-card-meta .mdi { font-size: 14px; vertical-align: -1px; }

.tk-kb-cat-icon {
    flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 10px; font-size: 20px;
}
.tk-kb-cat-icon.is-primary, .tk-kb-tag.is-primary { background: var(--tk-primary-soft); color: var(--tk-primary); }
.tk-kb-cat-icon.is-info, .tk-kb-tag.is-info { background: var(--tk-info-soft); color: var(--tk-info); }
.tk-kb-cat-icon.is-warning, .tk-kb-tag.is-warning { background: var(--tk-warning-soft); color: var(--tk-warning); }
.tk-kb-cat-icon.is-success, .tk-kb-tag.is-success { background: var(--tk-success-soft); color: var(--tk-success); }
.tk-kb-cat-icon.is-danger, .tk-kb-tag.is-danger { background: var(--tk-danger-soft); color: var(--tk-danger); }
.tk-kb-cat-icon.is-slate, .tk-kb-tag.is-slate { background: var(--tk-slate-soft); color: var(--tk-slate); }
.tk-kb-tag {
    display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
    border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.tk-kb-tag.is-draft { background: var(--tk-neutral-soft); color: var(--tk-neutral-text); }

/* Dashboard card */
.tk-kb-dash-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.tk-kb-dash-head .tk-kb-hero-icon { width: 40px; height: 40px; font-size: 22px; }
.tk-content a.tk-kb-dash-all { margin-left: auto; flex-shrink: 0; color: var(--tk-primary); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.tk-content a.tk-kb-dash-all:hover { text-decoration: underline; }
.tk-kb-dash .tk-kb-chips { margin-bottom: 16px; }

/* Article page */
.tk-kb-crumb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; font-size: 13px; color: var(--tk-faint); }
.tk-content .tk-kb-crumb a { color: var(--tk-muted); font-weight: 500; text-decoration: none; }
.tk-content .tk-kb-crumb a:hover { color: var(--tk-primary); }
.tk-kb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; margin-bottom: 20px; }
.tk-kb-article .card-body { padding: 28px 32px; }
.tk-kb-article-head { padding-bottom: 20px; margin-bottom: 22px; border-bottom: 1px solid var(--tk-border); }
.tk-kb-article-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tk-kb-edit { margin-left: auto; }
.tk-kb-article h1 { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; color: var(--tk-text); }
.tk-kb-lead { margin: 10px 0 0; color: var(--tk-text-2); font-size: 15px; line-height: 1.6; }
.tk-kb-article-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; color: var(--tk-muted); font-size: 12.5px; }
.tk-kb-article-meta .mdi { font-size: 15px; vertical-align: -2px; }

.tk-kb-body { color: var(--tk-text-2); font-size: 14.5px; line-height: 1.75; overflow-wrap: anywhere; }
.tk-kb-body > :first-child { margin-top: 0; }
.tk-kb-body > :last-child { margin-bottom: 0; }
.tk-kb-body p { margin: 0 0 14px; }
.tk-kb-body h3 { margin: 26px 0 10px; font-size: 18px; font-weight: 700; color: var(--tk-text); }
.tk-kb-body h4 { margin: 20px 0 8px; font-size: 15.5px; font-weight: 600; color: var(--tk-text); }
.tk-kb-body ul, .tk-kb-body ol { margin: 0 0 14px; padding-left: 22px; }
.tk-kb-body li { margin-bottom: 6px; padding-left: 2px; }
.tk-kb-body li::marker { color: var(--tk-primary); font-weight: 600; }
.tk-kb-body strong { color: var(--tk-text); font-weight: 600; }
.tk-kb-body a { color: var(--tk-primary); text-decoration: underline; text-underline-offset: 2px; }
.tk-kb-body code {
    padding: 1px 6px; border: 1px solid var(--tk-border); border-radius: 5px;
    background: var(--tk-surface-2); color: var(--tk-text); font-size: 12.5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.tk-kb-callout {
    display: flex; gap: 10px; margin: 0 0 14px; padding: 12px 14px;
    border-left: 3px solid var(--tk-info); border-radius: var(--tk-radius-sm);
    background: var(--tk-info-soft); color: var(--tk-text-2); font-size: 14px; line-height: 1.6;
}
.tk-kb-callout > .mdi { color: var(--tk-info); font-size: 19px; line-height: 1.3; }

.tk-kb-figure { margin: 18px 0; }
.tk-kb-figure img { display: block; max-width: 100%; height: auto; margin: 0 auto; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-sm); }
.tk-kb-figure figcaption { margin-top: 6px; color: var(--tk-muted); font-size: 12.5px; text-align: center; }
.tk-kb-pdf, .tk-kb-video { margin: 18px 0; overflow: hidden; border: 1px solid var(--tk-border); border-radius: var(--tk-radius-sm); background: var(--tk-surface-2); }
.tk-kb-pdf-head { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--tk-border); font-size: 13px; }
.tk-kb-pdf-head > .mdi { color: var(--tk-danger); font-size: 20px; }
.tk-kb-pdf-head span { flex: 1 1 auto; min-width: 0; overflow: hidden; color: var(--tk-text); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.tk-kb-body .tk-kb-pdf-head a { flex: 0 0 auto; text-decoration: none; }
.tk-kb-pdf iframe { display: block; width: 100%; height: 640px; border: 0; background: #fff; }
@media (max-width: 767.98px) { .tk-kb-pdf iframe { height: 420px; } }
.tk-kb-video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; background: #000; }
.tk-kb-aside .card { margin-bottom: 16px; }
.tk-kb-aside-title { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--tk-text); }
.tk-kb-aside-empty { margin: 0; color: var(--tk-muted); font-size: 13px; }
.tk-kb-links { list-style: none; margin: 0; padding: 0; }
.tk-kb-links li + li { border-top: 1px solid var(--tk-border); }
.tk-content .tk-kb-links a { display: flex; gap: 8px; padding: 9px 0; color: var(--tk-text-2); font-size: 13.5px; line-height: 1.45; text-decoration: none; }
.tk-content .tk-kb-links a:hover { color: var(--tk-primary); }
.tk-kb-links .mdi { color: var(--tk-faint); font-size: 16px; line-height: 1.3; }
.tk-kb-help .card-body > .mdi { display: block; margin-bottom: 6px; color: var(--tk-primary); font-size: 28px; line-height: 1; }
.tk-kb-help h5 { margin: 0 0 4px; font-size: 14.5px; font-weight: 600; color: var(--tk-text); }
.tk-kb-help p { margin: 0 0 12px; color: var(--tk-muted); font-size: 13px; line-height: 1.55; }

/* Admin table */
.tk-content .table td a.tk-kb-table-title { color: var(--tk-text); font-weight: 600; }
.tk-content .table td a.tk-kb-table-title:hover { color: var(--tk-primary); text-decoration: none; }
.tk-kb-table-sum { max-width: 460px; margin-top: 2px; color: var(--tk-muted); font-size: 12px; line-height: 1.45; white-space: normal; }
.tk-kb-table td:first-child { min-width: 280px; white-space: normal; }
.tk-kb-table td:first-child .tk-kb-table-sum { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tk-kb-table td { vertical-align: middle; }
.tk-kb-table td:not(:first-child) { white-space: nowrap; }
.tk-kb-status { display: flex; flex-wrap: wrap; gap: 4px; }
.tk-kb-row-new > td { animation: tk-kb-flash 2.4s ease-out; }
@keyframes tk-kb-flash { from { background: var(--tk-primary-soft); } to { background: transparent; } }

/* Editor */
.tk-kb-editor { overflow: hidden; border: 1px solid var(--tk-border-strong); border-radius: var(--tk-radius-sm); background: var(--tk-surface); }
.tk-kb-editor:focus-within { border-color: var(--tk-primary); box-shadow: 0 0 0 3px var(--tk-primary-ring); }
.tk-kb-editor.is-invalid { border-color: var(--tk-danger); }
.tk-kb-editor-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--tk-border); background: var(--tk-surface-2); }
.tk-kb-tabs { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--tk-neutral-soft); }
.tk-kb-tabs button { padding: 4px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--tk-muted); font-size: 13px; font-weight: 500; }
.tk-kb-tabs button.is-active { background: var(--tk-surface); color: var(--tk-text); box-shadow: var(--tk-shadow-sm); }
.tk-kb-tools { display: inline-flex; flex-wrap: wrap; gap: 2px; }
.tk-kb-tools button { width: 32px; height: 30px; border: 0; border-radius: 6px; background: transparent; color: var(--tk-muted); font-size: 18px; line-height: 1; }
.tk-kb-tools button:hover { background: var(--tk-primary-soft); color: var(--tk-primary); }
.tk-kb-tools.is-disabled { opacity: .4; pointer-events: none; }
.tk-kb-textarea {
    display: block; width: 100%; min-height: 360px; padding: 14px 16px; border: 0; outline: 0; resize: vertical;
    background: transparent; color: var(--tk-text); font-size: 14px; line-height: 1.7;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.tk-kb-preview { min-height: 360px; padding: 18px 20px; }

.tk-kb-side { margin-bottom: 16px; }
.tk-kb-toggle { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 14px; cursor: pointer; }
.tk-kb-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.tk-kb-switch {
    position: relative; flex-shrink: 0; width: 38px; height: 22px; margin-top: 1px;
    border-radius: 999px; background: var(--tk-border-strong); transition: background .15s;
}
.tk-kb-switch::after {
    content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
    border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s;
}
.tk-kb-toggle input:checked + .tk-kb-switch { background: var(--tk-primary); }
.tk-kb-toggle input:checked + .tk-kb-switch::after { transform: translateX(16px); }
.tk-kb-toggle input:focus-visible + .tk-kb-switch { box-shadow: 0 0 0 3px var(--tk-primary-ring); }
.tk-kb-toggle strong { display: block; color: var(--tk-text); font-size: 13.5px; font-weight: 600; }
.tk-kb-toggle small { display: block; margin-top: 1px; color: var(--tk-muted); font-size: 12px; line-height: 1.45; }
.tk-kb-facts { margin: 4px 0 0; padding-top: 12px; border-top: 1px solid var(--tk-border); font-size: 12.5px; }
.tk-kb-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.tk-kb-facts dt { color: var(--tk-muted); font-weight: 500; }
.tk-kb-facts dd { margin: 0; color: var(--tk-text); text-align: right; }
.tk-kb-cheats { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.tk-kb-cheats li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--tk-border); }
.tk-kb-cheats code { color: var(--tk-primary); background: none; padding: 0; font-size: 12px; }
.tk-kb-cheats span { color: var(--tk-muted); text-align: right; }
.tk-kb-cheats-note { margin: 10px 0 0; color: var(--tk-muted); font-size: 12px; }

@media (max-width: 1199px) {
    .tk-kb-layout { grid-template-columns: 1fr; }
}
@media (max-width: 576px) {
    .tk-kb-hero { padding: 18px 16px; }
    .tk-kb-hero-text { flex-wrap: wrap; }
    .tk-kb-hero-manage { margin-left: 0; width: 100%; }
    .tk-kb-search { padding-left: 38px; }
    .tk-kb-search > .mdi { left: 12px; }
    .tk-kb-search .btn { padding: 0 14px; }
    .tk-kb-grid { grid-template-columns: 1fr; }
    .tk-kb-dash-head { flex-wrap: wrap; align-items: flex-start; row-gap: 8px; }
    .tk-kb-dash-head .tk-card-heading { flex: 1 1 0; }
    .tk-content a.tk-kb-dash-all { flex-basis: 100%; margin-left: 54px; }
    .tk-kb-article .card-body { padding: 20px 18px; }
    .tk-kb-article h1 { font-size: 21px; }
    .tk-kb-chips { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; }
    .tk-kb-chip { flex-shrink: 0; }
}

/* ==========================================================================
   Toast notifications
   ========================================================================== */
.tk-toast-stack {
    position: fixed; top: 12px; right: 12px; z-index: 2100;
    display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
    width: 380px; max-width: calc(100vw - 24px);
    pointer-events: none;
}
.tk-toast {
    position: relative; overflow: hidden; pointer-events: auto;
    display: flex; align-items: center; gap: 14px; width: 100%;
    padding: 14px 12px 14px 18px;
    background: var(--tk-toast-bg, #b3e5f3); color: #1f2937;
    border: 0; border-radius: 12px;
    box-shadow: 0 10px 28px -12px rgba(15, 23, 42, .35), 0 2px 6px rgba(15, 23, 42, .08);
    font-family: var(--tk-font); font-size: 13.5px; line-height: 1.45;
    animation: tk-toast-in .24s cubic-bezier(.21, 1.02, .73, 1) both;
}
.tk-toast.is-success { --tk-toast-bg: #b5f5c4; --tk-toast-bar: #16a34a; }
.tk-toast.is-info { --tk-toast-bg: #b3e5f3; --tk-toast-bar: #0284c7; }
.tk-toast.is-warning { --tk-toast-bg: #f8e5c8; --tk-toast-bar: #d97706; }
.tk-toast.is-error { --tk-toast-bg: #fdb7b7; --tk-toast-bar: #dc2626; }
.tk-toast.is-leaving { animation: tk-toast-out .2s ease forwards; }
.tk-toast-icon {
    flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; color: #111827; font-size: 25px; line-height: 1;
}
.tk-toast-body { flex: 1 1 auto; min-width: 0; word-wrap: break-word; overflow-wrap: anywhere; }
.tk-toast-title { display: block; margin-bottom: 2px; color: #111827; font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }
.tk-toast-msg { color: #1f2937; }
.tk-toast-msg ul { margin: 4px 0 0; padding-left: 18px; }
.tk-toast-msg li + li { margin-top: 2px; }
.tk-toast-msg a { color: #111827; font-weight: 600; text-decoration: underline; }
.tk-toast-close {
    flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; margin: 0; padding: 0;
    border: 0; border-radius: 8px; background: transparent; color: #374151;
    font-size: 21px; line-height: 1; cursor: pointer; transition: background .15s, color .15s;
}
.tk-toast-close:hover { background: rgba(17, 24, 39, .08); color: #111827; }
.tk-toast-close:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(17, 24, 39, .2); }
.tk-toast-bar {
    position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
    background: var(--tk-toast-bar); opacity: .35; transform-origin: left;
    animation: tk-toast-bar linear forwards;
}
.tk-toast.is-paused .tk-toast-bar { animation-play-state: paused; }

@keyframes tk-toast-in { from { opacity: 0; transform: translateX(24px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes tk-toast-out { to { opacity: 0; transform: translateX(24px); } }
@keyframes tk-toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

@media (max-width: 576px) {
    .tk-toast-stack { left: 12px; right: 12px; width: auto; max-width: none; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
    .tk-toast, .tk-toast.is-leaving { animation-duration: .01ms; }
}

/* ==========================================================================
   Confirm modal
   ========================================================================== */
html.tk-confirm-open { overflow: hidden; }
.tk-confirm {
    position: fixed; inset: 0; z-index: 2090;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.tk-confirm-backdrop {
    position: absolute; inset: 0;
    background: rgba(15, 23, 42, .45);
    animation: tk-confirm-fade .18s ease both;
}
.tk-confirm-dialog {
    position: relative; width: 100%; max-width: 400px;
    padding: 24px 24px 20px;
    background: var(--tk-surface); color: var(--tk-text-2);
    border: 1px solid var(--tk-border); border-radius: 14px;
    box-shadow: 0 20px 40px -12px rgba(16, 24, 40, .3);
    font-family: var(--tk-font); text-align: center;
    animation: tk-confirm-in .2s cubic-bezier(.21, 1.02, .73, 1) both;
}
.tk-confirm.is-danger { --tk-confirm-accent: var(--tk-danger); --tk-confirm-soft: var(--tk-danger-soft); }
.tk-confirm.is-warning { --tk-confirm-accent: var(--tk-warning); --tk-confirm-soft: var(--tk-warning-soft); }
.tk-confirm.is-success { --tk-confirm-accent: var(--tk-success); --tk-confirm-soft: var(--tk-success-soft); }
.tk-confirm.is-primary { --tk-confirm-accent: var(--tk-primary); --tk-confirm-soft: var(--tk-primary-soft); }
.tk-confirm-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; margin-bottom: 14px; border-radius: 50%;
    background: var(--tk-confirm-soft); color: var(--tk-confirm-accent);
    font-size: 24px;
}
.tk-confirm-title { margin: 0 0 6px; color: var(--tk-text); font-size: 16px; font-weight: 600; }
.tk-confirm-msg { margin: 0; color: var(--tk-muted); font-size: 13.5px; line-height: 1.6; overflow-wrap: anywhere; }
.tk-confirm-actions { display: flex; gap: 10px; margin-top: 22px; }
.tk-confirm-actions .btn { flex: 1 1 0; justify-content: center; }
.tk-confirm.is-leaving .tk-confirm-backdrop { animation: tk-confirm-fade .18s ease reverse forwards; }
.tk-confirm.is-leaving .tk-confirm-dialog { animation: tk-confirm-out .16s ease forwards; }

@keyframes tk-confirm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tk-confirm-in { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes tk-confirm-out { to { opacity: 0; transform: scale(.97); } }

@media (prefers-reduced-motion: reduce) {
    .tk-confirm-backdrop, .tk-confirm-dialog { animation-duration: .01ms !important; }
}

/* =========================================================================
   Asisten Tikti (chatbot)
   ========================================================================= */
.tk-chat-launcher {
    position: fixed; right: 24px; bottom: 24px; z-index: 1038;
    display: inline-flex; align-items: center; justify-content: center;
    width: 64px; height: 64px; padding: 0;
    border: 2px solid #fff; border-radius: 50%;
    background: radial-gradient(circle at 50% 35%, #ffffff 0%, #e0e7ff 70%, #c7d2fe 100%);
    color: #fff;
    box-shadow: 0 12px 26px -8px rgba(30, 41, 99, .55);
    cursor: pointer;
    transition: transform .2s ease, opacity .2s ease, box-shadow .2s ease, visibility 0s;
}
.tk-chat-launcher::before {
    content: ''; position: absolute; inset: -2px; border-radius: 50%;
    border: 2px solid var(--tk-primary); opacity: 0; pointer-events: none;
    animation: tk-asti-ring 4s ease-out 2s infinite;
}
.tk-chat-launcher:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 16px 30px -8px rgba(30, 41, 99, .6); }
.tk-chat-launcher:focus-visible { outline: 0; box-shadow: 0 0 0 4px var(--tk-primary-ring); }
.tk-chat-launcher-bot {
    position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center;
    border-radius: 50%; overflow: hidden;
    transition: opacity .2s ease, transform .25s ease;
}
.tk-chat-launcher-bot img {
    width: 58px; height: 58px; margin-bottom: -2px; user-select: none;
    transform-origin: 50% 90%;
    animation: tk-asti-float 3.2s ease-in-out infinite, tk-asti-wave 6s ease-in-out 1s infinite;
}
.tk-chat-launcher:hover .tk-chat-launcher-bot img { animation: tk-asti-hop .6s ease-in-out infinite; }
.tk-chat-launcher.is-open {
    opacity: 0; visibility: hidden; pointer-events: none; transform: scale(.6);
    transition: transform .2s ease, opacity .2s ease, visibility 0s linear .2s;
}
.tk-chat-launcher.is-open::before,
.tk-chat-launcher.is-open .tk-chat-launcher-bot img { animation: none; }
[data-theme="dark"] .tk-chat-launcher {
    border-color: #312e81;
    background: radial-gradient(circle at 50% 35%, #3730a3 0%, #1e1b4b 75%);
}

@keyframes tk-asti-float {
    0%, 100% { translate: 0 0; }
    50%      { translate: 0 -4px; }
}
@keyframes tk-asti-wave {
    0%, 70%, 100% { rotate: 0deg; }
    75% { rotate: -9deg; }
    80% { rotate: 7deg; }
    85% { rotate: -5deg; }
    90% { rotate: 3deg; }
    95% { rotate: 0deg; }
}
@keyframes tk-asti-hop {
    0%, 100% { translate: 0 0; rotate: 0deg; }
    30%      { translate: 0 -5px; rotate: -4deg; }
    60%      { translate: 0 0; rotate: 4deg; }
}
@keyframes tk-asti-ring {
    0%       { opacity: .55; transform: scale(1); }
    40%, 100% { opacity: 0; transform: scale(1.45); }
}

.tk-chat-teaser {
    position: fixed; right: 100px; bottom: 34px; z-index: 1038;
    display: flex; align-items: flex-start; gap: 2px;
    max-width: 240px; padding: 10px 6px 10px 14px;
    background: var(--tk-surface); color: var(--tk-text);
    border: 1px solid var(--tk-border); border-radius: 14px 14px 4px 14px;
    box-shadow: 0 14px 30px -10px rgba(16, 24, 40, .3);
    font-family: var(--tk-font); font-size: 13px; line-height: 1.4;
    opacity: 0; visibility: hidden; pointer-events: none;
    transform: translateX(10px) scale(.95); transform-origin: bottom right;
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
}
.tk-chat-teaser.is-visible {
    opacity: 1; visibility: visible; pointer-events: auto; transform: none;
    transition: opacity .25s ease, transform .3s cubic-bezier(.34, 1.56, .64, 1);
}
.tk-chat-teaser-text {
    padding: 0; border: 0; background: none; color: inherit;
    font: inherit; text-align: left; cursor: pointer;
}
.tk-chat-teaser-close {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    width: 22px; height: 22px; padding: 0; margin-top: -3px;
    border: 0; border-radius: 6px; background: transparent; color: var(--tk-faint);
    font-size: 14px; cursor: pointer;
}
.tk-chat-teaser-close:hover { background: var(--tk-surface-2); color: var(--tk-text); }

.tk-chat {
    position: fixed; right: 24px; bottom: 24px; z-index: 1038;
    display: flex; flex-direction: column;
    width: 380px; height: min(640px, calc(100vh - 48px));
    background: var(--tk-surface); color: var(--tk-text);
    border: 1px solid var(--tk-border); border-radius: 16px;
    box-shadow: 0 24px 48px -12px rgba(16, 24, 40, .28);
    font-family: var(--tk-font); overflow: hidden;
    opacity: 0; visibility: hidden; pointer-events: none;
    transform: translateY(12px) scale(.98); transform-origin: bottom right;
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.tk-chat.is-open {
    opacity: 1; visibility: visible; pointer-events: auto; transform: none;
    transition: opacity .18s ease, transform .18s ease;
}

.tk-chat-head {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 12px 12px 16px;
    border-bottom: 1px solid var(--tk-border);
}
.tk-chat-avatar {
    display: inline-flex; align-items: flex-end; justify-content: center; flex: 0 0 auto;
    width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
    background: radial-gradient(circle at 50% 35%, #ffffff 0%, #e0e7ff 75%);
    box-shadow: inset 0 0 0 1px var(--tk-border);
}
.tk-chat-avatar img {
    width: 40px; height: 40px; margin-bottom: -3px; user-select: none;
    transform-origin: 50% 90%;
}
.tk-chat.is-open .tk-chat-avatar img { animation: tk-asti-wave 1.4s ease-in-out .15s 1 both; }
.tk-chat.is-busy .tk-chat-avatar img { animation: tk-asti-float .9s ease-in-out infinite; }
[data-theme="dark"] .tk-chat-avatar { background: radial-gradient(circle at 50% 35%, #3730a3 0%, #1e1b4b 80%); }
.tk-chat-title { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; line-height: 1.25; }
.tk-chat-title strong { color: var(--tk-text); font-size: 14.5px; font-weight: 600; }
.tk-chat-title span { color: var(--tk-muted); font-size: 12px; }
.tk-chat-title span::before {
    content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 5px;
    border-radius: 50%; background: var(--tk-success); vertical-align: 1px;
}
.tk-chat-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; padding: 0;
    border: 0; border-radius: 8px; background: transparent; color: var(--tk-muted);
    font-size: 18px; cursor: pointer;
}
.tk-chat-icon:hover { background: var(--tk-neutral-soft); color: var(--tk-text); }

.tk-chat-body {
    flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain;
    padding: 16px 14px 8px; background: var(--tk-bg);
}
.tk-chat-row { display: flex; margin-bottom: 8px; }
.tk-chat-row.is-user { justify-content: flex-end; }
.tk-chat-bubble {
    max-width: 86%; padding: 9px 12px;
    background: var(--tk-surface); color: var(--tk-text-2);
    border: 1px solid var(--tk-border); border-radius: 14px; border-top-left-radius: 4px;
    font-size: 13.5px; line-height: 1.55; overflow-wrap: anywhere;
}
.tk-chat-bubble strong { color: var(--tk-text); font-weight: 600; }
.tk-chat-row.is-user .tk-chat-bubble {
    background: var(--tk-primary); color: #fff; border-color: transparent;
    border-radius: 14px; border-top-right-radius: 4px;
}
.tk-chat-row.is-user .tk-chat-bubble strong { color: #fff; }
[data-theme="dark"] .tk-chat-row.is-user .tk-chat-bubble { background: #4f46e5; }

.tk-chat-choices { display: flex; flex-wrap: wrap; gap: 6px; max-width: 100%; }
.tk-chat-choice {
    padding: 6px 12px;
    background: var(--tk-surface); color: var(--tk-primary);
    border: 1px solid var(--tk-primary); border-radius: 999px;
    font-size: 12.5px; font-weight: 500; line-height: 1.4; text-align: left; cursor: pointer;
    transition: background .15s ease;
}
.tk-chat-choice:hover:not(:disabled) { background: var(--tk-primary-soft); }
.tk-chat-choice.is-recommended { background: var(--tk-primary); color: #fff; font-weight: 600; }
.tk-chat-choice.is-recommended:hover:not(:disabled) { background: var(--tk-primary-hover); }
.tk-chat-choice.is-recommended .mdi { margin-right: 4px; font-size: 12px; }
.tk-chat-choices.is-used { display: none; }

.tk-chat-links, .tk-chat-cards { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.tk-chat-link {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px;
    background: var(--tk-surface); color: var(--tk-text-2);
    border: 1px solid var(--tk-border); border-radius: 10px;
    font-size: 13px; font-weight: 500; text-decoration: none;
}
.tk-chat-link > .mdi:first-child { color: var(--tk-primary); font-size: 17px; }
.tk-chat-link > span { flex: 1 1 auto; min-width: 0; }
.tk-chat-link > .mdi:last-child { color: var(--tk-faint); }
.tk-chat-link:hover { border-color: var(--tk-primary); color: var(--tk-text); text-decoration: none; }

.tk-chat-card {
    display: flex; flex-direction: column; gap: 4px;
    padding: 10px 12px;
    background: var(--tk-surface); color: var(--tk-text-2);
    border: 1px solid var(--tk-border); border-radius: 12px;
    font-size: 13px; text-decoration: none;
}
.tk-chat-card:hover { border-color: var(--tk-primary); color: var(--tk-text-2); text-decoration: none; }
.tk-chat-card strong { color: var(--tk-text); font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.tk-chat-card-kicker { color: var(--tk-muted); font-size: 11.5px; font-weight: 500; }
.tk-chat-card-text { color: var(--tk-muted); font-size: 12.5px; line-height: 1.5; }
.tk-chat-card-meta { display: flex; align-items: center; gap: 8px; color: var(--tk-muted); font-size: 12px; }

.tk-chat-summary {
    width: 100%; padding: 4px 12px;
    background: var(--tk-surface); border: 1px solid var(--tk-border); border-radius: 12px;
}
.tk-chat-summary-row {
    display: flex; justify-content: space-between; gap: 12px;
    padding: 7px 0; border-bottom: 1px dashed var(--tk-border);
}
.tk-chat-summary-row:last-child { border-bottom: 0; }
.tk-chat-summary-row span { flex: 0 0 auto; color: var(--tk-muted); font-size: 12.5px; }
.tk-chat-summary-row strong {
    color: var(--tk-text); font-size: 13px; font-weight: 500; text-align: right; overflow-wrap: anywhere;
}

.tk-chat-typing .tk-chat-bubble { display: inline-flex; gap: 4px; padding: 12px 14px; }
.tk-chat-typing span {
    width: 6px; height: 6px; border-radius: 50%; background: var(--tk-faint);
    animation: tk-chat-dot 1s infinite ease-in-out;
}
.tk-chat-typing span:nth-child(2) { animation-delay: .15s; }
.tk-chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes tk-chat-dot { 0%, 80%, 100% { opacity: .3; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }

.tk-chat-widget { display: none; padding: 10px 12px 0; border-top: 1px solid var(--tk-border); background: var(--tk-surface); }
.tk-chat-widget.is-active { display: block; }
.tk-chat-widget.is-active + .tk-chat-composer { border-top: 0; }
.tk-chat-field { display: flex; align-items: center; gap: 8px; }
.tk-chat-field .form-control { flex: 1 1 auto; min-width: 0; height: 36px; font-size: 13.5px; }
.tk-chat-field .btn { flex: 0 0 auto; height: 36px; }
.tk-chat-field .tk-chat-file-btn { display: inline-flex; align-items: center; gap: 6px; margin: 0; cursor: pointer; }
.tk-chat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tk-chat-chip {
    max-width: 100%; padding: 5px 10px;
    background: var(--tk-primary-soft); color: var(--tk-primary);
    border: 0; border-radius: 999px;
    font-size: 12px; font-weight: 500; text-align: left; cursor: pointer;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tk-chat-chip.is-muted { background: var(--tk-neutral-soft); color: var(--tk-neutral-text); }
.tk-chat-files { display: flex; flex-wrap: wrap; gap: 6px; }
.tk-chat-files:not(:empty) { margin-bottom: 8px; }
.tk-chat-file {
    display: inline-flex; align-items: center; gap: 4px; max-width: 100%;
    padding: 3px 4px 3px 8px;
    background: var(--tk-neutral-soft); color: var(--tk-text-2); border-radius: 999px;
    font-size: 12px; overflow-wrap: anywhere;
}
.tk-chat-file button {
    width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%;
    background: transparent; color: var(--tk-muted); font-size: 15px; line-height: 1; cursor: pointer;
}
.tk-chat-file button:hover { background: var(--tk-danger-soft); color: var(--tk-danger); }
.tk-chat-hint { margin-top: 6px; color: var(--tk-muted); font-size: 11.5px; }

.tk-chat-composer {
    display: flex; align-items: flex-end; gap: 8px;
    padding: 10px 12px 12px;
    border-top: 1px solid var(--tk-border); background: var(--tk-surface);
}
.tk-chat-composer textarea {
    flex: 1 1 auto; min-width: 0; max-height: 120px; padding: 9px 12px;
    background: var(--tk-surface-2); color: var(--tk-text);
    border: 1px solid var(--tk-border); border-radius: 12px;
    font: inherit; font-size: 13.5px; line-height: 1.45; resize: none; outline: 0;
}
.tk-chat-composer textarea:focus { border-color: var(--tk-primary); box-shadow: 0 0 0 3px var(--tk-primary-ring); }
.tk-chat-composer textarea::placeholder { color: var(--tk-faint); }
.tk-chat-send {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    width: 40px; height: 40px; padding: 0;
    border: 0; border-radius: 50%; background: var(--tk-primary); color: #fff;
    font-size: 18px; cursor: pointer;
}
.tk-chat-send:hover { background: var(--tk-primary-hover); }

@media (max-width: 575.98px) {
    .tk-chat {
        inset: 0; width: 100%; height: 100%; height: 100dvh;
        border: 0; border-radius: 0;
    }
    .tk-chat-launcher { right: 16px; bottom: 16px; }
    .tk-chat-teaser { right: 90px; bottom: 26px; max-width: calc(100vw - 110px); }
}

@media (prefers-reduced-motion: reduce) {
    .tk-chat, .tk-chat-launcher, .tk-chat-launcher.is-open, .tk-chat-teaser, .tk-chat-launcher-bot { transition: none; }
    .tk-chat-typing span,
    .tk-chat-launcher::before,
    .tk-chat-launcher-bot img,
    .tk-chat-launcher:hover .tk-chat-launcher-bot img,
    .tk-chat-avatar img { animation: none !important; }
}
