/* TIM-OE 2026-05-07 v9 - complete dark mode / no white table blocks / no refresh flash
   SQ: Rregullon pjeset e bardha ne tabelat e oreve dhe vendos dark para renderimit.
   DE: Behebt weisse Tabellenbereiche und setzt Dark Mode vor dem Rendern.
*/

html.timoe-theme-boot * {
  transition: none !important;
  animation: none !important;
}

html.dark,
html.dark body,
html.dark #root,
html.timoe-preload-dark,
html.timoe-preload-dark body,
html.timoe-preload-dark #root,
html[data-timoe-theme="dark"],
html[data-timoe-theme="dark"] body,
html[data-timoe-theme="dark"] #root {
  background: #06111f !important;
  color: #e5edf8 !important;
  min-height: 100% !important;
}

html.dark body,
html.timoe-preload-dark body,
html[data-timoe-theme="dark"] body {
  background-image:
    radial-gradient(circle at 40% 12%, rgba(30,64,175,.24), transparent 20%),
    linear-gradient(180deg, #06111f 0%, #091427 45%, #0f172a 100%) !important;
  background-attachment: fixed !important;
}

html.dark body.timoe-vibiz-admin,
html.timoe-preload-dark body.timoe-vibiz-admin,
html[data-timoe-theme="dark"] body.timoe-vibiz-admin {
  background-color: #06111f !important;
}

/* Main app surfaces */
html.dark body.timoe-vibiz-admin main,
html.timoe-preload-dark body.timoe-vibiz-admin main,
html[data-timoe-theme="dark"] body.timoe-vibiz-admin main,
html.dark body.timoe-vibiz-admin [data-timoe-main="vibiz"],
html.timoe-preload-dark body.timoe-vibiz-admin [data-timoe-main="vibiz"],
html[data-timoe-theme="dark"] body.timoe-vibiz-admin [data-timoe-main="vibiz"] {
  background: transparent !important;
  color: #e5edf8 !important;
}

/* Kill hard-coded white/light blocks without touching action buttons. */
html.dark body.timoe-vibiz-admin main :where(div,section,article,aside,form,ul,li)[class*="bg-white"],
html.dark body.timoe-vibiz-admin main :where(div,section,article,aside,form,ul,li)[class*="bg-slate-50"],
html.dark body.timoe-vibiz-admin main :where(div,section,article,aside,form,ul,li)[class*="bg-slate-100"],
html.dark body.timoe-vibiz-admin main :where(div,section,article,aside,form,ul,li)[class*="bg-gray-50"],
html.dark body.timoe-vibiz-admin main :where(div,section,article,aside,form,ul,li)[class*="bg-gray-100"],
html.dark body.timoe-vibiz-admin main :where(div,section,article,aside,form,ul,li)[class*="bg-neutral-50"],
html.dark body.timoe-vibiz-admin main :where(div,section,article,aside,form,ul,li)[class*="bg-neutral-100"],
html.timoe-preload-dark body.timoe-vibiz-admin main :where(div,section,article,aside,form,ul,li)[class*="bg-white"],
html.timoe-preload-dark body.timoe-vibiz-admin main :where(div,section,article,aside,form,ul,li)[class*="bg-slate-50"],
html.timoe-preload-dark body.timoe-vibiz-admin main :where(div,section,article,aside,form,ul,li)[class*="bg-slate-100"],
html.timoe-preload-dark body.timoe-vibiz-admin main :where(div,section,article,aside,form,ul,li)[class*="bg-gray-50"],
html.timoe-preload-dark body.timoe-vibiz-admin main :where(div,section,article,aside,form,ul,li)[class*="bg-gray-100"],
html.timoe-preload-dark body.timoe-vibiz-admin main :where(div,section,article,aside,form,ul,li)[class*="bg-neutral-50"],
html.timoe-preload-dark body.timoe-vibiz-admin main :where(div,section,article,aside,form,ul,li)[class*="bg-neutral-100"] {
  background: linear-gradient(180deg, rgba(10,18,34,.98), rgba(15,23,42,.94)) !important;
  border-color: rgba(51,65,85,.78) !important;
  color: #e5edf8 !important;
}

/* Work-hours report table: force every row/cell dark. This fixes the white blocks in the screenshot. */
html.dark body.timoe-vibiz-admin main :where(table, thead, tbody, tfoot, tr, td, th),
html.timoe-preload-dark body.timoe-vibiz-admin main :where(table, thead, tbody, tfoot, tr, td, th),
html[data-timoe-theme="dark"] body.timoe-vibiz-admin main :where(table, thead, tbody, tfoot, tr, td, th) {
  background-color: #0b1730 !important;
  background-image: none !important;
  color: #eaf1ff !important;
  border-color: rgba(255,255,255,.08) !important;
  box-shadow: none !important;
}

html.dark body.timoe-vibiz-admin main :where(thead, th),
html.timoe-preload-dark body.timoe-vibiz-admin main :where(thead, th),
html[data-timoe-theme="dark"] body.timoe-vibiz-admin main :where(thead, th) {
  background-color: #0f1d37 !important;
  color: #f8fafc !important;
}

html.dark body.timoe-vibiz-admin main tbody tr:nth-child(odd),
html.dark body.timoe-vibiz-admin main tbody tr:nth-child(even),
html.timoe-preload-dark body.timoe-vibiz-admin main tbody tr:nth-child(odd),
html.timoe-preload-dark body.timoe-vibiz-admin main tbody tr:nth-child(even),
html[data-timoe-theme="dark"] body.timoe-vibiz-admin main tbody tr:nth-child(odd),
html[data-timoe-theme="dark"] body.timoe-vibiz-admin main tbody tr:nth-child(even) {
  background-color: #0b1730 !important;
  background-image: none !important;
}

html.dark body.timoe-vibiz-admin main td > :not(button):not(a):not([role="button"]),
html.dark body.timoe-vibiz-admin main th > :not(button):not(a):not([role="button"]),
html.timoe-preload-dark body.timoe-vibiz-admin main td > :not(button):not(a):not([role="button"]),
html.timoe-preload-dark body.timoe-vibiz-admin main th > :not(button):not(a):not([role="button"]),
html[data-timoe-theme="dark"] body.timoe-vibiz-admin main td > :not(button):not(a):not([role="button"]),
html[data-timoe-theme="dark"] body.timoe-vibiz-admin main th > :not(button):not(a):not([role="button"]) {
  color: inherit !important;
}

/* Do not destroy button styles inside table action column. */
html.dark body.timoe-vibiz-admin main td :where(button, button *, a, a *, [role="button"], [role="button"] *),
html.dark body.timoe-vibiz-admin main th :where(button, button *, a, a *, [role="button"], [role="button"] *),
html.timoe-preload-dark body.timoe-vibiz-admin main td :where(button, button *, a, a *, [role="button"], [role="button"] *),
html.timoe-preload-dark body.timoe-vibiz-admin main th :where(button, button *, a, a *, [role="button"], [role="button"] *),
html[data-timoe-theme="dark"] body.timoe-vibiz-admin main td :where(button, button *, a, a *, [role="button"], [role="button"] *),
html[data-timoe-theme="dark"] body.timoe-vibiz-admin main th :where(button, button *, a, a *, [role="button"], [role="button"] *) {
  color: revert !important;
}

/* Inline old white styles */
html.dark body.timoe-vibiz-admin main [style*="background: white"],
html.dark body.timoe-vibiz-admin main [style*="background-color: white"],
html.dark body.timoe-vibiz-admin main [style*="background:#fff"],
html.dark body.timoe-vibiz-admin main [style*="background-color:#fff"],
html.dark body.timoe-vibiz-admin main [style*="background: rgb(255"],
html.dark body.timoe-vibiz-admin main [style*="background-color: rgb(255"],
html.timoe-preload-dark body.timoe-vibiz-admin main [style*="background: white"],
html.timoe-preload-dark body.timoe-vibiz-admin main [style*="background-color: white"],
html.timoe-preload-dark body.timoe-vibiz-admin main [style*="background:#fff"],
html.timoe-preload-dark body.timoe-vibiz-admin main [style*="background-color:#fff"],
html.timoe-preload-dark body.timoe-vibiz-admin main [style*="background: rgb(255"],
html.timoe-preload-dark body.timoe-vibiz-admin main [style*="background-color: rgb(255"] {
  background: linear-gradient(180deg, rgba(10,18,34,.98), rgba(15,23,42,.94)) !important;
  background-color: #0b1730 !important;
  color: #e5edf8 !important;
  border-color: rgba(51,65,85,.78) !important;
}

/* Inputs */
html.dark body.timoe-vibiz-admin main :where(input, select, textarea),
html.timoe-preload-dark body.timoe-vibiz-admin main :where(input, select, textarea),
html[data-timoe-theme="dark"] body.timoe-vibiz-admin main :where(input, select, textarea) {
  background: rgba(15,23,42,.96) !important;
  color: #f8fafc !important;
  border-color: rgba(71,85,105,.75) !important;
}

html.dark body.timoe-vibiz-admin main ::placeholder,
html.timoe-preload-dark body.timoe-vibiz-admin main ::placeholder,
html[data-timoe-theme="dark"] body.timoe-vibiz-admin main ::placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
}

/* Text fixes */
html.dark body.timoe-vibiz-admin main :where(.text-black, .text-slate-900, .text-slate-800, .text-slate-700, .text-gray-900, .text-gray-800, .text-neutral-900, .text-neutral-800),
html.timoe-preload-dark body.timoe-vibiz-admin main :where(.text-black, .text-slate-900, .text-slate-800, .text-slate-700, .text-gray-900, .text-gray-800, .text-neutral-900, .text-neutral-800),
html[data-timoe-theme="dark"] body.timoe-vibiz-admin main :where(.text-black, .text-slate-900, .text-slate-800, .text-slate-700, .text-gray-900, .text-gray-800, .text-neutral-900, .text-neutral-800) {
  color: #f8fafc !important;
}

html.dark body.timoe-vibiz-admin main :where(.text-slate-600, .text-slate-500, .text-gray-600, .text-gray-500, .text-neutral-600, .text-neutral-500),
html.timoe-preload-dark body.timoe-vibiz-admin main :where(.text-slate-600, .text-slate-500, .text-gray-600, .text-gray-500, .text-neutral-600, .text-neutral-500),
html[data-timoe-theme="dark"] body.timoe-vibiz-admin main :where(.text-slate-600, .text-slate-500, .text-gray-600, .text-gray-500, .text-neutral-600, .text-neutral-500) {
  color: #cbd5e1 !important;
}

/* Browser autofill flash */
html.dark input:-webkit-autofill,
html.timoe-preload-dark input:-webkit-autofill,
html[data-timoe-theme="dark"] input:-webkit-autofill {
  -webkit-text-fill-color: #f8fafc !important;
  box-shadow: 0 0 0 1000px #0f172a inset !important;
  transition: background-color 9999s ease-out 0s !important;
}

@media print {
  html, body, #root, main, table, thead, tbody, tr, td, th {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
  }
}
