/* ==========================================================================
   Horus Organization Dashboard — Playful SaaS UI
   Duolingo / Discord / Arc / Linear inspired
   Uses design tokens from theme.css (--horus-*)
   ========================================================================== */

/* ========== Reset & Base ========== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  scroll-behavior: smooth;
  --horus-ui-zoom: 1;
  /* CSS zoom scales layout after vh is resolved — compensate so fixed chrome fills the screen. */
  --horus-viewport-h: calc(100vh / var(--horus-ui-zoom));
  --horus-viewport-dvh: calc(100dvh / var(--horus-ui-zoom));
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body.horus-body {
  min-height: var(--horus-viewport-dvh);
  margin: 0;
  background: var(--horus-bg);
  color: var(--horus-text);
  font-family: var(--horus-font-body);
  font-size: 0.9375rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  zoom: var(--horus-ui-zoom);
}

@supports not (zoom: 1) {
  body.horus-body {
    font-size: calc(0.9375rem * var(--horus-ui-zoom));
  }
}

a {
  color: var(--horus-brand-blue);
  text-decoration: none;
  transition: color var(--horus-ease-fast);
}

a:hover {
  color: var(--horus-accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--horus-focus-ring);
}

[x-cloak] {
  display: none !important;
}

/* ========== Utilities ========== */

.horus-glass {
  background: var(--horus-surface);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  border: 1px solid var(--horus-border);
}

.horus-fade-in {
  animation: horus-fade-in 480ms var(--horus-ease) both;
}

.horus-stagger > * {
  animation: horus-fade-up 520ms var(--horus-ease) both;
}

.horus-stagger > *:nth-child(1) { animation-delay: 0ms; }
.horus-stagger > *:nth-child(2) { animation-delay: 60ms; }
.horus-stagger > *:nth-child(3) { animation-delay: 120ms; }
.horus-stagger > *:nth-child(4) { animation-delay: 180ms; }
.horus-stagger > *:nth-child(5) { animation-delay: 240ms; }
.horus-stagger > *:nth-child(6) { animation-delay: 300ms; }
.horus-stagger > *:nth-child(7) { animation-delay: 360ms; }
.horus-stagger > *:nth-child(8) { animation-delay: 420ms; }

.horus-counter {
  font-family: var(--horus-font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  font-feature-settings: "tnum" 1;
}

/* ========== Ambient Background ========== */

.horus-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.horus-ambient__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--horus-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--horus-border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 75%);
  opacity: 0.35;
}

.horus-ambient__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  animation: horus-blob-float 18s ease-in-out infinite;
}

.horus-ambient__blob:nth-child(1) {
  width: 420px;
  height: 420px;
  top: -8%;
  left: -6%;
  background: color-mix(in srgb, var(--horus-brand-purple) 50%, transparent);
  animation-delay: 0s;
}

.horus-ambient__blob:nth-child(2) {
  width: 360px;
  height: 360px;
  top: 40%;
  right: -4%;
  background: color-mix(in srgb, var(--horus-brand-blue) 42%, transparent);
  animation-delay: -6s;
}

.horus-ambient__blob:nth-child(3) {
  width: 280px;
  height: 280px;
  bottom: -5%;
  left: 35%;
  background: color-mix(in srgb, var(--horus-brand-gold) 35%, transparent);
  animation-delay: -12s;
}

.horus-ambient__orb {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--horus-brand-purple-light);
  opacity: 0.3;
  box-shadow:
    120px 80px 0 0 color-mix(in srgb, var(--horus-brand-blue) 35%, transparent),
    240px 160px 0 0 color-mix(in srgb, var(--horus-brand-purple) 28%, transparent),
    360px 40px 0 0 color-mix(in srgb, var(--horus-brand-pink) 25%, transparent),
    480px 200px 0 0 color-mix(in srgb, var(--horus-brand-gold) 22%, transparent);
}

/* ========== Skip Link ========== */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  z-index: 1080;
  padding: 0.6rem 1.1rem;
  border-radius: var(--horus-radius-sm);
  background: var(--horus-accent);
  color: #fff;
  font-family: var(--horus-font-display);
  font-weight: 700;
  text-decoration: none;
  transition: top var(--horus-ease-fast), transform var(--horus-ease-fast);
}

.skip-link:focus {
  top: 1rem;
  color: #fff;
  transform: scale(1.02);
}

/* ========== Shell ========== */

.horus-shell {
  position: relative;
  display: block;
  min-height: var(--horus-viewport-h);
  min-height: var(--horus-viewport-dvh);
  width: 100%;
  --horus-sidebar-wave: 1.55rem;
  --horus-sidebar-drip-width: 3rem;
  --horus-sidebar-drip-overlap: 8px;
}

.horus-sidebar {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  inset-inline-end: auto;
  z-index: 1030;
  width: calc(var(--horus-sidebar-width) + var(--horus-sidebar-wave));
  display: flex;
  flex-direction: column;
  padding-inline-end: var(--horus-sidebar-wave);
  background-color: var(--horus-sidebar-solid);
  background-image: var(--horus-sidebar-bg);
  background-origin: content-box;
  background-clip: content-box;
  border: none;
  color: var(--horus-sidebar-text);
  transition: transform var(--horus-ease);
  box-shadow: none;
  margin: 0;
  border-radius: 0;
  min-height: var(--horus-viewport-h);
  min-height: var(--horus-viewport-dvh);
  height: var(--horus-viewport-h);
  height: var(--horus-viewport-dvh);
  overflow: visible;
}

.horus-sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  inset-inline-end: var(--horus-sidebar-wave);
  border-radius: 0;
  background:
    radial-gradient(ellipse 80% 40% at 50% 108%, rgba(255, 200, 74, 0.14), transparent 55%),
    radial-gradient(ellipse 70% 35% at 20% 0%, rgba(157, 217, 255, 0.12), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.horus-sidebar::after {
  content: none;
}

.horus-sidebar__drip {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-start: auto;
  inset-inline-end: calc(var(--horus-sidebar-wave) - var(--horus-sidebar-drip-width));
  width: calc(var(--horus-sidebar-drip-width) + var(--horus-sidebar-drip-overlap));
  height: 100% !important;
  min-height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  color: var(--horus-sidebar-solid);
  pointer-events: none;
  z-index: 2;
  display: block;
  overflow: visible;
  flex-shrink: 0;
  transform-origin: center;
  filter: drop-shadow(10px 0 18px rgba(42, 38, 128, 0.28));
}

.horus-sidebar-drip-stop--1 { stop-color: var(--horus-sidebar-grad-1); }
.horus-sidebar-drip-stop--2 { stop-color: var(--horus-sidebar-grad-2); }
.horus-sidebar-drip-stop--3 { stop-color: var(--horus-sidebar-grad-3); }
.horus-sidebar-drip-stop--4 { stop-color: var(--horus-sidebar-grad-4); }

.horus-sidebar__head,
.horus-sidebar__nav,
.horus-sidebar__footer {
  position: relative;
  z-index: 1;
}

.horus-sidebar__head {
  padding: 1.15rem 1.15rem 0.65rem;
}

.horus-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: auto;
  padding: 0.15rem 0.25rem 0.85rem;
  border-bottom: none;
  color: #fff;
  text-decoration: none;
  transition: opacity var(--horus-ease-fast);
}

.horus-sidebar__brand:hover {
  color: #fff;
  opacity: 0.96;
}

.horus-sidebar__logo {
  width: 5rem;
  height: 5rem;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 1.1rem;
  display: block;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.22));
}

.horus-sidebar__brand-text {
  font-family: var(--horus-font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
}

.horus-sidebar__org {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.55rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: rgba(20, 16, 64, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 650;
  transition: background var(--horus-ease-fast), border-color var(--horus-ease-fast);
}

.horus-sidebar__org:hover {
  color: #fff;
  background: rgba(20, 16, 64, 0.48);
  border-color: rgba(255, 255, 255, 0.2);
}

.horus-sidebar__org--static,
.horus-sidebar__org--static:hover {
  cursor: default;
  background: rgba(20, 16, 64, 0.35);
  border-color: rgba(255, 255, 255, 0.12);
}

.horus-sidebar__org-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horus-sidebar__org .bi {
  font-size: 0.75rem;
  opacity: 0.75;
}

.horus-sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.55rem 0.85rem 0.35rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.horus-sidebar__nav::-webkit-scrollbar {
  width: 4px;
}

.horus-sidebar__nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.horus-nav-section {
  margin-bottom: 0.75rem;
}

.horus-nav-section__label {
  margin: 0.35rem 0 0.45rem 0.85rem;
  font-family: var(--horus-font-display);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.horus-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 2.65rem;
  padding: 0.55rem 1rem;
  margin-bottom: 0.18rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition:
    background var(--horus-ease-fast),
    color var(--horus-ease-fast),
    transform var(--horus-ease-fast),
    box-shadow var(--horus-ease-fast);
}

.horus-nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: none;
  box-shadow: none;
}

.horus-nav-link.active,
.horus-nav-link[aria-current="page"] {
  background: #fff;
  color: #5b45f6;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(27, 24, 51, 0.16);
}

.horus-nav-link.active::before,
.horus-nav-link[aria-current="page"]::before {
  display: none;
}

.horus-nav-link .bi {
  font-size: 1.15rem;
  line-height: 1;
  width: 1.25rem;
  text-align: center;
  opacity: 1;
  flex-shrink: 0;
}

.horus-nav-link.active .bi,
.horus-nav-link[aria-current="page"] .bi {
  color: #5b45f6;
}

.horus-nav-link__icon {
  display: none;
}

.horus-nav-link__badge {
  margin-inline-start: auto;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #f85a5a;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.horus-sidebar__footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.85rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.horus-navbar-clock {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.4rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--horus-border);
  border-radius: 999px;
  background: var(--horus-surface);
  color: var(--horus-text-muted, var(--horus-text));
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.horus-navbar-clock--sidebar {
  width: 100%;
  justify-content: center;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
}

.horus-navbar-clock__value {
  font-style: normal;
}

.horus-navbar-clock .bi {
  font-size: 0.85rem;
  opacity: 0.75;
}

.horus-sidebar__art,
.horus-sidebar__art-img,
.horus-sidebar__moon,
.horus-sidebar__star {
  display: none;
}

.horus-main {
  position: relative;
  z-index: 1;
  margin-inline-start: calc(var(--horus-sidebar-width) + var(--horus-sidebar-wave, 1.5rem) + 1.25rem);
  margin-inline-end: 0;
  width: calc(100% - var(--horus-sidebar-width) - var(--horus-sidebar-wave, 1.5rem) - 1.25rem);
  max-width: calc(100% - var(--horus-sidebar-width) - var(--horus-sidebar-wave, 1.5rem) - 1.25rem);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: var(--horus-viewport-h);
  min-height: var(--horus-viewport-dvh);
}

.horus-navbar {
  position: sticky;
  top: 0.75rem;
  z-index: 1020;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.75rem;
  margin: 0.75rem 1rem 0;
  padding: 0.5rem 0.85rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--horus-border);
  border-radius: 999px;
  box-shadow: var(--horus-card-shadow);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}

[data-bs-theme="dark"] .horus-navbar {
  background: rgba(27, 24, 51, 0.82);
}

.horus-navbar__spacer {
  flex: 1;
  min-width: 0;
}

.horus-navbar__actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-inline-start: auto;
}

.horus-user-menu {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 14rem;
  min-height: 2.4rem;
  padding: 0.25rem 0.65rem 0.25rem 0.3rem;
  border: 1px solid var(--horus-border);
  border-radius: 999px;
  background: var(--horus-surface);
  color: var(--horus-text);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  transition:
    background var(--horus-ease-fast),
    border-color var(--horus-ease-fast),
    box-shadow var(--horus-ease-fast),
    transform var(--horus-ease-fast);
}

.horus-user-menu:hover,
.horus-user-menu:focus,
.horus-user-menu.show {
  background: var(--horus-surface-muted);
  border-color: var(--horus-border-strong);
  color: var(--horus-text);
  box-shadow: var(--horus-card-shadow);
  transform: translateY(-1px);
}

.horus-user-menu__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  background: var(--horus-grad-purple);
  color: #3a2aa8;
  font-size: 0.7rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(91, 69, 246, 0.28);
}

.horus-user-menu__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horus-user-menu::after {
  margin-left: 0.1rem;
  opacity: 0.45;
}

.horus-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  height: 2.45rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--horus-radius-sm);
  background: transparent;
  color: var(--horus-text-secondary);
  transition:
    background var(--horus-ease-fast),
    color var(--horus-ease-fast),
    border-color var(--horus-ease-fast),
    transform var(--horus-bounce),
    box-shadow var(--horus-ease-fast);
}

.horus-icon-btn:hover {
  background: var(--horus-surface-muted);
  color: var(--horus-text);
  border-color: var(--horus-border);
  box-shadow: var(--horus-shadow-sm);
}

.horus-icon-btn:active {
  transform: scale(0.94);
}

.horus-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1.65rem 1.85rem 2.25rem;
  max-width: 100%;
}

/* Stretch paged views so .horus-pagination can sit at the bottom of the content area. */
.horus-content > :last-child:has(.horus-pagination) {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}

.horus-card:has(.horus-pagination),
.horus-table-wrap:has(.horus-pagination),
.horus-live-board:has(.horus-pagination),
.horus-panel:has(.horus-pagination),
.horus-panel-body:has(.horus-pagination),
#employee-timeline-panel:has(.horus-pagination) {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.horus-footer {
  margin-top: auto;
  padding: 1rem 1.85rem 1.4rem;
  border-top: 1px solid var(--horus-border);
  color: var(--horus-text-muted);
  font-size: 0.75rem;
}

.horus-sidebar-toggle {
  display: none;
}

.horus-sidebar-backdrop {
  display: none;
}

/* ========== Page Header ========== */

.horus-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.horus-page-title {
  margin: 0;
  font-family: var(--horus-font-display);
  font-size: clamp(2rem, 2.4vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.25;
  padding-block: 0.08em 0.14em;
  overflow: visible;
  background: linear-gradient(135deg, var(--horus-brand-purple-deep), var(--horus-brand-purple), var(--horus-brand-blue));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.horus-page-subtitle {
  margin: 0.35rem 0 0;
  color: var(--horus-text-muted);
  font-size: 0.95rem;
  max-width: 52rem;
  line-height: 1.65;
  overflow: visible;
  padding-bottom: 0.1em;
  -webkit-text-fill-color: currentColor;
  background: none;
  background-clip: border-box;
  -webkit-background-clip: border-box;
}

.horus-section-title {
  margin: 0;
  font-family: var(--horus-font-display);
  font-size: clamp(1.25rem, 1.5vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.35;
  padding-block: 0.06em 0.1em;
  overflow: visible;
  color: var(--horus-text);
}

.horus-section-meta {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--horus-text-muted);
  line-height: 1.65;
  overflow: visible;
  padding-bottom: 0.1em;
  -webkit-text-fill-color: currentColor;
}

/* ========== Breadcrumb ========== */

.horus-breadcrumb {
  margin-bottom: 0.85rem;
}

.horus-breadcrumb .breadcrumb {
  margin-bottom: 0;
  background: transparent;
  padding: 0;
  font-size: 0.8rem;
  gap: 0.2rem;
}

.horus-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  color: var(--horus-text-muted);
  opacity: 0.65;
}

.horus-breadcrumb .breadcrumb-item a {
  color: var(--horus-text-muted);
  text-decoration: none;
  transition: color var(--horus-ease-fast);
}

.horus-breadcrumb .breadcrumb-item a:hover {
  color: var(--horus-accent);
}

.horus-breadcrumb .breadcrumb-item.active {
  color: var(--horus-text-secondary);
  font-weight: 600;
}

/* ========== Ops Hero ========== */

.horus-ops-hero {
  position: relative;
  overflow: visible;
  margin-bottom: 1.5rem;
  padding: 1.65rem 1.85rem;
  border-radius: var(--horus-radius-xl);
  border: 1px solid var(--horus-border);
  background: var(--horus-grad-hero);
  box-shadow: var(--horus-card-shadow);
}

.horus-ops-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--horus-grad-card);
  opacity: 0.75;
  pointer-events: none;
}

.horus-ops-hero > * {
  position: relative;
  z-index: 1;
}

.horus-ops-hero .horus-page-title {
  font-size: 1.85rem;
}

/* ========== Toolbar ========== */

.horus-toolbar {
  margin-bottom: 1.15rem;
}

.horus-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.horus-toolbar__actions > form {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.horus-filter-bar {
  display: contents;
}

/* ========== Buttons (Bootstrap overrides) ========== */

.horus-content .btn,
.modal .btn,
.horus-auth .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.45rem;
  padding: 0.45rem 1rem;
  border-radius: var(--horus-radius-sm);
  font-family: var(--horus-font-body);
  font-size: 0.85rem;
  font-weight: 650;
  line-height: 1.2;
  transition:
    background var(--horus-ease-fast),
    border-color var(--horus-ease-fast),
    color var(--horus-ease-fast),
    box-shadow var(--horus-ease-fast),
    transform var(--horus-bounce);
}

.horus-content .btn:active,
.modal .btn:active,
.horus-auth .btn:active {
  transform: scale(0.97);
}

.horus-content .btn-sm,
.modal .btn-sm {
  min-height: 2.05rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.775rem;
}

.btn-primary {
  --bs-btn-bg: var(--horus-brand-purple);
  --bs-btn-border-color: transparent;
  --bs-btn-hover-bg: var(--horus-accent-hover);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-bg: var(--horus-accent-pressed);
  --bs-btn-active-border-color: transparent;
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
  background-image: var(--horus-grad-primary);
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(91, 69, 246, 0.32);
}

.btn-primary:hover {
  box-shadow: 0 10px 28px rgba(91, 69, 246, 0.4);
  transform: translateY(-2px);
}

[data-bs-theme="dark"] .btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
  box-shadow: 0 6px 20px rgba(142, 125, 255, 0.28);
}

.btn-outline-secondary {
  --bs-btn-color: var(--horus-text-secondary);
  --bs-btn-border-color: var(--horus-border-strong);
  --bs-btn-hover-bg: var(--horus-surface-muted);
  --bs-btn-hover-border-color: var(--horus-border-strong);
  --bs-btn-hover-color: var(--horus-text);
  background: var(--horus-surface);
}

.btn-outline-secondary:hover {
  transform: translateY(-1px);
  box-shadow: var(--horus-shadow-sm);
}

.btn-outline-danger,
.btn-danger-soft {
  --bs-btn-color: var(--horus-danger);
  --bs-btn-border-color: transparent;
  --bs-btn-bg: var(--horus-danger-soft);
  --bs-btn-hover-bg: color-mix(in srgb, var(--horus-danger) 20%, transparent);
  --bs-btn-hover-color: var(--horus-danger);
  --bs-btn-hover-border-color: transparent;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--horus-text-secondary);
}

.btn-ghost:hover {
  background: var(--horus-surface-muted);
  color: var(--horus-text);
}

/* ========== Cards & Panels ========== */

.horus-card {
  background: var(--horus-grad-card);
  border: 1px solid var(--horus-border);
  border-radius: var(--horus-radius-lg);
  box-shadow: var(--horus-card-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition:
    box-shadow var(--horus-ease),
    border-color var(--horus-ease),
    transform var(--horus-ease);
  position: relative;
  overflow: hidden;
}

.horus-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--horus-brand-purple), var(--horus-brand-blue), var(--horus-brand-gold));
  opacity: 0.55;
  pointer-events: none;
}

.horus-card:not(.horus-card--static):hover {
  box-shadow: var(--horus-card-shadow-hover);
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--horus-brand-purple) 28%, var(--horus-border));
}

.horus-card--static:hover {
  box-shadow: var(--horus-card-shadow);
  transform: none;
}

.horus-panel-header,
.horus-table-wrap__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 1.35rem 2rem;
  border-bottom: 1px solid var(--horus-border);
}

.horus-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.horus-bulk-bar__count {
  margin-inline-end: 0.35rem;
  color: var(--horus-text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

.horus-table__col--select {
  width: 2.5rem;
  vertical-align: middle;
}

.horus-panel-body {
  padding: 2rem;
}

.horus-panel,
.horus-panel--md,
.horus-panel--lg,
.horus-workspace {
  width: 100%;
  max-width: min(100%, 96rem);
}

/* ========== Stat Cards ========== */

.horus-stat-card {
  padding: 1.25rem 1.35rem;
  position: relative;
  overflow: hidden;
}

.horus-stat-card::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -15%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--horus-accent) 8%, transparent);
  pointer-events: none;
}

.horus-stat-card__label {
  margin: 0;
  font-family: var(--horus-font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--horus-text-muted);
}

.horus-stat-card__value {
  margin: 0.45rem 0 0;
  font-family: var(--horus-font-display);
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--horus-text);
  line-height: 1.3;
  padding-block: 0.06em 0.1em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.horus-overview-stats .horus-stat-card__value {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.horus-overview-stats .horus-stat-card__value--status {
  margin-top: 0.45rem;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: normal;
  line-height: 1.2;
  padding-block: 0;
}

.horus-overview-stats .horus-stat-card__value--status .horus-status-pill {
  font-size: 0.8125rem;
}

.horus-stat-card__meta {
  margin: 0.5rem 0 0;
  font-size: 0.775rem;
  color: var(--horus-text-secondary);
}

.horus-stat-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--horus-radius-sm);
  background: var(--horus-accent-subtle);
  color: var(--horus-accent);
  font-size: 1.2rem;
  transition: transform var(--horus-bounce);
}

.horus-stat-card:hover .horus-stat-card__icon {
  transform: scale(1.1) rotate(-4deg);
}

.horus-stat-card--teal {
  background: linear-gradient(145deg, color-mix(in srgb, var(--horus-brand-purple) 10%, var(--horus-surface-solid)), var(--horus-surface-solid));
}

.horus-stat-card--teal::before {
  background: var(--horus-grad-purple);
  opacity: 0.85;
}

.horus-stat-card--teal .horus-stat-card__icon {
  background: var(--horus-grad-purple);
  color: #3a2aa8;
}

.horus-stat-card--blue {
  background: linear-gradient(145deg, color-mix(in srgb, var(--horus-brand-blue) 12%, var(--horus-surface-solid)), var(--horus-surface-solid));
}

.horus-stat-card--blue::before {
  background: var(--horus-grad-blue);
  opacity: 0.85;
}

.horus-stat-card--blue .horus-stat-card__icon {
  background: var(--horus-grad-blue);
  color: #2563eb;
}

.horus-stat-card--purple {
  background: linear-gradient(145deg, color-mix(in srgb, var(--horus-brand-purple-light) 12%, var(--horus-surface-solid)), var(--horus-surface-solid));
}

.horus-stat-card--purple::before {
  background: var(--horus-grad-purple);
  opacity: 0.85;
}

.horus-stat-card--purple .horus-stat-card__icon {
  background: var(--horus-grad-purple);
  color: #3a2aa8;
}

.horus-stat-card--orange {
  background: linear-gradient(145deg, color-mix(in srgb, var(--horus-brand-gold) 14%, var(--horus-surface-solid)), var(--horus-surface-solid));
}

.horus-stat-card--orange::before {
  background: var(--horus-grad-gold);
  opacity: 0.9;
}

.horus-stat-card--orange .horus-stat-card__icon {
  background: var(--horus-grad-gold);
  color: #b45309;
}

.horus-stat-card--pink {
  background: linear-gradient(145deg, color-mix(in srgb, var(--horus-brand-pink) 12%, var(--horus-surface-solid)), var(--horus-surface-solid));
}

.horus-stat-card--pink::before {
  background: var(--horus-grad-pink);
  opacity: 0.85;
}

.horus-stat-card--pink .horus-stat-card__icon {
  background: var(--horus-grad-pink);
  color: #db2777;
}

.horus-stat-card--green {
  background: linear-gradient(145deg, color-mix(in srgb, var(--horus-green) 12%, var(--horus-surface-solid)), var(--horus-surface-solid));
}

.horus-stat-card--green::before {
  background: var(--horus-grad-green);
  opacity: 0.85;
}

.horus-stat-card--green .horus-stat-card__icon {
  background: var(--horus-grad-green);
  color: #15803d;
}

.horus-analysis-filters {
  align-items: end;
}

.horus-analysis-section {
  margin-bottom: 1.75rem;
}

.horus-analysis-section__head {
  margin-bottom: 0.85rem;
}

.horus-analysis-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.horus-analysis-card-link:hover,
.horus-analysis-card-link:focus-visible {
  color: inherit;
}

.horus-analysis-card {
  padding: 1.15rem 1.25rem 1rem;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.horus-analysis-card-link:hover .horus-analysis-card,
.horus-analysis-card-link:focus-visible .horus-analysis-card {
  transform: translateY(-2px);
  box-shadow: var(--horus-shadow-md, 0 12px 30px rgba(15, 23, 42, 0.08));
}

.horus-analysis-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.horus-analysis-card__title {
  margin: 0;
  font-family: var(--horus-font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--horus-text-muted);
}

.horus-analysis-card__title--section {
  margin-top: 0.85rem;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--horus-text);
}

.horus-analysis-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.85rem;
  background: color-mix(in srgb, var(--horus-accent, #5b45f6) 12%, transparent);
  color: var(--horus-accent, #5b45f6);
  font-size: 1.15rem;
}

.horus-analysis-card__count {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--horus-text-muted);
  background: var(--horus-surface-muted, rgba(15, 23, 42, 0.05));
}

.horus-analysis-card__value {
  margin: 0.55rem 0 0;
  font-family: var(--horus-font-display);
  font-size: 1.55rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--horus-text);
  line-height: 1.2;
}

.horus-analysis-card__desc {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  color: var(--horus-text-secondary);
  min-height: 2.4em;
}

.horus-analysis-card__chart {
  height: 3.1rem;
  margin-top: 0.75rem;
}

.horus-analysis-detail-chart,
.horus-analysis-section-chart {
  min-height: 16rem;
}

.horus-analysis-section-heading {
  margin: 1.75rem 0 0.9rem;
}

.horus-analysis-section-table + .horus-analysis-section-table {
  margin-top: 1.15rem;
}

.horus-analysis-delta {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.horus-analysis-delta--up,
.horus-analysis-delta[data-trend="UP"][data-higher-is-better="true"],
.horus-analysis-delta[data-trend="DOWN"][data-higher-is-better="false"] {
  color: #15803d;
  background: color-mix(in srgb, #15803d 12%, transparent);
}

.horus-analysis-delta--down,
.horus-analysis-delta[data-trend="UP"][data-higher-is-better="false"],
.horus-analysis-delta[data-trend="DOWN"][data-higher-is-better="true"] {
  color: #b91c1c;
  background: color-mix(in srgb, #b91c1c 12%, transparent);
}

.horus-analysis-delta--flat,
.horus-analysis-delta[data-trend="FLAT"] {
  color: var(--horus-text-muted);
  background: var(--horus-surface-muted, rgba(15, 23, 42, 0.05));
}

.horus-meta-list {
  display: grid;
  grid-template-columns: minmax(7rem, 10.5rem) 1fr;
  gap: 0.75rem 1.15rem;
  margin: 0;
}

.horus-meta-list dt {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--horus-text-muted);
}

.horus-meta-list dd {
  margin: 0;
  font-size: 0.9rem;
  color: var(--horus-text);
  word-break: break-word;
}

/* ========== Productivity Ring ========== */

.horus-ring {
  position: relative;
  display: inline-grid;
  place-items: center;
}

.horus-ring__track {
  fill: none;
  stroke: var(--horus-surface-muted);
  stroke-width: 3.2;
}

.horus-ring__value {
  fill: none;
  stroke: var(--horus-accent);
  stroke-width: 3.2;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dasharray 800ms var(--horus-ease);
}

.horus-ring__label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--horus-font-display);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--horus-text);
  letter-spacing: -0.02em;
  text-transform: none;
}

/* ========== Quick Actions ========== */

.horus-quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 0.75rem;
}

.horus-quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 1rem 0.65rem;
  border: 1px solid var(--horus-border);
  border-radius: var(--horus-radius);
  background: var(--horus-surface);
  color: var(--horus-text);
  text-decoration: none;
  font-size: 0.775rem;
  font-weight: 650;
  text-align: center;
  transition:
    transform var(--horus-bounce),
    box-shadow var(--horus-ease),
    border-color var(--horus-ease-fast),
    background var(--horus-ease-fast);
}

.horus-quick-action:hover {
  color: var(--horus-text);
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--horus-card-shadow-hover);
  border-color: color-mix(in srgb, var(--horus-accent) 30%, var(--horus-border));
}

.horus-quick-action:active {
  transform: scale(0.96);
}

.horus-quick-action__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--horus-radius-sm);
  background: var(--horus-accent-subtle);
  color: var(--horus-accent);
  font-size: 1.25rem;
  transition: transform var(--horus-bounce);
}

.horus-quick-action:hover .horus-quick-action__icon {
  transform: rotate(-6deg) scale(1.08);
}

.horus-quick-action__label {
  line-height: 1.25;
}

/* ========== Employee Widget ========== */

.horus-emp-widget {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--horus-border);
  border-radius: var(--horus-radius-lg);
  background: var(--horus-grad-card);
  box-shadow: var(--horus-card-shadow);
  overflow: hidden;
  transition:
    transform var(--horus-ease),
    box-shadow var(--horus-ease);
}

.horus-emp-widget:hover {
  transform: translateY(-3px);
  box-shadow: var(--horus-card-shadow-hover);
}

.horus-emp-widget__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--horus-border);
  background: color-mix(in srgb, var(--horus-accent) 6%, transparent);
}

.horus-emp-widget__avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.horus-emp-widget__avatar-wrap::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--horus-success);
  border: 2px solid var(--horus-surface-solid);
  box-shadow: 0 0 8px color-mix(in srgb, var(--horus-success) 50%, transparent);
}

.horus-emp-widget__body {
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.horus-emp-widget__meta {
  font-size: 0.775rem;
  color: var(--horus-text-muted);
}

.horus-emp-widget__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.825rem;
}

.horus-emp-widget__app,
.horus-emp-widget__site {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--horus-text-secondary);
}

.horus-emp-widget__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1.1rem;
  border-top: 1px solid var(--horus-border);
  background: var(--horus-surface-muted);
  font-size: 0.75rem;
  color: var(--horus-text-muted);
}

.horus-emp-widget__spark {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 1.25rem;
}

.horus-emp-widget__spark span {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: var(--horus-accent);
  animation: horus-spark 1.2s ease-in-out infinite;
}

.horus-emp-widget__spark span:nth-child(1) { height: 40%; animation-delay: 0ms; }
.horus-emp-widget__spark span:nth-child(2) { height: 70%; animation-delay: 150ms; }
.horus-emp-widget__spark span:nth-child(3) { height: 55%; animation-delay: 300ms; }
.horus-emp-widget__spark span:nth-child(4) { height: 85%; animation-delay: 450ms; }
.horus-emp-widget__spark span:nth-child(5) { height: 45%; animation-delay: 600ms; }

/* ========== Filter Card (compact Stripe / Linear / GitHub toolbar) ========== */

.horus-filter-card {
  --horus-control-h: 2.85rem;
  position: relative;
  z-index: 20;
  overflow: visible;
  background: color-mix(in srgb, var(--horus-surface-solid, #fff) 92%, transparent);
  border: 1px solid var(--horus-border);
  border-radius: 1.25rem;
  box-shadow: var(--horus-card-shadow);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.horus-filter-card__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  overflow: visible;
}

.horus-filter-field {
  position: relative;
  z-index: 1;
  flex: 1 1 9.5rem;
  min-width: 8.5rem;
  max-width: 14rem;
  overflow: visible;
}

.horus-filter-field:has(.horus-member-picker.is-open),
.horus-filter-field:has(.horus-member-picker [aria-expanded="true"]) {
  z-index: 30;
}

.horus-filter-field--search,
.horus-filter-field:has(.horus-search),
.horus-filter-field:has(input[type="search"]),
.horus-filter-field:has(input[name="search"]),
.horus-filter-field:has(input[name="name"]),
.horus-filter-field:has(input[name="employee"]) {
  flex: 2 1 22rem;
  min-width: min(100%, 22rem);
  max-width: 32rem;
}

.horus-filter-field:has(.horus-member-picker) {
  flex: 1 1 11rem;
  min-width: min(100%, 10rem);
  max-width: 14rem;
}

.horus-filter-field:has(.horus-member-picker) .horus-member-picker__panel {
  min-width: 16rem;
  width: max(100%, 16rem);
  max-width: min(22rem, 90vw);
}

.horus-filter-field--date-range,
.horus-filter-field:has([data-horus-date-range]) {
  flex: 2 1 16rem;
  min-width: min(100%, 16rem);
  max-width: 22rem;
}

.horus-filter-field--datetime-range,
.horus-filter-field:has([data-horus-datetime-range]) {
  flex: 2 1 26rem;
  min-width: min(100%, 22rem);
  max-width: 38rem;
}

.horus-filter-field--datetime-range .horus-control,
.horus-filter-field--datetime-range input.flatpickr-input {
  border-radius: 999px;
}

.horus-filter-card__actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
  margin-inline-start: auto;
}

.horus-filter-card__actions .btn {
  min-height: var(--horus-control-h);
  height: var(--horus-control-h);
  padding: 0 1.1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
}

.horus-filter-card__actions .btn-sm {
  min-height: var(--horus-control-h);
  height: var(--horus-control-h);
}

.horus-filter-card__actions .btn-primary {
  background-image: var(--horus-grad-primary);
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(91, 69, 246, 0.22);
}

.horus-filter-card__actions .btn-outline-secondary {
  background: var(--horus-surface-solid);
  color: var(--horus-text);
  --bs-btn-color: var(--horus-text);
  --bs-btn-hover-color: var(--horus-text);
  --bs-btn-hover-bg: var(--horus-surface-hover);
}

/* Keep labels for a11y, hide visually — placeholders / first options carry meaning */
.horus-filter-field > label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.horus-filter-field .form-control,
.horus-filter-field .form-select,
.horus-filter-card .horus-control,
.horus-filter-card .horus-search__input {
  width: 100%;
  height: var(--horus-control-h);
  min-height: var(--horus-control-h);
  padding: 0.45rem 0.9rem;
  border-radius: 0.95rem;
  border: 1px solid var(--horus-border);
  background: var(--horus-bg-elevated);
  color: var(--horus-text);
  font-size: 0.9rem;
  line-height: 1.2;
  box-shadow: none;
  transition:
    border-color var(--horus-ease-fast),
    box-shadow var(--horus-ease-fast),
    background var(--horus-ease-fast);
}

.horus-filter-field .form-select,
.horus-filter-card .form-select.horus-control {
  padding-inline-end: 2.1rem;
  background-position: right 0.8rem center;
}

html[dir="rtl"] .horus-filter-field .form-select,
html[dir="rtl"] .horus-filter-card .form-select.horus-control {
  background-position: left 0.8rem center;
}

.horus-filter-card .horus-search {
  width: 100%;
}

.horus-filter-card .horus-search__icon {
  inset-inline-start: 0.9rem;
  font-size: 0.95rem;
}

.horus-filter-card .horus-search__input {
  padding-inline-start: 2.45rem;
  padding-inline-end: 2.35rem;
  font-size: 0.9rem;
}

.horus-filter-card .horus-search__clear {
  inset-inline-end: 0.45rem;
  width: 1.75rem;
  height: 1.75rem;
}

.horus-filter-field .form-control:hover,
.horus-filter-field .form-select:hover,
.horus-filter-card .horus-control:hover,
.horus-filter-card .horus-search__input:hover {
  border-color: var(--horus-border-strong);
}

.horus-filter-field .form-control:focus,
.horus-filter-field .form-select:focus,
.horus-filter-card .horus-control:focus,
.horus-filter-card .horus-search__input:focus {
  border-color: var(--horus-accent);
  box-shadow: var(--horus-focus-ring);
  background: var(--horus-surface-solid);
  outline: none;
}

/* Restore global control sizing outside filters (workspace forms own their scale) */
.horus-control {
  height: var(--horus-control-h);
  min-height: var(--horus-control-h);
  padding: 0.55rem 1rem;
  border-radius: 1rem;
  border-color: var(--horus-border);
  background: var(--horus-bg-elevated);
  color: var(--horus-text);
  font-size: 1rem;
  line-height: 1.25;
  box-shadow: none;
  transition:
    border-color var(--horus-ease-fast),
    box-shadow var(--horus-ease-fast),
    background var(--horus-ease-fast);
}

.horus-member-picker {
  position: relative;
  width: 100%;
  z-index: 1;
}

.horus-member-picker.is-open {
  z-index: 40;
}

.horus-member-picker__toggle {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: start;
  cursor: pointer;
}

.horus-member-picker__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horus-member-picker__panel {
  position: absolute;
  z-index: 50;
  top: calc(100% + 0.35rem);
  inset-inline: 0;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  max-height: 22rem;
  overflow: auto;
  padding: 0.55rem;
  border: 1px solid var(--horus-border);
  border-radius: 1rem;
  background: var(--horus-surface-solid, var(--horus-bg-elevated));
  box-shadow: var(--horus-shadow-md, 0 12px 28px rgba(15, 23, 42, 0.18));
}

.horus-member-picker__search {
  position: relative;
  margin-bottom: 0.35rem;
}

.horus-member-picker__search > .bi {
  position: absolute;
  inset-inline-start: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--horus-text-muted);
  pointer-events: none;
}

.horus-member-picker__search .form-control {
  padding-inline-start: 2.25rem;
}

.horus-member-picker__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  color: var(--horus-text);
  text-align: start;
  font-size: 0.92rem;
}

.horus-member-picker__option:hover,
.horus-member-picker__option.is-active {
  background: color-mix(in srgb, var(--horus-accent) 12%, transparent);
  color: var(--horus-accent);
}

.horus-member-picker__status {
  padding: 0.55rem 0.75rem;
  color: var(--horus-text-muted);
  font-size: 0.85rem;
}

.horus-member-picker__pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.35rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--horus-border);
}

.horus-member-picker__page {
  font-size: 0.8rem;
  color: var(--horus-text-muted);
  font-variant-numeric: tabular-nums;
}

.horus-member-picker__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.horus-member-picker__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--horus-border);
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--horus-accent) 8%, transparent);
  color: var(--horus-text);
  font-size: 0.85rem;
  cursor: pointer;
}

.horus-member-picker__chip:hover {
  border-color: var(--horus-accent);
  color: var(--horus-accent);
}

.horus-pattern-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--horus-border);
  border-radius: 0.85rem;
  background: var(--horus-surface-solid, var(--horus-bg-elevated));
  cursor: text;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.horus-pattern-tags:focus-within {
  border-color: var(--horus-accent);
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--horus-accent) 18%, transparent);
}

.horus-pattern-tags.is-invalid {
  border-color: var(--horus-danger, #dc3545);
}

.horus-pattern-tags__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 100%;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--horus-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--horus-accent) 10%, transparent);
  color: var(--horus-text);
  font-size: 0.84rem;
  line-height: 1.3;
  animation: horus-pattern-chip-in 0.18s ease;
}

.horus-pattern-tags__chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horus-pattern-tags__chip:hover {
  border-color: var(--horus-accent);
  color: var(--horus-accent);
}

.horus-pattern-tags__input {
  flex: 1 1 8rem;
  min-width: 8rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--horus-text);
  font-size: 0.95rem;
  padding: 0.2rem 0.15rem;
}

.horus-pattern-tags__input::placeholder {
  color: var(--horus-text-muted);
}

.horus-form-error {
  margin: 0.4rem 0 0;
  color: var(--horus-danger, #dc3545);
  font-size: 0.85rem;
}

.horus-pattern-helpers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.horus-pattern-helpers__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.horus-pattern-modal {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: horus-pattern-modal-in 0.18s ease;
}

.horus-pattern-modal[x-cloak],
.horus-pattern-modal[style*="display: none"] {
  display: none !important;
}

.horus-pattern-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
}

body.horus-pattern-modal-open {
  overflow: hidden;
}

.horus-pattern-modal__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(44rem, 100%);
  max-height: min(40rem, calc(100vh - 2rem));
  border: 1px solid var(--horus-border);
  border-radius: 1.1rem;
  background: var(--horus-surface-solid, var(--horus-bg-elevated));
  box-shadow: var(--horus-shadow-md, 0 18px 40px rgba(15, 23, 42, 0.22));
  overflow: hidden;
}

.horus-pattern-modal__header,
.horus-pattern-modal__footer,
.horus-pattern-modal__toolbar,
.horus-pattern-modal__search {
  flex: 0 0 auto;
}

.horus-pattern-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem 0.75rem;
  border-bottom: 1px solid var(--horus-border);
}

.horus-pattern-modal__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 650;
}

.horus-pattern-modal__meta {
  margin: 0.2rem 0 0;
  color: var(--horus-text-muted);
  font-size: 0.85rem;
}

.horus-pattern-modal__search {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.75rem 1.15rem 0.35rem;
  background: var(--horus-surface-solid, var(--horus-bg-elevated));
}

.horus-pattern-modal__search > .bi {
  position: absolute;
  inset-inline-start: 1.85rem;
  top: 50%;
  transform: translateY(-35%);
  color: var(--horus-text-muted);
  pointer-events: none;
}

.horus-pattern-modal__search .form-control {
  padding-inline-start: 2.25rem;
}

.horus-pattern-modal__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.35rem 1.15rem 0.75rem;
  border-bottom: 1px solid var(--horus-border);
}

.horus-pattern-modal__body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 0.5rem 0.75rem;
}

.horus-pattern-modal__selected {
  flex: 0 0 auto;
  padding: 0.75rem 1.15rem;
  border-top: 1px solid var(--horus-border);
  background: color-mix(in srgb, var(--horus-accent) 4%, var(--horus-surface-solid, var(--horus-bg-elevated)));
}

.horus-pattern-modal__selected-label {
  margin-bottom: 0.45rem;
  color: var(--horus-text-muted);
  font-size: 0.8rem;
  font-weight: 560;
}

.horus-pattern-modal__selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-height: 7.5rem;
  overflow: auto;
}

.horus-pattern-modal__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 100%;
  padding: 0.22rem 0.55rem;
  border: 1px solid var(--horus-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--horus-accent) 12%, transparent);
  color: var(--horus-text);
  font-size: 0.82rem;
  line-height: 1.3;
  animation: horus-pattern-chip-in 0.18s ease;
}

.horus-pattern-modal__tag span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horus-pattern-modal__tag:hover {
  border-color: var(--horus-accent);
  color: var(--horus-accent);
}

.horus-pattern-modal__status {
  padding: 1rem 0.75rem;
  color: var(--horus-text-muted);
  font-size: 0.9rem;
}

.horus-pattern-modal__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 0.8rem;
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.horus-pattern-modal__item:hover,
.horus-pattern-modal__item.is-selected {
  background: color-mix(in srgb, var(--horus-accent) 10%, transparent);
}

.horus-pattern-modal__item-main {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1 1 auto;
}

.horus-pattern-modal__item-name {
  font-size: 0.94rem;
  font-weight: 560;
  color: var(--horus-text);
}

.horus-pattern-modal__item-sub {
  font-size: 0.8rem;
  color: var(--horus-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horus-pattern-modal__item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  color: var(--horus-text-muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.horus-pattern-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  padding: 0.85rem 1.15rem;
  border-top: 1px solid var(--horus-border);
}

@keyframes horus-pattern-chip-in {
  from {
    opacity: 0;
    transform: translateY(2px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes horus-pattern-modal-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .horus-pattern-modal__dialog {
    max-height: calc(100vh - 1rem);
  }

  .horus-pattern-helpers__btn {
    width: 100%;
    justify-content: center;
  }
}

.access-enforcement-grid {
  display: grid;
  gap: 0.85rem;
}

.access-enforcement-card {
  padding: 1rem 1.1rem;
  border: 1px solid var(--horus-border);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--horus-surface-solid, var(--horus-bg-elevated)) 92%, transparent);
}

.access-enforcement-card.is-on {
  border-color: color-mix(in srgb, var(--horus-success) 35%, var(--horus-border));
  background: color-mix(in srgb, var(--horus-success) 8%, transparent);
}

.access-enforcement-card.is-off {
  border-color: color-mix(in srgb, var(--horus-text-muted) 25%, var(--horus-border));
  background: color-mix(in srgb, var(--horus-text-muted) 5%, transparent);
}

.horus-control:hover {
  border-color: var(--horus-border-strong);
}

.horus-control:focus {
  border-color: var(--horus-accent);
  box-shadow: var(--horus-focus-ring);
  background: var(--horus-surface-solid);
}

/* ========== Search ========== */

.horus-search {
  position: relative;
  width: 100%;
}

.horus-search__icon {
  position: absolute;
  inset-inline-start: 0.8rem;
  inset-inline-end: auto;
  top: 50%;
  transform: translateY(-50%);
  color: var(--horus-text-muted);
  pointer-events: none;
  font-size: 0.85rem;
}

.horus-search__input {
  width: 100%;
  height: var(--horus-control-h);
  min-height: var(--horus-control-h);
  padding-block: 0.4rem;
  padding-inline-start: 2.2rem;
  padding-inline-end: 2.25rem;
  border: 1px solid var(--horus-border);
  border-radius: 0.85rem;
  background: var(--horus-bg-elevated);
  color: var(--horus-text);
  font-size: 0.8125rem;
  line-height: 1.2;
  text-align: start;
  transition:
    border-color var(--horus-ease-fast),
    box-shadow var(--horus-ease-fast),
    background var(--horus-ease-fast);
}

.horus-search__input::placeholder {
  color: var(--horus-text-muted);
}

.horus-search__input:hover {
  border-color: var(--horus-border-strong);
}

.horus-search__input:focus {
  outline: none;
  border-color: var(--horus-accent);
  box-shadow: var(--horus-focus-ring);
  background: var(--horus-surface-solid);
}

.horus-search__clear {
  position: absolute;
  inset-inline-end: 0.35rem;
  inset-inline-start: auto;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--horus-text-muted);
  line-height: 1;
  transition: background var(--horus-ease-fast), color var(--horus-ease-fast);
}

.horus-search__clear i {
  display: block;
  line-height: 1;
  font-size: 0.75rem;
}

.horus-search__clear:hover {
  background: var(--horus-surface-muted);
  color: var(--horus-text);
}

.horus-search.is-filled .horus-search__clear {
  display: inline-flex;
}

/* ========== Tables ========== */

.horus-table-wrap {
  background: var(--horus-surface);
  border: 1px solid var(--horus-border);
  border-radius: var(--horus-radius-lg);
  box-shadow: var(--horus-card-shadow);
  overflow: hidden;
}

.horus-table-scroll {
  overflow: auto;
  max-height: min(70vh, 42rem);
}

/*
 * Portaled table menus are positioned by JS (fixed, pinned to the toggle).
 * Keep intrinsic width so measurement/placement cannot stretch to the viewport.
 */
body > .dropdown-menu.horus-dropdown-menu--portaled,
html > .dropdown-menu.horus-dropdown-menu--portaled,
body > .dropdown-menu.horus-dropdown-menu--portaled[data-bs-popper],
html > .dropdown-menu.horus-dropdown-menu--portaled[data-bs-popper],
body > .dropdown-menu.horus-dropdown-menu--portaled[data-bs-popper="static"],
html > .dropdown-menu.horus-dropdown-menu--portaled[data-bs-popper="static"] {
  z-index: 1080;
  position: fixed !important;
  width: max-content !important;
  min-width: 10rem !important;
  max-width: min(20rem, calc(100vw - 1rem)) !important;
  inset: auto !important;
  inset-inline: auto !important;
  inset-block: auto !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  transform: none !important;
  /* Portaled onto <html> (escapes body zoom) — restore UI font/color (Inter / Readex Pro). */
  font-family: var(--horus-font-body);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--horus-text);
  text-align: start;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[dir="rtl"] > .dropdown-menu.horus-dropdown-menu--portaled {
  font-family: var(--horus-font-rtl);
  line-height: 1.75;
  font-size: 1.02rem;
}

.horus-table {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0 0.35rem;
  padding: 0 0.65rem 0.65rem;
}

.horus-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--horus-surface-muted);
  border-bottom: none;
  color: var(--horus-text-muted);
  font-family: var(--horus-font-display);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 0.85rem 1.15rem 0.55rem;
}

.horus-table tbody tr {
  transition: none;
}

.horus-table tbody td {
  padding: 0.85rem 1.15rem;
  border: none;
  background: var(--horus-surface-solid);
  vertical-align: middle;
  font-size: 0.875rem;
  transition:
    background var(--horus-ease-fast),
    box-shadow var(--horus-ease-fast);
}

.horus-table tbody td:first-child {
  border-start-start-radius: var(--horus-radius-sm);
  border-end-start-radius: var(--horus-radius-sm);
  border-start-end-radius: 0;
  border-end-end-radius: 0;
}

.horus-table tbody td:last-child {
  border-start-end-radius: var(--horus-radius-sm);
  border-end-end-radius: var(--horus-radius-sm);
  border-start-start-radius: 0;
  border-end-start-radius: 0;
}

.horus-table tbody tr:hover td {
  background: var(--horus-surface-hover);
  box-shadow: 0 2px 8px rgba(91, 69, 246, 0.06);
}

.horus-table tbody tr:hover {
  transform: none;
}

.horus-table .btn {
  min-height: 1.95rem;
}

.horus-table__col--num,
.horus-table__col--status,
.horus-table__col--date,
.horus-table__col--actions {
  width: 1%;
  white-space: nowrap;
}

.horus-table__col--num {
  text-align: end;
}

.horus-table__col--owner {
  max-width: 11rem;
}

.horus-table__col--owner .fw-medium,
.horus-table__col--owner .small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horus-table__col--actions {
  min-width: 11.5rem;
  width: 1%;
  text-align: end;
  white-space: nowrap;
}

.horus-table-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: nowrap;
  vertical-align: middle;
}

.horus-table-actions > form {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.horus-table-actions .btn {
  min-height: 2rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-weight: 650;
  line-height: 1;
}

/* ========== Badges ========== */

.horus-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-family: var(--horus-font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.horus-badge--success {
  background: var(--horus-success-soft);
  color: var(--horus-success);
}

.horus-badge--warning {
  background: var(--horus-warning-soft);
  color: var(--horus-warning);
}

.horus-badge--info {
  background: var(--horus-info-soft);
  color: var(--horus-info);
}

.horus-badge--draft,
.horus-badge--neutral {
  background: var(--horus-draft-soft);
  color: var(--horus-draft);
}

.horus-badge--accent {
  background: var(--horus-accent-subtle);
  color: var(--horus-brand-purple);
  box-shadow: 0 0 0 1px rgba(91, 69, 246, 0.12);
}

.badge.text-bg-secondary {
  background: var(--horus-draft-soft) !important;
  color: var(--horus-draft) !important;
}

.badge.text-bg-success {
  background: var(--horus-success-soft) !important;
  color: var(--horus-success) !important;
}

.badge.text-bg-warning {
  background: var(--horus-warning-soft) !important;
  color: var(--horus-warning) !important;
}

.badge.text-bg-danger {
  background: var(--horus-danger-soft) !important;
  color: var(--horus-danger) !important;
}

.badge.text-bg-info {
  background: var(--horus-info-soft) !important;
  color: var(--horus-info) !important;
}

/* ========== Status Pills ========== */

.horus-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-family: var(--horus-font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--horus-draft-soft);
  color: var(--horus-draft);
}

.horus-status-pill__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  flex-shrink: 0;
}

.horus-status-pill__label {
  min-width: 0;
}

.horus-status-pill__source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.1rem;
  padding-left: 0.35rem;
  border-left: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  font-size: 0.78em;
  line-height: 1;
  opacity: 0.88;
}

.horus-status-pill__source .bi {
  display: block;
}

/* Teal — Check In */
.horus-status-pill--check-in {
  background: color-mix(in srgb, #0d9488 14%, transparent);
  color: #0f766e;
  box-shadow: 0 0 0 1px color-mix(in srgb, #0d9488 22%, transparent);
}

.horus-status-pill--check-in .horus-status-pill__dot {
  animation: horus-pulse 2s ease-out infinite;
  box-shadow: 0 0 8px rgba(13, 148, 136, 0.5);
}

/* Green — Available (and legacy --online) */
.horus-status-pill--available,
.horus-status-pill--online {
  background: var(--horus-success-soft);
  color: var(--horus-success);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.15);
}

.horus-status-pill--available .horus-status-pill__dot,
.horus-status-pill--online .horus-status-pill__dot {
  animation: horus-pulse 2s ease-out infinite;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.55);
}

/* Violet — Working */
.horus-status-pill--working {
  background: color-mix(in srgb, var(--horus-brand-purple) 12%, transparent);
  color: var(--horus-brand-purple);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--horus-brand-purple) 22%, transparent);
}

.horus-status-pill--working .horus-status-pill__dot {
  animation: horus-pulse 2s ease-out infinite;
  box-shadow: 0 0 8px color-mix(in srgb, var(--horus-brand-purple) 45%, transparent);
}

/* Blue — Busy */
.horus-status-pill--busy {
  background: var(--horus-info-soft);
  color: var(--horus-info);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--horus-info) 22%, transparent);
}

.horus-status-pill--busy .horus-status-pill__dot {
  box-shadow: 0 0 8px color-mix(in srgb, var(--horus-info) 45%, transparent);
}

/* Amber — Idle */
.horus-status-pill--idle {
  background: color-mix(in srgb, #ca8a04 14%, transparent);
  color: #a16207;
}

.horus-status-pill--idle .horus-status-pill__dot {
  opacity: 0.9;
  box-shadow: none;
}

/* Orange — Break */
.horus-status-pill--break {
  background: var(--horus-warning-soft);
  color: var(--horus-brand-orange);
  box-shadow: 0 0 0 1px rgba(255, 159, 28, 0.18);
}

.horus-status-pill--break .horus-status-pill__dot {
  box-shadow: 0 0 8px rgba(255, 159, 28, 0.45);
}

/* Red — Offline / Check Out */
.horus-status-pill--offline {
  background: var(--horus-danger-soft);
  color: var(--horus-danger);
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.15);
}

.horus-status-pill--offline .horus-status-pill__dot {
  opacity: 1;
}

.horus-live-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--horus-success);
  font-family: var(--horus-font-display);
  font-size: 0.8rem;
  font-weight: 700;
}

.horus-live-dot::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--horus-success) 50%, transparent);
  animation: horus-pulse 1.8s ease-out infinite;
}

/* ========== Empty States ========== */

.horus-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.75rem;
  color: var(--horus-text-muted);
}

.horus-empty--compact {
  padding: 2rem 1.15rem;
}

.horus-empty__art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 7rem;
  height: 7rem;
  margin-bottom: 1.25rem;
}

.horus-empty__art::before,
.horus-empty__art::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.horus-empty__art::before {
  inset: 0;
  background: var(--horus-grad-hero);
  opacity: 0.65;
}

.horus-empty__art::after {
  width: 5rem;
  height: 5rem;
  background: var(--horus-surface);
  border: 1px solid var(--horus-border);
  box-shadow: var(--horus-card-shadow);
}

.horus-empty__icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--horus-radius);
  background: var(--horus-grad-purple);
  color: #3a2aa8;
  font-size: 1.45rem;
  box-shadow: 0 8px 24px rgba(91, 69, 246, 0.2);
}

.horus-empty__title {
  margin: 0;
  font-family: var(--horus-font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--horus-text);
  letter-spacing: -0.02em;
  line-height: 1.4;
  padding-block: 0.06em 0.1em;
  overflow: visible;
}

.horus-empty__text {
  margin: 0.45rem 0 0;
  max-width: 30rem;
  font-size: 0.875rem;
  line-height: 1.65;
  overflow: visible;
  padding-bottom: 0.1em;
  -webkit-text-fill-color: currentColor;
}

.horus-empty__actions {
  margin-top: 1.25rem;
}

/* ========== Notice & Alerts ========== */

.horus-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
  padding: 0.95rem 1.15rem;
  border-radius: var(--horus-radius);
  border: 1px solid color-mix(in srgb, var(--horus-info) 28%, transparent);
  background: color-mix(in srgb, var(--horus-info) 8%, var(--horus-surface));
  color: var(--horus-text-secondary);
  font-size: 0.875rem;
  box-shadow: var(--horus-shadow-sm);
}

.horus-notice .bi {
  color: var(--horus-info);
  margin-top: 0.1rem;
  font-size: 1.1rem;
}

.horus-alerts .alert {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  border-radius: var(--horus-radius-sm);
  border: 1px solid var(--horus-border);
  box-shadow: var(--horus-shadow-sm);
}

.horus-alerts .alert.alert-dismissible {
  padding-inline-end: 2.85rem;
}

.horus-alerts .alert .btn-close {
  position: absolute;
  top: 50%;
  inset-inline-end: 0.8rem;
  inset-inline-start: auto;
  transform: translateY(-50%);
  margin: 0;
  padding: 0.35rem;
}

.horus-alert-row {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--horus-border);
  transition: background var(--horus-ease-fast);
}

.horus-alert-row--button {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: start;
  cursor: pointer;
}

.horus-alert-row--button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--horus-accent) 55%, transparent);
  outline-offset: 2px;
}

.horus-alert-row:hover {
  background: color-mix(in srgb, var(--horus-surface-muted) 50%, transparent);
  margin-inline: -0.5rem;
  margin-block: 0;
  padding-inline: 0.5rem;
  border-radius: var(--horus-radius-sm);
}

.horus-alert-row:last-child {
  border-bottom: 0;
}

.horus-alert-icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: var(--horus-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.horus-alert-icon--high {
  background: color-mix(in srgb, var(--horus-warning) 18%, transparent);
  color: var(--horus-warning);
}

.horus-alert-icon--medium {
  background: var(--horus-info-soft);
  color: var(--horus-info);
}

.horus-alert-icon--low {
  background: var(--horus-draft-soft);
  color: var(--horus-draft);
}

/* ========== Status Alerts ========== */

.horus-status-alerts__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--horus-border);
}

.horus-status-alerts__heading {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  min-width: 0;
}

.horus-status-alerts__policy {
  margin: 0;
  white-space: nowrap;
}

.horus-status-alerts__header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.horus-status-alerts__header .horus-section-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.horus-status-alerts__count {
  min-width: 1.85rem;
  height: 1.85rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #9f1239;
  background: color-mix(in srgb, #fb7185 18%, var(--horus-surface-solid));
}

.horus-status-alerts__body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.95rem 1.15rem 1.15rem;
}

.horus-status-alerts__footer {
  padding: 0 1.15rem 1rem;
}

.horus-status-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border-radius: 999px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  border-inline-start-width: 4px;
  transition: background var(--horus-ease-fast), transform var(--horus-ease-fast);
}

.horus-status-alert:hover {
  transform: translateY(-1px);
  color: inherit;
}

.horus-status-alert__icon {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  background: color-mix(in srgb, currentColor 12%, transparent);
}

.horus-status-alert__content {
  min-width: 0;
  flex: 1;
}

.horus-status-alert__message {
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.4;
}

.horus-status-alert__explain {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  opacity: 0.88;
}

.horus-status-alert__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.horus-status-alert__time {
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.78;
  font-variant-numeric: tabular-nums;
}

.horus-status-alert--logout {
  color: #9f1239;
  background: color-mix(in srgb, #fb7185 10%, var(--horus-surface-solid));
  border-color: color-mix(in srgb, #fb7185 22%, var(--horus-border));
  border-inline-start-color: #e11d48;
}

.horus-status-alert--break {
  color: #9a3412;
  background: color-mix(in srgb, #fb923c 11%, var(--horus-surface-solid));
  border-color: color-mix(in srgb, #fb923c 24%, var(--horus-border));
  border-inline-start-color: #ea580c;
}

.horus-status-alert--idle {
  color: #5b21b6;
  background: color-mix(in srgb, #a78bfa 12%, var(--horus-surface-solid));
  border-color: color-mix(in srgb, #a78bfa 24%, var(--horus-border));
  border-inline-start-color: #7c3aed;
}

[data-bs-theme="dark"] .horus-status-alerts__count {
  color: #fecdd3;
  background: color-mix(in srgb, #fb7185 22%, transparent);
}

[data-bs-theme="dark"] .horus-status-alert--logout {
  color: #fecdd3;
  background: color-mix(in srgb, #fb7185 14%, transparent);
}

[data-bs-theme="dark"] .horus-status-alert--break {
  color: #fed7aa;
  background: color-mix(in srgb, #fb923c 14%, transparent);
}

[data-bs-theme="dark"] .horus-status-alert--idle {
  color: #ddd6fe;
  background: color-mix(in srgb, #a78bfa 16%, transparent);
}

@media (max-width: 640px) {
  .horus-status-alert {
    border-radius: 1rem;
  }

  .horus-status-alerts__header {
    flex-direction: column;
    align-items: stretch;
  }

  .horus-status-alerts__header-actions {
    justify-content: space-between;
  }
}

/* ========== Toasts ========== */

.horus-toast-area {
  position: fixed;
  top: 1rem;
  inset-inline-end: 1rem;
  inset-inline-start: auto;
  z-index: 1090;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: min(24rem, calc(100vw - 2rem));
}

/* ========== Auth ========== */

.horus-auth {
  --horus-auth-control-h: 3.5rem;
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.75rem 1.25rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 60% at 50% -20%, rgba(91, 69, 246, 0.2), transparent 58%),
    radial-gradient(ellipse 45% 35% at 92% 85%, rgba(255, 200, 74, 0.12), transparent 52%),
    radial-gradient(ellipse 40% 30% at 6% 75%, rgba(87, 168, 255, 0.14), transparent 52%),
    var(--horus-bg);
}

[data-bs-theme="dark"] .horus-auth {
  background:
    radial-gradient(ellipse 90% 60% at 50% -20%, rgba(142, 125, 255, 0.18), transparent 58%),
    radial-gradient(ellipse 45% 35% at 92% 85%, rgba(255, 215, 106, 0.09), transparent 52%),
    radial-gradient(ellipse 40% 30% at 6% 75%, rgba(87, 168, 255, 0.1), transparent 52%),
    var(--horus-bg);
}

.horus-auth__glow {
  position: absolute;
  width: min(34rem, 90vw);
  height: min(34rem, 90vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 69, 246, 0.16), transparent 68%);
  filter: blur(28px);
  pointer-events: none;
  z-index: 0;
}

[data-bs-theme="dark"] .horus-auth__glow {
  background: radial-gradient(circle, rgba(142, 125, 255, 0.14), transparent 68%);
}

.horus-auth__theme {
  position: static;
}

.horus-auth__top-actions {
  position: absolute;
  top: 1.15rem;
  inset-inline-end: 1.15rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.horus-auth__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 34rem;
  padding: 0 0 2.15rem;
  background: color-mix(in srgb, var(--horus-surface-solid) 92%, transparent);
  border: 1px solid var(--horus-border);
  border-radius: calc(var(--horus-radius-xl) + 0.35rem);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 24px 64px rgba(42, 28, 110, 0.12),
    var(--horus-card-shadow-hover);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: horus-fade-up 520ms var(--horus-ease) both;
  overflow: hidden;
}

.horus-auth__card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 0;
  background: linear-gradient(90deg, var(--horus-brand-purple), var(--horus-brand-blue), var(--horus-brand-gold));
  z-index: 2;
}

[data-bs-theme="dark"] .horus-auth__card {
  background: color-mix(in srgb, var(--horus-surface-solid) 88%, transparent);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 24px 64px rgba(0, 0, 0, 0.35),
    var(--horus-card-shadow-hover);
}

.horus-auth__nav {
  display: flex;
  align-items: center;
  min-height: 4.35rem;
  padding: 0.85rem 1.85rem;
  margin: 0 0 0.35rem;
  border-bottom: 1px solid var(--horus-border);
  background: color-mix(in srgb, var(--horus-surface-muted) 55%, transparent);
}

[data-bs-theme="dark"] .horus-auth__nav {
  background: color-mix(in srgb, var(--horus-surface-muted) 45%, transparent);
}

.horus-auth__brand {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.85rem;
  margin: 0;
  color: var(--horus-text);
  text-decoration: none;
  transition: opacity var(--horus-ease-fast);
}

.horus-auth__brand:hover {
  color: var(--horus-text);
  opacity: 0.94;
}

.horus-auth__logo {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  border-radius: 0.7rem;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(91, 69, 246, 0.2));
}

.horus-auth__brand-sep {
  width: 1px;
  height: 1.55rem;
  flex-shrink: 0;
  background: var(--horus-border-strong);
  border-radius: 999px;
}

.horus-auth__brand-text {
  font-family: var(--horus-font-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.25;
  padding-block: 0.05em;
}

.horus-auth__header {
  text-align: center;
  margin-bottom: 1.75rem;
  padding: 1.65rem 2.35rem 0;
}

.horus-auth__form,
.horus-auth__alert,
.horus-auth__hint {
  margin-left: 2.35rem;
  margin-right: 2.35rem;
}

.horus-auth__title {
  margin: 0;
  font-family: var(--horus-font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.35;
  padding-block: 0.08em 0.12em;
  overflow: visible;
  color: var(--horus-text);
}

.horus-auth__subtitle {
  margin: 0.55rem 0 0;
  color: var(--horus-text-muted);
  font-size: 1.05rem;
  line-height: 1.65;
  overflow: visible;
  padding-bottom: 0.1em;
  -webkit-text-fill-color: currentColor;
}

.horus-auth__alert {
  margin: 0 2.35rem 1.15rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  border: 1px solid transparent;
}

.horus-auth__alert--danger {
  color: var(--horus-danger);
  background: color-mix(in srgb, var(--horus-danger) 10%, var(--horus-surface-solid));
  border-color: color-mix(in srgb, var(--horus-danger) 22%, var(--horus-border));
}

.horus-auth__alert--success {
  color: var(--horus-success, #0f7a4d);
  background: color-mix(in srgb, var(--horus-success, #0f7a4d) 10%, var(--horus-surface-solid));
  border-color: color-mix(in srgb, var(--horus-success, #0f7a4d) 22%, var(--horus-border));
}

.horus-auth__form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.horus-auth__field {
  display: flex;
  flex-direction: column;
}

.horus-auth .horus-form-label {
  margin-bottom: 0.65rem;
  font-size: 1.05rem;
  color: var(--horus-text);
}

.horus-auth .horus-control,
.horus-auth .form-control {
  height: var(--horus-auth-control-h);
  min-height: var(--horus-auth-control-h);
  padding: 0.85rem 1.15rem;
  border-radius: 1.1rem;
  font-size: 1.05rem;
}

/* Keep emails / codes / passwords readable and aligned in RTL pages */
.horus-control--ltr,
input[type="email"].horus-control,
input[type="url"].horus-control,
input[type="tel"].horus-control,
input[type="password"].horus-control,
input[name="username"].horus-control {
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
}

.horus-control--ltr::placeholder,
input[type="email"].horus-control::placeholder,
input[type="password"].horus-control::placeholder,
input[name="username"].horus-control::placeholder {
  text-align: left;
  direction: ltr;
}

.horus-auth .btn {
  min-height: var(--horus-auth-control-h);
  padding: 0.85rem 1.35rem;
  font-size: 1.08rem;
  font-weight: 700;
  border-radius: 999px;
}

.horus-auth__submit {
  width: 100%;
  margin-top: 0.35rem;
  letter-spacing: -0.01em;
}

.horus-auth__hint {
  margin: 1.5rem 2.35rem 0;
  padding-top: 1.15rem;
  border-top: 1px solid var(--horus-border);
  color: var(--horus-text-muted);
  font-size: 0.875rem;
  text-align: center;
}

.horus-auth__hint summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--horus-text-secondary);
  user-select: none;
}

.horus-auth__hint summary::-webkit-details-marker {
  display: none;
}

.horus-auth__hint summary:hover {
  color: var(--horus-text);
}

.horus-auth__hint p {
  margin: 0.75rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.horus-auth__hint code {
  font-size: 0.85rem;
  color: var(--horus-text-secondary);
  background: var(--horus-surface-muted);
  border: 1px solid var(--horus-border);
  border-radius: 0.55rem;
  padding: 0.2rem 0.5rem;
}

@media (max-width: 480px) {
  .horus-auth__card {
    padding: 0 0 1.75rem;
  }

  .horus-auth__nav {
    padding: 0.75rem 1.15rem;
    min-height: 3.85rem;
  }

  .horus-auth__header {
    padding: 1.35rem 1.35rem 0;
  }

  .horus-auth__form,
  .horus-auth__alert,
  .horus-auth__hint {
    margin-left: 1.35rem;
    margin-right: 1.35rem;
  }

  .horus-auth__hint {
    margin: 1.35rem 1.35rem 0;
  }

  .horus-auth__logo {
    width: 4rem;
    height: 4rem;
  }

  .horus-auth__brand-text {
    font-size: 1.25rem;
  }
}

/* ========== Pagination ========== */

.horus-pagination {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.2rem;
  border-top: 1px solid var(--horus-border);
  background: color-mix(in srgb, var(--horus-surface-muted) 45%, var(--horus-surface));
}

.horus-pagination .page-link {
  color: var(--horus-text-secondary);
  background: var(--horus-surface);
  border-color: var(--horus-border);
  font-size: 0.8125rem;
  padding: 0.4rem 0.7rem;
  min-width: 2.1rem;
  text-align: center;
  border-radius: var(--horus-radius-sm) !important;
  transition:
    background var(--horus-ease-fast),
    color var(--horus-ease-fast),
    border-color var(--horus-ease-fast),
    transform var(--horus-ease-fast);
}

.horus-pagination .page-link:hover {
  background: var(--horus-surface-muted);
  color: var(--horus-text);
  border-color: var(--horus-border-strong);
  transform: translateY(-1px);
}

.horus-pagination .page-item.active .page-link {
  background: var(--horus-accent);
  border-color: var(--horus-accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(91, 69, 246, 0.28);
}

[data-bs-theme="dark"] .horus-pagination .page-item.active .page-link {
  color: #0b1220;
}

.horus-pagination .page-item.disabled .page-link {
  color: var(--horus-text-muted);
  background: var(--horus-surface-muted);
}

/* ========== Charts ========== */

.horus-chart-card {
  display: flex;
  flex-direction: column;
}

.horus-chart-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  padding: 1.15rem 1.25rem 0.55rem;
}

.horus-chart-card__heading {
  min-width: 0;
  flex: 1;
}

.horus-chart-card__title {
  margin: 0;
  padding: 0;
  font-family: var(--horus-font-display);
  font-size: 0.975rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.4;
  overflow: visible;
}

.horus-chart-card__header .horus-section-meta {
  margin-top: 0.2rem;
  padding: 0;
}

.horus-chart-card__header .horus-badge {
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* Legacy: title as direct child of the chart card (applications / admin pages). */
.horus-chart-card > .horus-chart-card__title {
  padding: 1.55rem 1.35rem 0.55rem;
}

.horus-chart-card .horus-chart-canvas-wrap {
  padding: 0.75rem 1.25rem 1.25rem;
}

.horus-dash-range__grid {
  justify-content: flex-start;
  align-items: flex-end;
}

.horus-dash-range__copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1 1 12rem;
}

.horus-dash-range__label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--horus-text);
}

.horus-dash-range__team,
.horus-dash-range__period {
  flex: 0 1 11rem;
  max-width: 13rem;
}

.horus-dash-range__chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  width: 100%;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid color-mix(in srgb, var(--horus-border) 80%, transparent);
}

.horus-dash-range__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--horus-border) 90%, transparent);
  background: color-mix(in srgb, var(--horus-surface-muted) 55%, var(--horus-surface-solid));
  color: var(--horus-text-muted);
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.horus-dash-range__chip:hover,
.horus-dash-range__chip:focus-visible {
  color: var(--horus-text);
  border-color: color-mix(in srgb, var(--horus-accent) 35%, var(--horus-border));
}

.horus-dash-range__chip.is-active {
  color: var(--horus-accent);
  border-color: color-mix(in srgb, var(--horus-accent) 40%, var(--horus-border));
  background: color-mix(in srgb, var(--horus-accent) 12%, var(--horus-surface-solid));
}

/* Clear the card accent bar when a section title sits at the top of a card. */
.horus-card > .horus-section-title:first-child,
.horus-card > .horus-panel-title:first-child,
.horus-card > .horus-card-title:first-child {
  margin-top: 0;
  padding-top: 1.55rem;
  padding-inline: 1.35rem;
}

.horus-chart-canvas-wrap {
  position: relative;
  height: 14rem;
  min-height: 14rem;
  max-height: 16rem;
  flex: 0 0 auto;
}

.horus-chart-canvas-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-height: 100%;
}

.horus-chart-canvas-wrap--donut {
  height: 13rem;
  min-height: 13rem;
  max-height: 13rem;
  max-width: 15rem;
  margin-inline: auto;
}

/* ========== Timeline ========== */

.horus-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.horus-timeline__item {
  position: relative;
  display: flex;
  gap: 0.95rem;
  padding: 0 0 1.15rem 0.1rem;
}

.horus-timeline__item:last-child {
  padding-bottom: 0;
}

.horus-timeline__item:not(:last-child)::after {
  content: "";
  position: absolute;
  inset-inline-start: 0.7rem;
  top: 1.85rem;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--horus-border-strong) 85%, transparent),
    color-mix(in srgb, var(--horus-border) 35%, transparent)
  );
}

.horus-timeline__marker {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  margin-top: 0.05rem;
  border-radius: 0.55rem;
  color: var(--horus-blue);
  background: color-mix(in srgb, var(--horus-blue) 12%, var(--horus-surface));
  border: 1px solid color-mix(in srgb, var(--horus-blue) 22%, var(--horus-border));
  box-shadow: 0 1px 2px color-mix(in srgb, var(--horus-text) 4%, transparent);
}

/* Event-type glyph: paint on the marker so icons still show if <i> classes fail. */
.horus-timeline__marker::before {
  font-family: "bootstrap-icons" !important;
  font-style: normal;
  font-weight: normal !important;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  speak: never;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 0.85rem;
  content: "\f66b"; /* bi-activity */
}

.horus-timeline__marker.is-window::before,
.horus-timeline__marker.is-event::before,
.horus-timeline__marker.is-application::before { content: "\f6ce"; } /* bi-window-desktop */
.horus-timeline__marker.is-website::before { content: "\f3ef"; } /* bi-globe2 */
.horus-timeline__marker.is-process::before { content: "\f2d6"; } /* bi-cpu */
.horus-timeline__marker.is-idle::before { content: "\f496"; } /* bi-moon-stars */
.horus-timeline__marker.is-status::before,
.horus-timeline__marker.is-presence::before { content: "\f4d3"; } /* bi-person-badge */
.horus-timeline__marker.is-input::before { content: "\f451"; } /* bi-keyboard */
.horus-timeline__marker.is-screenshot::before { content: "\f220"; } /* bi-camera */
.horus-timeline__marker.is-system::before,
.horus-timeline__marker.is-other::before { content: "\f411"; } /* bi-hdd-stack */

.horus-timeline__marker .bi {
  /* Prefer CSS ::before on the marker; keep <i> for a11y tooling only. */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.horus-timeline__marker.is-window,
.horus-timeline__marker.is-event {
  color: var(--horus-blue);
  background: color-mix(in srgb, var(--horus-blue) 12%, var(--horus-surface));
  border-color: color-mix(in srgb, var(--horus-blue) 22%, var(--horus-border));
}

.horus-timeline__marker.is-website {
  color: #0f766e;
  background: color-mix(in srgb, #0f766e 12%, var(--horus-surface));
  border-color: color-mix(in srgb, #0f766e 24%, var(--horus-border));
}

.horus-timeline__marker.is-process {
  color: #4338ca;
  background: color-mix(in srgb, #4338ca 12%, var(--horus-surface));
  border-color: color-mix(in srgb, #4338ca 22%, var(--horus-border));
}

.horus-timeline__marker.is-idle {
  color: #a16207;
  background: color-mix(in srgb, #a16207 12%, var(--horus-surface));
  border-color: color-mix(in srgb, #a16207 24%, var(--horus-border));
}

.horus-timeline__marker.is-status {
  color: #be185d;
  background: color-mix(in srgb, #be185d 11%, var(--horus-surface));
  border-color: color-mix(in srgb, #be185d 22%, var(--horus-border));
}

.horus-timeline__marker.is-input {
  color: #0369a1;
  background: color-mix(in srgb, #0369a1 12%, var(--horus-surface));
  border-color: color-mix(in srgb, #0369a1 22%, var(--horus-border));
}

.horus-timeline__marker.is-screenshot {
  color: #7c3aed;
  background: color-mix(in srgb, #7c3aed 11%, var(--horus-surface));
  border-color: color-mix(in srgb, #7c3aed 22%, var(--horus-border));
}

.horus-timeline__marker.is-system,
.horus-timeline__marker.is-other {
  color: var(--horus-text-secondary);
  background: color-mix(in srgb, var(--horus-text-muted) 10%, var(--horus-surface));
  border-color: var(--horus-border);
}

.horus-timeline__body {
  min-width: 0;
  flex: 1 1 auto;
  padding-top: 0.05rem;
}

.horus-timeline__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.horus-timeline__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--horus-text);
  line-height: 1.35;
}

.horus-timeline__explain {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--horus-text-secondary);
}

.horus-timeline__meta {
  margin: 0.3rem 0 0;
  display: inline-flex;
  max-width: 100%;
  padding: 0.18rem 0.5rem;
  border-radius: 0.4rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--horus-text-muted);
  background: color-mix(in srgb, var(--horus-surface-muted, var(--horus-border)) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--horus-border) 70%, transparent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horus-event-context {
  white-space: pre-line;
  overflow: visible;
  text-overflow: unset;
}

.horus-event-context-badges {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem 0.7rem;
  align-items: flex-end;
  max-width: 100%;
}

.horus-event-chip {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  min-width: 0;
  max-width: 100%;
}

.horus-event-chip.is-transition {
  flex: 1 1 14rem;
  max-width: min(28rem, 100%);
}

.horus-event-chip__hint {
  font-family: var(--horus-font-display);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.15;
  color: var(--horus-text-muted);
  white-space: nowrap;
}

.horus-event-chip__row {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.horus-event-chip__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  color: var(--horus-text-muted);
  background: color-mix(in srgb, var(--horus-surface-muted, var(--horus-border)) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--horus-border) 65%, transparent);
}

.horus-event-chip__arrow .bi {
  font-size: 0.8rem;
  line-height: 1;
}

.horus-event-context-badges .horus-badge--stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  padding: 0.3rem 0.65rem;
  border-radius: 0.55rem;
  max-width: min(16rem, 100%);
  min-width: 0;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--horus-border) 45%, transparent);
}

.horus-event-chip.is-single .horus-badge--stack {
  min-width: 2.4rem;
  justify-content: center;
}

.horus-badge__side {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
  opacity: 0.68;
}

.horus-badge__value {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.horus-badge--from {
  background: var(--horus-draft-soft);
  color: var(--horus-draft);
}

.horus-badge--to {
  background: var(--horus-info-soft);
  color: var(--horus-info);
}

.horus-timeline__meta.horus-event-context {
  display: inline-block;
  vertical-align: top;
}

.horus-timeline__body > .horus-event-context-badges {
  margin-top: 0.4rem;
}

html[dir="rtl"] .horus-event-chip__arrow .bi {
  transform: scaleX(-1);
}

.horus-timeline__time {
  flex: 0 0 auto;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  color: var(--horus-text-muted);
  white-space: nowrap;
}

/* Legacy dots (screenshots feed, etc.) */
.horus-timeline__dot {
  flex: 0 0 auto;
  width: 0.6rem;
  height: 0.6rem;
  margin-top: 0.35rem;
  border-radius: 999px;
  background: var(--horus-text-muted);
  box-shadow: 0 0 0 4px var(--horus-accent-soft);
}

.horus-timeline__dot--event,
.horus-timeline__dot.is-event {
  background: var(--horus-blue);
  box-shadow: 0 0 0 4px var(--horus-blue-soft);
}

.horus-timeline--shots .horus-timeline__shot {
  flex: 1 1 auto;
  min-width: 0;
}

.horus-timeline--shots .horus-shot-card {
  max-width: 16rem;
  width: min(100%, 16rem);
}

.horus-timeline--shots .horus-shot-card__meta {
  display: none;
}

.horus-timeline--shots .horus-shot-chip {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
}

/* ========== Forms ========== */

.horus-form-label {
  display: block;
  margin-bottom: 0.55rem;
  font-family: var(--horus-font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--horus-text-secondary);
}

.horus-form-label .required {
  color: var(--horus-danger);
  margin-left: 0.15rem;
}

.horus-form-label__hint {
  display: inline-flex;
  align-items: center;
  margin-inline-start: 0.5rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-family: var(--horus-font-body, inherit);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--horus-text-secondary, #64748b);
  background: var(--horus-surface-muted, #f1f5f9);
  border: 1px solid var(--horus-border, rgba(15, 23, 42, 0.08));
  vertical-align: middle;
}

.horus-control--mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.875rem;
  line-height: 1.55;
  tab-size: 2;
}

.horus-form-help {
  margin-top: 0.45rem;
  font-size: 0.875rem;
  color: var(--horus-text-muted);
  line-height: 1.45;
}

.horus-timezone-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.horus-timezone-row__select {
  width: 7.5rem;
  min-width: 7.5rem;
  max-width: 7.5rem;
  flex: 0 0 7.5rem;
  height: 2.35rem;
  min-height: 2.35rem;
}

.horus-time-preview {
  margin: 0;
  width: fit-content;
  max-width: 100%;
  padding: 0.4rem 0.7rem;
  border-radius: var(--horus-radius-sm);
  border: 1px dashed var(--horus-border);
  background: var(--horus-surface-muted);
  color: var(--horus-text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  pointer-events: none;
  user-select: text;
}

.horus-time-preview--compact {
  min-height: 2.35rem;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
}

.horus-time-preview--inline {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  flex: 0 1 auto;
  height: 2.35rem;
  min-height: 2.35rem;
}

.horus-time-preview__hint {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--horus-text-muted);
  white-space: nowrap;
}

.horus-time-preview strong {
  color: var(--horus-text);
  font-size: 0.875rem;
  font-weight: 650;
  white-space: nowrap;
}

.form-floating > .form-control,
.form-floating > .form-select,
.form-control,
.form-select {
  border-radius: var(--horus-radius-sm);
  border-color: var(--horus-border);
  background: var(--horus-bg-elevated);
  color: var(--horus-text);
  transition:
    border-color var(--horus-ease-fast),
    box-shadow var(--horus-ease-fast),
    background var(--horus-ease-fast);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--horus-accent);
  box-shadow: var(--horus-focus-ring);
  background: var(--horus-surface);
}

html[dir="rtl"] .form-select {
  background-position: left 0.75rem center;
}

.form-control.is-invalid,
.form-select.is-invalid {
  border-color: var(--horus-danger);
}

/* ========== Modals & Dropdowns ========== */

/*
 * Body uses CSS zoom (--horus-ui-zoom). That makes body a containing block for
 * position:fixed, so Bootstrap's 100vw/100vh backdrop only covers part of the
 * screen (sidebar + left strip stay undimmed). Match sidebar compensation.
 */
.modal {
  z-index: 1060;
  width: calc(100vw / var(--horus-ui-zoom));
  height: var(--horus-viewport-dvh);
  max-width: none;
}

.modal-backdrop {
  z-index: 1055;
  width: calc(100vw / var(--horus-ui-zoom));
  height: var(--horus-viewport-dvh);
  top: 0;
  left: 0;
  right: auto;
  bottom: auto;
}

html[dir="rtl"] .modal-backdrop {
  left: auto;
  right: 0;
}

.modal-content {
  border: 1px solid var(--horus-border);
  border-radius: var(--horus-radius-xl);
  background: var(--horus-surface);
  box-shadow: var(--horus-card-shadow-hover);
  overflow: hidden;
}

.modal-header {
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--horus-border);
}

.modal-title {
  font-family: var(--horus-font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.modal-body {
  padding: 1.35rem;
}

.modal-footer {
  position: sticky;
  bottom: 0;
  padding: 0.95rem 1.35rem;
  border-top: 1px solid var(--horus-border);
  background: color-mix(in srgb, var(--horus-surface-muted) 50%, var(--horus-surface));
  gap: 0.55rem;
}

.modal.fade .modal-dialog {
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), opacity 280ms ease;
}

.dropdown-menu {
  border: 1px solid var(--horus-border);
  border-radius: var(--horus-radius);
  box-shadow: var(--horus-card-shadow-hover);
  padding: 0.45rem;
  background: var(--horus-surface-solid);
  /* Opacity-only: transform animations break Popper positioning */
  animation: horus-dropdown-in 160ms var(--horus-ease) both;
}

.dropdown-item {
  border-radius: var(--horus-radius-sm);
  font-family: var(--horus-font-body);
  font-size: 0.85rem;
  font-weight: 550;
  line-height: 1.45;
  padding: 0.5rem 0.7rem;
  color: var(--horus-text-secondary);
  text-align: start;
  transition: background var(--horus-ease-fast), color var(--horus-ease-fast);
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: var(--horus-surface-muted);
  color: var(--horus-text);
}

/* ========== Organization & Tabs ========== */

.horus-org-tabs,
.horus-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0 0 1.35rem;
  padding: 0.35rem;
  border: 1px solid var(--horus-border);
  border-radius: var(--horus-radius-lg);
  background: var(--horus-surface);
  box-shadow: var(--horus-card-shadow);
  overflow-x: auto;
}

.horus-org-tabs__link,
.horus-tabs__link {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.4rem 0.95rem;
  border-radius: var(--horus-radius-sm);
  color: var(--horus-text-secondary);
  font-family: var(--horus-font-display);
  font-size: 0.85rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background var(--horus-ease-fast),
    color var(--horus-ease-fast),
    transform var(--horus-bounce);
}

.horus-org-tabs__link:hover,
.horus-tabs__link:hover {
  background: var(--horus-surface-muted);
  color: var(--horus-text);
}

.horus-org-tabs__link.is-active,
.horus-org-tabs__link[aria-current="page"],
.horus-tabs__link.active,
.horus-tabs__link.is-active {
  background: var(--horus-accent-subtle);
  color: var(--horus-accent);
  font-weight: 800;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--horus-accent) 20%, transparent);
}

/* ========== Avatars ========== */

.horus-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  background: var(--horus-grad-purple);
  color: #3a2aa8;
  font-family: var(--horus-font-display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(91, 69, 246, 0.22);
  overflow: hidden;
  position: relative;
}

.horus-avatar--sm {
  width: 1.9rem;
  height: 1.9rem;
  font-size: 0.65rem;
}

.horus-avatar--image {
  background: transparent;
  color: transparent;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.18);
}

.horus-avatar__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* ========== Impersonation Banner ========== */

.horus-impersonation-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1.15rem;
  padding: 0.85rem 1.15rem;
  border-radius: var(--horus-radius);
  border: 1px solid color-mix(in srgb, var(--horus-accent) 35%, transparent);
  background: color-mix(in srgb, var(--horus-accent) 10%, var(--horus-surface));
  color: var(--horus-text);
  box-shadow: var(--horus-shadow-sm);
}

.horus-impersonation-banner__text {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.horus-impersonation-banner__text .bi {
  color: var(--horus-accent);
  font-size: 1.1rem;
}

.horus-flash-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1.15rem;
  padding: 0.85rem 1.15rem;
  border-radius: var(--horus-radius);
  color: var(--horus-text);
  box-shadow: var(--horus-shadow-sm);
}

.horus-flash-banner--success {
  border: 1px solid color-mix(in srgb, var(--horus-success) 35%, transparent);
  background: color-mix(in srgb, var(--horus-success) 10%, var(--horus-surface));
}

.horus-flash-banner__text {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.horus-flash-banner--success .horus-flash-banner__text .bi {
  color: var(--horus-success);
  font-size: 1.1rem;
}

.horus-alerts .horus-flash-banner.alert {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.85rem 2.85rem 0.85rem 1.15rem;
  font-size: 0.9rem;
  border-radius: var(--horus-radius);
  box-shadow: var(--horus-shadow-sm);
}

.horus-alerts .horus-flash-banner--success {
  color: var(--horus-text);
  background: color-mix(in srgb, var(--horus-success) 10%, var(--horus-surface));
  border-color: color-mix(in srgb, var(--horus-success) 35%, transparent);
}

/* ========== Employee Grid & Cards ========== */

.horus-employee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.15rem;
}

.horus-live-board {
  margin-top: 0.25rem;
}

.horus-live-board > .horus-panel-body {
  padding-top: 0.35rem;
}

.horus-live-board > .horus-panel-body:has(+ .horus-pagination) {
  padding-bottom: 1rem;
}

.horus-live-board .horus-employee-grid {
  margin: 0;
}

.horus-employee-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.15rem 1.2rem 1.05rem;
  border: 1px solid color-mix(in srgb, var(--horus-border) 92%, transparent);
  border-radius: 1rem;
  background: var(--horus-surface-solid);
  box-shadow:
    0 1px 2px color-mix(in srgb, #0f172a 4%, transparent),
    0 8px 24px color-mix(in srgb, #0f172a 5%, transparent);
  overflow: hidden;
  transition:
    border-color 180ms ease,
    box-shadow 200ms ease,
    transform 200ms ease;
}

.horus-employee-card::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 3px;
  background: linear-gradient(180deg, #f59e0b, #fb923c);
}

.horus-employee-card.is-night-shift::before {
  background: linear-gradient(180deg, #6366f1, #312e81);
}

.horus-employee-card.is-day-shift {
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, #fbbf24 7%, var(--horus-surface-solid)) 0%,
      var(--horus-surface-solid) 38%
    );
}

.horus-employee-card.is-night-shift {
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, #6366f1 9%, var(--horus-surface-solid)) 0%,
      var(--horus-surface-solid) 40%
    );
}

.horus-employee-card__shift {
  position: absolute;
  left: 50%;
  bottom: -0.55rem;
  transform: translateX(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  border: 1px solid transparent;
  white-space: nowrap;
  box-shadow: 0 4px 10px color-mix(in srgb, #0f172a 12%, transparent);
}

.horus-employee-card__shift .bi {
  font-size: 0.7rem;
}

.horus-employee-card__shift.is-day {
  color: #92400e;
  background: #fff7ed;
  border-color: color-mix(in srgb, #f59e0b 35%, transparent);
}

.horus-employee-card__shift.is-night {
  color: #312e81;
  background: #eef2ff;
  border-color: color-mix(in srgb, #6366f1 35%, transparent);
}

.horus-employee-card__avatar-wrap {
  position: relative;
  flex-shrink: 0;
  border-radius: 50%;
  padding: 2px;
  margin-bottom: 0.55rem;
}

.horus-employee-card__avatar-wrap.is-day {
  background: linear-gradient(145deg, #fde68a, #f59e0b);
}

.horus-employee-card__avatar-wrap.is-night {
  background: linear-gradient(145deg, #a5b4fc, #4338ca);
}

.horus-employee-card__avatar-wrap .horus-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--horus-surface-solid);
}

[data-bs-theme="dark"] .horus-employee-card__shift.is-day {
  color: #fde68a;
  background: color-mix(in srgb, #92400e 55%, #0f172a);
  border-color: color-mix(in srgb, #f59e0b 40%, transparent);
}

[data-bs-theme="dark"] .horus-employee-card__shift.is-night {
  color: #c7d2fe;
  background: color-mix(in srgb, #312e81 55%, #0f172a);
  border-color: color-mix(in srgb, #818cf8 40%, transparent);
}

.horus-employee-card:hover {
  border-color: color-mix(in srgb, var(--horus-accent) 28%, var(--horus-border));
  box-shadow:
    0 2px 4px color-mix(in srgb, #0f172a 5%, transparent),
    0 14px 28px color-mix(in srgb, #0f172a 8%, transparent);
  transform: translateY(-2px);
}

.horus-employee-card.has-alert-warn {
  border-color: color-mix(in srgb, #d97706 28%, var(--horus-border));
}

.horus-employee-card.has-alert-danger {
  border-color: color-mix(in srgb, #dc2626 30%, var(--horus-border));
}

.horus-employee-card.is-inactive {
  opacity: 0.72;
}

.horus-employee-card__header {
  display: block;
}

.horus-employee-card__identity {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  min-width: 0;
}

.horus-employee-card__identity .horus-avatar {
  width: 2.65rem;
  height: 2.65rem;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.horus-employee-card__identity-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

.horus-employee-card__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  min-width: 0;
}

.horus-employee-card__name {
  font-family: var(--horus-font-display);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--horus-text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  transition: color 160ms ease;
}

.horus-employee-card__name:hover,
.horus-employee-card__name:focus-visible {
  color: var(--horus-accent);
}

.horus-employee-card__title-row .horus-status-pill {
  flex-shrink: 0;
}

.horus-employee-card__meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.15rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--horus-text-muted);
}

.horus-employee-card__meta-sep {
  margin-inline: 0.2rem;
  opacity: 0.65;
}

.horus-employee-card__affiliation {
  margin: 0.28rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  min-width: 0;
  font-size: 0.74rem;
  line-height: 1.3;
  color: color-mix(in srgb, var(--horus-text) 78%, var(--horus-text-muted));
}

.horus-employee-card__affiliation-node {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  min-width: 0;
  max-width: 100%;
}

.horus-employee-card__affiliation-node .bi {
  display: inline-grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 0.35rem;
  font-size: 0.62rem;
  flex-shrink: 0;
  color: color-mix(in srgb, var(--horus-accent) 78%, var(--horus-text));
  background: color-mix(in srgb, var(--horus-accent) 12%, transparent);
}

.horus-employee-card__affiliation-node span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.horus-employee-card__affiliation-node.is-empty {
  color: var(--horus-text-muted);
}

.horus-employee-card__affiliation-node.is-empty .bi {
  color: var(--horus-text-muted);
  background: color-mix(in srgb, var(--horus-surface-muted) 85%, transparent);
}

.horus-employee-card__affiliation-node.is-empty span {
  font-weight: 500;
  opacity: 0.85;
}

.horus-employee-card__affiliation-sep {
  width: 0.22rem;
  height: 0.22rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--horus-text-muted) 55%, transparent);
  flex-shrink: 0;
}

.horus-employee-card__signals {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0.45rem 0 0;
}

.horus-employee-card__signal {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  max-width: 100%;
  padding: 0.18rem 0.48rem 0.18rem 0.34rem;
  border-radius: 0.45rem;
  border: 1px solid transparent;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

.horus-employee-card__signal .bi {
  font-size: 0.72rem;
  flex-shrink: 0;
}

.horus-employee-card__signal.is-apps {
  color: color-mix(in srgb, #b45309 72%, var(--horus-text));
  background: color-mix(in srgb, #f59e0b 14%, var(--horus-surface));
  border-color: color-mix(in srgb, #f59e0b 28%, var(--horus-border));
}

.horus-employee-card__signal.is-websites {
  color: color-mix(in srgb, #0f766e 70%, var(--horus-text));
  background: color-mix(in srgb, #14b8a6 12%, var(--horus-surface));
  border-color: color-mix(in srgb, #14b8a6 26%, var(--horus-border));
}

.horus-employee-card__signal.is-shot {
  color: color-mix(in srgb, var(--horus-accent) 82%, var(--horus-text));
  background: color-mix(in srgb, var(--horus-accent) 12%, var(--horus-surface));
  border-color: color-mix(in srgb, var(--horus-accent) 28%, var(--horus-border));
}

.horus-employee-card__signal.is-cam {
  color: color-mix(in srgb, #7c3aed 78%, var(--horus-text));
  background: color-mix(in srgb, #8b5cf6 12%, var(--horus-surface));
  border-color: color-mix(in srgb, #8b5cf6 26%, var(--horus-border));
}

.horus-employee-card__signal.is-shot.is-paused,
.horus-employee-card__signal.is-cam.is-paused {
  color: color-mix(in srgb, var(--horus-text-muted, #64748b) 90%, var(--horus-text));
  background: color-mix(in srgb, var(--horus-text-muted, #64748b) 10%, var(--horus-surface));
  border-color: color-mix(in srgb, var(--horus-border) 80%, transparent);
}

[data-bs-theme="dark"] .horus-employee-card__signal.is-apps {
  color: color-mix(in srgb, #fbbf24 78%, var(--horus-text));
  background: color-mix(in srgb, #f59e0b 16%, var(--horus-surface));
}

[data-bs-theme="dark"] .horus-employee-card__signal.is-websites {
  color: color-mix(in srgb, #5eead4 72%, var(--horus-text));
  background: color-mix(in srgb, #14b8a6 14%, var(--horus-surface));
}

[data-bs-theme="dark"] .horus-employee-card__signal.is-cam {
  color: color-mix(in srgb, #c4b5fd 80%, var(--horus-text));
  background: color-mix(in srgb, #8b5cf6 16%, var(--horus-surface));
}

.horus-employee-card__account {
  margin-inline-start: 0.35rem;
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
}

.horus-employee-card__last-active {
  margin: 0.1rem 0 0;
  font-size: 0.76rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--horus-text-muted) 88%, var(--horus-text));
}

.horus-employee-card__body {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0.95rem;
  border-radius: 0.85rem;
  background: color-mix(in srgb, var(--horus-surface-muted) 55%, var(--horus-surface-solid));
  border: 1px solid color-mix(in srgb, var(--horus-border) 70%, transparent);
}

.horus-employee-card__ring {
  width: 4.35rem;
  height: 4.35rem;
  flex-shrink: 0;
}

.horus-employee-card__ring .horus-ring__value {
  stroke: var(--horus-accent);
  stroke-width: 3.4;
}

.horus-employee-card__ring .horus-ring__track {
  stroke: color-mix(in srgb, var(--horus-border) 70%, transparent);
  stroke-width: 3.4;
}

.horus-employee-card__ring .horus-ring__label {
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--horus-text);
}

.horus-employee-card__metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 1rem;
  margin: 0;
  min-width: 0;
  flex: 1;
}

.horus-employee-card__metric {
  min-width: 0;
}

.horus-employee-card__metric dt {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--horus-text-muted);
}

.horus-employee-card__metric dd {
  margin: 0.18rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem;
  font-family: var(--horus-font-display);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--horus-text);
}

.horus-employee-card__metric dd.is-ok {
  color: #15803d;
}

.horus-employee-card__metric dd.is-warn {
  color: #c2410c;
}

.horus-employee-card__metric dd.is-danger {
  color: #b91c1c;
}

.horus-employee-card__overdue {
  font-size: 0.76rem;
  font-weight: 700;
  color: #b91c1c;
}

.horus-employee-card__alert {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
  padding: 0.6rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.4;
  border: 1px solid transparent;
}

.horus-employee-card__alert .bi {
  margin-top: 0.1rem;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.horus-employee-card__alert.is-danger {
  color: #991b1b;
  background: color-mix(in srgb, #ef4444 9%, var(--horus-surface-solid));
  border-color: color-mix(in srgb, #ef4444 20%, var(--horus-border));
}

.horus-employee-card__alert.is-warn {
  color: #9a3412;
  background: color-mix(in srgb, #f59e0b 10%, var(--horus-surface-solid));
  border-color: color-mix(in srgb, #f59e0b 22%, var(--horus-border));
}

.horus-employee-card__alert.is-muted {
  color: color-mix(in srgb, var(--horus-text-muted) 90%, var(--horus-text));
  background: color-mix(in srgb, var(--horus-surface-muted) 70%, var(--horus-surface-solid));
  border-color: color-mix(in srgb, var(--horus-border) 75%, transparent);
}

.horus-status-context {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  font-weight: 600;
  text-align: end;
  color: var(--horus-text-muted);
}

.horus-status-context.is-warn {
  color: #c2410c;
}

.horus-status-context.is-danger {
  color: #b91c1c;
}

.horus-status-context.is-muted {
  color: var(--horus-text-muted);
}

.horus-emp-widget__status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  max-width: 11rem;
  flex-shrink: 0;
}

.horus-emp-widget .horus-status-context {
  max-width: 100%;
}

[data-bs-theme="dark"] .horus-employee-card {
  box-shadow:
    0 1px 2px color-mix(in srgb, #000 25%, transparent),
    0 10px 28px color-mix(in srgb, #000 28%, transparent);
}

[data-bs-theme="dark"] .horus-status-context.is-warn,
[data-bs-theme="dark"] .horus-employee-card__alert.is-warn,
[data-bs-theme="dark"] .horus-employee-card__metric dd.is-warn {
  color: #fbbf24;
}

[data-bs-theme="dark"] .horus-status-context.is-danger,
[data-bs-theme="dark"] .horus-employee-card__alert.is-danger,
[data-bs-theme="dark"] .horus-employee-card__metric dd.is-danger,
[data-bs-theme="dark"] .horus-employee-card__overdue {
  color: #f87171;
}

[data-bs-theme="dark"] .horus-employee-card__metric dd.is-ok {
  color: #4ade80;
}

.horus-employee-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: auto;
  padding: 0.7rem 1rem;
  border-radius: 0.75rem;
  border: 0;
  background: var(--horus-accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 650;
  text-decoration: none;
  transition:
    background 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.horus-employee-card__cta:hover,
.horus-employee-card__cta:focus-visible {
  color: #fff;
  background: var(--horus-accent-hover);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--horus-accent) 28%, transparent);
}

.horus-employee-card__cta:active {
  transform: translateY(1px);
}

.horus-employee-card__cta .bi {
  font-size: 0.95rem;
  line-height: 1;
}

.horus-profile-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
  padding: 1.35rem 1.45rem;
  border: 1px solid var(--horus-border);
  border-radius: var(--horus-radius-lg);
  background: var(--horus-grad-hero);
  box-shadow: var(--horus-card-shadow);
}

.horus-profile-hero__identity {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.horus-profile-hero__title-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.horus-profile-hero__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  min-width: 0;
}

.horus-profile-hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.horus-profile-hero__actions .horus-status-pill,
.horus-profile-hero__actions .horus-badge,
.horus-profile-hero__actions .btn {
  align-self: center;
}

.horus-refresh-timer {
  --progress: 0;
  position: relative;
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--horus-accent) 35%, var(--horus-border));
  background: var(--horus-surface-muted);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--horus-surface) 70%, transparent);
  cursor: pointer;
}

.horus-refresh-timer:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--horus-accent) 55%, transparent);
  outline-offset: 2px;
}

.horus-refresh-timer.is-paused {
  opacity: 0.72;
  border-color: color-mix(in srgb, var(--horus-draft) 45%, var(--horus-border));
}

.horus-refresh-timer.is-paused .horus-refresh-timer__fill {
  filter: grayscale(0.35);
}

.horus-refresh-timer__fill {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from -90deg,
    var(--horus-accent) calc(var(--progress) * 1%),
    transparent 0
  );
  transition: none;
}

.horus-refresh-timer.is-complete {
  border-color: var(--horus-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--horus-accent) 22%, transparent);
}

.horus-refresh-timer.is-complete .horus-refresh-timer__fill {
  background: var(--horus-accent);
}

/* ========== Screenshots ========== */

.horus-shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.1rem;
}

.horus-shot-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--horus-border);
  border-radius: var(--horus-radius-lg);
  background: var(--horus-surface);
  overflow: hidden;
  box-shadow: var(--horus-card-shadow);
  transition:
    box-shadow var(--horus-ease),
    border-color var(--horus-ease);
}

.horus-shot-card:hover {
  box-shadow: var(--horus-card-shadow-hover);
  border-color: color-mix(in srgb, var(--horus-accent) 28%, var(--horus-border));
}

.horus-shot-card__preview {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  text-align: start;
}

.horus-shot-card__canvas {
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--horus-accent) 12%, var(--horus-surface-muted)), var(--horus-surface-muted));
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.horus-shot-card__canvas.is-dual {
  grid-template-columns: 1fr 1fr;
}

.horus-shot-card__canvas.is-triple {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.horus-shot-card__canvas.is-triple .horus-shot-card__pane:first-child {
  grid-column: 1 / -1;
}

.horus-shot-card__canvas.is-quad {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.horus-shot-card__pane {
  position: relative;
  margin: 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-inline-end: 1px solid color-mix(in srgb, #fff 18%, transparent);
  border-bottom: 1px solid color-mix(in srgb, #fff 18%, transparent);
}

.horus-shot-card__canvas.is-dual .horus-shot-card__pane:last-child,
.horus-shot-card__canvas.is-triple .horus-shot-card__pane:nth-child(2n),
.horus-shot-card__canvas.is-quad .horus-shot-card__pane:nth-child(2n) {
  border-inline-end: 0;
}

.horus-shot-card__canvas.is-triple .horus-shot-card__pane:nth-child(n + 2),
.horus-shot-card__canvas.is-quad .horus-shot-card__pane:nth-child(n + 3) {
  border-bottom: 0;
}

.horus-shot-card__pane-label {
  position: absolute;
  inset-inline-start: 0.4rem;
  top: 0.4rem;
  margin: 0;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: color-mix(in srgb, #0f172a 70%, transparent);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.horus-shot-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 280ms var(--horus-ease);
}

.horus-shot-card:hover .horus-shot-card__image {
  transform: scale(1.03);
}

.horus-shot-card__chips {
  position: absolute;
  inset-inline: 0.55rem 0.55rem;
  bottom: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: flex-end;
  pointer-events: none;
}

.horus-shot-chip {
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, #0f172a 72%, transparent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  backdrop-filter: blur(4px);
}

.horus-shot-chip--accent {
  background: color-mix(in srgb, var(--horus-accent) 88%, #0f172a);
}

.horus-shot-card__placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--horus-text-muted);
  font-size: 0.85rem;
  padding: 1rem;
  text-align: center;
}

.horus-shot-card__placeholder .bi {
  font-size: 1.55rem;
  color: var(--horus-accent);
}

.horus-shot-card__placeholder--lg .bi {
  font-size: 2.35rem;
}

.horus-shot-card__preview.is-blurred .horus-shot-card__canvas {
  filter: blur(8px);
}

.horus-shot-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.85rem 0.95rem 0.95rem;
  border-top: 1px solid var(--horus-border);
}

.horus-shot-card__identity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.horus-shot-card__name {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--horus-text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horus-shot-card__name:hover {
  color: var(--horus-accent);
}

.horus-shot-card__time {
  margin: 0;
  font-size: 0.74rem;
  color: var(--horus-text-muted);
}

.horus-shot-card__app {
  margin: 0;
  font-size: 0.78rem;
  color: var(--horus-text-muted);
}

.horus-shot-viewer {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.horus-shot-viewer[x-cloak],
[x-cloak].horus-shot-viewer {
  display: none !important;
}

.horus-shot-viewer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 22, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.horus-shot-viewer__shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 90vw;
  height: 90vh;
  height: 90dvh;
  max-width: 90vw;
  max-height: 90vh;
  max-height: 90dvh;
  border-radius: var(--horus-radius-xl);
  overflow: hidden;
  background: #0b1220;
  border: 1px solid color-mix(in srgb, #fff 10%, transparent);
  box-shadow: var(--horus-shadow-lg);
}

.horus-rtl .horus-shot-viewer__shell {
  flex-direction: row-reverse;
}

.horus-shot-viewer__stage {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  padding: 1.25rem 3.5rem;
  background:
    radial-gradient(circle at 20% 15%, color-mix(in srgb, var(--horus-accent) 18%, transparent), transparent 45%),
    #0b1220;
}

.horus-shot-viewer__stage.is-blurred .horus-shot-viewer__image {
  filter: blur(10px);
}

.horus-shot-viewer__carousel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.horus-shot-viewer__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
}

.horus-shot-viewer__pane-label {
  position: absolute;
  inset-inline-start: 0.75rem;
  top: 0.75rem;
  margin: 0;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, #0f172a 72%, transparent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  z-index: 1;
}

.horus-shot-viewer__image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: var(--horus-radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  background: #111;
}

.horus-shot-viewer__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, #fff 18%, transparent);
  background: color-mix(in srgb, #0b1220 72%, transparent);
  color: #fff;
  transform: translateY(-50%);
  backdrop-filter: blur(6px);
  transition:
    background var(--horus-ease-fast),
    border-color var(--horus-ease-fast);
}

.horus-shot-viewer__nav:hover {
  background: color-mix(in srgb, var(--horus-accent) 70%, #0b1220);
  border-color: color-mix(in srgb, var(--horus-accent) 55%, transparent);
}

.horus-shot-viewer__nav--prev {
  inset-inline-start: 0.75rem;
}

.horus-shot-viewer__nav--next {
  inset-inline-end: 0.75rem;
}

.horus-shot-viewer__counter {
  position: absolute;
  left: 50%;
  bottom: 0.85rem;
  z-index: 2;
  transform: translateX(-50%);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: color-mix(in srgb, #0f172a 72%, transparent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.horus-shot-viewer__monitor-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.horus-shot-viewer__monitor-tab {
  min-width: 2.4rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--horus-border);
  background: var(--horus-surface);
  color: var(--horus-text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.horus-shot-viewer__monitor-tab.is-active {
  border-color: color-mix(in srgb, var(--horus-accent) 45%, var(--horus-border));
  background: color-mix(in srgb, var(--horus-accent) 14%, var(--horus-surface));
  color: var(--horus-accent);
}

.horus-shot-viewer__fact.horus-shot-viewer__fact--apps {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.horus-shot-viewer__fact.horus-shot-viewer__fact--apps dd {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.horus-shot-viewer__apps {
  list-style: none;
  margin: 0.15rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
}

.horus-shot-viewer__app {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0;
  padding: 0.5rem 0.65rem;
  border-radius: var(--horus-radius-sm);
  border: 1px solid var(--horus-border);
  background: var(--horus-surface-muted);
  color: var(--horus-text);
}

.horus-shot-viewer__app .bi {
  margin-top: 0.12rem;
  color: var(--horus-accent);
  font-size: 0.9rem;
  flex: 0 0 auto;
}

.horus-shot-viewer__app-title {
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.horus-shot-viewer__panel {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  flex: 0 0 340px;
  width: 340px;
  max-width: 100%;
  min-height: 0;
  padding: 1.25rem 1.2rem 1.2rem;
  background: var(--horus-surface);
  border-inline-start: 1px solid var(--horus-border);
  overflow: hidden;
}

.horus-shot-viewer__panel-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.horus-shot-viewer__eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--horus-text-muted);
}

.horus-shot-viewer__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--horus-text);
}

.horus-shot-viewer__close {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid var(--horus-border);
  background: var(--horus-surface);
  color: var(--horus-text-muted);
  transition:
    background var(--horus-ease-fast),
    color var(--horus-ease-fast),
    border-color var(--horus-ease-fast);
}

.horus-shot-viewer__close:hover {
  color: var(--horus-text);
  border-color: color-mix(in srgb, var(--horus-text) 25%, var(--horus-border));
  background: var(--horus-surface-muted);
}

.horus-shot-viewer__employee {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: var(--horus-radius);
  background: var(--horus-surface-muted);
  border: 1px solid var(--horus-border);
}

.horus-shot-viewer__employee-link {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--horus-text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horus-shot-viewer__employee-link:hover {
  color: var(--horus-accent);
}

.horus-shot-viewer__employee-meta {
  margin: 0.1rem 0 0;
  font-size: 0.74rem;
  color: var(--horus-text-muted);
}

.horus-shot-viewer__facts {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
  flex: 1 1 auto;
  min-height: 0;
}

.horus-shot-viewer__fact {
  display: grid;
  gap: 0.2rem;
  flex: 0 0 auto;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--horus-border);
}

.horus-shot-viewer__fact:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.horus-shot-viewer__fact dt {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--horus-text-muted);
}

.horus-shot-viewer__fact dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--horus-text);
  overflow-wrap: anywhere;
}

.horus-shot-viewer__next {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--horus-accent) 14%, var(--horus-surface));
  color: var(--horus-accent);
  font-size: 0.85rem;
  font-weight: 700;
}

.horus-shot-viewer__actions {
  margin-top: auto;
  display: grid;
  gap: 0.55rem;
  padding-top: 0.35rem;
}

@media (max-width: 900px) {
  .horus-shot-viewer {
    padding: 0;
    align-items: stretch;
  }

  .horus-shot-viewer__shell,
  .horus-rtl .horus-shot-viewer__shell {
    flex-direction: column;
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }

  .horus-shot-viewer__stage {
    flex: 1 1 auto;
    min-height: 42vh;
    padding: 0.85rem;
  }

  .horus-shot-viewer__panel {
    flex: 0 0 auto;
    width: 100%;
    border-inline-start: 0;
    border-top: 1px solid var(--horus-border);
    max-height: 52vh;
  }
}

/* ========== Settings ========== */

.horus-settings-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1.35rem;
  align-items: start;
}

.horus-settings-nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.85rem;
  border: 1px solid var(--horus-border);
  border-radius: var(--horus-radius-lg);
  background: var(--horus-surface);
  box-shadow: var(--horus-card-shadow);
  position: sticky;
  top: 1rem;
}

.horus-settings-nav__link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.45rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--horus-radius-sm);
  color: var(--horus-text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition:
    background var(--horus-ease-fast),
    color var(--horus-ease-fast),
    transform var(--horus-ease-fast);
}

.horus-settings-nav__link:hover,
.horus-settings-nav__link.is-active {
  background: var(--horus-accent-subtle);
  color: var(--horus-accent);
  transform: translateX(2px);
}

/* ========== Progress & Usage ========== */

.horus-progress {
  height: 0.5rem;
  border-radius: 999px;
  background: var(--horus-surface-muted);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}

.horus-progress__bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--horus-accent-pressed), var(--horus-accent-hover));
  transition: width 600ms var(--horus-ease);
}

.horus-progress__bar--warn,
.horus-progress__bar.is-warn {
  background: linear-gradient(90deg, var(--horus-warning), color-mix(in srgb, var(--horus-warning) 80%, #fff));
}

.horus-progress__bar--muted,
.horus-progress__bar.is-muted {
  background: var(--horus-draft);
}

.horus-usage-bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--horus-border);
}

.horus-usage-bar-row--with-toggle {
  grid-template-columns: minmax(120px, 160px) 1fr auto auto;
}

.horus-usage-bar-row:last-child {
  border-bottom: 0;
}

/* ========== Schedule ========== */

.horus-schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.85rem;
}

.horus-schedule-day {
  display: block;
  padding: 0.95rem;
  border: 1px solid var(--horus-border);
  border-radius: var(--horus-radius-sm);
  background: var(--horus-surface-muted);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--horus-ease-fast),
    box-shadow var(--horus-ease-fast),
    border-color var(--horus-ease-fast),
    background var(--horus-ease-fast);
}

.horus-schedule-day:hover {
  transform: translateY(-2px);
  box-shadow: var(--horus-shadow-sm);
  color: inherit;
  text-decoration: none;
}

.horus-schedule-day:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--horus-accent) 55%, transparent);
  outline-offset: 2px;
}

.horus-schedule-day.is-off {
  opacity: 0.72;
  background: color-mix(in srgb, var(--horus-surface-muted) 70%, transparent);
}

.horus-schedule-day.is-selected {
  border-color: color-mix(in srgb, var(--horus-accent) 55%, var(--horus-border));
  background: color-mix(in srgb, var(--horus-accent) 12%, var(--horus-surface-muted));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--horus-accent) 25%, transparent);
}

.horus-schedule-day.is-future {
  opacity: 0.48;
  cursor: not-allowed;
  pointer-events: none;
}

.horus-schedule-day__date {
  display: block;
  margin-bottom: 0.2rem;
}

.horus-attendance-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

/* ========== Employee attendance day log ========== */

.horus-attendance-day--spaced {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--horus-border);
}

.horus-attendance-day__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.horus-attendance-day__date {
  margin: 0;
  font-family: var(--horus-font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--horus-text);
}

.horus-attendance-day__status-explain {
  margin-top: 0.25rem;
  font-size: 0.82rem;
  color: var(--horus-text-muted, #64748b);
}

.horus-attendance-day__flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.horus-attendance-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}

.horus-attendance-summary__item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--horus-border);
  border-radius: 0.85rem;
  background: color-mix(in srgb, var(--horus-surface-muted, #f8fafc) 70%, var(--horus-surface));
}

.horus-attendance-summary__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.55rem;
  color: var(--horus-accent);
  background: color-mix(in srgb, var(--horus-accent) 12%, transparent);
  flex-shrink: 0;
}

.horus-attendance-summary__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--horus-text-muted, #64748b);
}

.horus-attendance-summary__value {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--horus-text);
}

.horus-attendance-log {
  padding: 0.85rem;
  border: 1px solid var(--horus-border);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--horus-surface-muted, #f1f5f9) 55%, var(--horus-surface));
}

.horus-attendance-log__header {
  margin-bottom: 0.75rem;
}

.horus-attendance-log__title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--horus-text);
}

.horus-attendance-log__meta,
.horus-attendance-log__empty {
  font-size: 0.8rem;
  color: var(--horus-text-muted, #64748b);
}

.horus-attendance-log__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 60rem;
  overflow: auto;
}

.horus-attendance-log__item {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem 0.75rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--horus-border);
  border-radius: 0.85rem;
  background: var(--horus-surface);
}

.horus-attendance-log__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #94a3b8;
  flex-shrink: 0;
}

.horus-attendance-log__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 0.5rem;
  color: inherit;
  background: color-mix(in srgb, currentColor 12%, transparent);
}

.horus-attendance-log__body {
  min-width: 0;
}

.horus-attendance-log__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
}

.horus-attendance-log__ongoing {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--horus-accent);
}

.horus-attendance-log__explain {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: var(--horus-text-muted, #64748b);
}

.horus-attendance-log__meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin: 0.45rem 0 0;
}

.horus-attendance-log__meta-row > div {
  min-width: 4.5rem;
}

.horus-attendance-log__meta-row dt {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--horus-text-muted, #64748b);
}

.horus-attendance-log__meta-row dd {
  margin: 0.1rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--horus-text);
  font-variant-numeric: tabular-nums;
}

.horus-attendance-log__time {
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--horus-text-muted, #64748b);
  white-space: nowrap;
}

.horus-attendance-log__item.is-check-in { color: #0f766e; }
.horus-attendance-log__item.is-check-in .horus-attendance-log__dot { background: #14b8a6; }

.horus-attendance-log__item.is-available,
.horus-attendance-log__item.is-online { color: #15803d; }
.horus-attendance-log__item.is-available .horus-attendance-log__dot,
.horus-attendance-log__item.is-online .horus-attendance-log__dot { background: #22c55e; }

.horus-attendance-log__item.is-working { color: #5b45f6; }
.horus-attendance-log__item.is-working .horus-attendance-log__dot { background: #8b5cf6; }

.horus-attendance-log__item.is-busy { color: #1d4ed8; }
.horus-attendance-log__item.is-busy .horus-attendance-log__dot { background: #3b82f6; }

.horus-attendance-log__item.is-idle { color: #a16207; }
.horus-attendance-log__item.is-idle .horus-attendance-log__dot { background: #eab308; }

.horus-attendance-log__item.is-break { color: #c2410c; }
.horus-attendance-log__item.is-break .horus-attendance-log__dot { background: #fb923c; }

.horus-attendance-log__item.is-offline { color: #b91c1c; }
.horus-attendance-log__item.is-offline .horus-attendance-log__dot { background: #f87171; }

@media (max-width: 640px) {
  .horus-attendance-log__item {
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  .horus-attendance-log__time {
    grid-column: 3;
    justify-self: start;
  }
}

.horus-schedule-day strong {
  display: block;
  margin-bottom: 0.15rem;
  font-family: var(--horus-font-display);
  font-weight: 800;
}

/* ========== API Key Reveal ========== */

.horus-key-reveal .modal-body {
  padding-top: 0.85rem;
}

.horus-key-reveal__field .form-control {
  font-size: 0.8rem;
  background: var(--horus-surface-muted);
  height: auto;
  min-height: 2.55rem;
  font-family: ui-monospace, "Cascadia Code", monospace;
}

.horus-key-reveal .input-group .btn {
  white-space: nowrap;
}

/* ========== Theme Icon Swap ========== */

.horus-icon-btn [data-bs-theme-icon="dark"],
.horus-theme-pill__btn [data-bs-theme-icon="dark"] {
  display: none !important;
}

.horus-icon-btn [data-bs-theme-icon="light"],
.horus-theme-pill__btn [data-bs-theme-icon="light"] {
  display: inline-block !important;
}

[data-bs-theme="dark"] .horus-icon-btn [data-bs-theme-icon="dark"],
[data-bs-theme="dark"] .horus-theme-pill__btn [data-bs-theme-icon="dark"] {
  display: inline-block !important;
}

[data-bs-theme="dark"] .horus-icon-btn [data-bs-theme-icon="light"],
[data-bs-theme="dark"] .horus-theme-pill__btn [data-bs-theme-icon="light"] {
  display: none !important;
}

/* ========== Keyframes ========== */

@keyframes horus-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes horus-fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes horus-dropdown-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes horus-pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 45%, transparent);
  }
  70% {
    box-shadow: 0 0 0 0.6rem transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

@keyframes horus-blob-float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(24px, -18px) scale(1.05);
  }
  66% {
    transform: translate(-16px, 12px) scale(0.97);
  }
}

@keyframes horus-spark {
  0%, 100% {
    transform: scaleY(0.6);
    opacity: 0.5;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

/* ========== Responsive ========== */

@media (max-width: 1199.98px) {
  .horus-filter-card__grid {
    gap: 0.65rem 0.75rem;
  }

  .horus-filter-field {
    flex: 1 1 8.5rem;
    max-width: 12.5rem;
  }

  .horus-filter-field--search,
  .horus-filter-field:has(.horus-search),
  .horus-filter-field:has(input[type="search"]),
  .horus-filter-field:has(input[name="search"]),
  .horus-filter-field:has(input[name="name"]),
  .horus-filter-field:has(input[name="employee"]) {
    flex: 2 1 18rem;
    min-width: min(100%, 18rem);
    max-width: 28rem;
  }

  .horus-content {
    padding: 1.45rem 1.45rem 1.85rem;
  }
}

@media (max-width: 991.98px) {
  .horus-sidebar {
    inset: 0 auto auto 0;
    transform: translateX(calc(-100% - 2rem));
    margin: 0;
    min-height: var(--horus-viewport-h);
    min-height: var(--horus-viewport-dvh);
    height: var(--horus-viewport-h);
    height: var(--horus-viewport-dvh);
    border-radius: 0;
  }

  .horus-sidebar.is-open {
    transform: translateX(0);
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.25);
  }

  .horus-main {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
  }

  .horus-sidebar-toggle {
    display: inline-flex;
  }

  .horus-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1025;
    background: rgba(15, 12, 35, 0.55);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    animation: horus-fade-in 180ms ease both;
  }

  .horus-navbar {
    padding: 0 1rem;
  }

  .horus-content {
    padding: 1.25rem 1rem 1.65rem;
  }

  .horus-user-menu__name {
    display: none;
  }

  .horus-filter-card {
    padding: 0.75rem 0.85rem;
  }

  .horus-filter-card__grid {
    gap: 0.6rem 0.7rem;
  }

  .horus-filter-field {
    flex: 1 1 calc(50% - 0.7rem);
    max-width: none;
    min-width: calc(50% - 0.7rem);
  }

  .horus-filter-field--search,
  .horus-filter-field:has(.horus-search),
  .horus-filter-field:has(input[type="search"]),
  .horus-filter-field:has(input[name="search"]),
  .horus-filter-field:has(input[name="name"]),
  .horus-filter-field:has(input[name="employee"]) {
    flex: 1 1 100%;
    min-width: 100%;
    max-width: none;
  }

  .horus-filter-card__actions {
    margin-left: 0;
    flex: 1 1 100%;
    justify-content: flex-end;
  }

  .horus-filter-card__actions .btn {
    flex: 0 0 auto;
  }

  .horus-page-title {
    font-size: 1.45rem;
  }

  .horus-settings-layout {
    grid-template-columns: 1fr;
  }

  .horus-settings-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .horus-ops-hero {
    padding: 1.35rem 1.25rem;
  }

  .horus-quick-actions {
    grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
  }
}

@media (max-width: 767.98px) {
  .horus-filter-card__grid {
    gap: 0.55rem;
  }

  .horus-filter-field,
  .horus-filter-field--search,
  .horus-filter-field:has(.horus-search),
  .horus-filter-field:has(input[type="search"]),
  .horus-filter-field:has(input[name="search"]),
  .horus-filter-field:has(input[name="name"]),
  .horus-filter-field:has(input[name="employee"]) {
    flex: 1 1 100%;
    min-width: 100%;
    max-width: none;
  }

  .horus-filter-card__actions {
    width: 100%;
    margin-left: 0;
    justify-content: stretch;
  }

  .horus-filter-card__actions .btn {
    flex: 1 1 auto;
  }

  .horus-meta-list {
    grid-template-columns: 1fr;
    gap: 0.3rem 0;
  }

  .horus-live-context .horus-meta-list {
    grid-template-columns: minmax(5.5rem, 7rem) minmax(0, 1fr);
    gap: 0.5rem 0.65rem;
  }

  .horus-meta-list dt {
    margin-top: 0.5rem;
  }

  .horus-live-context .horus-meta-list dt {
    margin-top: 0;
  }

  .horus-meta-list dt:first-child {
    margin-top: 0;
  }

  .horus-page-title {
    font-size: 1.3rem;
  }

  .horus-stat-card__value {
    font-size: 1.25rem;
  }

  .horus-overview-stats .horus-stat-card__value {
    font-size: 0.98rem;
  }

  .horus-employee-grid {
    grid-template-columns: 1fr;
  }

  .horus-shot-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .horus-usage-bar-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

@media (max-width: 575.98px) {
  .horus-page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .horus-toolbar__actions {
    width: 100%;
  }

  .horus-toolbar__actions .btn {
    flex: 1;
  }

  .horus-toast-area {
    left: 1rem;
    right: 1rem;
    max-width: none;
  }
}

/* ========== Playful SaaS polish (template extensions) ========== */

.horus-shell,
.horus-main {
  z-index: 1;
}

.horus-sidebar__logo-wrap {
  display: contents;
}

.horus-sidebar__footer-pill {
  display: none;
}

.horus-navbar__greeting {
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
  line-height: 1.15;
}

.horus-navbar__eyebrow {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--horus-text-muted);
}

.horus-navbar__hello {
  font-family: var(--horus-font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--horus-text);
  letter-spacing: -0.02em;
}

.horus-ops-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
}

.horus-ops-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 0.55rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--horus-text-secondary);
}

.horus-ops-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.horus-empty__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.55;
  pointer-events: none;
}

.horus-empty__blob--a {
  width: 4.5rem;
  height: 4.5rem;
  top: -0.4rem;
  left: 0.2rem;
  background: color-mix(in srgb, var(--horus-accent) 45%, transparent);
}

.horus-empty__blob--b {
  width: 3.2rem;
  height: 3.2rem;
  top: 0.8rem;
  right: 0.1rem;
  background: color-mix(in srgb, var(--horus-purple) 40%, transparent);
}

.horus-empty__blob--c {
  width: 2.4rem;
  height: 2.4rem;
  bottom: 0;
  left: 2.8rem;
  background: color-mix(in srgb, var(--horus-orange) 35%, transparent);
}

.horus-avatar[data-tone="0"] {
  background: var(--horus-grad-purple);
  color: #3a2aa8;
}
.horus-avatar[data-tone="1"] {
  background: var(--horus-grad-blue);
  color: #2563eb;
}
.horus-avatar[data-tone="2"] {
  background: var(--horus-grad-gold);
  color: #b45309;
}
.horus-avatar[data-tone="3"] {
  background: var(--horus-grad-pink);
  color: #db2777;
}
.horus-avatar[data-tone="4"] {
  background: var(--horus-grad-purple);
  color: #5b45f6;
}
.horus-avatar[data-tone="5"] {
  background: var(--horus-grad-green);
  color: #15803d;
}

.horus-ring svg {
  width: 4.25rem;
  height: 4.25rem;
}

.horus-ring--sm svg {
  width: 3rem;
  height: 3rem;
}

.horus-ring--sm .horus-ring__label {
  font-size: 0.65rem;
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin-top: -0.15rem;
}

.horus-emp-widget__name {
  display: block;
  font-family: var(--horus-font-display);
  font-weight: 800;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  color: var(--horus-text);
  text-decoration: none;
}

.horus-emp-widget__name:hover {
  color: var(--horus-accent);
}

.horus-emp-widget__team {
  font-size: 0.78rem;
  color: var(--horus-text-muted);
}

.horus-emp-widget__k {
  color: var(--horus-text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 2.4rem;
}

.horus-emp-widget__activity {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--horus-success-soft);
  color: var(--horus-success);
  font-size: 0.72rem;
  font-weight: 700;
}

.horus-emp-widget__time {
  font-size: 0.75rem;
  color: var(--horus-text-muted);
}

.horus-emp-widget__spark {
  position: absolute;
  right: -0.15rem;
  bottom: -0.15rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: var(--horus-success);
  border: 2px solid var(--horus-surface-solid);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--horus-success) 45%, transparent);
  animation: horus-pulse 1.8s ease-out infinite;
}

.horus-emp-widget__avatar-wrap {
  position: relative;
}


.horus-ripple-host {
  position: relative;
  overflow: hidden;
}

.horus-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: horus-ripple 560ms ease-out forwards;
  pointer-events: none;
}

@keyframes horus-ripple {
  to {
    transform: scale(2.4);
    opacity: 0;
  }
}


.horus-footer__tag {
  font-size: 0.75rem;
  color: var(--horus-text-muted);
}

.horus-navbar {
  position: sticky;
  top: 0.75rem;
  z-index: 1020;
}


/* ========== Horus Logo Brand — ambient decorations ========== */

.horus-ambient__cloud {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  filter: blur(2px);
  opacity: 0.45;
  animation: horus-cloud-drift 22s ease-in-out infinite;
}

.horus-ambient__cloud--1 {
  width: 140px;
  height: 48px;
  top: 12%;
  right: 8%;
  box-shadow:
    -28px 8px 0 -6px rgba(255, 255, 255, 0.4),
    32px 10px 0 -8px rgba(255, 255, 255, 0.35);
}

.horus-ambient__cloud--2 {
  width: 110px;
  height: 38px;
  bottom: 18%;
  left: 12%;
  animation-delay: -8s;
  box-shadow:
    -22px 6px 0 -5px rgba(255, 255, 255, 0.35),
    26px 8px 0 -7px rgba(255, 255, 255, 0.3);
}

.horus-ambient__star {
  position: absolute;
  font-size: 0.85rem;
  color: color-mix(in srgb, var(--horus-brand-gold) 55%, transparent);
  opacity: 0.45;
  animation: horus-sparkle 5s ease-in-out infinite;
  pointer-events: none;
}

.horus-ambient__star--1 { top: 18%; left: 22%; animation-delay: 0s; }
.horus-ambient__star--2 { top: 62%; right: 18%; animation-delay: -2s; color: color-mix(in srgb, var(--horus-brand-purple-light) 60%, transparent); }
.horus-ambient__star--3 { bottom: 24%; right: 32%; animation-delay: -4s; font-size: 0.65rem; }

@keyframes horus-cloud-drift {
  0%, 100% { transform: translateX(0) translateY(0); }
  50% { transform: translateX(18px) translateY(-6px); }
}

@keyframes horus-sparkle {
  0%, 100% { opacity: 0.25; transform: scale(0.9) rotate(0deg); }
  50% { opacity: 0.7; transform: scale(1.15) rotate(12deg); }
}

.horus-sidebar__brand,
.horus-sidebar__nav,
.horus-sidebar__footer {
  position: relative;
  z-index: 1;
}

.horus-badge--accent {
  background: var(--horus-accent-subtle);
  color: var(--horus-brand-purple);
  box-shadow: 0 0 0 1px rgba(91, 69, 246, 0.12);
}

.horus-badge--success {
  background: var(--horus-success-soft);
  color: var(--horus-success);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.15);
}

.horus-badge--warning {
  background: var(--horus-gold-soft);
  color: #b45309;
}

.horus-outline-secondary,
.btn-outline-secondary {
  border-radius: 999px;
}

.btn-outline-danger,
.btn-danger-soft {
  border-radius: 999px;
  background: var(--horus-danger-soft);
  color: var(--horus-danger);
  border-color: transparent;
}

.horus-progress__bar {
  background: linear-gradient(90deg, var(--horus-brand-purple), var(--horus-brand-blue));
}

.horus-ring__value {
  stroke: var(--horus-brand-purple);
}

.horus-ops-hero {
  border: 1px solid color-mix(in srgb, var(--horus-brand-purple) 18%, var(--horus-border));
  box-shadow: var(--horus-card-shadow);
}

.horus-ops-hero::before {
  opacity: 0.82;
}

.horus-empty__blob--a {
  background: color-mix(in srgb, var(--horus-brand-purple) 45%, transparent);
}

.horus-empty__blob--b {
  background: color-mix(in srgb, var(--horus-brand-blue) 40%, transparent);
}

.horus-empty__blob--c {
  background: color-mix(in srgb, var(--horus-brand-gold) 35%, transparent);
}

.horus-table tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--horus-brand-light) 55%, var(--horus-surface-solid));
}

.horus-table tbody tr:hover td {
  background: color-mix(in srgb, var(--horus-brand-purple) 6%, var(--horus-surface-hover));
  box-shadow: 0 4px 14px rgba(91, 69, 246, 0.08);
}

.horus-notice {
  border-color: color-mix(in srgb, var(--horus-brand-blue) 28%, transparent);
  background: color-mix(in srgb, var(--horus-brand-blue) 8%, var(--horus-surface-solid));
}

.horus-notice .bi {
  color: var(--horus-brand-blue);
}

.horus-live-dot {
  color: var(--horus-success);
}

.horus-live-dot::before {
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--horus-success) 50%, transparent);
}

.horus-quick-action:hover {
  border-color: color-mix(in srgb, var(--horus-brand-purple) 30%, var(--horus-border));
}

.horus-emp-widget {
  border-color: color-mix(in srgb, var(--horus-brand-purple) 14%, var(--horus-border));
}

.horus-emp-widget:hover {
  border-color: color-mix(in srgb, var(--horus-brand-purple) 28%, var(--horus-border));
  box-shadow: var(--horus-card-shadow-hover);
}


/* ==========================================================================
   Premium dashboard shell — welcome, KPIs, rail, focus, navbar search
   ========================================================================== */

.horus-global-search {
  position: relative;
  flex: 1;
  max-width: 28rem;
  display: flex;
  align-items: center;
  align-self: center;
  min-height: 2.65rem;
  margin: 0;
  margin-inline-start: 0.5rem;
  padding: 0;
}

.horus-global-search__icon {
  position: absolute;
  inset-inline-start: 0.95rem;
  inset-inline-end: auto;
  top: 50%;
  transform: translateY(-50%);
  line-height: 1;
  color: var(--horus-text-muted);
  pointer-events: none;
  z-index: 1;
}

.horus-global-search__input {
  width: 100%;
  height: 2.65rem;
  min-height: 2.65rem;
  margin: 0;
  padding-block: 0;
  padding-inline-start: 2.55rem;
  padding-inline-end: 4.5rem;
  border: 1px solid var(--horus-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--horus-text);
  font-size: 0.9rem;
  line-height: 1.25;
  text-align: start;
  box-shadow: var(--horus-shadow-sm);
  transition: border-color var(--horus-ease-fast), box-shadow var(--horus-ease-fast);
}

.horus-global-search__input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--horus-brand-purple) 40%, var(--horus-border));
  box-shadow: var(--horus-focus-ring);
}

.horus-global-search__kbd {
  position: absolute;
  inset-inline-end: 0.7rem;
  inset-inline-start: auto;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.15rem 0.45rem;
  border-radius: 0.45rem;
  border: 1px solid var(--horus-border);
  background: var(--horus-surface-muted);
  color: var(--horus-text-muted);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
}

.horus-theme-pill {
  display: inline-flex;
  padding: 0.15rem;
  border-radius: 999px;
  background: var(--horus-surface-solid);
  border: 1px solid var(--horus-border);
  box-shadow: var(--horus-shadow-sm);
}

.horus-theme-pill__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--horus-text-secondary);
}

.horus-theme-pill__btn:hover {
  background: var(--horus-accent-subtle);
  color: var(--horus-brand-purple);
}

.horus-notify-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 999px;
  border: 1px solid var(--horus-border);
  background: var(--horus-surface-solid);
  color: var(--horus-text-secondary);
  box-shadow: var(--horus-shadow-sm);
  text-decoration: none;
}

.horus-notify-btn:hover {
  color: var(--horus-brand-purple);
  border-color: color-mix(in srgb, var(--horus-brand-purple) 25%, var(--horus-border));
}

.horus-notify-btn__dot {
  position: absolute;
  top: 0.45rem;
  inset-inline-end: 0.55rem;
  inset-inline-start: auto;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--horus-danger);
  box-shadow: 0 0 0 2px var(--horus-surface-solid);
}

.horus-profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 14rem;
  min-height: 2.55rem;
  padding-block: 0.2rem;
  padding-inline-start: 0.25rem;
  padding-inline-end: 0.7rem;
  border: 1px solid var(--horus-border);
  border-radius: 999px;
  background: var(--horus-surface-solid);
  color: var(--horus-text);
  box-shadow: var(--horus-shadow-sm);
}

.horus-profile-chip::after {
  margin-left: 0.1rem;
  opacity: 0.45;
}

.horus-profile-chip__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--horus-grad-purple);
  color: #3a2aa8;
  font-size: 0.7rem;
  font-weight: 800;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.horus-profile-chip__avatar--image {
  background: transparent;
  color: transparent;
  padding: 0;
}

.horus-profile-chip__avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.horus-profile-chip__meta {
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  min-width: 0;
}

.horus-profile-chip__name {
  font-size: 0.8rem;
  font-weight: 700;
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horus-profile-chip__role {
  font-size: 0.65rem;
  color: var(--horus-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.horus-dash {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 19.5rem;
  gap: 1.25rem;
  align-items: start;
}

.horus-dash__main {
  min-width: 0;
}

.horus-dash__rail {
  position: sticky;
  top: 4.5rem;
}

.horus-welcome {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.15rem;
  padding: 1.6rem 1.75rem;
  border-radius: var(--horus-radius-xl);
  border: 1px solid color-mix(in srgb, var(--horus-brand-blue) 18%, var(--horus-border));
  background:
    linear-gradient(135deg, rgba(157, 217, 255, 0.35), rgba(142, 125, 255, 0.12) 45%, rgba(255, 255, 255, 0.9)),
    var(--horus-surface-solid);
  box-shadow: var(--horus-card-shadow);
}

.horus-welcome__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.55rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--horus-text-secondary);
}

.horus-welcome__title {
  margin: 0;
  font-family: var(--horus-font-display);
  font-size: clamp(1.55rem, 2.2vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--horus-text);
  -webkit-text-fill-color: unset;
  background: none;
}

.horus-welcome__text {
  margin: 0.55rem 0 0;
  max-width: 34rem;
  color: var(--horus-text-secondary);
  font-size: 0.95rem;
}

.horus-welcome__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.1rem;
}

.horus-welcome__art {
  position: relative;
  width: min(220px, 40vw);
  height: 120px;
}

.horus-welcome__island {
  position: absolute;
  inset: 0;
  border-radius: 2rem;
  background: linear-gradient(180deg, rgba(157, 217, 255, 0.35), rgba(52, 211, 153, 0.25));
}

.horus-welcome__cloud {
  position: absolute;
  width: 48px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
}

.horus-welcome__cloud--a { top: 18%; left: 18%; }
.horus-welcome__cloud--b { top: 34%; right: 16%; width: 36px; }
.horus-welcome__palm { position: absolute; bottom: 18%; left: 28%; font-size: 1.8rem; }
.horus-welcome__sun { position: absolute; top: 10%; right: 18%; font-size: 1.35rem; }

.horus-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.15rem;
}

.horus-kpi {
  position: relative;
  overflow: hidden;
  padding: 1.1rem 1.15rem;
  border-radius: var(--horus-radius-lg);
  border: 1px solid var(--horus-border);
  background: var(--horus-surface-solid);
  box-shadow: var(--horus-card-shadow);
  transition: transform var(--horus-ease), box-shadow var(--horus-ease);
}

.horus-kpi:hover {
  transform: translateY(-4px);
  box-shadow: var(--horus-card-shadow-hover);
}

.horus-kpi__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.horus-kpi__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.9rem;
  font-size: 1.1rem;
}

.horus-kpi__label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--horus-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.horus-kpi__value {
  margin: 0.35rem 0 0;
  font-family: var(--horus-font-display);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--horus-text);
  line-height: 1;
}

.horus-kpi__meta {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  color: var(--horus-text-secondary);
}

.horus-kpi--purple {
  background: linear-gradient(160deg, rgba(91, 69, 246, 0.12), #fff 58%);
}
.horus-kpi--purple .horus-kpi__icon { background: var(--horus-grad-purple); color: #3a2aa8; }

.horus-kpi--green {
  background: linear-gradient(160deg, rgba(34, 197, 94, 0.12), #fff 58%);
}
.horus-kpi--green .horus-kpi__icon { background: var(--horus-grad-green); color: #15803d; }

.horus-kpi--blue {
  background: linear-gradient(160deg, rgba(87, 168, 255, 0.14), #fff 58%);
}
.horus-kpi--blue .horus-kpi__icon { background: var(--horus-grad-blue); color: #1d4ed8; }

.horus-kpi--orange {
  background: linear-gradient(160deg, rgba(255, 159, 28, 0.14), #fff 58%);
}
.horus-kpi--orange .horus-kpi__icon { background: var(--horus-grad-gold); color: #b45309; }

.horus-kpi--pink {
  background: linear-gradient(160deg, rgba(255, 143, 184, 0.16), #fff 58%);
}
.horus-kpi--pink .horus-kpi__icon { background: var(--horus-grad-pink); color: #be185d; }

.horus-rail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.horus-rail__panel {
  padding: 1rem 1.05rem;
  border-radius: var(--horus-radius-lg);
  border: 1px solid var(--horus-border);
  background: var(--horus-surface-solid);
  box-shadow: var(--horus-card-shadow);
}

.horus-rail__panel--soft {
  background: linear-gradient(180deg, rgba(246, 249, 255, 0.95), #fff);
}

.horus-rail__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.horus-rail__empty {
  text-align: center;
  padding: 1rem 0.5rem 0.35rem;
}

.horus-rail__illus {
  font-size: 2rem;
  margin-bottom: 0.35rem;
}

.horus-live-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.horus-live-list__link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.45rem;
  border-radius: var(--horus-radius-sm);
  color: inherit;
  text-decoration: none;
  transition: background var(--horus-ease-fast);
}

.horus-live-list__link:hover {
  background: var(--horus-surface-muted);
  color: inherit;
}

.horus-live-list__name {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--horus-text);
}

.horus-live-list__job {
  display: block;
  font-size: 0.72rem;
  color: var(--horus-text-muted);
}

.horus-rail__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.horus-rail__action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.35rem;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--horus-border);
  background: #fff;
  color: var(--horus-text-secondary);
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
}

.horus-rail__action:hover {
  color: var(--horus-brand-purple);
  border-color: color-mix(in srgb, var(--horus-brand-purple) 28%, var(--horus-border));
  background: var(--horus-accent-subtle);
}

.horus-focus-card {
  position: relative;
  overflow: hidden;
  padding: 1.2rem 1.15rem 1.15rem;
  border-radius: var(--horus-radius-xl);
  background: linear-gradient(145deg, #6d5ef7 0%, #5b45f6 45%, #3a2aa8 100%);
  color: #fff;
  box-shadow: 0 16px 36px rgba(91, 69, 246, 0.28);
}

.horus-focus-card__art {
  position: absolute;
  right: -0.5rem;
  top: -0.35rem;
  width: 5rem;
  height: 5rem;
  opacity: 0.9;
}

.horus-focus-card__orb {
  position: absolute;
  inset: 0.6rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.horus-focus-card__bird {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
}

.horus-focus-card__eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}

.horus-focus-card__timer {
  margin: 0.45rem 0 0;
  font-family: var(--horus-font-display);
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.horus-focus-card__hint {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  opacity: 0.85;
}

.horus-focus-card__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.horus-focus-card .btn-light {
  border-radius: 999px;
  font-weight: 700;
}

.horus-focus-card .btn-outline-light {
  border-radius: 999px;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 1399.98px) {
  .horus-dash {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1199.98px) {
  .horus-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .horus-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .horus-welcome {
    padding: 1.25rem;
  }
}


@media (max-width: 1399.98px) {
  .horus-dash__rail {
    display: none;
  }
}



/* ==========================================================================
   Full-width workspace forms (Create / Edit / Details / Settings)
   ========================================================================== */

.horus-content {
  padding-left: clamp(1.5rem, 2.5vw, 2.5rem);
  padding-right: clamp(1.5rem, 2.5vw, 2.5rem);
}

.horus-panel.horus-card,
.horus-workspace.horus-card,
form.horus-panel,
form.horus-workspace {
  border-radius: 1.75rem;
  box-shadow: var(--horus-card-shadow);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 249, 255, 0.94) 100%);
}

[data-bs-theme="dark"] .horus-panel.horus-card,
[data-bs-theme="dark"] .horus-workspace.horus-card,
[data-bs-theme="dark"] form.horus-panel,
[data-bs-theme="dark"] form.horus-workspace {
  background: var(--horus-grad-card);
}

.horus-form-section {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin: 0 0 1.5rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--horus-border);
  flex: 1;
  min-width: 0;
}

.horus-form-section-break {
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--horus-border);
}

.horus-form-section:last-of-type {
  margin-bottom: 0.5rem;
}

.horus-form-section__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.85rem;
  height: 2.85rem;
  flex-shrink: 0;
  border-radius: 1rem;
  background: var(--horus-grad-purple);
  color: #3a2aa8;
  font-size: 1.2rem;
  box-shadow: 0 8px 20px rgba(91, 69, 246, 0.18);
}

.horus-form-section__body {
  min-width: 0;
}

.horus-form-section__title {
  margin: 0;
  font-family: var(--horus-font-display);
  font-size: clamp(1.25rem, 1.5vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--horus-text);
  line-height: 1.4;
  padding-block: 0.06em 0.1em;
  overflow: visible;
}

.horus-form-section__desc {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--horus-text-muted);
  line-height: 1.45;
}

.horus-panel .horus-panel-header {
  padding: 1.5rem 2.15rem;
  background: linear-gradient(180deg, rgba(91, 69, 246, 0.04), transparent);
}

.horus-panel .horus-panel-body,
.horus-workspace .horus-panel-body {
  padding: 2rem 2.15rem 2.25rem;
}

.horus-panel .row.g-3,
.horus-workspace .row.g-3 {
  --bs-gutter-x: 1.35rem;
  --bs-gutter-y: 1.35rem;
}

.horus-panel .horus-control,
.horus-workspace .horus-control,
.horus-settings-layout .horus-control {
  height: 3.35rem;
  min-height: 3.35rem;
  padding: 0.65rem 1.1rem;
  border-radius: 1.05rem;
  font-size: 1rem;
  color: var(--horus-text);
  background: var(--horus-bg-elevated);
  border-color: var(--horus-border);
  -webkit-text-fill-color: var(--horus-text);
  color-scheme: light dark;
}

.horus-panel .form-select.horus-control,
.horus-workspace .form-select.horus-control,
.horus-settings-layout .form-select.horus-control {
  padding-inline-end: 2.5rem;
  background-color: var(--horus-bg-elevated);
  background-position: right 1rem center;
  color: var(--horus-text);
  -webkit-text-fill-color: var(--horus-text);
}

html[dir="rtl"] .horus-panel .form-select.horus-control,
html[dir="rtl"] .horus-workspace .form-select.horus-control,
html[dir="rtl"] .horus-settings-layout .form-select.horus-control {
  background-position: left 1rem center;
}

.horus-panel .horus-control::placeholder,
.horus-workspace .horus-control::placeholder {
  color: var(--horus-text-muted);
  -webkit-text-fill-color: var(--horus-text-muted);
  font-size: 0.95rem;
  opacity: 1;
}

.horus-panel .horus-control:focus,
.horus-workspace .horus-control:focus,
.horus-settings-layout .horus-control:focus {
  border-color: var(--horus-brand-purple);
  box-shadow: 0 0 0 4px rgba(91, 69, 246, 0.18);
  background: var(--horus-surface-solid);
  color: var(--horus-text);
  -webkit-text-fill-color: var(--horus-text);
}

.horus-panel .horus-control:disabled,
.horus-workspace .horus-control:disabled,
.horus-settings-layout .horus-control:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  background: var(--horus-surface-muted);
  color: var(--horus-text-muted);
  -webkit-text-fill-color: var(--horus-text-muted);
}

[data-bs-theme="dark"] .horus-panel .horus-control,
[data-bs-theme="dark"] .horus-workspace .horus-control,
[data-bs-theme="dark"] .horus-settings-layout .horus-control,
[data-bs-theme="dark"] .horus-panel .form-select.horus-control,
[data-bs-theme="dark"] .horus-workspace .form-select.horus-control,
[data-bs-theme="dark"] .horus-settings-layout .form-select.horus-control,
[data-bs-theme="dark"] .horus-control,
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  color: var(--horus-text);
  -webkit-text-fill-color: var(--horus-text);
  background-color: var(--horus-surface-muted);
  border-color: var(--horus-border);
}

[data-bs-theme="dark"] .horus-panel .horus-control:focus,
[data-bs-theme="dark"] .horus-workspace .horus-control:focus,
[data-bs-theme="dark"] .horus-settings-layout .horus-control:focus,
[data-bs-theme="dark"] .horus-control:focus,
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
  background-color: var(--horus-surface-solid);
  color: var(--horus-text);
  -webkit-text-fill-color: var(--horus-text);
  border-color: var(--horus-accent);
}

[data-bs-theme="dark"] .horus-panel .horus-control option,
[data-bs-theme="dark"] .horus-workspace .horus-control option,
[data-bs-theme="dark"] .form-select option {
  background-color: var(--horus-surface-solid);
  color: var(--horus-text);
}

[data-bs-theme="dark"] input[type="time"].horus-control,
[data-bs-theme="dark"] input[type="date"].horus-control,
[data-bs-theme="dark"] input.flatpickr-input.horus-control {
  color-scheme: dark;
}

.horus-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--horus-border);
}

.horus-action-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  width: 100%;
}

.horus-action-row__form {
  display: flex;
  min-width: 0;
  width: 100%;
}

.horus-action-row__form .horus-action-row__btn {
  flex: 1 1 auto;
}

.horus-action-row__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 3.1rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.horus-action-row__btn .bi {
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.horus-action-row__btn span {
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 767.98px) {
  .horus-action-row {
    grid-template-columns: 1fr;
  }
}

.horus-panel .horus-form-actions .btn,
.horus-workspace .horus-form-actions .btn,
.horus-panel-body > .d-flex.gap-2.mt-4 .btn,
.horus-panel-body > .d-flex.gap-2:last-child .btn,
.horus-action-row .btn {
  min-height: 3.1rem;
  padding: 0.7rem 1.45rem;
  border-radius: 999px;
  font-size: 0.975rem;
  font-weight: 700;
}

.horus-panel .btn-primary,
.horus-workspace .btn-primary,
.horus-form-actions .btn-primary,
.horus-action-row .btn-primary {
  background-image: var(--horus-grad-primary);
  box-shadow: 0 10px 28px rgba(91, 69, 246, 0.28);
}

.horus-panel .btn-outline-secondary,
.horus-workspace .btn-outline-secondary,
.horus-form-actions .btn-outline-secondary,
.horus-action-row .btn-outline-secondary {
  background: var(--horus-surface-solid);
  border-width: 1.5px;
  border-color: var(--horus-border-strong);
  color: var(--horus-text);
  --bs-btn-color: var(--horus-text);
  --bs-btn-border-color: var(--horus-border-strong);
  --bs-btn-hover-color: var(--horus-text);
  --bs-btn-hover-bg: var(--horus-surface-hover);
  --bs-btn-hover-border-color: var(--horus-border-strong);
}

[data-bs-theme="dark"] .horus-panel .btn-outline-secondary,
[data-bs-theme="dark"] .horus-workspace .btn-outline-secondary,
[data-bs-theme="dark"] .horus-form-actions .btn-outline-secondary,
[data-bs-theme="dark"] .horus-action-row .btn-outline-secondary,
[data-bs-theme="dark"] .horus-filter-card__actions .btn-outline-secondary {
  background: var(--horus-surface-muted);
  border-color: var(--horus-border-strong);
  color: var(--horus-text);
  --bs-btn-color: var(--horus-text);
  --bs-btn-hover-color: var(--horus-text);
  --bs-btn-hover-bg: var(--horus-surface-hover);
  --bs-btn-hover-border-color: color-mix(in srgb, var(--horus-accent) 45%, var(--horus-border-strong));
}

[data-bs-theme="dark"] .horus-panel .btn-outline-secondary:hover,
[data-bs-theme="dark"] .horus-workspace .btn-outline-secondary:hover,
[data-bs-theme="dark"] .horus-form-actions .btn-outline-secondary:hover,
[data-bs-theme="dark"] .horus-action-row .btn-outline-secondary:hover,
[data-bs-theme="dark"] .horus-filter-card__actions .btn-outline-secondary:hover {
  background: var(--horus-surface-hover);
  color: var(--horus-text);
}

.horus-meta-list {
  grid-template-columns: minmax(6.5rem, 9rem) minmax(0, 1fr);
  gap: 0.65rem 0.85rem;
  align-items: start;
}

.horus-meta-list > dt {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--horus-text-muted);
  padding-top: 0.45rem;
  line-height: 1.3;
}

.horus-meta-list > dd {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--horus-text);
  padding: 0.4rem 0.7rem;
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--horus-surface-muted) 80%, transparent);
  border: 1px solid var(--horus-border);
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.horus-live-context .horus-meta-list {
  grid-template-columns: minmax(5.75rem, 7.5rem) minmax(0, 1fr);
  gap: 0.55rem 0.75rem;
}

.horus-live-context .horus-meta-list > dt {
  font-size: 0.72rem;
  padding-top: 0.4rem;
}

.horus-live-context .horus-meta-list > dd {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.35rem 0.6rem;
  border-radius: 0.55rem;
}

.horus-live-context .horus-meta-list > dd .horus-status-pill {
  font-size: 0.75rem;
}

@media (min-width: 992px) {
  .horus-meta-list {
    grid-template-columns: minmax(7.5rem, 11rem) minmax(0, 1fr) minmax(7.5rem, 11rem) minmax(0, 1fr);
  }

  .horus-live-context .horus-meta-list {
    grid-template-columns: minmax(5.75rem, 7.5rem) minmax(0, 1fr);
  }
}

.horus-settings-layout {
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 1.5rem;
}

.horus-settings-layout > div > .horus-card,
.horus-settings-layout > div > form.horus-panel {
  width: 100%;
  max-width: none;
}

.horus-field-narrow {
  max-width: 36rem;
}

@media (max-width: 991.98px) {
  .horus-panel .horus-panel-body,
  .horus-workspace .horus-panel-body,
  .horus-panel .horus-panel-header {
    padding-left: 1.35rem;
    padding-right: 1.35rem;
  }

  .horus-meta-list {
    grid-template-columns: minmax(7rem, 9.5rem) minmax(0, 1fr);
  }

  .horus-live-context .horus-meta-list {
    grid-template-columns: minmax(5.5rem, 7rem) minmax(0, 1fr);
    gap: 0.5rem 0.65rem;
  }
}

@media (max-width: 575.98px) {
  .horus-form-section {
    gap: 0.75rem;
  }

  .horus-form-section__icon {
    width: 2.45rem;
    height: 2.45rem;
    font-size: 1.05rem;
  }

  .horus-meta-list {
    grid-template-columns: 1fr;
  }

  .horus-meta-list > dt {
    padding-top: 0;
    margin-bottom: -0.55rem;
  }

  .horus-live-context .horus-meta-list {
    grid-template-columns: minmax(5.25rem, 6.5rem) minmax(0, 1fr);
    gap: 0.45rem 0.55rem;
  }

  .horus-live-context .horus-meta-list > dt {
    margin: 0;
    padding-top: 0.35rem;
    margin-bottom: 0;
  }
}

/* ========== Language switcher ========== */

.horus-lang-switcher__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.55rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--horus-border);
  border-radius: 999px;
  background: var(--horus-surface-solid);
  color: var(--horus-text);
  font-family: var(--horus-font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: var(--horus-shadow-sm);
  transition:
    background var(--horus-ease-fast),
    border-color var(--horus-ease-fast),
    transform var(--horus-ease-fast);
}

.horus-lang-switcher__btn:hover,
.horus-lang-switcher__btn:focus-visible {
  background: var(--horus-surface-muted);
  border-color: var(--horus-border-strong);
  color: var(--horus-text);
}

.horus-lang-switcher__btn::after {
  margin-inline-start: 0.15rem;
}

.horus-lang-switcher__flag {
  font-size: 1rem;
  line-height: 1;
}

.horus-lang-switcher__code {
  min-width: 1.4rem;
}

.horus-lang-switcher__item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
}

.horus-lang-switcher__item.active {
  color: var(--horus-brand-purple);
  background: color-mix(in srgb, var(--horus-brand-purple) 10%, transparent);
}

.horus-auth .horus-lang-switcher__btn {
  background: color-mix(in srgb, var(--horus-surface-solid) 88%, transparent);
  backdrop-filter: blur(10px);
}

/* ========== RTL / LTR (single codebase) ========== */

html[dir="rtl"],
.horus-rtl {
  --horus-font-display: var(--horus-font-rtl);
  --horus-font-body: var(--horus-font-rtl);
}

html[dir="ltr"] {
  --horus-font-display: var(--horus-font-ltr-display);
  --horus-font-body: var(--horus-font-ltr-body);
}

html[dir="rtl"] body,
.horus-rtl {
  font-family: var(--horus-font-rtl);
  text-align: start;
  line-height: 1.75;
  font-size: 1.02rem;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Arabic/Kurdish: prevent glyph clipping from tight Latin tracking + line-height. */
html[dir="rtl"] .horus-page-title,
html[dir="rtl"] .horus-auth__title,
html[dir="rtl"] .horus-empty__title,
html[dir="rtl"] .horus-section-title,
html[dir="rtl"] .horus-chart-card__title,
html[dir="rtl"] .horus-panel-title,
html[dir="rtl"] .horus-card-title,
html[dir="rtl"] .horus-form-section__title,
html[dir="rtl"] .horus-sidebar__brand-text,
html[dir="rtl"] .horus-auth__brand-text,
html[dir="rtl"] .horus-stat-card__value,
html[dir="rtl"] .horus-ops-hero .horus-page-title {
  letter-spacing: 0 !important;
  line-height: 1.55 !important;
  padding-block: 0.18em 0.24em;
  overflow: visible !important;
  font-weight: 700;
}

html[dir="rtl"] .horus-chart-card__header .horus-chart-card__title,
html[dir="rtl"] .horus-chart-card__header .horus-section-meta {
  padding-block: 0.08em 0.12em;
}

/* Direct-child titles: restore card top padding (RTL glyph rule shrinks padding-block). */
html[dir="rtl"] .horus-chart-card > .horus-chart-card__title {
  margin-top: 0.35rem;
  padding-block: 1.55rem 0.55rem;
  padding-inline: 1.35rem;
}

html[dir="rtl"] .horus-chart-card__header {
  padding-block: 1.25rem 0.45rem;
  padding-top: 1.35rem;
}

html[dir="rtl"] .horus-dash-range__chips {
  margin-inline-start: 0;
  margin-inline-end: 0;
}

html[dir="rtl"] .horus-page-subtitle,
html[dir="rtl"] .horus-section-meta,
html[dir="rtl"] .horus-empty__text,
html[dir="rtl"] .horus-auth__subtitle,
html[dir="rtl"] .horus-page-header p,
html[dir="rtl"] .horus-form-help,
html[dir="rtl"] .horus-stat-card__label,
html[dir="rtl"] .horus-stat-card__meta {
  letter-spacing: 0;
  line-height: 1.9;
  overflow: visible;
  padding-bottom: 0.25em;
  font-weight: 500;
}

html[dir="rtl"] .horus-page-header,
html[dir="rtl"] .horus-page-header > div,
html[dir="rtl"] .horus-ops-hero,
html[dir="rtl"] .horus-table-wrap__header,
html[dir="rtl"] .horus-panel-header,
html[dir="rtl"] .horus-empty,
html[dir="rtl"] .horus-content {
  overflow: visible;
}

html[dir="rtl"] .horus-nav-link,
html[dir="rtl"] .horus-settings-nav__link,
html[dir="rtl"] .dropdown-item,
html[dir="rtl"] .horus-form-label,
html[dir="rtl"] .btn,
html[dir="rtl"] .horus-profile-chip__name,
html[dir="rtl"] .horus-sidebar__org-label {
  letter-spacing: 0;
  line-height: 1.55;
}

/* ----- Auth card: Arabic/RTL polish (keep navbar brand) ----- */
html[dir="rtl"] .horus-auth__card {
  max-width: 34rem;
  padding: 0 0 2.25rem;
}

html[dir="rtl"] .horus-auth__brand {
  flex-direction: row;
  gap: 0.85rem;
  margin-bottom: 0;
}

html[dir="rtl"] .horus-auth__logo {
  width: 4rem;
  height: 4rem;
}

html[dir="rtl"] .horus-auth__brand-text {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.35;
}

html[dir="rtl"] .horus-auth__header {
  margin-bottom: 2rem;
  padding-top: 1.65rem;
}

html[dir="rtl"] .horus-auth__title {
  font-size: clamp(1.95rem, 4vw, 2.35rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--horus-brand-purple-deep), var(--horus-brand-purple), var(--horus-brand-blue));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

html[dir="rtl"] .horus-auth__subtitle {
  margin-top: 0.75rem;
  font-size: 1.08rem;
  max-width: 22rem;
  margin-inline: auto;
  color: var(--horus-text-secondary);
  -webkit-text-fill-color: var(--horus-text-secondary);
}

html[dir="rtl"] .horus-auth__form {
  gap: 1.4rem;
  text-align: start;
}

html[dir="rtl"] .horus-auth .horus-form-label {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
}

html[dir="rtl"] .horus-auth .horus-control,
html[dir="rtl"] .horus-auth .form-control {
  --horus-auth-control-h: 3.65rem;
  height: var(--horus-auth-control-h);
  min-height: var(--horus-auth-control-h);
  font-size: 1.05rem;
  padding-inline: 1.2rem;
}

html[dir="rtl"] .horus-auth .horus-control:not(.horus-control--ltr):not([type="email"]):not([name="username"]) {
  text-align: start;
}

html[dir="rtl"] .horus-auth__submit {
  margin-top: 0.55rem;
  min-height: 3.65rem;
  font-size: 1.12rem;
  font-weight: 700;
}

html[dir="rtl"] .horus-auth__hint {
  margin-top: 1.65rem;
  font-size: 0.9rem;
}

html[dir="rtl"] .horus-auth__hint summary {
  font-weight: 600;
}

html[dir="rtl"] .horus-auth__hint p[dir="ltr"] {
  direction: ltr;
  unicode-bidi: isolate;
  justify-content: center;
}

html[dir="rtl"] .horus-sidebar__brand {
  gap: 0.85rem;
}

html[dir="rtl"] .horus-sidebar__brand-text {
  font-size: 1.85rem;
  font-weight: 700;
}

html[dir="rtl"] .horus-sidebar__org-label {
  font-weight: 600;
  line-height: 1.45;
}

html[dir="rtl"] .horus-global-search__input {
  text-align: start;
}

/* Forms / tables / search across the app */
html[dir="rtl"] .horus-form-label {
  font-weight: 700;
}

html[dir="rtl"] .horus-control:not(.horus-control--ltr):not([type="email"]):not([type="url"]):not([type="tel"]):not([name="username"]) {
  text-align: start;
}

html[dir="rtl"] code,
html[dir="rtl"] .horus-mono,
html[dir="rtl"] kbd {
  direction: ltr;
  unicode-bidi: isolate;
  letter-spacing: 0;
}

/* Sidebar stays on the inline-start edge in both directions (left in LTR, right in RTL).
 * Only adjust shadow/drip so they cast toward the content area. */
html[dir="rtl"] .horus-sidebar {
  box-shadow: none;
}

html[dir="rtl"] .horus-sidebar__drip {
  transform: scaleX(-1);
  transform-origin: center;
  filter: drop-shadow(-10px 0 18px rgba(42, 38, 128, 0.28));
}

html[dir="rtl"] .horus-nav-link i,
html[dir="rtl"] .horus-settings-nav__link i {
  margin-inline-end: 0;
}

html[dir="rtl"] .horus-breadcrumb,
html[dir="rtl"] .breadcrumb {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

html[dir="rtl"] .horus-pagination,
html[dir="rtl"] .pagination {
  direction: rtl;
}

/*
 * App loads LTR bootstrap.css with html[dir=rtl]. Bootstrap btn-group rounds
 * physical left/right on :first-child/:last-child, so outer corners become
 * inner in RTL. Zero all, then restore outer corners for the mirrored flex order.
 */
html[dir="rtl"] .btn-group > .btn {
  border-radius: 0;
}

html[dir="rtl"] .btn-group > .btn:first-child {
  border-top-right-radius: var(--bs-border-radius);
  border-bottom-right-radius: var(--bs-border-radius);
}

html[dir="rtl"] .btn-group > .btn:last-child {
  border-top-left-radius: var(--bs-border-radius);
  border-bottom-left-radius: var(--bs-border-radius);
}

html[dir="rtl"] .btn-group > .btn:only-child {
  border-radius: var(--bs-border-radius);
}

html[dir="rtl"] .btn-group > .btn-sm:first-child,
html[dir="rtl"] .btn-group-sm > .btn:first-child {
  border-top-right-radius: var(--bs-border-radius-sm);
  border-bottom-right-radius: var(--bs-border-radius-sm);
}

html[dir="rtl"] .btn-group > .btn-sm:last-child,
html[dir="rtl"] .btn-group-sm > .btn:last-child {
  border-top-left-radius: var(--bs-border-radius-sm);
  border-bottom-left-radius: var(--bs-border-radius-sm);
}

html[dir="rtl"] .btn-group > .btn-sm:only-child,
html[dir="rtl"] .btn-group-sm > .btn:only-child {
  border-radius: var(--bs-border-radius-sm);
}

html[dir="rtl"] .btn-group > :not(.btn-check) + .btn,
html[dir="rtl"] .btn-group > .btn-group:not(:first-child) {
  margin-left: 0;
  margin-right: calc(var(--bs-border-width, 1px) * -1);
}

/*
 * LTR bootstrap.css + html[dir=rtl]: flex mirrors children, but Bootstrap still
 * rounds physical left/right from DOM order. Restore outer corners only on the
 * first/last children (visual right/left after mirroring); leave middles square.
 */
html[dir="rtl"] .input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
  margin-left: 0;
  margin-right: calc(var(--bs-border-width, 1px) * -1);
}

html[dir="rtl"] .input-group:not(.has-validation) > :first-child:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating),
html[dir="rtl"] .input-group:not(.has-validation) > .dropdown-toggle:first-child:nth-last-child(n + 3),
html[dir="rtl"] .input-group:not(.has-validation) > .form-floating:first-child:not(:last-child) > .form-control,
html[dir="rtl"] .input-group:not(.has-validation) > .form-floating:first-child:not(:last-child) > .form-select {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: var(--bs-border-radius, 0.375rem);
  border-bottom-right-radius: var(--bs-border-radius, 0.375rem);
}

html[dir="rtl"] .input-group > :last-child:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-top-left-radius: var(--bs-border-radius, 0.375rem);
  border-bottom-left-radius: var(--bs-border-radius, 0.375rem);
}

html[dir="rtl"] .input-group > .form-floating:last-child:not(:first-child) > .form-control,
html[dir="rtl"] .input-group > .form-floating:last-child:not(:first-child) > .form-select {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-top-left-radius: var(--bs-border-radius, 0.375rem);
  border-bottom-left-radius: var(--bs-border-radius, 0.375rem);
}

html[dir="rtl"] .input-group:not(.has-validation) > :first-child:last-child,
html[dir="rtl"] .input-group > :first-child:last-child {
  border-radius: var(--bs-border-radius, 0.375rem);
}

html[dir="rtl"] .input-group-sm:not(.has-validation) > :first-child:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating),
html[dir="rtl"] .input-group-sm:not(.has-validation) > .form-floating:first-child:not(:last-child) > .form-control,
html[dir="rtl"] .input-group-sm:not(.has-validation) > .form-floating:first-child:not(:last-child) > .form-select {
  border-top-right-radius: var(--bs-border-radius-sm, 0.25rem);
  border-bottom-right-radius: var(--bs-border-radius-sm, 0.25rem);
}

html[dir="rtl"] .input-group-sm > :last-child:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
  border-top-left-radius: var(--bs-border-radius-sm, 0.25rem);
  border-bottom-left-radius: var(--bs-border-radius-sm, 0.25rem);
}

html[dir="rtl"] .input-group-lg:not(.has-validation) > :first-child:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating),
html[dir="rtl"] .input-group-lg:not(.has-validation) > .form-floating:first-child:not(:last-child) > .form-control,
html[dir="rtl"] .input-group-lg:not(.has-validation) > .form-floating:first-child:not(:last-child) > .form-select {
  border-top-right-radius: var(--bs-border-radius-lg, 0.5rem);
  border-bottom-right-radius: var(--bs-border-radius-lg, 0.5rem);
}

html[dir="rtl"] .input-group-lg > :last-child:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
  border-top-left-radius: var(--bs-border-radius-lg, 0.5rem);
  border-bottom-left-radius: var(--bs-border-radius-lg, 0.5rem);
}

html[dir="rtl"] .horus-table th,
html[dir="rtl"] .horus-table td,
html[dir="rtl"] table th,
html[dir="rtl"] table td {
  text-align: start;
}

html[dir="rtl"] .modal-header .btn-close {
  margin: calc(-0.5 * var(--bs-modal-header-padding-y)) auto
    calc(-0.5 * var(--bs-modal-header-padding-y))
    calc(-0.5 * var(--bs-modal-header-padding-x));
}

html[dir="rtl"] .form-check {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding-inline: 0;
  min-height: 0;
}

html[dir="rtl"] .form-check .form-check-input {
  float: none;
  margin: 0;
  flex: 0 0 auto;
  order: 2;
}

html[dir="rtl"] .form-check .form-check-label {
  flex: 0 1 auto;
  order: 1;
  text-align: start;
  line-height: 1.55;
}

html[dir="rtl"] .horus-filter-card__grid,
html[dir="rtl"] .horus-page-header,
html[dir="rtl"] .horus-navbar__actions {
  direction: rtl;
}

@media (max-width: 991.98px) {
  html[dir="rtl"] .horus-sidebar {
    /* Keep drawer on inline-start (right); slide in from that edge. */
    inset: 0 0 auto auto;
    left: auto;
    right: 0;
    transform: translateX(calc(100% + 2rem));
  }

  html[dir="rtl"] .horus-sidebar.is-open {
    transform: translateX(0);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.25);
  }
}

/* ========== Dark mode — professional contrast ========== */

[data-bs-theme="dark"] .horus-global-search__input {
  background: color-mix(in srgb, var(--horus-surface-solid) 92%, transparent);
  color: var(--horus-text);
  border-color: var(--horus-border-strong);
}

[data-bs-theme="dark"] .horus-global-search__input::placeholder {
  color: var(--horus-text-muted);
  opacity: 1;
}

[data-bs-theme="dark"] .horus-global-search__icon,
[data-bs-theme="dark"] .horus-global-search__kbd {
  color: var(--horus-text-muted);
}

[data-bs-theme="dark"] .horus-welcome {
  border-color: color-mix(in srgb, var(--horus-accent) 28%, var(--horus-border));
  background:
    linear-gradient(135deg, rgba(168, 155, 255, 0.22), rgba(142, 197, 255, 0.1) 48%, rgba(28, 24, 52, 0.96)),
    var(--horus-surface-solid);
}

[data-bs-theme="dark"] .horus-welcome__eyebrow,
[data-bs-theme="dark"] .horus-welcome__text {
  color: var(--horus-text-secondary);
}

[data-bs-theme="dark"] .horus-welcome__title {
  color: var(--horus-text);
}

[data-bs-theme="dark"] .horus-welcome__island {
  background: linear-gradient(180deg, rgba(168, 155, 255, 0.28), rgba(94, 233, 138, 0.14));
}

[data-bs-theme="dark"] .horus-welcome__cloud {
  background: rgba(255, 255, 255, 0.22);
}

[data-bs-theme="dark"] .horus-kpi {
  border-color: var(--horus-border);
  color: var(--horus-text);
  box-shadow: var(--horus-card-shadow);
}

[data-bs-theme="dark"] .horus-kpi__label {
  color: var(--horus-text-muted);
}

[data-bs-theme="dark"] .horus-kpi__value {
  color: var(--horus-text);
}

[data-bs-theme="dark"] .horus-kpi__meta {
  color: var(--horus-text-secondary);
}

[data-bs-theme="dark"] .horus-kpi--purple {
  background: linear-gradient(160deg, rgba(168, 155, 255, 0.22), var(--horus-surface-solid) 62%);
}

[data-bs-theme="dark"] .horus-kpi--green {
  background: linear-gradient(160deg, rgba(94, 233, 138, 0.16), var(--horus-surface-solid) 62%);
}

[data-bs-theme="dark"] .horus-kpi--blue {
  background: linear-gradient(160deg, rgba(142, 197, 255, 0.18), var(--horus-surface-solid) 62%);
}

[data-bs-theme="dark"] .horus-kpi--orange {
  background: linear-gradient(160deg, rgba(255, 189, 92, 0.16), var(--horus-surface-solid) 62%);
}

[data-bs-theme="dark"] .horus-kpi--pink {
  background: linear-gradient(160deg, rgba(255, 176, 208, 0.16), var(--horus-surface-solid) 62%);
}

[data-bs-theme="dark"] .horus-kpi--purple .horus-kpi__icon,
[data-bs-theme="dark"] .horus-kpi--green .horus-kpi__icon,
[data-bs-theme="dark"] .horus-kpi--blue .horus-kpi__icon,
[data-bs-theme="dark"] .horus-kpi--orange .horus-kpi__icon,
[data-bs-theme="dark"] .horus-kpi--pink .horus-kpi__icon {
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

[data-bs-theme="dark"] .horus-kpi--purple .horus-kpi__icon { background: linear-gradient(135deg, #8e7dff, #5b45f6); }
[data-bs-theme="dark"] .horus-kpi--green .horus-kpi__icon { background: linear-gradient(135deg, #4ade80, #16a34a); }
[data-bs-theme="dark"] .horus-kpi--blue .horus-kpi__icon { background: linear-gradient(135deg, #7ab8ff, #3b82f6); }
[data-bs-theme="dark"] .horus-kpi--orange .horus-kpi__icon { background: linear-gradient(135deg, #ffc84a, #f59e0b); }
[data-bs-theme="dark"] .horus-kpi--pink .horus-kpi__icon { background: linear-gradient(135deg, #ff8fb8, #ec4899); }

[data-bs-theme="dark"] .horus-rail__panel--soft {
  background: linear-gradient(180deg, rgba(42, 37, 80, 0.95), var(--horus-surface-solid));
  border-color: var(--horus-border);
  color: var(--horus-text);
}

[data-bs-theme="dark"] .horus-rail__panel {
  background: var(--horus-surface-solid);
  color: var(--horus-text);
}

[data-bs-theme="dark"] .horus-rail__action {
  background: color-mix(in srgb, var(--horus-surface-muted) 80%, transparent);
  color: var(--horus-text);
  border-color: var(--horus-border);
}

[data-bs-theme="dark"] .horus-rail__action:hover {
  background: var(--horus-surface-hover);
  color: var(--horus-text);
}

[data-bs-theme="dark"] .horus-stat-card--teal,
[data-bs-theme="dark"] .horus-stat-card--blue,
[data-bs-theme="dark"] .horus-stat-card--purple,
[data-bs-theme="dark"] .horus-stat-card--orange,
[data-bs-theme="dark"] .horus-stat-card--pink,
[data-bs-theme="dark"] .horus-stat-card--green {
  background: linear-gradient(145deg, color-mix(in srgb, var(--horus-accent) 14%, var(--horus-surface-solid)), var(--horus-surface-solid));
}

[data-bs-theme="dark"] .horus-stat-card__label {
  color: var(--horus-text-muted);
}

[data-bs-theme="dark"] .horus-stat-card__value {
  color: var(--horus-text);
}

[data-bs-theme="dark"] .horus-stat-card__meta {
  color: var(--horus-text-secondary);
}

[data-bs-theme="dark"] .horus-stat-card--teal .horus-stat-card__icon,
[data-bs-theme="dark"] .horus-stat-card--blue .horus-stat-card__icon,
[data-bs-theme="dark"] .horus-stat-card--purple .horus-stat-card__icon,
[data-bs-theme="dark"] .horus-stat-card--orange .horus-stat-card__icon,
[data-bs-theme="dark"] .horus-stat-card--pink .horus-stat-card__icon,
[data-bs-theme="dark"] .horus-stat-card--green .horus-stat-card__icon {
  color: #fff;
}

[data-bs-theme="dark"] .horus-table tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--horus-surface-muted) 55%, var(--horus-surface-solid));
}

[data-bs-theme="dark"] .horus-table tbody tr:hover td {
  background: color-mix(in srgb, var(--horus-accent) 12%, var(--horus-surface-hover));
  box-shadow: none;
}

[data-bs-theme="dark"] .horus-empty__text,
[data-bs-theme="dark"] .horus-page-subtitle,
[data-bs-theme="dark"] .horus-footer__tag {
  color: var(--horus-text-secondary);
}

[data-bs-theme="dark"] .horus-section-meta {
  color: var(--horus-text-secondary);
  opacity: 1;
  font-weight: 500;
}

[data-bs-theme="dark"] .horus-empty__title,
[data-bs-theme="dark"] .horus-section-title,
[data-bs-theme="dark"] .horus-chart-card__title {
  color: var(--horus-text);
}

[data-bs-theme="dark"] .alert-success {
  color: #d8ffe8;
  background: color-mix(in srgb, var(--horus-success) 16%, var(--horus-surface-solid));
  border-color: color-mix(in srgb, var(--horus-success) 35%, var(--horus-border));
}

[data-bs-theme="dark"] .alert-danger {
  color: #ffd4d4;
  background: color-mix(in srgb, var(--horus-danger) 16%, var(--horus-surface-solid));
  border-color: color-mix(in srgb, var(--horus-danger) 35%, var(--horus-border));
}

[data-bs-theme="dark"] .alert-warning {
  color: #ffe9c2;
  background: color-mix(in srgb, var(--horus-warning) 16%, var(--horus-surface-solid));
  border-color: color-mix(in srgb, var(--horus-warning) 35%, var(--horus-border));
}

[data-bs-theme="dark"] .alert-info {
  color: #d8ecff;
  background: color-mix(in srgb, var(--horus-info) 16%, var(--horus-surface-solid));
  border-color: color-mix(in srgb, var(--horus-info) 35%, var(--horus-border));
}

[data-bs-theme="dark"] .horus-impersonation-banner {
  color: var(--horus-text);
  background: color-mix(in srgb, var(--horus-accent) 16%, var(--horus-surface-solid));
  border-color: color-mix(in srgb, var(--horus-accent) 40%, transparent);
}

[data-bs-theme="dark"] .horus-flash-banner--success,
[data-bs-theme="dark"] .horus-alerts .horus-flash-banner--success {
  color: var(--horus-text);
  background: color-mix(in srgb, var(--horus-success) 16%, var(--horus-surface-solid));
  border-color: color-mix(in srgb, var(--horus-success) 40%, transparent);
}

[data-bs-theme="dark"] .horus-filter-card,
[data-bs-theme="dark"] .horus-card,
[data-bs-theme="dark"] .horus-panel {
  color: var(--horus-text);
}

[data-bs-theme="dark"] .text-secondary,
[data-bs-theme="dark"] .text-muted {
  color: var(--horus-text-muted) !important;
}

[data-bs-theme="dark"] .dropdown-menu {
  background: var(--horus-surface-solid);
  border-color: var(--horus-border-strong);
  color: var(--horus-text);
}

[data-bs-theme="dark"] .dropdown-item {
  color: var(--horus-text-secondary);
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus,
[data-bs-theme="dark"] .dropdown-item.active {
  background: var(--horus-surface-hover);
  color: var(--horus-text);
}

[data-bs-theme="dark"] .dropdown-header {
  color: var(--horus-text);
}

[data-bs-theme="dark"] .horus-lang-switcher__btn,
[data-bs-theme="dark"] .horus-theme-pill,
[data-bs-theme="dark"] .horus-profile-chip {
  background: var(--horus-surface-solid);
  border-color: var(--horus-border-strong);
  color: var(--horus-text);
}

[data-bs-theme="dark"] .horus-nav-section__label {
  color: rgba(255, 255, 255, 0.55);
}

[data-bs-theme="dark"] .horus-ambient__cloud {
  background: rgba(168, 155, 255, 0.08);
  opacity: 0.35;
}

[data-bs-theme="dark"] .horus-focus-timer__time,
[data-bs-theme="dark"] .horus-emp-widget__time {
  color: var(--horus-text-muted);
}

/* ========== Support FAB ========== */

.horus-fab {
  position: fixed;
  bottom: 1.35rem;
  inset-inline-end: 1.35rem;
  z-index: 1045;
  width: 3.35rem;
  height: 3.35rem;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--horus-brand-purple), var(--horus-brand-blue));
  box-shadow:
    0 10px 28px rgba(91, 69, 246, 0.35),
    0 2px 0 rgba(255, 255, 255, 0.18) inset;
  transition: transform var(--horus-ease-fast), box-shadow var(--horus-ease-fast);
}

.horus-fab:hover {
  color: #fff;
  transform: translateY(-2px) scale(1.04);
  box-shadow:
    0 14px 34px rgba(91, 69, 246, 0.42),
    0 2px 0 rgba(255, 255, 255, 0.2) inset;
}

.horus-fab:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--horus-brand-purple) 65%, white);
  outline-offset: 3px;
}

.horus-fab i {
  font-size: 1.35rem;
  line-height: 1;
}

.horus-support-modal__subtitle {
  margin-top: 0.25rem;
  color: var(--horus-text-muted);
  font-size: 0.9rem;
}

.horus-support-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.15rem;
}

.horus-support-tabs__btn {
  border: 1px solid var(--horus-border);
  background: var(--horus-surface);
  color: var(--horus-text-secondary);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background var(--horus-ease-fast), color var(--horus-ease-fast), border-color var(--horus-ease-fast);
}

.horus-support-tabs__btn:hover {
  color: var(--horus-text);
  border-color: var(--horus-border-strong);
}

.horus-support-tabs__btn.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--horus-brand-purple), var(--horus-brand-blue));
}

.horus-support-faq .accordion-item {
  background: transparent;
  border: 1px solid var(--horus-border);
  border-radius: 0.9rem !important;
  overflow: hidden;
  margin-bottom: 0.55rem;
}

.horus-support-faq .accordion-button {
  background: color-mix(in srgb, var(--horus-surface-muted) 55%, transparent);
  color: var(--horus-text);
  font-weight: 600;
  box-shadow: none;
}

.horus-support-faq .accordion-button:not(.collapsed) {
  background: color-mix(in srgb, var(--horus-brand-purple) 10%, var(--horus-surface));
  color: var(--horus-text);
}

.horus-support-faq .accordion-button::after {
  filter: none;
}

.horus-support-faq .accordion-body {
  color: var(--horus-text-secondary);
  line-height: 1.65;
}

[data-bs-theme="dark"] .horus-support-tabs__btn {
  background: color-mix(in srgb, var(--horus-surface-solid) 88%, transparent);
}

.horus-permission-transfer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.85rem;
  align-items: stretch;
}

.horus-permission-transfer__panel {
  border: 1px solid var(--horus-border);
  border-radius: 0.9rem;
  background: var(--horus-surface);
  overflow: hidden;
  min-height: 18rem;
  display: flex;
  flex-direction: column;
}

.horus-permission-transfer__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--horus-border);
  background: color-mix(in srgb, var(--horus-surface-muted) 70%, transparent);
}

.horus-permission-transfer__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
}

.horus-permission-transfer__count {
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 650;
  background: color-mix(in srgb, var(--horus-brand-purple) 14%, transparent);
  color: var(--horus-text);
}

.horus-permission-transfer__table-wrap {
  position: relative;
  flex: 1;
  overflow: auto;
  max-height: 22rem;
}

.horus-permission-transfer__table {
  width: 100%;
}

.horus-permission-transfer__table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.horus-permission-transfer__check {
  width: 2.4rem;
  text-align: center;
}

.horus-permission-transfer__empty {
  margin: 0;
  padding: 1.25rem 1rem;
  color: var(--horus-text-secondary);
  text-align: center;
  font-size: 0.9rem;
}

.horus-permission-transfer__actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.45rem;
  padding-top: 2.2rem;
}

.horus-permission-transfer__actions .btn {
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 991.98px) {
  .horus-permission-transfer__grid {
    grid-template-columns: 1fr;
  }

  .horus-permission-transfer__actions {
    flex-direction: row;
    justify-content: center;
    padding-top: 0;
  }

  html[dir="rtl"] .horus-permission-transfer__actions .bi-chevron-right,
  html[dir="rtl"] .horus-permission-transfer__actions .bi-chevron-double-right,
  html[dir="rtl"] .horus-permission-transfer__actions .bi-chevron-left,
  html[dir="rtl"] .horus-permission-transfer__actions .bi-chevron-double-left {
    transform: scaleX(-1);
  }
}

.horus-coming-soon {
  border: 1px dashed var(--horus-border, rgba(15, 23, 42, 0.14));
  border-radius: 0.85rem;
  padding: 1rem 1.15rem;
  background: color-mix(in srgb, var(--horus-surface, #fff) 88%, var(--horus-accent, #2563eb) 12%);
}

.btn.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.72;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  inset-inline-end: 0.75rem;
  top: 50%;
  width: 0.85rem;
  height: 0.85rem;
  margin-top: -0.425rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: horus-btn-spin 0.7s linear infinite;
}

@keyframes horus-btn-spin {
  to {
    transform: rotate(360deg);
  }
}

[data-bs-theme="dark"] .horus-coming-soon {
  background: color-mix(in srgb, var(--horus-surface, #111827) 90%, var(--horus-accent, #60a5fa) 10%);
}

/* ========== Activity Timeline (Reports) ========== */

.horus-activity-timeline {
  margin-bottom: 1.25rem;
  border: 1px solid color-mix(in srgb, var(--horus-border, #e2e8f0) 90%, transparent);
  border-radius: 1rem;
  background: var(--horus-surface, #fff);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
  overflow: clip;
}

.horus-activity-timeline__empty {
  padding: 1rem 1.25rem 1.35rem;
}

.horus-activity-timeline__empty .horus-empty {
  padding-block: 1.5rem;
}

.horus-employee-report__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  margin-bottom: 0;
}

.horus-employee-report__ranges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.horus-employee-report__summary > .horus-panel-body {
  padding-top: 1.35rem;
  padding-bottom: 1.35rem;
}

.horus-employee-report__kpis > [class*="col-"] + [class*="col-"] {
  border-inline-start: 1px solid color-mix(in srgb, var(--horus-border, #e2e8f0) 85%, transparent);
}

.horus-employee-report__kpi {
  padding: 0.15rem 0.35rem;
}

@media (max-width: 767.98px) {
  .horus-employee-report__kpis > [class*="col-"] + [class*="col-"] {
    border-inline-start: 0;
    border-top: 1px solid color-mix(in srgb, var(--horus-border, #e2e8f0) 85%, transparent);
    padding-top: 0.85rem;
  }
}

.horus-activity-timeline__header {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 1.1rem 1.25rem 0.85rem;
  background: color-mix(in srgb, var(--horus-surface, #fff) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--horus-border, #e2e8f0) 80%, transparent);
}

.horus-activity-timeline__header-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
  justify-content: space-between;
  align-items: flex-start;
}

.horus-activity-timeline__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.horus-activity-timeline__date-form {
  margin: 0;
}

.horus-activity-timeline__filters,
.horus-activity-timeline__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.horus-activity-timeline__chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--horus-border, #e2e8f0) 90%, transparent);
  color: var(--horus-muted, #64748b);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.horus-activity-timeline__chip:hover,
.horus-activity-timeline__chip.is-active {
  color: var(--horus-text, #0f172a);
  border-color: color-mix(in srgb, var(--horus-accent, #2563eb) 35%, transparent);
  background: color-mix(in srgb, var(--horus-accent, #2563eb) 10%, transparent);
}

.horus-activity-timeline__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.7rem 0.32rem 0.55rem;
  border-radius: 0.55rem;
  border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  background: color-mix(in srgb, currentColor 7%, var(--horus-surface-solid, #ffffff));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 4%, transparent);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--horus-text, #0f172a);
}

.horus-activity-timeline__legend-dot {
  flex: 0 0 auto;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent);
}

.horus-activity-timeline__legend-label {
  color: inherit;
  white-space: nowrap;
}

.horus-activity-timeline__legend-time {
  margin-inline-start: 0.1rem;
  padding-inline-start: 0.45rem;
  border-inline-start: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  color: color-mix(in srgb, currentColor 68%, var(--horus-muted, #64748b));
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.horus-activity-timeline__legend-item.horus-activity-block--check-in { color: #0f766e; }
.horus-activity-timeline__legend-item.horus-activity-block--available,
.horus-activity-timeline__legend-item.horus-activity-block--online { color: #16a34a; }
.horus-activity-timeline__legend-item.horus-activity-block--working { color: #5b45f6; }
.horus-activity-timeline__legend-item.horus-activity-block--busy { color: #2563eb; }
.horus-activity-timeline__legend-item.horus-activity-block--idle { color: #ca8a04; }
.horus-activity-timeline__legend-item.horus-activity-block--break { color: #ea580c; }
.horus-activity-timeline__legend-item.horus-activity-block--offline { color: #dc2626; }

.horus-activity-timeline__body {
  padding: 1.35rem 1.25rem 1.5rem;
}

.horus-activity-timeline__viewport {
  overflow-x: auto;
  padding-block: 0.35rem 0.15rem;
}

.horus-activity-timeline__track {
  position: relative;
  min-height: 3.25rem;
  border-radius: 0;
  background: color-mix(in srgb, var(--horus-border, #e2e8f0) 55%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--horus-border, #e2e8f0) 70%, transparent);
  width: 100%;
  min-width: 36rem;
  overflow: hidden;
}

.horus-activity-block {
  position: absolute;
  top: 0;
  bottom: 0;
  border: 0;
  margin: 0;
  padding: 0.4rem 0.7rem;
  border-radius: 0;
  color: #fff;
  text-align: start;
  cursor: pointer;
  overflow: hidden;
  min-width: 0.35rem;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
  z-index: 1;
}

.horus-activity-block:hover,
.horus-activity-block:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.18);
  z-index: 2;
  outline: none;
}

.horus-activity-block--check-in { background: #2dd4bf; color: #134e4a; }
.horus-activity-block--available,
.horus-activity-block--online { background: #4ade80; color: #14532d; }
.horus-activity-block--working { background: #8b5cf6; color: #f5f3ff; }
.horus-activity-block--busy { background: #3b82f6; color: #eff6ff; }
.horus-activity-block--idle { background: #facc15; color: #713f12; }
.horus-activity-block--break { background: #fb923c; color: #7c2d12; }
.horus-activity-block--offline { background: #f87171; color: #7f1d1d; }

.horus-activity-block__label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.08rem;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  font-size: 0.68rem;
  line-height: 1.2;
  overflow: hidden;
}

.horus-activity-block__label strong,
.horus-activity-block__meta,
.horus-activity-block__duration {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.horus-activity-block__label strong {
  font-size: 0.74rem;
  font-weight: 700;
}

.horus-activity-block__duration {
  font-style: normal;
  font-weight: 700;
}

/* Short segments: hide secondary text; keep color bar readable */
.horus-activity-block.is-cozy {
  padding-inline: 0.55rem;
}

.horus-activity-block.is-cozy .horus-activity-block__meta {
  display: none;
}

.horus-activity-block.is-compact {
  padding-inline: 0.4rem;
}

.horus-activity-block.is-compact .horus-activity-block__meta,
.horus-activity-block.is-compact .horus-activity-block__duration {
  display: none;
}

.horus-activity-block.is-micro {
  padding: 0;
}

.horus-activity-block.is-micro .horus-activity-block__label {
  display: none;
}

.horus-activity-timeline__now {
  position: absolute;
  top: -0.25rem;
  bottom: -0.25rem;
  width: 2px;
  background: var(--horus-accent, #2563eb);
  border-radius: 999px;
  z-index: 3;
  pointer-events: none;
  transform: translateX(-50%);
}

.horus-activity-timeline__now::before {
  content: "";
  position: absolute;
  top: -0.2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: inherit;
}

.horus-activity-timeline__upcoming {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  cursor: default;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 6px,
    color-mix(in srgb, var(--horus-border, #e2e8f0) 45%, transparent) 6px,
    color-mix(in srgb, var(--horus-border, #e2e8f0) 45%, transparent) 7px
  );
}

.horus-activity-timeline__upcoming:hover,
.horus-activity-timeline__upcoming:focus-visible {
  background: color-mix(in srgb, var(--horus-accent, #2563eb) 10%, transparent);
  outline: none;
}

.horus-activity-timeline__scale {
  position: relative;
  min-height: 1.75rem;
  margin-top: 0.65rem;
  min-width: 36rem;
  width: 100%;
  border-top: 1px solid color-mix(in srgb, var(--horus-border, #e2e8f0) 80%, transparent);
}

.horus-activity-timeline__tick {
  position: absolute;
  top: 0.35rem;
  transform: translateX(-50%);
  font-size: 0.68rem;
  color: var(--horus-muted, #64748b);
  white-space: nowrap;
  pointer-events: none;
  background: var(--horus-surface, #fff);
  padding: 0 0.2rem;
  line-height: 1.2;
}

/* Keep full label visible at the bar edges (centered ticks clip "12:00 AM" → "0 AM"). */
.horus-activity-timeline__tick.is-start {
  transform: translateX(0);
  padding-inline-start: 0;
}

.horus-activity-timeline__tick.is-end {
  transform: translateX(-100%);
  padding-inline-end: 0;
}

.horus-activity-timeline__tick:not(.is-transition) {
  font-size: 0.62rem;
  color: color-mix(in srgb, var(--horus-muted, #64748b) 85%, transparent);
}

.horus-activity-timeline__tick.is-transition {
  font-weight: 700;
  color: var(--horus-text, #0f172a);
}

.horus-activity-timeline__tooltip {
  position: fixed;
  z-index: 1080;
  min-width: 12rem;
  max-width: min(18rem, calc(100vw - 1.5rem));
  padding: 0.75rem 0.85rem;
  border-radius: 0.85rem;
  background: var(--horus-surface-solid, #fff);
  border: 1px solid color-mix(in srgb, var(--horus-border, #e2e8f0) 85%, transparent);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
  pointer-events: none;
  margin: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.horus-activity-timeline__tooltip-title {
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.horus-activity-timeline__tooltip-meta {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  min-width: 0;
}

.horus-activity-timeline__tooltip-meta > div {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.75rem;
  min-width: 0;
}

.horus-activity-timeline__tooltip-meta dt {
  margin: 0;
  color: var(--horus-muted, #64748b);
  font-weight: 500;
  flex: 0 1 auto;
  max-width: 42%;
}

.horus-activity-timeline__tooltip-meta dd {
  margin: 0;
  font-weight: 600;
  text-align: end;
  flex: 1 1 0;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.horus-activity-drawer {
  position: fixed;
  inset: 0;
  z-index: 1090;
}

.horus-activity-drawer[hidden] {
  display: none !important;
}

.horus-activity-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
}

.horus-activity-drawer__panel {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: min(24rem, 100vw);
  max-width: 100%;
  background: var(--horus-surface, #fff);
  box-shadow: -12px 0 36px rgba(15, 23, 42, 0.16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.18s ease;
}

.horus-activity-drawer--wide .horus-activity-drawer__panel {
  width: min(28rem, 100vw);
}

html[dir="rtl"] .horus-activity-drawer__panel {
  box-shadow: 12px 0 36px rgba(15, 23, 42, 0.16);
}

.horus-activity-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid color-mix(in srgb, var(--horus-border, #e2e8f0) 85%, transparent);
  flex: 0 0 auto;
}

.horus-activity-drawer__title-wrap {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.horus-activity-drawer__subtitle {
  font-size: 0.82rem;
  color: var(--horus-text-muted, #64748b);
  line-height: 1.35;
}

.horus-activity-drawer__body {
  padding: 1rem 1.25rem 1.35rem;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  gap: 1.1rem;
  align-content: start;
}

.horus-activity-drawer__section {
  display: grid;
  gap: 0.65rem;
  min-width: 0;
}

.horus-activity-drawer__section-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--horus-text-muted, #64748b);
}

.horus-activity-drawer__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.horus-activity-drawer__stack {
  display: grid;
  gap: 0.65rem;
}

.horus-activity-drawer__field {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
  padding: 0.7rem 0.8rem;
  border-radius: 0.8rem;
  background: color-mix(in srgb, var(--horus-surface-muted, #f8fafc) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--horus-border, #e2e8f0) 80%, transparent);
}

.horus-activity-drawer__label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--horus-text-muted, #64748b);
  letter-spacing: 0.02em;
}

.horus-activity-drawer__value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--horus-text, #0f172a);
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: normal;
}

.horus-activity-drawer__value--accent {
  color: var(--horus-accent, #5b45f6);
  font-weight: 800;
}

.horus-activity-drawer__value--mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 500;
}

.horus-activity-drawer__value--wrap {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.45;
  font-weight: 500;
}

.horus-invite-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.horus-invite-stat {
  display: grid;
  gap: 0.15rem;
  justify-items: center;
  text-align: center;
  padding: 0.7rem 0.45rem;
  border-radius: var(--horus-radius-sm, 0.75rem);
  border: 1px solid var(--horus-border);
  background: color-mix(in srgb, var(--horus-surface-solid, #fff) 88%, transparent);
  color: inherit;
  cursor: pointer;
  transition:
    border-color var(--horus-ease-fast, 0.15s ease),
    background var(--horus-ease-fast, 0.15s ease),
    box-shadow var(--horus-ease-fast, 0.15s ease),
    transform var(--horus-ease-fast, 0.15s ease);
}

.horus-invite-stat:hover {
  transform: translateY(-1px);
}

.horus-invite-stat:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--horus-accent, #5b45f6) 55%, transparent);
  outline-offset: 2px;
}

.horus-invite-stat.is-active {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--horus-accent, #5b45f6) 28%, transparent);
}

.horus-invite-stat__value {
  font-size: 1.2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: var(--horus-text);
}

.horus-invite-stat__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--horus-text-muted);
}

.horus-invite-stat--ok {
  border-color: color-mix(in srgb, var(--horus-success) 35%, transparent);
  background: color-mix(in srgb, var(--horus-success) 10%, var(--horus-surface));
}

.horus-invite-stat--ok .horus-invite-stat__value {
  color: var(--horus-success);
}

.horus-invite-stat--fail {
  border-color: color-mix(in srgb, var(--horus-danger, #ef4444) 35%, transparent);
  background: color-mix(in srgb, var(--horus-danger, #ef4444) 8%, var(--horus-surface));
}

.horus-invite-stat--fail .horus-invite-stat__value {
  color: var(--horus-danger, #ef4444);
}

.horus-invite-stat--ok.is-active {
  border-color: color-mix(in srgb, var(--horus-success) 55%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--horus-success) 28%, transparent);
}

.horus-invite-stat--fail.is-active {
  border-color: color-mix(in srgb, var(--horus-danger, #ef4444) 55%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--horus-danger, #ef4444) 28%, transparent);
}

.horus-invite-stat--total.is-active {
  border-color: color-mix(in srgb, var(--horus-accent, #5b45f6) 45%, transparent);
}

.horus-invite-search {
  position: relative;
  display: block;
}

.horus-invite-search .bi {
  position: absolute;
  inset-inline-start: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--horus-text-muted);
  pointer-events: none;
  font-size: 0.9rem;
}

.horus-invite-search .form-control {
  padding-inline-start: 2.2rem;
  min-height: 2.35rem;
  font-size: 0.875rem;
}

.horus-invite-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  max-height: min(42vh, 18rem);
  overflow: auto;
  scrollbar-width: thin;
}

.horus-invite-pagination {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.15rem;
  padding-top: 0.65rem;
  border-top: 1px solid color-mix(in srgb, var(--horus-border) 85%, transparent);
}

.horus-invite-pagination__meta {
  font-size: 0.75rem;
  color: var(--horus-text-muted);
}

.horus-invite-pagination__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.horus-invite-pagination__page {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--horus-text-secondary, var(--horus-text));
  text-align: center;
  min-width: 0;
}

.horus-invite-pagination .btn:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.horus-invite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--horus-radius-sm, 0.75rem);
  border: 1px solid var(--horus-border);
  background: var(--horus-surface);
  min-width: 0;
}

.horus-invite-row.is-ok {
  border-color: color-mix(in srgb, var(--horus-success) 28%, var(--horus-border));
}

.horus-invite-row.is-fail {
  border-color: color-mix(in srgb, var(--horus-danger, #ef4444) 28%, var(--horus-border));
}

.horus-invite-row__meta {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.horus-invite-row__index {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--horus-text-muted);
}

.horus-invite-row__email {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--horus-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horus-invite-row__badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.horus-invite-row__badge.is-ok {
  color: var(--horus-success);
  background: color-mix(in srgb, var(--horus-success) 14%, transparent);
}

.horus-invite-row__badge.is-reinvite {
  color: var(--horus-info, #3b82f6);
  background: color-mix(in srgb, var(--horus-info, #3b82f6) 14%, transparent);
}

.horus-invite-row__badge.is-fail {
  color: var(--horus-danger, #ef4444);
  background: color-mix(in srgb, var(--horus-danger, #ef4444) 14%, transparent);
}

.horus-activity-drawer__shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.horus-activity-drawer__shots img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 0.65rem;
  border: 1px solid color-mix(in srgb, var(--horus-border, #e2e8f0) 80%, transparent);
}

.horus-activity-drawer__idle {
  margin: 0;
  padding: 0.75rem 0.85rem;
  border-radius: 0.8rem;
  background: color-mix(in srgb, var(--horus-warning-soft, #fff7ed) 90%, transparent);
  color: var(--horus-text-secondary, #3d5c5a);
  font-size: 0.82rem;
  line-height: 1.45;
}

body.horus-drawer-open {
  overflow: hidden;
}

@media (max-width: 575.98px) {
  .horus-activity-drawer__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .horus-activity-timeline__header-row {
    flex-direction: column;
  }

  .horus-activity-block:not(.is-micro):not(.is-compact) .horus-activity-block__meta,
  .horus-activity-block:not(.is-micro):not(.is-compact) .horus-activity-block__duration {
    display: none;
  }
}

/* ========== Reports catalog ========== */
.horus-report-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
  gap: 1.35rem;
}

.horus-report-type {
  display: flex;
  flex-direction: column;
  min-height: 16.5rem;
  padding: 0;
  border-radius: 1.25rem;
  text-decoration: none;
  color: inherit;
  background: var(--horus-grad-card);
  border: 1px solid color-mix(in srgb, var(--horus-border, #e2e8f0) 80%, transparent);
  box-shadow: var(--horus-card-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  position: relative;
  overflow: hidden;
}

.horus-report-type::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 0.28rem;
  background: linear-gradient(
    90deg,
    var(--horus-accent, #0d9488),
    color-mix(in srgb, var(--horus-accent, #0d9488) 35%, white)
  );
}

.horus-report-type:hover {
  transform: translateY(-4px);
  box-shadow: var(--horus-card-shadow-hover);
  border-color: color-mix(in srgb, var(--horus-accent, #0d9488) 40%, var(--horus-border, #e2e8f0));
  color: inherit;
}

.horus-report-type__visual {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 1.55rem 1.6rem 0.35rem;
  background:
    radial-gradient(
      120% 90% at 0% 0%,
      color-mix(in srgb, var(--horus-accent, #0d9488) 14%, transparent),
      transparent 62%
    );
}

.horus-report-type__icon {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  background: color-mix(in srgb, var(--horus-accent, #0d9488) 16%, var(--horus-surface-solid, #fff));
  color: var(--horus-accent, #0d9488);
  border: 1px solid color-mix(in srgb, var(--horus-accent, #0d9488) 22%, transparent);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--horus-accent, #0d9488) 12%, transparent);
}

.horus-report-type__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem 1.6rem 1.15rem;
}

.horus-report-type__title {
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--horus-text, #0f172a);
}

.horus-report-type__subtitle {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--horus-text-secondary, #64748b);
  max-width: 34ch;
}

.horus-report-type__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding: 0.95rem 1.6rem 1.25rem;
  border-top: 1px solid color-mix(in srgb, var(--horus-border, #e2e8f0) 70%, transparent);
}

.horus-report-type__cta {
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--horus-accent, #0d9488);
}

.horus-report-type__chevron {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--horus-accent, #0d9488);
  background: color-mix(in srgb, var(--horus-accent, #0d9488) 12%, transparent);
  transition: transform 0.22s ease, background-color 0.22s ease;
}

.horus-report-type:hover .horus-report-type__chevron {
  transform: translateX(3px);
  background: color-mix(in srgb, var(--horus-accent, #0d9488) 20%, transparent);
}

html[dir="rtl"] .horus-report-type::before {
  inset: 0 0 auto 0;
}

html[dir="rtl"] .horus-report-type:hover .horus-report-type__chevron {
  transform: translateX(-3px);
}

html[dir="rtl"] .horus-report-type__chevron .bi-arrow-right::before {
  content: "\f12f";
}

.horus-report-type--teal {
  --horus-accent: #0d9488;
}

.horus-report-type--blue {
  --horus-accent: #2563eb;
}

.horus-report-type--orange {
  --horus-accent: #ea580c;
}

.horus-report-type--purple {
  --horus-accent: #7c3aed;
}

.horus-report-type--green {
  --horus-accent: #16a34a;
}

@media (max-width: 575.98px) {
  .horus-report-type-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .horus-report-type {
    min-height: 14.5rem;
  }

  .horus-report-type__title {
    font-size: 1.2rem;
  }
}

[data-bs-theme="dark"] .horus-report-type__title {
  color: var(--horus-text, #f8fafc);
}

[data-bs-theme="dark"] .horus-report-type__subtitle {
  color: var(--horus-text-secondary, #94a3b8);
}

[data-bs-theme="dark"] .horus-report-type__icon {
  background: color-mix(in srgb, var(--horus-accent, #0d9488) 22%, transparent);
}

/* ========== Flatpickr (date / date-range filters) ========== */

.flatpickr-calendar {
  z-index: 1200;
  border: 1px solid var(--horus-border);
  border-radius: 1rem;
  box-shadow: var(--horus-card-shadow, 0 18px 40px rgba(15, 23, 42, 0.16));
  background: var(--horus-surface-solid, #fff);
  overflow: hidden;
  font-family: inherit;
}

.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after,
.flatpickr-calendar.arrowBottom:before,
.flatpickr-calendar.arrowBottom:after {
  display: none;
}

.flatpickr-months {
  padding: 0.35rem 0.25rem 0;
}

.flatpickr-months .flatpickr-month {
  color: var(--horus-text);
  fill: var(--horus-text);
  height: 2.4rem;
}

.flatpickr-current-month {
  font-size: 0.95rem;
  font-weight: 700;
  padding-top: 0.35rem;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  color: var(--horus-text);
  font-weight: 700;
  background: transparent;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  color: var(--horus-text-secondary, #64748b);
  fill: var(--horus-text-secondary, #64748b);
  padding: 0.55rem 0.75rem;
  border-radius: 0.65rem;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover,
.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
  color: var(--horus-accent);
  fill: var(--horus-accent);
}

.flatpickr-weekdays {
  background: transparent;
  padding: 0 0.35rem;
}

span.flatpickr-weekday {
  color: var(--horus-text-secondary, #64748b);
  font-weight: 600;
  font-size: 0.78rem;
}

.flatpickr-days {
  padding: 0.25rem 0.35rem 0.55rem;
}

.dayContainer {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
}

.flatpickr-day {
  color: var(--horus-text);
  border-radius: 0.65rem;
  max-width: 2.35rem;
  height: 2.35rem;
  line-height: 2.35rem;
  border-color: transparent;
}

.flatpickr-day:hover,
.flatpickr-day:focus,
.flatpickr-day.prevMonthDay:hover,
.flatpickr-day.nextMonthDay:hover {
  background: color-mix(in srgb, var(--horus-accent) 12%, transparent);
  border-color: transparent;
  color: var(--horus-text);
}

.flatpickr-day.today {
  border-color: var(--horus-accent);
  font-weight: 700;
}

.flatpickr-day.today:hover,
.flatpickr-day.today:focus {
  background: color-mix(in srgb, var(--horus-accent) 14%, transparent);
  border-color: var(--horus-accent);
  color: var(--horus-text);
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus {
  background: var(--horus-accent);
  border-color: var(--horus-accent);
  color: #fff;
  box-shadow: none;
}

.flatpickr-day.inRange,
.flatpickr-day.prevMonthDay.inRange,
.flatpickr-day.nextMonthDay.inRange {
  background: color-mix(in srgb, var(--horus-accent) 16%, transparent);
  border-color: transparent;
  box-shadow: none;
  color: var(--horus-text);
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
  color: var(--horus-text-muted, #94a3b8);
  opacity: 0.45;
}

.flatpickr-day.hidden {
  visibility: hidden;
}

input.flatpickr-input.horus-control[readonly] {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 0.95rem;
  padding-inline-end: 2.4rem;
}

html[dir="rtl"] input.flatpickr-input.horus-control[readonly] {
  background-position: left 0.9rem center;
}

.flatpickr-calendar.flatpickr-calendar--rtl,
.flatpickr-calendar.flatpickr-calendar--rtl .flatpickr-months,
.flatpickr-calendar.flatpickr-calendar--rtl .flatpickr-weekdays,
.flatpickr-calendar.flatpickr-calendar--rtl .flatpickr-days {
  direction: rtl;
}

.flatpickr-calendar.flatpickr-calendar--rtl .flatpickr-months .flatpickr-prev-month,
.flatpickr-calendar.flatpickr-calendar--rtl .flatpickr-months .flatpickr-next-month {
  transform: scaleX(-1);
}

[data-bs-theme="dark"] .flatpickr-calendar {
  background: var(--horus-surface-solid, #0f172a);
  border-color: var(--horus-border);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

[data-bs-theme="dark"] .flatpickr-months .flatpickr-month,
[data-bs-theme="dark"] .flatpickr-current-month .flatpickr-monthDropdown-months,
[data-bs-theme="dark"] .flatpickr-current-month input.cur-year,
[data-bs-theme="dark"] .flatpickr-day {
  color: var(--horus-text);
  fill: var(--horus-text);
}

[data-bs-theme="dark"] .flatpickr-day.inRange,
[data-bs-theme="dark"] .flatpickr-day.prevMonthDay.inRange,
[data-bs-theme="dark"] .flatpickr-day.nextMonthDay.inRange {
  background: color-mix(in srgb, var(--horus-accent) 22%, transparent);
  color: var(--horus-text);
}

[data-bs-theme="dark"] input.flatpickr-input.horus-control[readonly] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z'/%3E%3C/svg%3E");
}

/* —— Session replay —— */
.horus-replay-field {
  min-width: 0;
}

.horus-replay-field__label {
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--horus-text-muted, #64748b);
}

.horus-replay-field__value {
  font-size: 0.95rem;
  color: var(--horus-text);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.horus-replay-field__value code {
  display: inline-block;
  max-width: 100%;
  padding: 0.2rem 0.45rem;
  border-radius: 0.4rem;
  font-size: 0.8rem;
  color: var(--horus-text);
  background: color-mix(in srgb, var(--horus-accent, #2563eb) 12%, transparent);
  word-break: break-word;
  white-space: normal;
}

.horus-replay-stage {
  position: relative;
  width: 100%;
  min-height: 520px;
  border-radius: 0.85rem;
  background:
    radial-gradient(ellipse at top, rgba(37, 99, 235, 0.2), transparent 55%),
    #0b1220;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.horus-replay-stage__status {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 520px;
  padding: 1.5rem;
  color: #e2e8f0;
  text-align: center;
}

.horus-replay-stage__status .horus-replay-player__error,
.horus-replay-player__error {
  margin: 0;
  color: #fecaca;
}

.horus-replay-stage .rr-player,
.horus-replay-stage .rr-player__frame {
  max-width: 100%;
}

/* Matches rrweb-player's built-in skip-inactive switch look. */
.horus-replay-stage .horus-replay-switch {
  height: 1em;
  display: flex;
  align-items: center;
  margin-left: 0.5rem;
}

.horus-replay-stage .horus-replay-switch input[type='checkbox'] {
  position: absolute;
  opacity: 0;
}

.horus-replay-stage .horus-replay-switch label {
  width: 2em;
  height: 1em;
  position: relative;
  cursor: pointer;
  display: block;
  margin: 0;
}

.horus-replay-stage .horus-replay-switch label::before {
  content: '';
  position: absolute;
  width: 2em;
  height: 1em;
  left: 0.1em;
  transition: background 0.1s ease;
  background: rgba(73, 80, 246, 0.5);
  border-radius: 50px;
}

.horus-replay-stage .horus-replay-switch label::after {
  content: '';
  position: absolute;
  width: 1em;
  height: 1em;
  border-radius: 50px;
  left: 0;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.3);
  background: #fcfff4;
  z-index: 2;
}

.horus-replay-stage .horus-replay-switch input[type='checkbox']:checked + label::before {
  background: rgb(73, 80, 246);
}

.horus-replay-stage .horus-replay-switch input[type='checkbox']:checked + label::after {
  left: 1.1em;
}

.horus-replay-stage .horus-replay-switch__label {
  margin: 0 8px;
  font-size: 13px;
  color: #11103e;
  white-space: nowrap;
  user-select: none;
}

/* —— Integration hub —— */
.horus-integration {
  --integration-ink: #0f172a;
  --integration-muted: #64748b;
  --integration-agent: #0f766e;
  --integration-sdk: #1d4ed8;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.horus-integration__hero {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 1.5rem;
  padding: 1.75rem 1.85rem;
  border-radius: 1.1rem;
  overflow: hidden;
  color: #f8fafc;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(20, 184, 166, 0.28) 0%, transparent 52%),
    radial-gradient(90% 120% at 0% 100%, rgba(37, 99, 235, 0.22) 0%, transparent 48%),
    linear-gradient(145deg, #0b1220 0%, #132033 48%, #0f1a2a 100%);
  border: 1px solid color-mix(in srgb, #94a3b8 22%, transparent);
  animation: horus-integration-hero-in 0.55s ease-out both;
}

.horus-integration__hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -40% 40%;
  height: 70%;
  background: radial-gradient(closest-side, rgba(148, 163, 184, 0.14), transparent 70%);
  pointer-events: none;
}

.horus-integration__hero-copy {
  position: relative;
  z-index: 1;
  max-width: 40rem;
}

.horus-integration__eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, #99f6e4 70%, #e2e8f0);
}

.horus-integration__title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.85rem, 2.4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
}

.horus-integration__lead {
  margin: 0;
  max-width: 36rem;
  font-size: 1.02rem;
  line-height: 1.55;
  color: color-mix(in srgb, #e2e8f0 86%, transparent);
}

.horus-integration__filter-note {
  margin: 0.65rem 0 0;
  font-size: 0.875rem;
  color: color-mix(in srgb, #99f6e4 75%, #cbd5e1);
}

.horus-integration__hero-actions {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
}

.horus-integration__channels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  animation: horus-integration-rise 0.55s ease-out 0.08s both;
}

.horus-integration-channel {
  display: flex;
  gap: 1rem;
  padding: 1.2rem 1.25rem;
  border-radius: 1rem;
  background: var(--horus-surface, #fff);
  border: 1px solid var(--horus-border, rgba(15, 23, 42, 0.1));
  box-shadow: 0 1px 0 color-mix(in srgb, #0f172a 4%, transparent);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.horus-integration-channel:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px color-mix(in srgb, #0f172a 8%, transparent);
}

.horus-integration-channel--agent:hover {
  border-color: color-mix(in srgb, var(--integration-agent) 35%, var(--horus-border, #e2e8f0));
}

.horus-integration-channel--sdk:hover {
  border-color: color-mix(in srgb, var(--integration-sdk) 35%, var(--horus-border, #e2e8f0));
}

.horus-integration-channel__icon {
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 0.85rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 1.35rem;
}

.horus-integration-channel--agent .horus-integration-channel__icon {
  color: var(--integration-agent);
  background: color-mix(in srgb, var(--integration-agent) 12%, transparent);
}

.horus-integration-channel--sdk .horus-integration-channel__icon {
  color: var(--integration-sdk);
  background: color-mix(in srgb, var(--integration-sdk) 12%, transparent);
}

.horus-integration-channel__body {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: flex-start;
}

.horus-integration-channel__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}

.horus-integration-channel__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--integration-ink, var(--horus-text, #0f172a));
}

.horus-integration-channel__version {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--horus-text-secondary, #64748b);
  background: var(--horus-surface-muted, #f1f5f9);
  border: 1px solid var(--horus-border, rgba(15, 23, 42, 0.08));
}

.horus-integration-channel__text {
  margin: 0;
  font-size: 0.925rem;
  line-height: 1.5;
  color: var(--integration-muted, var(--horus-text-secondary, #64748b));
}

.horus-integration__credentials {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: horus-integration-rise 0.55s ease-out 0.14s both;
}

.horus-integration__credentials-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.horus-integration__credentials-title {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  font-weight: 650;
  color: var(--horus-text, #0f172a);
}

.horus-integration__credentials-subtitle {
  margin: 0;
  font-size: 0.925rem;
  color: var(--horus-text-secondary, #64748b);
}

@keyframes horus-integration-hero-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes horus-integration-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 991.98px) {
  .horus-integration__channels {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .horus-integration__hero {
    padding: 1.35rem 1.2rem;
  }

  .horus-integration__hero-actions {
    width: 100%;
  }

  .horus-integration__hero-actions .btn {
    width: 100%;
  }
}

[data-bs-theme="dark"] .horus-integration-channel {
  background: color-mix(in srgb, var(--horus-surface, #111827) 96%, #000);
  box-shadow: none;
}

[data-bs-theme="dark"] .horus-integration-channel__title {
  color: var(--horus-text, #e2e8f0);
}

[data-bs-theme="dark"] .horus-integration-channel__version {
  background: color-mix(in srgb, #64748b 22%, transparent);
  border-color: color-mix(in srgb, #64748b 35%, transparent);
  color: #cbd5e1;
}

/* legacy promo (unused on integration hub; kept for safety) */
.horus-sdk-promo {
  overflow: hidden;
}

.horus-sdk-promo__body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  padding: 1.1rem 1.25rem;
}

.horus-sdk-promo__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--horus-accent, #0d6efd) 12%, transparent);
  color: var(--horus-accent, #0d6efd);
  font-size: 1.35rem;
  flex: 0 0 auto;
}

.horus-sdk-promo__copy {
  flex: 1 1 16rem;
  min-width: 0;
}

.horus-sdk-promo__title {
  font-size: 1.05rem;
  font-weight: 650;
  margin: 0 0 0.25rem;
}

.horus-sdk-promo__text {
  color: var(--horus-text-secondary, #6c757d);
  font-size: 0.925rem;
  line-height: 1.45;
}

.horus-sdk-promo__action {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* —— Markdown content (agent features, etc.) —— */
.horus-md {
  color: var(--horus-text, #0f172a);
  font-size: 0.975rem;
  line-height: 1.65;
}

.horus-md > :first-child {
  margin-top: 0;
}

.horus-md > :last-child {
  margin-bottom: 0;
}

.horus-md h1,
.horus-md h2,
.horus-md h3,
.horus-md h4 {
  margin: 1.15rem 0 0.45rem;
  font-weight: 650;
  line-height: 1.3;
  color: var(--horus-text, #0f172a);
}

.horus-md h1 { font-size: 1.35rem; }
.horus-md h2 { font-size: 1.2rem; }
.horus-md h3 { font-size: 1.05rem; }
.horus-md h4 { font-size: 1rem; }

.horus-md p,
.horus-md ul,
.horus-md ol,
.horus-md pre,
.horus-md blockquote {
  margin: 0 0 0.85rem;
}

.horus-md ul,
.horus-md ol {
  padding-inline-start: 1.35rem;
}

.horus-md li + li {
  margin-top: 0.3rem;
}

.horus-md a {
  color: var(--horus-accent, #2563eb);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.horus-md code {
  padding: 0.1rem 0.35rem;
  border-radius: 0.35rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--horus-surface-muted, #f1f5f9);
  border: 1px solid var(--horus-border, rgba(15, 23, 42, 0.08));
}

.horus-md pre {
  padding: 0.85rem 1rem;
  overflow-x: auto;
  border-radius: 0.75rem;
  background: var(--horus-surface-muted, #f1f5f9);
  border: 1px solid var(--horus-border, rgba(15, 23, 42, 0.08));
}

.horus-md pre code {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.85rem;
}

.horus-md blockquote {
  padding: 0.15rem 0 0.15rem 0.9rem;
  border-inline-start: 3px solid color-mix(in srgb, var(--horus-accent, #2563eb) 45%, transparent);
  color: var(--horus-text-secondary, #64748b);
}

.horus-md hr {
  margin: 1.1rem 0;
  border: 0;
  border-top: 1px solid var(--horus-border, rgba(15, 23, 42, 0.12));
}

.horus-md strong {
  font-weight: 650;
}

[data-bs-theme="dark"] .horus-md code,
[data-bs-theme="dark"] .horus-md pre {
  background: color-mix(in srgb, #64748b 18%, transparent);
  border-color: color-mix(in srgb, #64748b 30%, transparent);
}

/* —— JS SDK documentation —— */
.horus-sdk-docs__hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  gap: 1.5rem;
  margin-bottom: 1.25rem;
  padding: 1.5rem 1.6rem;
  border-radius: 1rem;
  background:
    radial-gradient(1200px 280px at 0% 0%, color-mix(in srgb, var(--horus-accent, #0d6efd) 10%, transparent), transparent 55%),
    var(--horus-surface, #fff);
  border: 1px solid var(--horus-border, rgba(0, 0, 0, 0.08));
  box-shadow: var(--horus-card-shadow, 0 1px 2px rgba(0, 0, 0, 0.04));
}

.horus-sdk-docs__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--horus-accent, #0d6efd);
  margin: 0 0 0.4rem;
}

.horus-sdk-docs__lead {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--horus-text-secondary, #5c6570);
  max-width: 40rem;
  margin: 0.5rem 0 1rem;
}

.horus-sdk-docs__hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-bottom: 1.1rem;
}

.horus-sdk-docs__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--horus-accent, #0d6efd) 12%, #fff);
  color: var(--horus-text, #212529);
  font-size: 0.85rem;
  font-weight: 600;
}

.horus-sdk-docs__meta-note {
  font-size: 0.875rem;
  color: var(--horus-text-secondary, #6c757d);
}

.horus-sdk-docs__cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.horus-sdk-docs__cta-row .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.horus-sdk-docs__size {
  opacity: 0.75;
  font-size: 0.85em;
  font-weight: 500;
}

.horus-sdk-docs__hero-panel {
  min-width: 0;
  border-radius: 0.85rem;
  background: #0f1419;
  color: #e8eef5;
  padding: 0.85rem 0.95rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.horus-sdk-docs__snippet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #9aabbd;
}

.horus-sdk-docs__hero-panel .horus-sdk-docs__snippet-head .btn {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  --bs-btn-color: #d7e2ee;
  --bs-btn-border-color: #3a4654;
  --bs-btn-hover-bg: #1c2530;
  --bs-btn-hover-border-color: #5a6a7c;
  --bs-btn-hover-color: #fff;
}

.horus-sdk-docs__pre {
  margin: 0;
  padding: 0.85rem 0.95rem;
  border-radius: 0.65rem;
  background: #0b1015;
  border: 1px solid #243040;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #d7e2ee;
}

.horus-sdk-section .horus-sdk-docs__snippet-head {
  margin-bottom: 0.4rem;
  color: var(--horus-text-secondary, #6c757d);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.8rem;
}

.horus-sdk-section .horus-sdk-docs__pre {
  background: #111827;
  margin-bottom: 0;
}

.horus-sdk-docs__toc {
  position: sticky;
  top: 0.75rem;
  z-index: 5;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.45rem;
  margin-bottom: 1.25rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--horus-surface, #fff) 92%, #e9ecef);
  border: 1px solid var(--horus-border, rgba(0, 0, 0, 0.08));
  backdrop-filter: blur(8px);
}

.horus-sdk-docs__toc a {
  flex: 0 0 auto;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  color: var(--horus-text-secondary, #5c6570);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 550;
  white-space: nowrap;
}

.horus-sdk-docs__toc a:hover {
  background: color-mix(in srgb, var(--horus-accent, #0d6efd) 10%, transparent);
  color: var(--horus-text, #212529);
}

.horus-sdk-section {
  margin-bottom: 1rem;
  scroll-margin-top: 4.5rem;
}

.horus-sdk-subtitle {
  font-size: 1rem;
  font-weight: 650;
  margin: 0 0 0.35rem;
}

.horus-sdk-list {
  padding-inline-start: 1.15rem;
  margin: 0 0 1rem;
  display: grid;
  gap: 0.45rem;
  line-height: 1.5;
}

.horus-sdk-table code {
  font-size: 0.85em;
}

.horus-sdk-versions {
  display: grid;
  gap: 0.75rem;
}

.horus-sdk-version {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  padding: 0.95rem 1.05rem;
  border-radius: 0.85rem;
  border: 1px solid var(--horus-border, rgba(0, 0, 0, 0.08));
  background: var(--horus-surface-muted, #f8f9fa);
}

.horus-sdk-version--latest {
  background: color-mix(in srgb, var(--horus-accent, #0d6efd) 7%, #fff);
  border-color: color-mix(in srgb, var(--horus-accent, #0d6efd) 28%, transparent);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--horus-accent, #0d6efd) 12%, transparent);
}

.horus-sdk-version__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.horus-sdk-version__name {
  font-weight: 700;
  font-size: 1.05rem;
}

.horus-sdk-version__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.horus-sdk-version__actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

@media (max-width: 991.98px) {
  .horus-sdk-docs__hero {
    grid-template-columns: 1fr;
    padding: 1.2rem;
  }
}

/* ========== Event settings type grid ========== */
.horus-event-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.35rem;
}

.horus-event-type-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0;
  min-height: 0;
  min-width: 0;
  padding: 0.95rem 1rem;
  padding-inline: 1rem;
  border: 1px solid color-mix(in srgb, var(--horus-border, #e2e8f0) 88%, transparent);
  border-radius: 0.85rem;
  background: color-mix(in srgb, var(--horus-surface, #fff) 92%, var(--horus-bg, #f8fafc));
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
  cursor: pointer;
}

.horus-event-type-option:hover {
  border-color: color-mix(in srgb, var(--horus-accent, #0d9488) 42%, var(--horus-border, #e2e8f0));
  background: color-mix(in srgb, var(--horus-accent, #0d9488) 6%, var(--horus-surface, #fff));
  box-shadow: 0 1px 0 color-mix(in srgb, var(--horus-accent, #0d9488) 12%, transparent);
}

.horus-event-type-option:has(.form-check-input:checked) {
  border-color: color-mix(in srgb, var(--horus-accent, #0d9488) 55%, var(--horus-border, #e2e8f0));
  background: color-mix(in srgb, var(--horus-accent, #0d9488) 9%, var(--horus-surface, #fff));
}

.horus-event-type-option:has(.form-check-input:disabled) {
  cursor: default;
  opacity: 0.78;
}

.horus-event-type-option:has(.form-check-input:disabled):hover {
  border-color: color-mix(in srgb, var(--horus-border, #e2e8f0) 88%, transparent);
  background: color-mix(in srgb, var(--horus-surface, #fff) 92%, var(--horus-bg, #f8fafc));
  box-shadow: none;
}

.horus-event-type-option .form-check-input,
html[dir="rtl"] .horus-event-type-option .form-check-input {
  float: none;
  position: static;
  margin: 0.2rem 0 0;
  margin-inline: 0;
  flex: 0 0 auto;
  order: 0;
}

.horus-event-type-option__body {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
  flex: 1 1 auto;
  order: 0;
  text-align: start;
  overflow-wrap: anywhere;
}

.horus-event-type-option__title {
  display: block;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.35;
  color: var(--horus-text, #0f172a);
}

.horus-event-type-option__desc {
  display: block;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--horus-muted, #64748b);
}

html[dir="rtl"] .horus-event-type-option {
  flex-direction: row;
  justify-content: flex-start;
  padding-inline: 1rem;
}

[data-bs-theme="dark"] .horus-event-type-option {
  background: color-mix(in srgb, var(--horus-surface, #111827) 88%, #000);
  border-color: color-mix(in srgb, var(--horus-border, #334155) 90%, transparent);
}

[data-bs-theme="dark"] .horus-event-type-option:hover,
[data-bs-theme="dark"] .horus-event-type-option:has(.form-check-input:checked) {
  background: color-mix(in srgb, var(--horus-accent, #14b8a6) 14%, var(--horus-surface, #111827));
  border-color: color-mix(in srgb, var(--horus-accent, #14b8a6) 45%, var(--horus-border, #334155));
}

@media (max-width: 1199.98px) {
  .horus-event-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .horus-event-type-grid {
    grid-template-columns: 1fr;
  }
}

/* Admin event-settings: organization multiselect */
.horus-multiselect {
  position: relative;
  max-width: 28rem;
}

.horus-multiselect__toggle {
  cursor: pointer;
  user-select: none;
  background-image: none;
  appearance: none;
}

.horus-multiselect__toggle:focus {
  box-shadow: var(--bs-focus-ring-box-shadow, 0 0 0 0.25rem rgba(20, 184, 166, 0.25));
}

.horus-multiselect__summary {
  flex: 1 1 auto;
  min-width: 0;
}

.horus-multiselect__chevron {
  flex: 0 0 auto;
  opacity: 0.65;
  font-size: 0.85rem;
  transition: transform 0.15s ease;
}

.horus-multiselect__toggle[aria-expanded="true"] .horus-multiselect__chevron {
  transform: rotate(180deg);
}

.horus-multiselect__menu {
  position: absolute;
  inset-inline-start: 0;
  inset-inline-end: 0;
  top: calc(100% + 0.35rem);
  z-index: 20;
  display: flex;
  flex-direction: column;
  max-height: 18rem;
  overflow: hidden;
  border: 1px solid var(--horus-border, #e2e8f0);
  border-radius: 0.75rem;
  background: var(--horus-surface, #fff);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.horus-multiselect__toolbar {
  display: grid;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--horus-border, #e2e8f0);
  background: color-mix(in srgb, var(--horus-surface, #fff) 92%, var(--horus-border, #e2e8f0));
}

.horus-multiselect__search {
  width: 100%;
}

.horus-multiselect__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.horus-multiselect__list {
  overflow: auto;
  padding: 0.35rem;
  display: grid;
  gap: 0.15rem;
}

.horus-multiselect__option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.45rem 0.55rem;
  padding-inline: 0.55rem;
  border-radius: 0.5rem;
  cursor: pointer;
}

.horus-multiselect__option--button {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: start;
  font: inherit;
}

.horus-multiselect__option--button.is-selected,
.horus-multiselect__option--button:hover {
  background: color-mix(in srgb, var(--horus-accent, #14b8a6) 10%, transparent);
}

.horus-multiselect__option--button.is-selected {
  font-weight: 650;
}

.horus-event-settings--muted {
  opacity: 0.62;
  pointer-events: none;
}

.horus-event-type-option.is-disabled {
  cursor: default;
}

.horus-multiselect__option:hover,
.horus-multiselect__option:has(.form-check-input:checked) {
  background: color-mix(in srgb, var(--horus-accent, #14b8a6) 10%, transparent);
}

.horus-multiselect__option .form-check-input,
html[dir="rtl"] .horus-multiselect__option .form-check-input {
  float: none;
  position: static;
  margin: 0;
  margin-inline: 0;
  flex: 0 0 auto;
  order: 0;
}

.horus-multiselect__option .form-check-label {
  flex: 1 1 auto;
  min-width: 0;
  cursor: pointer;
  order: 0;
  text-align: start;
}

.horus-multiselect__empty {
  padding: 0.75rem 0.65rem;
}

[data-bs-theme="dark"] .horus-multiselect__menu {
  background: var(--horus-surface, #111827);
  border-color: var(--horus-border, #334155);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

[data-bs-theme="dark"] .horus-multiselect__toolbar {
  background: color-mix(in srgb, var(--horus-surface, #111827) 88%, #000);
  border-bottom-color: var(--horus-border, #334155);
}

[data-bs-theme="dark"] .horus-multiselect__option:hover,
[data-bs-theme="dark"] .horus-multiselect__option:has(.form-check-input:checked) {
  background: color-mix(in srgb, var(--horus-accent, #14b8a6) 14%, transparent);
}

@media (max-width: 575.98px) {
  .horus-multiselect {
    max-width: none;
  }
}

/* API Keys — split docs + download controls */
.horus-docs-split {
  display: inline-flex;
  align-items: stretch;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--horus-border, rgba(15, 23, 42, 0.12));
  background: var(--horus-surface, #fff);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.horus-docs-split__docs {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  color: var(--horus-text, #1f2440);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.925rem;
  line-height: 1.2;
  background: transparent;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.horus-docs-split__docs:hover {
  background: color-mix(in srgb, var(--horus-surface-muted, #f1f5f9) 80%, transparent);
  color: var(--horus-text, #1f2440);
}

.horus-docs-split__docs i {
  opacity: 0.72;
}

.horus-docs-split__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #475569;
  background: color-mix(in srgb, #94a3b8 18%, transparent);
  border: 1px solid color-mix(in srgb, #94a3b8 28%, transparent);
}

.horus-docs-split__download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.55rem;
  min-width: 2.55rem;
  text-decoration: none;
  color: #fff;
  border: 0;
  border-inline-start: 1px solid transparent;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.horus-docs-split__download:hover {
  color: #fff;
  filter: brightness(1.06);
}

.horus-docs-split__download:active {
  transform: translateY(1px);
}

.horus-docs-split__download--agent {
  background: linear-gradient(160deg, #0f766e 0%, #0d9488 55%, #14b8a6 100%);
  border-inline-start-color: color-mix(in srgb, #0f766e 55%, transparent);
}

.horus-docs-split__download--sdk {
  background: linear-gradient(160deg, #1e3a5f 0%, #2563eb 55%, #3b82f6 100%);
  border-inline-start-color: color-mix(in srgb, #1e3a5f 55%, transparent);
}

.horus-docs-split__download.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
  filter: grayscale(0.25);
}

.horus-toolbar__actions .horus-docs-split {
  flex: 0 0 auto;
}

@media (max-width: 767.98px) {
  .horus-docs-split__docs span:not(.horus-docs-split__badge) {
    max-width: 7.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

[data-bs-theme="dark"] .horus-docs-split {
  background: color-mix(in srgb, var(--horus-surface, #111827) 92%, #000);
  border-color: var(--horus-border, #334155);
}

[data-bs-theme="dark"] .horus-docs-split__docs:hover {
  background: color-mix(in srgb, #fff 6%, transparent);
}

[data-bs-theme="dark"] .horus-docs-split__badge {
  color: #cbd5e1;
  background: color-mix(in srgb, #64748b 28%, transparent);
  border-color: color-mix(in srgb, #64748b 35%, transparent);
}

