/* Shared components: header, controls, panels, forms, charts. */

.page-top {
  position: sticky;
  top: 0;
  z-index: 100;
}

.notification-banner {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  text-align: center;
  white-space: pre-wrap;
}

.notification-banner--info {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

[data-theme="dark"] .notification-banner--info {
  background: color-mix(in srgb, var(--primary) 28%, var(--surface));
  color: var(--primary);
}

.notification-banner--warning {
  background: var(--badge-warn-bg);
  color: var(--badge-warn-fg);
}

.notification-banner--error {
  background: var(--badge-err-bg);
  color: var(--badge-err-fg);
}

.header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--header-border);
  background: var(--header-bg);
  color: var(--header-text);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
}

.header h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--secondary);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
  opacity: 0.92;
}

.brand-logo {
  display: block;
  height: 1.75rem;
  width: auto;
}

.brand-wordmark {
  fill: var(--secondary);
}

[data-theme="dark"] .brand-wordmark {
  fill: var(--header-text);
}

[data-theme="dark"] .header h1 { color: var(--header-text); }

.header nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.header nav a {
  margin-left: 0;
  padding: 0.45rem 0.75rem;
  border-radius: 0.5rem;
  color: var(--header-nav);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.header nav a:hover {
  color: var(--primary-hover);
  background: var(--header-hover-bg);
  text-decoration: none;
}

.header nav a.active {
  color: var(--primary-dark);
  font-weight: 600;
}

[data-theme="dark"] .header nav a.active { color: var(--primary); }

.header-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-user .user-email {
  color: var(--header-nav);
  font-size: 0.85rem;
}

.link-button {
  background: none;
  border: none;
  color: var(--header-nav);
  cursor: pointer;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: 0.5rem;
}

.link-button:hover {
  color: var(--primary-hover);
  background: var(--header-hover-bg);
  text-decoration: none;
}

.header-user > a {
  color: var(--header-nav);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: 0.5rem;
  text-decoration: none;
}

.header-user > a:hover {
  color: var(--primary-hover);
  background: var(--header-hover-bg);
  text-decoration: none;
}

.header-org-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--header-nav);
  padding: 0.35rem 0.6rem;
  border-radius: 0.5rem;
  white-space: nowrap;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-org-switcher {
  width: auto;
  min-width: 8rem;
  max-width: 16rem;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--header-nav);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
}

.header-org-switcher:hover,
.header-org-switcher:focus {
  color: var(--primary);
  border-color: var(--primary);
  outline: none;
}

.user-menu {
  position: relative;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  padding: 0.3rem 0.5rem;
  cursor: pointer;
  color: var(--header-nav);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.user-menu-trigger:hover,
.user-menu.open .user-menu-trigger {
  background: var(--header-hover-bg);
  border-color: var(--header-border);
}

.user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.user-menu-name {
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-caret {
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.user-menu.open .user-menu-caret {
  transform: rotate(180deg);
}

.user-menu-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 16rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 100;
  overflow: hidden;
}

.user-menu.open .user-menu-dropdown {
  display: block;
}

.user-menu-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.user-menu-header-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.user-menu-header-email {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-section {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
}

.user-menu-section-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.user-menu-org-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

.org-switcher {
  width: 100%;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
}

.user-menu-links {
  display: flex;
  flex-direction: column;
  padding: 0.35rem 0;
}

.user-menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 1rem;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.1s ease;
}

.user-menu-link:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.user-menu-link-danger {
  color: var(--red);
}

@media (max-width: 640px) {
  .user-menu-name { display: none; }
  .user-menu-dropdown { right: -0.5rem; min-width: 14rem; }
}

.messages { margin-bottom: 1rem; }

.message {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.message.success {
  background: var(--msg-ok-bg);
  border: 1px solid var(--msg-ok-border);
  color: var(--msg-ok-fg);
}

.message.error {
  background: var(--msg-err-bg);
  border: 1px solid var(--msg-err-border);
  color: var(--msg-err-fg);
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  margin-right: auto;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--muted);
}

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

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
  color: var(--text);
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.4rem;
  color: var(--muted);
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}

.btn:hover { background: var(--primary-hover); text-decoration: none; color: #fff; }

.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--surface-2);
  color: var(--primary-dark);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
}

[data-theme="dark"] .btn-secondary:hover {
  color: var(--primary);
}

.btn-danger { background: #b91c1c; color: #fff; }

.btn-danger:hover { background: #991b1b; color: #fff; }

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }

.kpi {
  background: var(--surface);
  border: 1px solid var(--ring);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.kpi .label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.kpi .value {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.kpi .hint {
  margin-top: 0.35rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--ring);
  border-radius: var(--radius);
  overflow: visible;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.panel-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.panel-body { padding: 1rem 1.25rem; }

.empty { color: var(--muted); text-align: center; padding: 2rem; }

.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: lowercase;
}

.badge-completed, .badge-processed { background: var(--badge-ok-bg); color: var(--badge-ok-fg); }

.badge-failed { background: var(--badge-err-bg); color: var(--badge-err-fg); }

.badge-pending, .badge-running, .badge-processing,
.badge-unclassified { background: var(--badge-warn-bg); color: var(--badge-warn-fg); }

.badge-active { background: var(--badge-ok-bg); color: var(--badge-ok-fg); }

.badge-inactive { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }

.badge-fuzzy, .badge-manual, .badge-alias, .badge-embedding, .badge-code {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

[data-theme="dark"] .badge-fuzzy,
[data-theme="dark"] .badge-manual,
[data-theme="dark"] .badge-alias,
[data-theme="dark"] .badge-embedding,
[data-theme="dark"] .badge-code {
  background: color-mix(in srgb, var(--primary) 22%, transparent);
  color: var(--primary);
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.form-row label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="url"],
.form-row input[type="password"],
.form-row input[type="number"],
.form-row input[type="datetime-local"],
.form-row select,
.form-row textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-family: inherit;
}

.form-row input.sync-interval-input {
  width: 100%;
  max-width: 12rem;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
}

.form-row textarea { font-family: ui-monospace, monospace; font-size: 0.85rem; }

.form-row .helptext { font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; }

.form-row .errorlist { color: var(--red); font-size: 0.85rem; margin: 0.25rem 0 0; padding: 0; list-style: none; }

.form-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-row label { margin: 0; text-transform: none; letter-spacing: 0; color: var(--text); }

.table-actions {
  text-align: right;
  white-space: nowrap;
  width: 1%;
}

.members-divider {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.member-add-form {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) auto auto;
  gap: 1rem 1.25rem;
  align-items: end;
}

.member-add-form .form-row {
  margin: 0;
}

.member-add-form .form-actions {
  margin-top: 0;
  align-self: end;
}

@media (max-width: 720px) {
  .member-add-form {
    grid-template-columns: 1fr;
  }

  .member-add-form .form-actions {
    align-self: stretch;
  }
}

.action-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.inline-form {
  display: inline;
  margin: 0;
}

.hint { font-size: 0.8rem; color: var(--muted); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--ring);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.filters label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.filters select,
.filters input[type="date"],
.filters input[type="search"],
.filters input[type="text"] {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  min-width: 10rem;
}

.filters .checkbox-label {
  flex-direction: row;
  align-items: center;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
  font-size: 0.9rem;
  gap: 0.5rem;
}

.filters .checkbox-label.is-locked {
  color: var(--muted, #64748b);
  cursor: default;
}

.filters button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.55rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  cursor: pointer;
  font-weight: 600;
}

.chart-wrap {
  position: relative;
  height: 280px;
  overflow: hidden;
}

.chart-wrap.tall { height: 360px; }

.chart-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
}

.chart-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--surface-2);
}

.chart-toggle-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
}

.chart-toggle-btn:hover {
  color: var(--text);
  background: rgba(33, 151, 159, 0.08);
}

.chart-toggle-btn.active {
  color: #fff;
  background: var(--primary);
  box-shadow: none;
}

.panel-header-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

.chart-actions {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--surface-2);
  flex-shrink: 0;
}

.chart-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}

.chart-action-btn + .chart-action-btn {
  border-left: 1px solid var(--border);
}

.chart-action-btn:hover {
  color: var(--text);
  background: rgba(33, 151, 159, 0.08);
}

.chart-action-btn svg {
  display: block;
}

.chart-maximize-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 999;
}

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

body.chart-maximized-open {
  overflow: hidden;
}

.chart-maximize-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  padding: 1.5rem;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.45);
}

.chart-maximize-dialog {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  margin: 0 !important;
  max-height: 100%;
  overflow: hidden;
}

.chart-maximize-dialog .panel-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chart-maximize-dialog .chart-wrap {
  flex: 1 1 auto;
  height: calc(100vh - 8rem) !important;
  min-height: 320px;
}

.chart-wrap-placeholder {
  visibility: hidden;
  pointer-events: none;
}

.heatmap-chart {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  --heatmap-base: color-mix(in srgb, var(--primary) 10%, var(--surface));
  --heatmap-strong: var(--secondary);
}

[data-theme="dark"] .heatmap-chart {
  --heatmap-strong: #5eead4;
}

.heatmap-body {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0.5rem;
  align-items: stretch;
}

.heatmap-y-axis {
  display: grid;
  grid-template-rows: repeat(24, 1fr);
  min-height: 320px;
}

.heatmap-y-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1;
}

.heatmap-y-label--empty {
  visibility: hidden;
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(24, 1fr);
  gap: 2px;
  min-height: 320px;
}

.heatmap-cell {
  --heatmap-intensity: 0;
  border-radius: 2px;
  min-height: 0;
  cursor: default;
  background-color: color-mix(
    in srgb,
    var(--heatmap-strong) calc(var(--heatmap-intensity) * 100%),
    var(--heatmap-base)
  );
}

.heatmap-x-axis {
  display: grid;
  grid-template-columns: 3.5rem repeat(7, 1fr);
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.heatmap-x-axis span:first-child {
  visibility: hidden;
}

.heatmap-x-axis span {
  text-align: center;
}

.heatmap-legend {
  margin-top: 0.25rem;
}

.heatmap-legend-bar {
  height: 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: linear-gradient(
    to right,
    color-mix(in srgb, var(--heatmap-strong) 0%, var(--heatmap-base)),
    color-mix(in srgb, var(--heatmap-strong) 100%, var(--heatmap-base))
  );
}

.heatmap-legend-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.docs-content h1, .docs-content h2, .docs-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.docs-content h1 { font-size: 1.75rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }

.docs-content h2 { font-size: 1.25rem; }

.docs-content p, .docs-content li { color: var(--muted); }

.docs-content code { background: var(--surface-2); padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.85em; }

.docs-content pre { background: var(--surface-2); padding: 1rem; border-radius: 6px; overflow-x: auto; }

.docs-content pre code { background: none; padding: 0; }

.docs-content table { margin: 1rem 0; }

.docs-content hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

.sync-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.sync-progress-bar {
  height: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.sync-progress .sync-progress-bar {
  height: 10px;
}

.sync-progress-bar--compact {
  width: 6rem;
  margin-bottom: 0.2rem;
}

.sync-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  min-width: 1px;
}

.sync-progress-bar--indeterminate .sync-progress-fill {
  width: 100%;
  background-color: var(--primary);
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  );
  background-size: 1rem 1rem;
  animation: sync-progress-stripes 1s linear infinite;
}

@keyframes sync-progress-stripes {
  from { background-position: 1rem 0; }
  to { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sync-progress-bar--indeterminate .sync-progress-fill {
    animation: none;
  }
}

.sync-progress-detail {
  margin: 0.75rem 0 0;
}

.matrix-page-loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--bg, #f4f6f8) 58%, transparent);
  backdrop-filter: blur(2px);
}

html.is-page-loading .matrix-page-loader {
  display: flex;
}

.matrix-page-loader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  min-width: 9.5rem;
  padding: 1.15rem 1.4rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm), 0 12px 28px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .matrix-page-loader {
  background: color-mix(in srgb, var(--bg, #0f1419) 62%, transparent);
}

[data-theme="dark"] .matrix-page-loader-card {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.matrix-page-loader-spinner {
  width: 1.7rem;
  height: 1.7rem;
  border: 2.5px solid color-mix(in srgb, var(--primary) 22%, transparent);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: matrix-page-spin 0.7s linear infinite;
}

.matrix-page-loader-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

html.is-page-loading,
html.is-page-loading body {
  cursor: progress;
}

@keyframes matrix-page-spin {
  to { transform: rotate(360deg); }
}
