@charset "UTF-8";
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./fonts/Vazirmatn[wght].woff2") format("woff2");
}
:root {
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
}

:root {
  --sidebar-bg: #1a2332;
  --sidebar-hover: rgba(255,255,255,0.04);
  --sidebar-active: rgba(26,187,156,0.08);
  --sidebar-text: #7b8fa3;
  --sidebar-text-hover: #c5d0dc;
  --sidebar-text-active: #ffffff;
  --sidebar-border: rgba(255,255,255,0.06);
  --sidebar-w: 252px;
  --primary: #1ABB9C;
  --primary-lt: rgba(26,187,156,0.06);
  --primary-dk: #169f85;
  --body-bg: #f5f7fb;
  --bg-surface: #ffffff;
  --bg-surface-secondary: #f9fafb;
  --border-color: #e6e7eb;
  --border-color-light: #eff0f3;
  --border-translucent: rgba(4,32,69,0.08);
  --text: #1e2633;
  --text-secondary: #626d7d;
  --text-muted: #667085;
  --text-disabled: #c0c7cf;
  --blue: #066fd1;
  --azure: #4299e1;
  --green: #2fb344;
  --lime: #74b816;
  --yellow: #f59f00;
  --orange: #f76707;
  --red: #d63939;
  --pink: #d6336c;
  --purple: #ae3ec9;
  --indigo: #4263eb;
  --cyan: #17a2b8;
  --primary-ink: #0e7c6b;
  --green-ink: #1f7a30;
  --red-ink: #b02a2a;
  --yellow-ink: #8a5a00;
  --orange-ink: #b34a00;
  --blue-ink: #05559f;
  --purple-ink: #8c2ba3;
  --cyan-ink: #0e7183;
  --green-lt: rgba(47,179,68,0.06);
  --red-lt: rgba(214,57,57,0.06);
  --yellow-lt: rgba(245,159,0,0.06);
  --blue-lt: rgba(6,111,209,0.06);
  --azure-lt: rgba(66,153,225,0.06);
  --purple-lt: rgba(174,62,201,0.06);
  --cyan-lt: rgba(23,162,184,0.06);
  --radius: 6px;
  --radius-sm: 4px;
  --radius-lg: 8px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --shadow: rgba(30,38,51,0.04) 0 2px 4px 0;
  --shadow-card: 0 0 0 1px var(--border-translucent), rgba(30,38,51,0.04) 0 2px 4px 0;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', Monaco, Consolas, 'Liberation Mono', monospace;
  --font-size: 0.875rem;
  --line-height: 1.4286;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 600;
}

[data-theme=dark] {
  --body-bg: #0f1623;
  --bg-surface: #1a2332;
  --bg-surface-secondary: #141d2b;
  --border-color: rgba(255,255,255,0.08);
  --border-color-light: rgba(255,255,255,0.05);
  --border-translucent: rgba(255,255,255,0.08);
  --text: #e6ebf2;
  --text-secondary: #b3bccb;
  --text-muted: #8a93a3;
  --text-disabled: #5a6473;
  --primary-ink: #2fd0ae;
  --green-ink: #4ade80;
  --red-ink: #f87171;
  --yellow-ink: #fbbf24;
  --orange-ink: #fb923c;
  --blue-ink: #60a5fa;
  --purple-ink: #d8b4fe;
  --cyan-ink: #67e8f9;
  --primary-lt: rgba(26,187,156,0.14);
  --green-lt: rgba(47,179,68,0.16);
  --red-lt: rgba(214,57,57,0.16);
  --yellow-lt: rgba(245,159,0,0.16);
  --blue-lt: rgba(6,111,209,0.18);
  --azure-lt: rgba(66,153,225,0.16);
  --purple-lt: rgba(174,62,201,0.16);
  --cyan-lt: rgba(23,162,184,0.16);
  --shadow: rgba(0,0,0,0.4) 0 2px 4px 0;
  --shadow-card: 0 0 0 1px var(--border-translucent), rgba(0,0,0,0.3) 0 2px 4px 0;
}

[data-theme=dark] ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
}

[data-theme=dark] .topbar {
  background: rgba(20, 29, 43, 0.85);
}

[data-theme=dark] .tb-btn .dot {
  border-color: var(--bg-surface);
}

[data-theme=dark] .sidebar-user .avatar .online {
  border-color: var(--sidebar-bg);
}

.theme-toggle .theme-icon-light {
  display: none;
}

.theme-toggle .theme-icon-dark {
  display: block;
}

[data-theme=dark] .theme-toggle .theme-icon-light {
  display: block;
}

[data-theme=dark] .theme-toggle .theme-icon-dark {
  display: none;
}

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

body {
  font-family: var(--font);
  font-size: var(--font-size);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height);
  color: var(--text);
  background: var(--body-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:where(svg):not([width]):not([height]) {
  width: 1em;
  height: 1em;
}

@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 180ms;
  animation-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0s;
  }
}
.skip-link {
  position: fixed;
  top: 8px;
  inset-inline-start: 8px;
  z-index: 200;
  padding: 8px 14px;
  background: var(--text);
  color: var(--bg-surface);
  border-radius: var(--radius);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 150ms ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.nav-link:focus-visible {
  outline-color: var(--primary);
  outline-offset: -2px;
}

.search-box input:focus-visible {
  outline: none;
}

#main-content:focus {
  outline: none;
}

.sidebar {
  position: fixed;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 220ms cubic-bezier(0.2, 0, 0, 1);
}

.sidebar-brand {
  height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

.brand-icon {
  width: 28px;
  height: 28px;
  background: var(--primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 13px;
}

.brand-name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.2px;
}

.brand-name small {
  font-weight: 400;
  color: var(--sidebar-text);
  font-size: 13px;
  margin-inline-start: 2px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.sidebar-nav::-webkit-scrollbar {
  width: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

.nav-group {
  padding: 0 8px;
  margin-bottom: 2px;
}

.nav-label {
  padding: 16px 12px 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(123, 143, 163, 0.5);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: var(--font-weight-normal);
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms, color 120ms;
  margin-bottom: 1px;
  min-height: 32px;
}

.nav-link:hover {
  color: var(--sidebar-text-hover);
  background: var(--sidebar-hover);
  text-decoration: none;
}

.nav-link.active {
  color: var(--sidebar-text-active);
  background: var(--sidebar-active);
  font-weight: var(--font-weight-medium);
}

.nav-link .icon {
  width: 18px;
  height: 18px;
  opacity: 0.5;
  flex-shrink: 0;
}

.nav-link:hover .icon, .nav-link.active .icon {
  opacity: 0.85;
}

.nav-link .badge {
  margin-inline-start: auto;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  line-height: 1.6;
}

.badge-red {
  background: rgba(214, 57, 57, 0.15);
  color: #f87171;
}

.badge-teal {
  background: var(--primary-lt);
  color: var(--primary);
}

.badge-blue {
  background: rgba(66, 153, 225, 0.12);
  color: #60a5fa;
}

.nav-tree {
  display: flex;
  flex-direction: column;
}

.nav-toggle {
  background: transparent;
  border: 0;
  font: inherit;
  width: 100%;
  text-align: start;
  cursor: pointer;
}

.nav-toggle .nav-text {
  flex: 1;
}

.nav-chev {
  margin-inline-start: auto;
  opacity: 0.55;
  transition: transform 200ms cubic-bezier(0.2, 0, 0, 1), opacity 120ms;
  flex-shrink: 0;
}

.nav-toggle:hover .nav-chev {
  opacity: 0.9;
}

.nav-tree.open > .nav-toggle .nav-chev {
  transform: rotate(90deg);
  opacity: 1;
}

.nav-tree.has-active > .nav-toggle {
  color: var(--sidebar-text-hover);
}

.nav-tree.has-active > .nav-toggle .icon {
  opacity: 0.85;
}

.nav-tree .nav-sub {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 220ms cubic-bezier(0.2, 0, 0, 1);
}

.nav-tree.open .nav-sub {
  grid-template-rows: 1fr;
}

.nav-tree .nav-sub > .nav-sub-inner {
  overflow: hidden;
  min-height: 0;
  position: relative;
  padding: 4px 0 4px 28px;
}

.nav-tree .nav-sub > .nav-sub-inner::before {
  content: "";
  position: absolute;
  inset-inline-start: 19px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: var(--sidebar-border);
}

.nav-tree.open .nav-sub > .nav-sub-inner::before {
  background: rgba(255, 255, 255, 0.1);
}

.nav-sublink {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  font-size: 12.5px;
  color: var(--sidebar-text);
  border-radius: var(--radius-sm);
  text-decoration: none;
  position: relative;
  margin: 1px 0;
  transition: background 120ms, color 120ms, transform 120ms;
}

.nav-sublink::before {
  content: "";
  position: absolute;
  inset-inline-start: -9px;
  top: 50%;
  width: 8px;
  height: 1px;
  background: var(--sidebar-border);
  transform: translateY(-50%);
  transition: background 120ms, width 120ms;
}

.nav-sublink:hover {
  color: var(--sidebar-text-hover);
  background: var(--sidebar-hover);
  text-decoration: none;
}

.nav-sublink:hover::before {
  background: rgba(255, 255, 255, 0.25);
}

.nav-sublink.active {
  color: var(--sidebar-text-active);
  background: var(--sidebar-active);
  font-weight: var(--font-weight-medium);
}
.nav-sublink.active::before {
  background: var(--primary);
  width: 12px;
  inset-inline-start: -13px;
}

.nav-sublink .badge {
  margin-inline-start: auto;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  line-height: 1.6;
}

.sidebar-footer {
  border-top: 1px solid var(--sidebar-border);
  padding: 8px;
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background 120ms;
  cursor: pointer;
}

.sidebar-user:hover {
  background: var(--sidebar-hover);
}

.sidebar-user .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dk));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  position: relative;
}

.sidebar-user .avatar .online {
  position: absolute;
  bottom: -1px;
  inset-inline-end: -1px;
  width: 8px;
  height: 8px;
  background: var(--green);
  border: 2px solid var(--sidebar-bg);
  border-radius: 50%;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-info .name {
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-info .role {
  color: var(--sidebar-text);
  font-size: 11px;
  line-height: 1.2;
}

.sidebar-user .more-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--sidebar-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  opacity: 0;
  transition: opacity 120ms;
}

.sidebar-user:hover .more-btn {
  opacity: 1;
}

.topbar {
  position: fixed;
  top: 0;
  inset-inline-start: var(--sidebar-w);
  inset-inline-end: 0;
  height: 56px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 90;
  transition: left 220ms cubic-bezier(0.2, 0, 0, 1);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.sidebar-toggle {
  display: inline-flex;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background 120ms, color 120ms;
}

.sidebar-toggle:hover {
  background: var(--body-bg);
  color: var(--text);
}

.sidebar-toggle svg {
  width: 18px;
  height: 18px;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 95;
  opacity: 1;
  transition: opacity 180ms ease;
}

.sidebar-backdrop[hidden] {
  display: none;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumb .current {
  color: var(--text);
  font-weight: var(--font-weight-medium);
}

.breadcrumb .sep {
  color: var(--text-muted);
}

.breadcrumb a {
  color: inherit;
  text-decoration: none;
  transition: color 100ms;
}

.breadcrumb a:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.search-box {
  position: relative;
  width: 240px;
}

.search-box input {
  width: 100%;
  height: 32px;
  padding: 0 10px 0 32px;
  background: var(--body-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font: inherit;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color 150ms, box-shadow 150ms;
}

.search-box input::placeholder {
  color: var(--text-disabled);
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-lt);
}

.search-box .s-icon {
  position: absolute;
  inset-inline-start: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.search-box kbd {
  position: absolute;
  inset-inline-end: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 5px;
  font-family: inherit;
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  line-height: 18px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 2px;
}

.tb-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background 120ms, color 120ms;
  position: relative;
}

.tb-btn:hover {
  background: var(--body-bg);
  color: var(--text);
}

.tb-btn svg {
  width: 18px;
  height: 18px;
}

.tb-btn.tb-docs {
  width: auto;
  height: 32px;
  padding: 0 12px;
  gap: 6px;
  margin-inline-end: 6px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
}

.tb-btn.tb-docs:hover {
  background: color-mix(in srgb, var(--primary) 15%, transparent);
  color: var(--primary-dk, var(--primary));
}

.tb-btn.tb-docs svg {
  width: 15px;
  height: 15px;
}

.tb-btn .dot {
  position: absolute;
  top: 6px;
  inset-inline-end: 6px;
  width: 6px;
  height: 6px;
  background: var(--red);
  border: 1.5px solid white;
  border-radius: 50%;
}

.tb-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-dk));
  display: flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  color: white;
  margin-inline-start: 6px;
  cursor: pointer;
  padding: 0;
  transition: transform 120ms;
}

.tb-avatar:hover {
  transform: scale(1.06);
}

.main {
  margin-inline-start: var(--sidebar-w);
  padding-top: 56px;
  min-height: 100vh;
  transition: margin-left 220ms cubic-bezier(0.2, 0, 0, 1);
}

.page-wrapper {
  padding: 20px 24px 40px;
}

.page-header {
  margin-bottom: 20px;
}

.page-pretitle {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.page-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  margin: 0;
}

.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.page-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.row {
  display: grid;
  gap: var(--space-4);
  margin-bottom: 16px;
}

.row:last-child {
  margin-bottom: 0;
}

.col-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.col-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.col-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.col-8-4 {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}

.col-4-8 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}

.col-1 {
  grid-template-columns: minmax(0, 1fr);
}

.footer {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color-light);
}

.footer a {
  color: var(--primary);
}

@media (max-width: 1100px) {
  .col-8-4, .col-4-8 {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 1200px) {
  .col-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 920px) {
  .col-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 220ms ease;
    will-change: transform;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main {
    margin-inline-start: 0;
  }
  .topbar {
    inset-inline-start: 0;
    padding: 0 12px;
  }
  .topbar .breadcrumb,
  .topbar .search-box,
  .topbar .tb-notifications,
  .topbar .tb-messages {
    display: none;
  }
  .topbar .tb-avatar {
    width: 32px;
    height: 32px;
  }
  .col-4, .col-3, .col-2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .page-wrapper {
    padding: 12px;
  }
  body.sidebar-open {
    overflow: hidden;
  }
  body.sidebar-rail .sidebar {
    width: var(--sidebar-w);
  }
}
@media (min-width: 769px) {
  .sidebar-backdrop {
    display: none !important;
  }
}
@media (min-width: 769px) {
  body.sidebar-rail {
    --sidebar-w: 64px;
  }
  body.sidebar-rail .sidebar {
    overflow: visible;
  }
  body.sidebar-rail .sidebar-brand {
    padding: 0;
    justify-content: center;
  }
  body.sidebar-rail .brand-name {
    display: none;
  }
  body.sidebar-rail .nav-group {
    padding: 0 8px;
  }
  body.sidebar-rail .nav-label {
    display: none;
  }
  body.sidebar-rail .nav-link {
    justify-content: center;
    gap: 0;
    padding: 8px;
    position: relative;
  }
  body.sidebar-rail .nav-link .nav-text,
  body.sidebar-rail .nav-link .badge {
    display: none;
  }
  body.sidebar-rail .nav-chev {
    display: none;
  }
  body.sidebar-rail .nav-tree .nav-sub {
    display: none;
  }
  body.sidebar-rail .sidebar-user {
    padding: 8px;
    justify-content: center;
  }
  body.sidebar-rail .sidebar-user-info,
  body.sidebar-rail .sidebar-user .more-btn {
    display: none;
  }
  body.sidebar-rail .nav-link[data-rail-label]::after {
    content: attr(data-rail-label);
    position: absolute;
    inset-inline-start: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
    background: var(--text);
    color: var(--bg-surface);
    font-size: 11.5px;
    font-weight: var(--font-weight-medium);
    padding: 5px 9px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 120ms, transform 120ms;
    z-index: 110;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
  }
  body.sidebar-rail .nav-link[data-rail-label]:hover::after,
  body.sidebar-rail .nav-link[data-rail-label]:focus-visible::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
  body.sidebar-rail .sidebar-toggle svg {
    transform: rotate(180deg);
  }
  .sidebar-toggle svg {
    transition: transform 200ms ease;
  }
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 12.5px;
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 120ms, border-color 120ms, color 120ms, box-shadow 120ms;
  line-height: 1;
  white-space: nowrap;
}

.btn svg {
  width: 14px;
  height: 14px;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary-dk);
}

.btn-primary:hover {
  background: var(--primary-dk);
}

.btn-outline {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border-color: var(--border-color);
  box-shadow: var(--shadow);
}

.btn-outline:hover {
  background: var(--bg-surface-secondary);
  color: var(--text);
}

.btn-sm {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: box-shadow 150ms;
}

.card.is-refreshing {
  position: relative;
  pointer-events: none;
}

.card.is-refreshing::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent 0%, rgba(26, 187, 156, 0.1) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: card-refresh-sweep 700ms ease-out;
  pointer-events: none;
  z-index: 5;
}

@keyframes card-refresh-sweep {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .card.is-refreshing::before {
    animation: none;
    opacity: 0.3;
  }
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color-light);
  min-height: 44px;
}

.card-title {
  font-size: 13px;
  font-weight: var(--font-weight-bold);
  color: var(--text);
}

.card-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: var(--font-weight-normal);
  margin-top: 1px;
}

.card-options {
  display: flex;
  align-items: center;
  gap: 2px;
}

.card-opt-btn {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 100ms, color 100ms;
}

.card-opt-btn:hover {
  background: var(--body-bg);
  color: var(--text-secondary);
}

.card-opt-btn svg {
  width: 14px;
  height: 14px;
}

.card-body {
  padding: 16px;
}

.card-body.p-0 {
  padding: 0;
}

.card-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border-color-light);
}

.table-responsive {
  overflow-x: auto;
}

table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.table th {
  text-align: start;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  background: var(--bg-surface-secondary);
  border-bottom: 1px solid var(--border-color);
}

table.table td {
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-color-light);
  color: var(--text-secondary);
  vertical-align: middle;
}

table.table tr:last-child td {
  border-bottom: none;
}

table.table tbody tr {
  transition: background 80ms;
}

table.table tbody tr:hover {
  background: var(--bg-surface-secondary);
}

.cell-strong {
  color: var(--text);
  font-weight: var(--font-weight-medium);
}

.cell-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  font-weight: var(--font-weight-medium);
}

.cell-customer {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.cell-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 11.5px;
  font-weight: var(--font-weight-medium);
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-green {
  color: var(--green-ink);
}

.status-green::before {
  background: var(--green);
}

.status-yellow {
  color: var(--yellow-ink);
}

.status-yellow::before {
  background: var(--yellow);
}

.status-blue {
  color: var(--blue-ink);
}

.status-blue::before {
  background: var(--blue);
}

.status-red {
  color: var(--red-ink);
}

.status-red::before {
  background: var(--red);
}

.progress-thin {
  height: 5px;
  background: var(--bg-surface-secondary);
  border-radius: 3px;
  overflow: hidden;
}

.progress-thin .bar {
  height: 100%;
  border-radius: 3px;
  transition: width 200ms ease;
}

.live-pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(47, 179, 68, 0.5);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(47, 179, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(47, 179, 68, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .live-pulse {
    animation: none;
  }
}
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color-light);
}

.toggle-row:last-child {
  border-bottom: none;
}

.toggle-row .label {
  font-size: 13px;
  color: var(--text);
}

.toggle-row .desc {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 1px;
}

.toggle {
  width: 36px;
  height: 20px;
  background: #d1d5db;
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 150ms;
}

.toggle.on {
  background: var(--primary);
}

.toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: transform 150ms;
}

.toggle.on::after {
  transform: translateX(16px);
}

.toast-host {
  position: fixed;
  inset-inline-end: 16px;
  bottom: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--bg-surface);
  color: var(--text);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12), 0 0 0 1px var(--border-translucent);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: var(--font-weight-medium);
  max-width: 360px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms cubic-bezier(0.2, 0, 0, 1);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-success {
  border-inline-start: 3px solid var(--green);
  padding-inline-start: 11px;
}

.toast-error {
  border-inline-start: 3px solid var(--red);
  padding-inline-start: 11px;
}

.toast-warning {
  border-inline-start: 3px solid var(--yellow);
  padding-inline-start: 11px;
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    transition: opacity 80ms;
    transform: none;
  }
}
.menu-popover {
  position: fixed;
  z-index: 1100;
  min-width: 160px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12), 0 0 0 1px var(--border-translucent);
  padding: 4px;
  display: flex;
  flex-direction: column;
  animation: menu-in 140ms cubic-bezier(0.2, 0, 0, 1);
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.menu-item {
  appearance: none;
  background: transparent;
  border: none;
  text-align: start;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 100ms;
}

.menu-item:hover, .menu-item:focus-visible {
  background: var(--bg-surface-secondary);
}

.menu-separator {
  height: 1px;
  background: var(--border-color-light);
  margin: 4px 2px;
}

.menu-panel {
  padding: 0;
  min-width: 320px;
  max-width: 380px;
}

.menu-panel .panel-content {
  display: flex;
  flex-direction: column;
  max-height: min(72vh, 520px);
}

.menu-panel .panel-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color-light);
  flex-shrink: 0;
}

.menu-panel .panel-title {
  font-size: 13px;
  font-weight: var(--font-weight-bold);
  color: var(--text);
}

.menu-panel .panel-badge {
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--primary-lt);
  color: var(--primary);
}

.menu-panel .panel-action {
  margin-inline-start: auto;
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  padding: 0;
}

.menu-panel .panel-action:hover {
  text-decoration: underline;
}

.menu-panel .panel-list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex: 1 1 auto;
}

.menu-panel .panel-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-color-light);
  cursor: pointer;
  text-align: start;
  font: inherit;
  transition: background 100ms;
  position: relative;
}

.menu-panel .panel-row:last-child {
  border-bottom: none;
}

.menu-panel .panel-row:hover {
  background: var(--bg-surface-secondary);
}

.menu-panel .panel-row.unread::before {
  content: "";
  position: absolute;
  inset-inline-start: 5px;
  top: 18px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
}

.menu-panel .panel-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.menu-panel .panel-icon-info {
  background: var(--blue-lt);
  color: var(--blue);
}

.menu-panel .panel-icon-task {
  background: var(--primary-lt);
  color: var(--primary);
}

.menu-panel .panel-icon-alert {
  background: var(--red-lt);
  color: var(--red);
}

.menu-panel .panel-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
  font-size: 10.5px;
  font-weight: var(--font-weight-bold);
}

.menu-panel .panel-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.menu-panel .panel-from {
  font-size: 12.5px;
  font-weight: var(--font-weight-medium);
  color: var(--text);
}

.menu-panel .panel-row.unread .panel-from {
  font-weight: var(--font-weight-bold);
}

.menu-panel .panel-text {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-panel .panel-time {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 2px;
}

.menu-panel .panel-footer {
  padding: 10px 14px;
  text-align: center;
  border-top: 1px solid var(--border-color-light);
  flex-shrink: 0;
}

.menu-panel .panel-link {
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  color: var(--primary);
}

.chip {
  transition: background 120ms, color 120ms, opacity 150ms, transform 150ms;
}

.chip.active {
  background: var(--primary-lt);
  color: var(--primary-ink);
}

.chip-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-inline-start: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: 0.55;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}

.chip-close:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.08);
}

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 180ms ease;
}

.modal-backdrop.show {
  opacity: 1;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18), 0 0 0 1px var(--border-translucent);
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  transform: translateY(8px) scale(0.98);
  opacity: 0;
  transition: transform 220ms cubic-bezier(0.2, 0, 0, 1), opacity 180ms ease;
}

.modal-backdrop.show .modal-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-sm {
  max-width: 360px;
}

.modal-lg {
  max-width: 720px;
}

@media (max-width: 480px) {
  .modal-backdrop {
    padding: var(--space-3);
  }
  .modal-dialog,
  .modal-sm,
  .modal-lg {
    max-width: calc(100vw - var(--space-5));
  }
  .modal-header {
    padding: var(--space-3) var(--space-4);
  }
  .modal-body {
    padding: var(--space-3) var(--space-4);
  }
  .modal-footer {
    padding: var(--space-3) var(--space-4);
    flex-wrap: wrap;
  }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color-light);
  flex-shrink: 0;
}

.modal-title {
  font-size: 15px;
  font-weight: var(--font-weight-bold);
  color: var(--text);
  letter-spacing: -0.1px;
  margin: 0;
}

.modal-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 100ms, color 100ms;
}

.modal-close:hover {
  background: var(--bg-surface-secondary);
  color: var(--text);
}

.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1 1 auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: 12px 18px;
  border-top: 1px solid var(--border-color-light);
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .modal-backdrop, .modal-dialog {
    transition: opacity 80ms;
    transform: none;
  }
}
.modal-form-row {
  margin-bottom: 14px;
}

.modal-form-row:last-child {
  margin-bottom: 0;
}

.modal-form-row label {
  display: block;
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.modal-form-row input[type=text],
.modal-form-row input[type=date],
.modal-form-row textarea,
.modal-form-row select {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font: inherit;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color 120ms, box-shadow 120ms;
}

.modal-form-row textarea {
  height: auto;
  min-height: 80px;
  padding: 8px 10px;
  resize: vertical;
}

.modal-form-row input:focus,
.modal-form-row textarea:focus,
.modal-form-row select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-lt);
}

.color-swatches {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.color-swatches input[type=radio] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.color-swatches label {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  margin-bottom: 0;
  display: inline-block;
  position: relative;
  border: 2px solid transparent;
  transition: transform 120ms, border-color 120ms;
}

.color-swatches label:hover {
  transform: scale(1.08);
}

.color-swatches input[type=radio]:checked + label::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid var(--text);
  border-radius: 50%;
}

.color-swatches input[type=radio]:focus-visible + label {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.modal-events-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: 14px;
}

.modal-events-list:empty {
  display: none;
}

.modal-event-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-secondary);
  font-size: 13px;
  color: var(--text);
}

.modal-event-row .swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.modal-event-row .title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-event-row .row-actions {
  display: flex;
  gap: 2px;
  opacity: 0.6;
  transition: opacity 120ms;
}

.modal-event-row:hover .row-actions {
  opacity: 1;
}

.modal-event-row .row-btn {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-event-row .row-btn:hover {
  background: var(--bg-surface);
  color: var(--text);
}

.modal-events-empty {
  padding: 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 14px;
}

.btn-lg {
  height: 38px;
  padding: 0 16px;
  font-size: 13.5px;
}

.btn-icon {
  width: 32px;
  padding: 0;
  justify-content: center;
}

.btn-icon.btn-sm {
  width: 28px;
}

.btn-icon.btn-lg {
  width: 38px;
}

.btn-success {
  background: var(--green);
  color: white;
  border-color: #1a8a32;
}

.btn-success:hover {
  background: #1a8a32;
}

.btn-warning {
  background: var(--yellow);
  color: white;
  border-color: #c97f00;
}

.btn-warning:hover {
  background: #c97f00;
}

.btn-danger {
  background: var(--red);
  color: white;
  border-color: #a82b2b;
}

.btn-danger:hover {
  background: #a82b2b;
}

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

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

.btn[aria-busy=true] {
  pointer-events: none;
  opacity: 0.85;
}

.btn-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: btn-spin 700ms linear infinite;
}

@keyframes btn-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .btn-spinner {
    animation-duration: 1.6s;
  }
}
.btn-group {
  display: inline-flex;
}

.btn-group .btn {
  border-radius: 0;
  margin-inline-end: -1px;
}

.btn-group .btn:hover,
.btn-group .btn.active {
  z-index: 1;
}

.btn-group .btn:first-child {
  border-start-start-radius: var(--radius-sm);
  border-end-start-radius: var(--radius-sm);
}

.btn-group .btn:last-child {
  border-start-end-radius: var(--radius-sm);
  border-end-end-radius: var(--radius-sm);
  margin-inline-end: 0;
}

.btn-group .btn.active {
  background: var(--primary-lt);
  color: var(--primary);
  border-color: var(--primary);
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: var(--font-weight-bold);
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-dk));
  flex-shrink: 0;
  position: relative;
  text-transform: uppercase;
  font-size: 11px;
  line-height: 1;
  width: 32px;
  height: 32px;
  overflow: hidden;
}

.avatar.avatar-image {
  background: var(--bg-surface-secondary);
  overflow: hidden;
}

.avatar.avatar-image img, .avatar.avatar-image svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-xs {
  width: 20px;
  height: 20px;
  font-size: 8.5px;
}

.avatar-sm {
  width: 26px;
  height: 26px;
  font-size: 10px;
}

.avatar-md {
  width: 32px;
  height: 32px;
  font-size: 11px;
}

.avatar-lg {
  width: 44px;
  height: 44px;
  font-size: 14px;
}

.avatar-xl {
  width: 64px;
  height: 64px;
  font-size: 20px;
}

.avatar-xxl {
  width: 96px;
  height: 96px;
  font-size: 30px;
}

.avatar-status {
  position: absolute;
  bottom: 0;
  inset-inline-end: 0;
  width: 28%;
  height: 28%;
  min-width: 6px;
  min-height: 6px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--bg-surface);
}

.avatar-status.offline {
  background: var(--text-disabled);
}

.avatar-status.busy {
  background: var(--red);
}

.avatar-status.away {
  background: var(--yellow);
}

.avatar-stack {
  display: inline-flex;
}

.avatar-stack .avatar {
  border: 2px solid var(--bg-surface);
  margin-inline-start: -8px;
}

.avatar-stack .avatar:first-child {
  margin-inline-start: 0;
}

.avatar-stack .avatar.more {
  background: var(--bg-surface-secondary);
  color: var(--text-secondary);
}

.spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: btn-spin 700ms linear infinite;
}

.spinner-sm {
  width: 14px;
  height: 14px;
  border-width: 1.5px;
}

.spinner-lg {
  width: 36px;
  height: 36px;
  border-width: 3px;
}

.spinner-azure {
  border-top-color: var(--azure);
}

.spinner-yellow {
  border-top-color: var(--yellow);
}

.spinner-red {
  border-top-color: var(--red);
}

.spinner-dots {
  display: inline-flex;
  gap: var(--space-1);
  align-items: center;
}

.spinner-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  animation: dot-pulse 1.2s infinite ease-in-out;
}

.spinner-dots span:nth-child(2) {
  animation-delay: 200ms;
}

.spinner-dots span:nth-child(3) {
  animation-delay: 400ms;
}

@keyframes dot-pulse {
  0%, 80%, 100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .spinner-dots span {
    animation-duration: 2s;
  }
}
.loading-bar {
  height: 3px;
  background: var(--bg-surface-secondary);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.loading-bar::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: -40%;
  width: 40%;
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  animation: loading-bar-slide 1.4s ease-in-out infinite;
}

@keyframes loading-bar-slide {
  0% {
    inset-inline-start: -40%;
  }
  60% {
    inset-inline-start: 100%;
  }
  100% {
    inset-inline-start: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .loading-bar::before {
    animation-duration: 2.4s;
  }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-surface-secondary) 0%, var(--border-color-light) 50%, var(--bg-surface-secondary) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
  display: block;
}

.skeleton-text {
  height: 10px;
  margin-bottom: 8px;
}

.skeleton-text:last-child {
  margin-bottom: 0;
}

.skeleton-text-lg {
  height: 14px;
}

.skeleton-circle {
  border-radius: 50%;
}

.skeleton-rect {
  border-radius: var(--radius);
}

.chart-skeleton {
  width: 100%;
  height: 100%;
  min-height: inherit;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
    opacity: 0.6;
  }
}
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--text);
  color: white;
  font-size: 11px;
  font-weight: var(--font-weight-medium);
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms, transform 120ms;
  z-index: 100;
}

[data-tooltip]::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(2px);
  border: 4px solid transparent;
  border-top-color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms, transform 120ms;
  z-index: 100;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after,
[data-tooltip]:hover::before,
[data-tooltip]:focus-visible::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

[data-tooltip-pos=bottom]::after {
  bottom: auto;
  top: calc(100% + 6px);
  transform: translateX(-50%) translateY(-4px);
}

[data-tooltip-pos=bottom]::before {
  bottom: auto;
  top: 100%;
  border-top-color: transparent;
  border-bottom-color: var(--text);
  transform: translateX(-50%) translateY(-2px);
}

[data-tooltip-pos=bottom]:hover::after, [data-tooltip-pos=bottom]:hover::before {
  transform: translateX(-50%) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-tooltip]::after, [data-tooltip]::before {
    transition: opacity 80ms;
  }
}
.tabs-pill {
  display: inline-flex;
  background: var(--bg-surface-secondary);
  padding: 3px;
  border-radius: var(--radius);
  gap: 2px;
}

.tabs-pill .tab {
  padding: 6px 14px;
  background: transparent;
  border: none;
  font: inherit;
  font-size: 12.5px;
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  transition: background 100ms, color 100ms;
}

.tabs-pill .tab:hover {
  color: var(--text);
}

.tabs-pill .tab.active {
  background: var(--bg-surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.tabs-underline {
  display: flex;
  border-bottom: 1px solid var(--border-color-light);
  gap: var(--space-1);
}

.tabs-underline .tab {
  padding: 9px 14px 11px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font: inherit;
  font-size: 13px;
  font-weight: var(--font-weight-medium);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 100ms, border-color 100ms;
  margin-bottom: -1px;
}

.tabs-underline .tab:hover {
  color: var(--text);
}

.tabs-underline .tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.pagination {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.pagination .page-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 12.5px;
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 100ms, color 100ms, border-color 100ms;
}

.pagination .page-btn:hover {
  background: var(--bg-surface-secondary);
  color: var(--text);
}

.pagination .page-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.pagination .page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pagination .page-btn svg {
  width: 12px;
  height: 12px;
}

.pagination .page-ellipsis {
  color: var(--text-disabled);
  padding: 0 4px;
  font-size: 12px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 100ms;
}

.breadcrumbs a:hover {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumbs .sep {
  color: var(--text-disabled);
  user-select: none;
}

.breadcrumbs .current {
  color: var(--text);
  font-weight: var(--font-weight-medium);
}

.stepper {
  display: flex;
  align-items: flex-start;
  width: 100%;
  gap: 0;
}

.stepper .step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  min-width: 80px;
}

.stepper .step .num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: var(--font-weight-bold);
  color: var(--text-muted);
  flex-shrink: 0;
  transition: background 120ms, border-color 120ms, color 120ms;
}

.stepper .step .label {
  font-size: 11.5px;
  font-weight: var(--font-weight-medium);
  color: var(--text-muted);
  text-align: center;
}

.stepper .step.done .num {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.stepper .step.done .num::after {
  content: "";
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.5'%3E%3Cpath d='M3 8l3 3 7-7'/%3E%3C/svg%3E") center/14px no-repeat;
  position: absolute;
}

.stepper .step.done .num span {
  display: none;
}

.stepper .step.active .num {
  background: var(--bg-surface);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-lt);
}

.stepper .step.active .label,
.stepper .step.done .label {
  color: var(--text);
}

.stepper .line {
  flex: 1 1 auto;
  height: 2px;
  background: var(--border-color);
  margin: 15px 4px 0;
  min-width: 16px;
  transition: background 120ms;
}

.stepper .line.done {
  background: var(--primary);
}

.rating-stars {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}

.rating-stars button {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  color: var(--text-disabled);
  transition: color 100ms, transform 100ms;
}

.rating-stars button.on {
  color: var(--yellow);
}

.rating-stars button:hover {
  transform: scale(1.15);
}

.rating-stars svg {
  width: 22px;
  height: 22px;
  display: block;
  margin: 0 auto;
}

.rating-stars-readonly button {
  pointer-events: none;
}

.empty-state {
  text-align: center;
  padding: 36px 20px;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--bg-surface-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.empty-state-icon svg {
  width: 30px;
  height: 30px;
}

.empty-state-title {
  font-size: 15px;
  font-weight: var(--font-weight-bold);
  color: var(--text);
  margin-bottom: 4px;
}

.empty-state-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.list-group {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

.list-group-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 14px;
  background: var(--bg-surface);
  border: none;
  border-bottom: 1px solid var(--border-color-light);
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background 100ms, color 100ms;
  text-align: start;
  width: 100%;
}

.list-group-item:last-child {
  border-bottom: none;
}

.list-group-item:hover {
  background: var(--bg-surface-secondary);
  text-decoration: none;
}

.list-group-item.active {
  background: var(--primary-lt);
  color: var(--primary);
  font-weight: var(--font-weight-medium);
}

.list-group-item .meta {
  margin-inline-start: auto;
  color: var(--text-muted);
  font-size: 11.5px;
}

code, .code-inline {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-surface-secondary);
  color: var(--text);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--border-color-light);
}

pre {
  background: var(--bg-surface-secondary);
  color: var(--text);
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  overflow-x: auto;
  margin: 0;
}

pre code {
  background: transparent;
  padding: 0;
  border: none;
  font-size: inherit;
}

kbd {
  font-family: var(--font);
  font-size: 11px;
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 6px;
  line-height: 1.5;
  display: inline-block;
}

blockquote {
  margin: 0;
  padding: 4px 16px;
  border-inline-start: 3px solid var(--primary);
  font-size: 14px;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.6;
}

blockquote footer {
  margin-top: 10px;
  font-size: 12px;
  font-style: normal;
  color: var(--text-muted);
}

blockquote footer cite {
  font-style: normal;
  color: var(--text);
  font-weight: var(--font-weight-medium);
}

.divider-label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 11px;
  font-weight: var(--font-weight-bold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 16px 0;
}

.divider-label::before, .divider-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.divider-plain {
  height: 1px;
  background: var(--border-color);
  border: none;
  margin: 16px 0;
}

.divider-dashed {
  height: 0;
  background: none;
  border: none;
  border-top: 1px dashed var(--border-color);
  margin: 16px 0;
}

.cmdk-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 22, 35, 0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
  animation: cmdk-fade-in 120ms ease-out;
}

@keyframes cmdk-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.cmdk-dialog {
  width: min(580px, 100vw - 32px);
  max-height: 70vh;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18), 0 0 0 1px var(--border-translucent);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: cmdk-pop-in 140ms cubic-bezier(0.2, 0, 0, 1);
}

@keyframes cmdk-pop-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.cmdk-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color-light);
}

.cmdk-search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.cmdk-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
}

.cmdk-input::placeholder {
  color: var(--text-muted);
}

.cmdk-esc {
  font-family: var(--font);
  font-size: 10.5px;
  color: var(--text-muted);
  padding: 2px 6px;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.cmdk-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}

.cmdk-section {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 10px 10px 4px;
}

.cmdk-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  text-align: start;
}

.cmdk-item:hover,
.cmdk-item.active {
  background: var(--primary-lt);
  color: var(--primary);
}

.cmdk-item-icon {
  width: 24px;
  height: 24px;
  background: var(--bg-surface-secondary);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cmdk-item.active .cmdk-item-icon {
  background: rgba(26, 187, 156, 0.14);
  color: var(--primary);
}

.cmdk-item-label {
  flex: 1;
}

.cmdk-item-kbd {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0;
}

.cmdk-item.active .cmdk-item-kbd {
  opacity: 1;
}

.cmdk-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.cmdk-footer {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  padding: 8px 16px;
  border-top: 1px solid var(--border-color-light);
  font-size: 11px;
  color: var(--text-muted);
}

.cmdk-footer kbd {
  font-family: var(--font);
  font-size: 10.5px;
  padding: 1px 5px;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  margin-inline-end: 4px;
}

body.cmdk-open {
  overflow: hidden;
}

.accordion {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.accordion-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-surface);
  overflow: hidden;
  transition: border-color 120ms;
}

.accordion-item:hover {
  border-color: var(--text-muted);
}

.accordion-item[open] {
  border-color: var(--primary);
}

.accordion-summary {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 14px 16px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: var(--font-weight-medium);
  color: var(--text);
  user-select: none;
  list-style: none;
}

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

.accordion-summary .chev {
  margin-inline-start: auto;
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: transform 200ms;
}

.accordion-item[open] .accordion-summary .chev {
  transform: rotate(180deg);
  color: var(--primary);
}

.accordion-content {
  padding: 0 16px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 22, 35, 0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 250;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  inset-inline-end: 0;
  width: min(420px, 100vw);
  height: 100vh;
  background: var(--bg-surface);
  z-index: 260;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 240ms cubic-bezier(0.2, 0, 0, 1);
  display: flex;
  flex-direction: column;
}

.drawer.open {
  transform: translateX(0);
}

.drawer.left {
  inset-inline-end: auto;
  inset-inline-start: 0;
  transform: translateX(-100%);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.12);
}

.drawer.left.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color-light);
}

.drawer-title {
  font-size: 15px;
  font-weight: var(--font-weight-bold);
  color: var(--text);
  flex: 1;
}

.drawer-close {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-close:hover {
  background: var(--bg-surface-secondary);
  color: var(--text);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.drawer-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color-light);
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
}

.timeline {
  position: relative;
  padding-inline-start: 24px;
}

.timeline::before {
  content: "";
  position: absolute;
  inset-inline-start: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border-color);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-bottom: 18px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  inset-inline-start: -22px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
}

.timeline-item.is-primary::before {
  border-color: var(--primary);
  background: var(--primary);
}

.timeline-item.is-green::before {
  border-color: var(--green);
  background: var(--green);
}

.timeline-item.is-yellow::before {
  border-color: var(--yellow);
  background: var(--yellow);
}

.timeline-item.is-red::before {
  border-color: var(--red);
  background: var(--red);
}

.timeline-item.is-blue::before {
  border-color: var(--blue);
  background: var(--blue);
}

.timeline-item .ti-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.timeline-item .ti-title {
  font-size: 13px;
  font-weight: var(--font-weight-medium);
  color: var(--text);
}

.timeline-item .ti-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.5;
}

.banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--primary-lt);
  border: 1px solid rgba(26, 187, 156, 0.18);
  font-size: 13px;
  color: var(--text);
}

.banner.banner-warning {
  background: var(--yellow-lt);
  border-color: rgba(245, 159, 0, 0.22);
}

.banner.banner-danger {
  background: var(--red-lt);
  border-color: rgba(214, 57, 57, 0.22);
}

.banner.banner-info {
  background: var(--blue-lt);
  border-color: rgba(6, 111, 209, 0.22);
}

.banner-icon {
  flex-shrink: 0;
  color: var(--primary);
}

.banner.banner-warning .banner-icon {
  color: var(--yellow);
}

.banner.banner-danger .banner-icon {
  color: var(--red);
}

.banner.banner-info .banner-icon {
  color: var(--blue);
}

.banner-body {
  flex: 1;
}

.banner-body strong {
  color: var(--text);
}

.banner-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.popover-trigger {
  position: relative;
  display: inline-flex;
}

.popover-trigger > .popover-content {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  width: 240px;
  padding: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.1);
  font-size: 12.5px;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms, transform 120ms;
  z-index: 50;
}

.popover-trigger:hover > .popover-content,
.popover-trigger:focus-within > .popover-content {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.popover-title {
  font-weight: var(--font-weight-bold);
  font-size: 12.5px;
  color: var(--text);
  margin-bottom: 4px;
}

.popover-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  gap: 6px;
}

.empty-state .empty-state-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-surface-secondary);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.empty-state .empty-state-icon svg {
  width: 22px;
  height: 22px;
}

.empty-state .empty-state-title {
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  color: var(--text);
}

.empty-state .empty-state-text {
  font-size: 12.5px;
  max-width: 320px;
  line-height: 1.5;
}

.empty-state .empty-state-actions {
  margin-top: 12px;
  display: flex;
  gap: var(--space-2);
}

.stat {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 14px 16px 0;
}

.stat-head {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.stat-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.stat-icon svg {
  width: 16px;
  height: 16px;
}

.stat-icon.teal {
  background: var(--primary-lt);
  color: var(--primary);
}

.stat-icon.blue {
  background: var(--blue-lt);
  color: var(--blue);
}

.stat-icon.green {
  background: var(--green-lt);
  color: var(--green);
}

.stat-icon.yellow {
  background: var(--yellow-lt);
  color: var(--yellow);
}

.stat-icon.red {
  background: var(--red-lt);
  color: var(--red);
}

.stat-icon.purple {
  background: var(--purple-lt);
  color: var(--purple);
}

.stat-icon.azure {
  background: var(--azure-lt);
  color: var(--azure);
}

.stat-label {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-chip {
  flex: 0 0 auto;
  font-size: 10.5px;
  font-weight: var(--font-weight-bold);
  line-height: 1.6;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--bg-surface-secondary);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.stat-chip.green {
  background: var(--green-lt);
  color: var(--green-ink);
}

.stat-chip.yellow {
  background: var(--yellow-lt);
  color: var(--yellow-ink);
}

.stat-chip.red {
  background: var(--red-lt);
  color: var(--red-ink);
}

.stat-figure {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 11px;
  min-width: 0;
}

.stat-value {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stat-change {
  font-size: 11px;
  font-weight: var(--font-weight-bold);
  display: inline-flex;
  align-items: center;
  gap: 1px;
}

.stat-change svg {
  width: 12px;
  height: 12px;
}

/* The arrow comes from the sign of the change; the colour comes from whether
   that sign is good news. On a cost console a rise in spend is red, which is
   the opposite of the default `.up = green`. */
.stat-change.up {
  color: var(--green);
}

.stat-change.down {
  color: var(--red);
}

.stat-change.good {
  color: var(--green);
}

.stat-change.bad {
  color: var(--red);
}

.stat-subtext {
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stat-foot {
  margin-top: auto;
  height: 49px;
  padding: 11px 0 12px;
  border-top: 1px solid var(--border-color-light);
  display: flex;
  align-items: flex-end;
  box-sizing: border-box;
}

.stat-foot.is-empty {
  border-top-color: transparent;
}

.share,
.spark {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.share-rail {
  flex: 1;
  min-width: 0;
  height: 8px;
  border-radius: 999px;
  background: var(--border-color-light);
  overflow: hidden;
}

.share-rail i {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.share-label {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: var(--font-weight-bold);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1.4;
}

.spark-bars {
  flex: 1;
  min-width: 0;
  height: 26px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  direction: ltr;
}

.spark-bars .bar {
  flex: 1;
  min-width: 0;
  border-radius: 2px 2px 1px 1px;
  background: var(--primary);
  opacity: 0.26;
  transition: height 0.3s ease, opacity 0.2s ease;
}

.spark-bars .bar:last-child {
  opacity: 1;
}

.stat-card:hover .spark-bars .bar {
  opacity: 0.45;
}

.stat-card:hover .spark-bars .bar:last-child {
  opacity: 1;
}

.stat-card {
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.stat-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px var(--border-translucent), rgba(30, 38, 51, 0.07) 0 6px 16px 0;
}

.chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 16px 0;
}

.chart-header-left .chart-stat {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1;
  margin-bottom: 4px;
}

.chart-tabs {
  display: flex;
  gap: 0;
  background: var(--body-bg);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.chart-tab {
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: var(--font-weight-medium);
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 3px;
  border: none;
  background: transparent;
  transition: background 120ms, color 120ms;
}

.chart-tab.active {
  background: var(--bg-surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.chart-tab:hover:not(.active) {
  color: var(--text-secondary);
}

.chart-head-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (pointer: coarse) {
  .chart-tab {
    padding: 6px 12px;
    font-size: 12px;
  }
}
.chart-area {
  padding: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 240px;
}

.chart-area svg {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-grid-line {
  stroke: var(--border-color-light);
  stroke-width: 1;
  stroke-dasharray: 4 3;
}

.chart-label {
  font-family: var(--font);
  font-size: 10px;
  fill: var(--text-muted);
}

.chart-path {
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-fill {
  opacity: 0.04;
}

.activity-list {
  list-style: none;
}

.activity-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color-light);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.activity-body {
  flex: 1;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.activity-body strong {
  color: var(--text);
  font-weight: var(--font-weight-medium);
}

.activity-time {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  margin-top: 1px;
}

.visitor-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-color-light);
  font-size: 13px;
}

.visitor-row:last-child {
  border-bottom: none;
}

.visitor-flag {
  font-size: 16px;
  line-height: 1;
}

.visitor-name {
  flex: 1;
  color: var(--text);
  font-weight: var(--font-weight-normal);
}

.visitor-pct {
  font-weight: var(--font-weight-bold);
  color: var(--text);
  min-width: 32px;
  text-align: end;
  font-size: 12.5px;
}

.visitor-bar {
  width: 80px;
  height: 4px;
  background: var(--border-color-light);
  border-radius: 2px;
  overflow: hidden;
}

.visitor-bar .fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
}

.todo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-color-light);
}

.todo-row:last-child {
  border-bottom: none;
}

.todo-cb {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 120ms, border-color 120ms;
  position: relative;
}

.todo-cb svg {
  display: none;
}

.todo-cb::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: translate(-55%, -65%) rotate(45deg);
  opacity: 0;
  transition: opacity 100ms;
}

.todo-cb:hover {
  border-color: var(--primary);
}

.todo-cb.done {
  background: var(--primary);
  border-color: var(--primary);
}

.todo-cb.done::after {
  opacity: 1;
}

.todo-text {
  flex: 1;
  font-size: 13px;
  color: var(--text);
}

.todo-row.done .todo-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.todo-date {
  font-size: 11px;
  color: var(--text-muted);
}

.todo-prio {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.donut-block {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.donut-svg {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  position: relative;
}

.donut-svg svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-center-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.donut-center-label .num {
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
}

.donut-center-label .sub {
  font-size: 10px;
  color: var(--text-muted);
}

.donut-legend {
  flex: 1;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 3px 0;
}

.donut-legend-item .dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.donut-legend-item .pct {
  margin-inline-start: auto;
  font-weight: var(--font-weight-bold);
  color: var(--text);
  font-size: 11.5px;
}

.version-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.version-label {
  font-size: 12.5px;
  color: var(--text-secondary);
  width: 48px;
  font-weight: var(--font-weight-medium);
}

.version-bar {
  flex: 1;
  height: 4px;
  background: var(--border-color-light);
  border-radius: 2px;
  overflow: hidden;
}

.version-bar .fill {
  height: 100%;
  border-radius: 2px;
}

.version-pct {
  font-size: 12px;
  color: var(--text-muted);
  width: 30px;
  text-align: end;
  font-weight: var(--font-weight-medium);
}

.storage-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--border-color-light);
  margin-bottom: 12px;
}

.storage-bar > div {
  height: 100%;
}

.storage-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
}

.storage-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.storage-legend-item .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.storage-legend-item .val {
  margin-inline-start: auto;
  font-weight: var(--font-weight-medium);
  color: var(--text);
}

.profile-ring-box {
  text-align: center;
  padding: 8px 0;
}

.profile-ring-box .ring-wrap {
  width: 80px;
  height: 80px;
  margin: 0 auto 8px;
  position: relative;
}

.profile-ring-box .ring-wrap svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: var(--border-color-light);
  stroke-width: 5;
}

.ring-fill {
  fill: none;
  stroke: var(--primary);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 213.6;
}

.profile-ring-box .ring-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  font-weight: 600;
}

.profile-ring-box .ring-center span {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 400;
}

.profile-ring-box .note {
  font-size: 12px;
  color: var(--text-muted);
}

.profile-ring-box .ring-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--primary);
  font-weight: var(--font-weight-medium);
}

table.has-selection tbody tr:has(input[type=checkbox]:checked) {
  background: var(--primary-lt);
}

.bulk-selection-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-inline-end: 12px;
}

.btn-sm {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.dt-container {
  font-family: var(--font);
  font-size: 13px;
  color: var(--text-secondary);
}

.dt-layout-row.dt-layout-table {
  padding: 0;
}

.dt-layout-row:not(.dt-layout-table) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  gap: var(--space-3);
}

.dt-layout-row + .dt-layout-row.dt-layout-table {
  border-top: 1px solid var(--border-color-light);
}

.dt-layout-row.dt-layout-table + .dt-layout-row {
  border-top: 1px solid var(--border-color-light);
}

.dt-search {
  position: relative;
  width: 220px;
}

.dt-search label {
  display: none;
}

.dt-search input {
  width: 100%;
  height: 32px;
  padding: 0 10px 0 32px;
  background: var(--body-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font: inherit;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color 150ms, box-shadow 150ms;
}

.dt-search::before {
  content: "";
  position: absolute;
  inset-inline-start: 9px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%239ba5b1' stroke-width='1.5'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3.5 3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  pointer-events: none;
}

.dt-search input::placeholder {
  color: var(--text-disabled);
}

.dt-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-lt);
}

.dt-info {
  font-size: 12px;
  color: var(--text-muted);
}

.dt-paging {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.dt-paging .dt-paging-button {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background 100ms, color 100ms, border-color 100ms;
}

.dt-paging .dt-paging-button:hover:not(.disabled):not(.current) {
  background: var(--bg-surface-secondary);
  color: var(--text);
}

.dt-paging .dt-paging-button.current {
  background: var(--primary);
  color: white;
  border-color: var(--primary-dk);
}

.dt-paging .dt-paging-button.disabled {
  color: var(--text-disabled);
  cursor: not-allowed;
  opacity: 0.6;
}

.dt-paging .ellipsis {
  color: var(--text-disabled);
  padding: 0 4px;
  font-size: 12px;
}

table.dataTable thead th {
  position: relative;
  user-select: none;
}

table.dataTable thead th .dt-column-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

table.dataTable thead th.dt-orderable-asc,
table.dataTable thead th.dt-orderable-desc {
  cursor: pointer;
}

table.dataTable thead th[data-orderable=false],
table.dataTable thead th.dt-orderable-none {
  cursor: default;
}

table.dataTable thead th.dt-orderable-none .dt-column-order {
  display: none;
}

.dt-column-order {
  display: inline-block;
  width: 10px;
  height: 14px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px 14px;
  border-radius: 3px;
  opacity: 0.7;
  transition: opacity 120ms, background-color 120ms;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 14'%3E%3Cpath fill='%239ba5b1' d='M5 1L1 5h8z'/%3E%3Cpath fill='%239ba5b1' d='M5 13L1 9h8z'/%3E%3C/svg%3E");
}

table.dataTable thead th:hover .dt-column-order {
  opacity: 1;
}

table.dataTable thead th.dt-ordering-asc .dt-column-order {
  opacity: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 14'%3E%3Cpath fill='%231ABB9C' d='M5 1L1 5h8z'/%3E%3Cpath fill='%23d8dee5' d='M5 13L1 9h8z'/%3E%3C/svg%3E");
}

table.dataTable thead th.dt-ordering-desc .dt-column-order {
  opacity: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 14'%3E%3Cpath fill='%23d8dee5' d='M5 1L1 5h8z'/%3E%3Cpath fill='%231ABB9C' d='M5 13L1 9h8z'/%3E%3C/svg%3E");
}

.dt-column-order:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

table.dataTable thead th.dt-ordering-asc .dt-column-title,
table.dataTable thead th.dt-ordering-desc .dt-column-title {
  color: var(--text);
}

table.dataTable .dt-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
}

html[dir=rtl] body {
  font-family: var(--font);
}

.stat-label,
table.table th,
.nav-label,
.page-pretitle,
.chart-tab,
.cmdk-section {
  letter-spacing: 0;
  text-transform: none;
  font-size: 11.5px;
}

.stat-value,
.stat-subtext,
.cell-mono,
.num {
  font-variant-numeric: tabular-nums;
}

.stat-value {
  letter-spacing: 0;
}

[dir=rtl] .search-box input,
[dir=rtl] .dt-search input {
  padding-inline: 32px 10px;
}

[dir=rtl] .search-box .s-icon {
  inset-inline: 9px auto;
}

[dir=rtl] .search-box kbd {
  inset-inline: auto 6px;
}

[dir=rtl] table.table th.sorting::after,
[dir=rtl] table.table th.sorting_asc::after,
[dir=rtl] table.table th.sorting_desc::after {
  margin-inline: 6px 0;
}

:root {
  --font: 'Vazirmatn', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'Vazirmatn', ui-monospace, 'SF Mono', Monaco, Consolas, monospace;
}

.money {
  white-space: nowrap;
}

.money .unit {
  font-size: 0.72em;
  color: var(--text-muted);
  font-weight: var(--font-weight-normal);
  margin-inline-start: 3px;
}

.money-usd {
  color: var(--text-muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  /* The dollar figures already carry LRI/PDI from the formatter; this is the
     belt-and-braces for anything that reaches the DOM without them. */
  unicode-bidi: isolate;
  white-space: nowrap;
}

.nowrap {
  white-space: nowrap;
}

.sub-note {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

.sub-note strong {
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
}

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

.stat-icon.red {
  background: var(--red-lt);
  color: var(--red);
}

.stat-icon.azure {
  background: var(--azure-lt);
  color: var(--azure);
}

.stat-icon.teal {
  background: var(--primary-lt);
  color: var(--primary);
}

.stat-icon.blue {
  background: var(--blue-lt);
  color: var(--blue);
}

.stat-icon.green {
  background: var(--green-lt);
  color: var(--green);
}

.stat-icon.yellow {
  background: var(--yellow-lt);
  color: var(--yellow);
}

.stat-icon.purple {
  background: var(--purple-lt);
  color: var(--purple);
}

.stat-value .unit {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  /* 2px was tight enough that the figure read as one run of characters
     ("۶۳۳٬۰۶۲تومان") instead of as a number and its unit. */
  margin-inline-start: 5px;
}

.chart-host {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 200px;
}

.chart-host svg {
  display: block;
  width: 100%;
  height: 100%;
}

.chart-host .grid-line {
  stroke: var(--border-color-light);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.chart-host .axis-label {
  font-family: var(--font);
  font-size: 11px;
  fill: var(--text-muted);
}

.chart-host .bar-grant {
  fill: var(--azure);
}

.chart-host .bar-paid {
  fill: var(--primary);
}

.chart-host .tok-line {
  fill: none;
  stroke: var(--orange);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}

.chart-host .tok-dot {
  fill: var(--orange);
}

.chart-host .hit {
  fill: transparent;
  cursor: crosshair;
}

.chart-host .hit:hover + .hover-col,
.chart-host .hover-col {
  pointer-events: none;
}

.chart-host .hover-band {
  fill: var(--text);
  opacity: 0;
  transition: opacity 100ms;
}

.chart-host .hit:hover ~ .hover-band {
  opacity: 0.05;
}

.chart-host .bar-paid, .chart-host .bar-grant {
  transition: opacity 120ms;
}

.chart-host .hit:hover ~ .bars .bar-paid,
.chart-host .hit:hover ~ .bars .bar-grant {
  opacity: 0.72;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 0 16px 14px;
  font-size: 12px;
  color: var(--text-secondary);
}

.chart-legend .item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend .swatch {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex-shrink: 0;
}

.chart-legend .swatch.paid {
  background: var(--primary);
}

.chart-legend .swatch.grant {
  background: var(--azure);
}

.chart-legend .swatch.tok {
  background: var(--orange);
  height: 3px;
  border-radius: 2px;
  width: 14px;
}

.kv {
  display: flex;
  flex-direction: column;
}

.kv .row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color-light);
  font-size: 12.5px;
  margin: 0;
}

.kv .row:last-child {
  border-bottom: none;
}

.kv .row .k {
  color: var(--text-secondary);
  min-width: 0;
}

.kv .row .v {
  color: var(--text);
  font-weight: var(--font-weight-medium);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tile-link {
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  color: var(--primary);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

.tile-link:hover {
  text-decoration: underline;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: var(--font-weight-medium);
  background: var(--bg-surface-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color-light);
}

.chip.teal {
  background: var(--primary-lt);
  color: var(--primary-dk);
  border-color: transparent;
}

.chip.green {
  background: var(--green-lt);
  color: #1a7f2c;
  border-color: transparent;
}

.chip.red {
  background: var(--red-lt);
  color: var(--red);
  border-color: transparent;
}

.chip.blue {
  background: var(--blue-lt);
  color: var(--blue);
  border-color: transparent;
}

.chip.yellow {
  background: var(--yellow-lt);
  color: #b45309;
  border-color: transparent;
}

.skeleton-line {
  height: 12px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--bg-surface-secondary) 0%, var(--border-color-light) 50%, var(--bg-surface-secondary) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color-light);
  border-radius: var(--radius);
}

.seg button {
  appearance: none;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  padding: 5px 11px;
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms, color 120ms;
}

.seg button:hover:not(.active) {
  color: var(--text);
  background: var(--bg-surface);
}

.seg button.active {
  background: var(--bg-surface);
  color: var(--text);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.06));
}

.seg.sm button {
  padding: 3px 9px;
  font-size: 11.5px;
}

.dt {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dt-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color-light);
}

.dt-toolbar-lead {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 0;
}

.dt-toolbar-right {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dt-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 220px;
  max-width: 340px;
}

.dt-search svg {
  position: absolute;
  inset-inline-start: 9px;
  width: 14px;
  height: 14px;
  color: var(--text-disabled);
  pointer-events: none;
}

.dt-search input {
  width: 100%;
  height: 32px;
  /* Room for the magnifier on the inline start, in both directions. */
  padding-inline: 30px 10px;
  font: inherit;
  font-size: 12.5px;
  color: var(--text);
  background: var(--body-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 150ms, box-shadow 150ms;
}

.dt-search input::placeholder {
  color: var(--text-disabled);
}

.dt-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-lt);
}

.dt-search input::-webkit-search-cancel-button {
  display: none;
}

.dt-count {
  font-size: 11.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dt-pagesize select {
  height: 32px;
  padding-inline: 8px 6px;
  font: inherit;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--body-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  outline: none;
  cursor: pointer;
}

.dt-scroll {
  overflow: auto;
  overscroll-behavior: contain;
}

.dt-scroll::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.dt-scroll::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 6px;
  border: 3px solid var(--bg-surface);
}

.dt-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--text-disabled);
}

.dt-table {
  margin: 0;
  width: 100%;
}

.dt-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-surface-secondary);
  white-space: nowrap;
  padding-top: 9px;
  padding-bottom: 9px;
}

.dt-table thead th.dt-sortable {
  cursor: pointer;
  user-select: none;
}

.dt-table thead th.dt-sortable:hover {
  color: var(--text);
}

.dt-th {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dt-order {
  width: 8px;
  height: 13px;
  flex-shrink: 0;
  opacity: 0.42;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 8px 13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 13'%3E%3Cpath fill='%239ba5b1' d='M4 0.5L0.5 4h7z'/%3E%3Cpath fill='%239ba5b1' d='M4 12.5L0.5 9h7z'/%3E%3C/svg%3E");
}

.dt-table thead th.dt-sortable:hover .dt-order {
  opacity: 1;
}

.dt-table thead th.dt-asc .dt-order {
  opacity: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 13'%3E%3Cpath fill='%231ABB9C' d='M4 0.5L0.5 4h7z'/%3E%3Cpath fill='%23d8dee5' d='M4 12.5L0.5 9h7z'/%3E%3C/svg%3E");
}

.dt-table thead th.dt-desc .dt-order {
  opacity: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 13'%3E%3Cpath fill='%23d8dee5' d='M4 0.5L0.5 4h7z'/%3E%3Cpath fill='%231ABB9C' d='M4 12.5L0.5 9h7z'/%3E%3C/svg%3E");
}

.dt-table thead th.start .dt-th {
  justify-content: flex-start;
}

.dt-table thead th.end .dt-th,
.dt-table thead th.end {
  text-align: end;
}

.dt-table thead th.center {
  text-align: center;
}

.dt-table td {
  vertical-align: middle;
}

.dt-table td.end, .dt-table th.end {
  text-align: end;
}

.dt-table td.center, .dt-table th.center {
  text-align: center;
}

.dt-table td .dt-plain {
  font-variant-numeric: tabular-nums;
}

.dt-empty-row td {
  padding: 0;
}

.dt-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 44px 16px;
  color: var(--text-muted);
  font-size: 12.5px;
  text-align: center;
}

.dt-empty svg {
  width: 22px;
  height: 22px;
  opacity: 0.55;
}

.dt-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 16px;
  border-top: 1px solid var(--border-color-light);
}

.dt-range {
  font-size: 11.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.dt-paging {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 3px;
}

.dt-page-btn {
  appearance: none;
  font: inherit;
  font-size: 12px;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm, 4px);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: background 100ms, color 100ms, border-color 100ms;
}

.dt-page-btn:hover:not(:disabled):not(.current) {
  background: var(--bg-surface-secondary);
  color: var(--text);
}

.dt-page-btn.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: var(--font-weight-medium);
}

.dt-page-btn:disabled {
  color: var(--text-disabled);
  cursor: default;
  opacity: 0.6;
}

.dt-page-btn.dots {
  border-color: transparent;
  background: none;
}

.mini {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  min-width: 92px;
}

.mini-track {
  flex: 1 1 auto;
  min-width: 48px;
  height: 7px;
  border-radius: 999px;
  background: var(--bg-surface-secondary);
  overflow: hidden;
}

.mini-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 260ms cubic-bezier(0.2, 0, 0, 1);
}

.mini-num {
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  white-space: nowrap;
  min-width: 40px;
  text-align: end;
}

.bar-list {
  display: flex;
  flex-direction: column;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(84px, 158px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.bar-row + .bar-row {
  border-top: 1px solid var(--border-color-light);
}

.bar-row .bar-label {
  font-size: 12.5px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-row .bar-label small {
  display: block;
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 1px;
}

.bar-row .bar-track {
  height: 9px;
  border-radius: 5px;
  background: var(--bg-surface-secondary);
  overflow: hidden;
}

.bar-row .bar-fill {
  display: block;
  height: 100%;
  border-radius: 5px;
  transition: width 260ms cubic-bezier(0.2, 0, 0, 1);
}

.bar-row .bar-value {
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  font-variant-numeric: tabular-nums;
  color: var(--text);
  white-space: nowrap;
  text-align: end;
  min-width: 62px;
}

.bar-row .bar-value small {
  display: block;
  font-size: 10.5px;
  font-weight: 400;
  color: var(--text-muted);
}

.heat {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 1px;
  min-width: 96px;
  direction: ltr;
}

.heat i {
  display: block;
  height: 14px;
  border-radius: 1.5px;
  background: var(--bg-surface-secondary);
}

.heat-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--text-muted);
}

.heat-legend .ramp {
  display: inline-flex;
  gap: 1px;
}

.heat-legend .ramp i {
  width: 10px;
  height: 8px;
  border-radius: 1.5px;
  display: block;
}

.note-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 12px;
  border-radius: var(--radius);
  font-size: 12.5px;
  line-height: 1.6;
  background: var(--bg-surface-secondary);
  color: var(--text-secondary);
}

.note-row + .note-row {
  margin-top: 8px;
}

.note-row svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 2px;
}

.note-row.warn {
  background: var(--yellow-lt);
  color: #8a4b00;
}

.note-row.warn svg {
  color: var(--yellow);
}

.note-row.good {
  background: var(--green-lt);
  color: #14622a;
}

.note-row.good svg {
  color: var(--green);
}

.note-row.bad {
  background: var(--red-lt);
  color: #8f1d1d;
}

.note-row.bad svg {
  color: var(--red);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stack-tight {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.row.align-start {
  align-items: start;
}

.card.col {
  display: flex;
  flex-direction: column;
}

.card.col > .card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.card.col > .card-body > .fill-tail {
  margin-top: auto;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: var(--font-weight-medium);
  background: var(--bg-surface-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color-light);
  white-space: nowrap;
}

.tag.good {
  background: var(--green-lt);
  color: var(--green-ink);
  border-color: transparent;
}

.tag.warn {
  background: var(--yellow-lt);
  color: var(--yellow-ink);
  border-color: transparent;
}

.tag.bad {
  background: var(--red-lt);
  color: var(--red-ink);
  border-color: transparent;
}

.tag.info {
  background: var(--blue-lt);
  color: var(--blue-ink);
  border-color: transparent;
}

.tag.mono {
  font-family: var(--font-mono);
  direction: ltr;
  unicode-bidi: isolate;
}

.cell-strong {
  font-weight: var(--font-weight-medium);
  color: var(--text);
}

.cell-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.cell-sub.ltr {
  direction: ltr;
  unicode-bidi: isolate;
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-line {
    animation: none;
  }
}
@media (max-width: 900px) {
  .dt-table {
    min-width: 760px;
  }
  .bar-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .bar-row .bar-track {
    grid-column: 1/-1;
  }
}
@media (max-width: 768px) {
  .page-wrapper {
    padding: 14px 12px 32px;
  }
}
@media (max-width: 768px) {
  [dir=rtl] .sidebar {
    transform: translateX(100%);
  }
  [dir=rtl] .sidebar.open {
    transform: translateX(0);
  }
}
[dir=rtl] body.sidebar-rail .nav-link[data-rail-label]::after {
  transform: translateY(-50%) translateX(4px);
}

[dir=rtl] body.sidebar-rail .nav-link[data-rail-label]:hover::after,
[dir=rtl] body.sidebar-rail .nav-link[data-rail-label]:focus-visible::after {
  transform: translateY(-50%) translateX(0);
}

[dir=rtl] body.sidebar-rail .sidebar-toggle svg {
  transform: rotate(0deg);
}

[dir=rtl] .sidebar-toggle svg {
  transform: rotate(180deg);
}

[dir=rtl] .drawer {
  transform: translateX(-100%);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.12);
}

[dir=rtl] .drawer.open {
  transform: translateX(0);
}

[dir=rtl] .drawer.left {
  transform: translateX(100%);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.12);
}

[dir=rtl] .drawer.left.open {
  transform: translateX(0);
}

[dir=rtl] .switch input:checked + .track::before,
[dir=rtl] .toggle.on::after {
  transform: translateX(-16px);
}

[dir=rtl] select.input,
[dir=rtl] .input select,
[dir=rtl] select.form-control {
  background-position: left 10px center;
}

[dir=rtl] .nav-chev {
  transform: scaleX(-1);
}