/* Omni Client Monitoring — Kendo ⇄ Metronic bridge and small utilities.
   Prefer Metronic (kt-*) classes and Tailwind utilities; put here only what the prebuilt build lacks. */

:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --kendo-font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --kendo-font-size: 0.875rem;
  --kendo-color-primary: var(--primary, #0d6efd);
  --kendo-border-radius-md: 0.5rem;
}

body { font-family: var(--font-sans); }

/* Grids */
.k-grid { border: 0; font-size: 0.875rem; }
.k-grid .k-grid-header th, .k-grid .k-table-th { background: var(--accent, #f8f9fa); font-weight: 600; color: var(--muted-foreground, #64748b); text-transform: none; }
.k-grid td, .k-grid .k-table-td { padding: 0.5rem 0.75rem; vertical-align: middle; }
.k-grid tr:hover td { background: color-mix(in srgb, var(--accent, #f8f9fa) 60%, transparent); }
.k-grid .k-grid-pager { border-top: 1px solid var(--border, #e5e7eb); }
.k-grid tr.k-master-row { cursor: pointer; }
.dark .k-grid .k-grid-header th { background: var(--accent); }

/* Notifications */
.k-notification { border-radius: 0.5rem; padding: 0.75rem 1rem; box-shadow: 0 10px 30px rgba(0,0,0,.15); }

/* Popups above KTUI modals (KTUI modal z=100, Kendo popups 10002) — leave defaults, but keep animation containers sane */
.k-animation-container { z-index: 10050 !important; }

/* Semantic text helpers absent from the prebuilt Metronic CSS */
.text-success { color: var(--color-green-500, #22c55e); }
.text-warning { color: var(--color-yellow-500, #eab308); }
.text-danger { color: var(--destructive, #ef4444); }
.text-info { color: var(--color-blue-500, #3b82f6); }
.bg-success-light { background: color-mix(in srgb, #22c55e 12%, transparent); }
.bg-warning-light { background: color-mix(in srgb, #eab308 12%, transparent); }
.bg-danger-light { background: color-mix(in srgb, #ef4444 12%, transparent); }

/* Avatar / logo helpers */
.avatar-initials { display: inline-flex; align-items: center; justify-content: center; border-radius: 9999px; font-weight: 700; color: #fff; }
.logo-thumb { width: 2.25rem; height: 2.25rem; object-fit: contain; border-radius: 0.5rem; background: #fff; border: 1px solid var(--border, #e5e7eb); }

/* Stat tiles */
.stat-tile .stat-value { font-size: 1.75rem; font-weight: 600; line-height: 1.1; }
.stat-tile .stat-label { font-size: 0.8125rem; color: var(--secondary-foreground, #64748b); }

/* OTP boxes */
.otp-input { width: 2.6rem; height: 3rem; text-align: center; font-size: 1.35rem; font-weight: 600; letter-spacing: 0; }

/* Timeline */
.timeline-item { position: relative; padding-left: 2.25rem; }
.timeline-item::before { content: ""; position: absolute; left: 0.9rem; top: 2rem; bottom: -0.5rem; width: 2px; background: var(--border, #e5e7eb); }
.timeline-item:last-child::before { display: none; }
.timeline-icon { position: absolute; left: 0; top: 0.25rem; width: 1.9rem; height: 1.9rem; border-radius: 9999px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 0.8rem; }

/* Scheduler event decorations */
.k-scheduler .k-event.evt-private .k-event-template::before { content: "\f023"; font-family: "Font Awesome 6 Pro", "Font Awesome 6 Free"; font-weight: 900; margin-right: .3rem; font-size: .7rem; }
.k-scheduler .k-event.evt-google { border-style: dashed !important; }

/* JS-driven line tabs (no data-kt-tab-toggle target) — mirror KTUI's active state */
.kt-tabs.kt-tabs-line .kt-tab-toggle.active { border-color: var(--primary); color: var(--primary); }
.kt-tabs.kt-tabs-line .kt-tab-toggle.active i { color: var(--primary); }

/* Dashboard */
#dbLists .kt-card-title, #leaderboard + .kt-card-header .kt-card-title { white-space: nowrap; }
.kt-card-header .kt-card-title { white-space: nowrap; }
#leaderboard table th, #leaderboard table td { padding: .4rem .5rem; }
#leaderboard table th:first-child, #leaderboard table td:first-child { padding-left: 1rem; }

/* Privacy notice typography */
.privacy-notice p, .privacy-notice ul { font-size: .9rem; line-height: 1.6; margin-bottom: .75rem; }
.privacy-notice ul { padding-left: 1.25rem; list-style: disc; }
.privacy-notice h4 { font-size: 1rem; font-weight: 600; margin: 1.25rem 0 .5rem; color: var(--foreground); }
.privacy-notice a { color: var(--primary); }

/* Layout: never let wide grids/tables push the page wider than the viewport — they scroll inside their card instead */
body { overflow-x: hidden; }
.kt-container-fixed { min-width: 0; }
.kt-card-content > .k-grid, .kt-card-content > .k-scheduler { max-width: 100%; }

/* ---- Chat (Release 3) ---- */
#chatApp .conv-item.bg-accent { box-shadow: inset 3px 0 0 var(--primary); }
#messages { scroll-behavior: smooth; }
#messages .msg-actions { transition: opacity .1s; }
#messages .msg:hover .msg-actions { display: flex; }
#messages a { word-break: break-all; }
emoji-picker { --num-columns: 8; --emoji-size: 1.4rem; height: 340px; width: 320px; }
.dark #chatApp .bg-accent { background: color-mix(in oklab, var(--accent) 80%, transparent); }
#callWindow video { background: #000; }
