/* Nexora identity layer.
   Calms the HUD chrome into a dense, Linear-inspired workspace.
   Loaded after site.css so these rules win on equal specificity. */

body.tf-app,
body.page-dashboard,
body.page-kanban,
body.page-auth {
  background: var(--tf-canvas);
}

.tf-sidebar {
  width: 224px;
  background: var(--tf-sidebar);
}

html:not([data-theme="light"]) .tf-sidebar {
  background: var(--tf-sidebar);
}

@media (min-width: 992px) {
  .tf-shell {
    margin-inline-start: 224px;
  }
}

.tf-topbar {
  height: 56px;
  min-height: 56px;
  padding: 0 20px;
  gap: 12px;
  background: var(--tf-chrome-top);
  box-shadow: none;
}

.tf-topbar-code,
.dash-panel-code,
.dash-readout-code,
.dash-readout-viz,
.dash-readout-hint,
.dash-hero-clock,
.dash-bg,
.dash-blob,
.dash-orbit,
.dash-grid-pattern {
  display: none;
}

.tf-topbar-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.tf-side-link {
  border-radius: 8px;
}

.tf-side-link.active {
  background: var(--tf-fill-hover);
}

/* Dashboard home — greeting, KPI cards, three-column overview */
body.page-dashboard {
  background: var(--tf-canvas);
}

body.page-dashboard .tf-topbar {
  background: transparent;
  border-bottom-color: transparent;
}

body.page-dashboard .tf-topbar-heading {
  display: none;
}

body.page-dashboard .dash-main-wrap {
  max-width: 1600px;
  margin-inline: auto;
  padding: 8px 24px 40px;
}

body.page-dashboard .dash-page {
  gap: 16px;
  min-height: 0;
}

body.page-dashboard .dash-hero,
html:not([data-theme="light"]) body.page-dashboard .dash-hero,
html[data-theme="light"] body.page-dashboard .dash-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-height: 0;
  padding: 8px 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--tf-ink-strong);
  animation: none;
  overflow: visible;
}

body.page-dashboard .dash-hero::before,
body.page-dashboard .dash-hero::after {
  content: none;
  background: none;
}

body.page-dashboard .dash-hero-kicker,
html[data-theme="light"] body.page-dashboard .dash-hero-kicker,
html[data-theme="light"] body.page-dashboard .dash-hero-sub {
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  font-size: 13px;
  color: var(--tf-text-muted);
}

body.page-dashboard .dash-hero-title,
html[data-theme="light"] body.page-dashboard .dash-hero-title,
body.page-dashboard .dash-hero-name {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--tf-ink-strong);
}

body.page-dashboard .dash-hero-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--tf-text-muted);
}

body.page-dashboard .dash-hero-actions .btn,
body.page-dashboard .dash-hero-btn {
  border-radius: 8px !important;
  font-size: 13px;
  font-weight: 600;
}

body.page-dashboard .dash-hero .btn-light {
  background: var(--tf-primary);
  color: #fff;
  border-color: var(--tf-primary);
}

body.page-dashboard .dash-hero .btn-outline-light {
  color: var(--tf-primary-dark);
  border-color: var(--tf-primary);
  background: transparent;
}

body.page-dashboard .dash-hero .btn-outline-light:hover {
  color: #fff;
  background: var(--tf-primary);
  border-color: var(--tf-primary);
}

body.page-dashboard .dash-console {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  animation: none;
}

body.page-dashboard .dash-readout,
body.page-dashboard .dash-readout-a,
body.page-dashboard .dash-readout:last-child {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 2px;
  min-height: 0;
  padding: 14px 16px;
  border: 1px solid var(--tf-border);
  border-inline-end: 1px solid var(--tf-border);
  border-radius: 12px;
  background: var(--tf-surface);
  box-shadow: none;
}

body.page-dashboard .dash-readout-value,
body.page-dashboard .dash-readout-a .dash-readout-value {
  margin-top: 2px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--tf-ink-strong);
}

body.page-dashboard .dash-readout-label,
body.page-dashboard .dash-readout-a .dash-readout-label {
  margin-top: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--tf-text-muted);
}

body.page-dashboard .dash-readout-head > i {
  color: var(--tf-primary);
  font-size: 14px;
}

body.page-dashboard .dash-panel {
  background: var(--tf-surface);
  border: 1px solid var(--tf-border);
  border-radius: 12px;
  box-shadow: none;
}

body.page-dashboard .dash-section-title {
  font-size: 16px;
  font-weight: 600;
}

body.page-dashboard .dash-project-card {
  border-radius: 12px;
  box-shadow: none;
  background: var(--tf-surface);
}

body.page-dashboard .dash-project-card.is-clickable:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(99, 102, 241, 0.45);
}

body.page-dashboard .dash-project-visual {
  aspect-ratio: auto;
  height: 6px;
}

body.page-dashboard .dash-project-preview,
body.page-dashboard .dash-project-pct {
  display: none;
}

body.page-dashboard .dash-toolbar {
  padding: 12px 16px;
}

@media (max-width: 1100px) {
  body.page-dashboard .dash-console {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body.page-dashboard .dash-main-wrap {
    padding-inline: 16px;
  }

  body.page-dashboard .dash-console {
    grid-template-columns: 1fr;
  }

  body.page-dashboard .dash-hero-title,
  html[data-theme="light"] body.page-dashboard .dash-hero-title {
    font-size: 20px;
  }
}

.nx-home {
  position: relative;
  gap: 18px;
}

.nx-home-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 22px 22px 18px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(165, 180, 252, 0.16);
  background-color: #10162a;
  background-image:
    radial-gradient(ellipse 48% 90% at 100% -18%, rgba(99, 102, 241, 0.42), transparent 58%),
    radial-gradient(ellipse 26% 70% at 68% 120%, rgba(139, 92, 246, 0.16), transparent 62%);
}

.nx-home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(199, 210, 254, 0.34) 1.05px, transparent 1.15px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(to left, #000 0%, rgba(0, 0, 0, 0.72) 28%, transparent 68%);
  mask-image: linear-gradient(to left, #000 0%, rgba(0, 0, 0, 0.72) 28%, transparent 68%);
}

html[dir="rtl"] .nx-home-hero::before {
  -webkit-mask-image: linear-gradient(to right, #000 0%, rgba(0, 0, 0, 0.72) 28%, transparent 68%);
  mask-image: linear-gradient(to right, #000 0%, rgba(0, 0, 0, 0.72) 28%, transparent 68%);
}

.nx-home-hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: -48px;
  inset-inline-end: -36px;
  width: 540px;
  height: 240px;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 240' fill='none'%3E%3Cpath d='M-10 168C90 148 140 36 250 72c110 36 130-58 250-24 70 20 110-8 160 6' stroke='%23c7d2fe' stroke-opacity='.55' stroke-width='26' stroke-linecap='round'/%3E%3Cpath d='M20 198C130 156 190 86 310 118c100 26 140-70 270-28' stroke='%238b5cf6' stroke-opacity='.45' stroke-width='16' stroke-linecap='round'/%3E%3C/svg%3E") right top / 540px 240px no-repeat;
}

html[dir="rtl"] .nx-home-hero::after {
  transform: scaleX(-1);
  transform-origin: center;
}

html[data-theme="light"] .nx-home-hero {
  border-color: rgba(99, 102, 241, 0.16);
  background-color: #eef1fb;
  background-image:
    radial-gradient(ellipse 48% 90% at 100% -18%, rgba(99, 102, 241, 0.22), transparent 58%),
    radial-gradient(ellipse 26% 70% at 68% 120%, rgba(139, 92, 246, 0.1), transparent 62%);
}

html[data-theme="light"] .nx-home-hero::before {
  background-image: radial-gradient(rgba(79, 70, 229, 0.28) 1.05px, transparent 1.15px);
}

html[data-theme="light"] .nx-home-hero::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 240' fill='none'%3E%3Cpath d='M-10 168C90 148 140 36 250 72c110 36 130-58 250-24 70 20 110-8 160 6' stroke='%234f46e5' stroke-opacity='.35' stroke-width='26' stroke-linecap='round'/%3E%3Cpath d='M20 198C130 156 190 86 310 118c100 26 140-70 270-28' stroke='%237c3aed' stroke-opacity='.28' stroke-width='16' stroke-linecap='round'/%3E%3C/svg%3E");
}

.nx-home-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 0;
}

.nx-home-title,
.nx-home-title .dash-hero-name {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--tf-ink-strong);
}

.nx-wave {
  font-size: 0.85em;
}

.nx-home-sub {
  margin: 6px 0 0;
  color: var(--tf-text-muted);
  font-size: 14px;
}

.nx-home-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nx-home-date {
  color: var(--tf-text-muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.nx-home-cta {
  border-radius: 999px !important;
  padding: 0.48rem 1rem !important;
  font-weight: 650;
  background: #7464f3;
  border-color: #7464f3;
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.32);
}

.nx-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--tf-border);
  background: var(--tf-surface);
  color: var(--tf-ink);
  display: inline-grid;
  place-items: center;
}

.nx-kpi-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.nx-kpi {
  position: relative;
  overflow: visible;
  min-height: 118px;
  padding: 16px 16px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(120px 80px at 100% 100%, rgba(99, 102, 241, 0.08), transparent 70%),
    #161d31;
}

html[data-theme="light"] .nx-kpi {
  background: #fff;
  border-color: #e6e8f0;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.04);
}

.nx-kpi-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nx-kpi-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 16px;
  background: rgba(129, 140, 248, 0.16);
  color: #a5b4fc;
}

.nx-kpi-amber .nx-kpi-icon { background: rgba(245, 158, 11, 0.16); color: #fbbf24; }
.nx-kpi-green .nx-kpi-icon { background: rgba(16, 185, 129, 0.16); color: #34d399; }
.nx-kpi-blue .nx-kpi-icon { background: rgba(56, 189, 248, 0.16); color: #7dd3fc; }

.nx-kpi strong {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--tf-ink-strong);
}

.nx-kpi-label {
  display: block;
  margin-top: 6px;
  margin-inline-start: 50px;
  color: var(--tf-text-muted);
  font-size: 13px;
}

.nx-kpi {
  --nx-spark-shadow: rgba(129, 140, 248, 0.72);
}

.nx-kpi-spark {
  position: absolute;
  width: 108px;
  height: 36px;
  inset-inline-end: 12px;
  bottom: 10px;
  color: #a5b4fc;
  overflow: visible;
}

.nx-kpi-spark path,
.nx-kpi-spark .nx-spark-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter:
    drop-shadow(0 3px 1.5px var(--nx-spark-shadow))
    drop-shadow(0 7px 5px var(--nx-spark-shadow));
}

.nx-kpi-amber { --nx-spark-shadow: rgba(251, 113, 133, 0.7); }
.nx-kpi-amber .nx-kpi-spark { color: #fb7185; }
.nx-kpi-green { --nx-spark-shadow: rgba(52, 211, 153, 0.62); }
.nx-kpi-green .nx-kpi-spark { color: #34d399; }
.nx-kpi-blue { --nx-spark-shadow: rgba(56, 189, 248, 0.68); }
.nx-kpi-blue .nx-kpi-spark { color: #38bdf8; }

html[data-theme="light"] .nx-kpi { --nx-spark-shadow: rgba(79, 70, 229, 0.62); }
html[data-theme="light"] .nx-kpi-violet .nx-kpi-spark { color: #4f46e5; }
html[data-theme="light"] .nx-kpi-amber { --nx-spark-shadow: rgba(225, 29, 72, 0.55); }
html[data-theme="light"] .nx-kpi-amber .nx-kpi-spark { color: #e11d48; }
html[data-theme="light"] .nx-kpi-green { --nx-spark-shadow: rgba(5, 150, 105, 0.55); }
html[data-theme="light"] .nx-kpi-green .nx-kpi-spark { color: #059669; }
html[data-theme="light"] .nx-kpi-blue { --nx-spark-shadow: rgba(2, 132, 199, 0.58); }
html[data-theme="light"] .nx-kpi-blue .nx-kpi-spark { color: #0284c7; }

html[data-theme="light"] .nx-kpi-spark path,
html[data-theme="light"] .nx-kpi-spark .nx-spark-line {
  filter:
    drop-shadow(0 2px 1px var(--nx-spark-shadow))
    drop-shadow(0 6px 4px var(--nx-spark-shadow));
}

.nx-home-hero::after {
  filter: drop-shadow(0 12px 14px rgba(99, 102, 241, 0.38));
}

html[data-theme="light"] .nx-home-hero::after {
  filter: drop-shadow(0 10px 12px rgba(79, 70, 229, 0.28));
}

.nx-home-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(260px, 0.92fr);
  gap: 14px;
  align-items: stretch;
}

.nx-card {
  display: flex;
  flex-direction: column;
  min-height: 320px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #161d31;
  overflow: hidden;
}

html[data-theme="light"] .nx-card {
  background: #fff;
  border-color: #e6e8f0;
}

.nx-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px 8px;
}

.nx-card-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--tf-ink-strong);
}

.nx-card-head a {
  color: #a5b4fc;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.nx-card-head a::after {
  content: "→";
  margin-inline-start: 4px;
}

html[dir="rtl"] .nx-card-head a::after {
  content: "←";
}

.nx-tabs {
  display: flex;
  gap: 6px;
  padding: 0 12px 8px;
  overflow-x: auto;
}

.nx-tabs button {
  border: 0;
  background: transparent;
  color: var(--tf-text-muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.nx-tabs button b {
  font-weight: 700;
  margin-inline-start: 4px;
}

.nx-tabs button.is-on {
  background: #6366f1;
  color: #fff;
}

html[data-theme="light"] .nx-tabs button.is-on {
  background: #6366f1;
  color: #fff;
}

.nx-card-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.nx-task {
  width: 100%;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto auto 28px;
  gap: 12px;
  align-items: center;
  padding: 11px 16px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: start;
  cursor: pointer;
}

.nx-task:hover {
  background: rgba(99, 102, 241, 0.07);
}

.nx-task-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(148, 163, 184, 0.75);
}

.nx-task-title {
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--tf-ink-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nx-task-when {
  color: var(--tf-text-muted);
  font-size: 12.5px;
  white-space: nowrap;
}

.nx-task.is-late .nx-task-when {
  color: #fb7185;
}

.nx-task-face {
  width: 28px;
  height: 28px;
}

.nx-pri {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  line-height: 1.2;
}

.nx-pri.is-high { color: #fda4af; background: rgba(244, 63, 94, 0.16); }
.nx-pri.is-med { color: #fdba74; background: rgba(249, 115, 22, 0.16); }
.nx-pri.is-low { color: #6ee7b7; background: rgba(16, 185, 129, 0.16); }

html[data-theme="light"] .nx-pri.is-high { color: #e11d48; background: rgba(244, 63, 94, 0.12); }
html[data-theme="light"] .nx-pri.is-med { color: #c2410c; background: rgba(249, 115, 22, 0.12); }
html[data-theme="light"] .nx-pri.is-low { color: #047857; background: rgba(16, 185, 129, 0.12); }

.nx-act {
  position: relative;
  display: grid;
  grid-template-columns: 16px 32px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
}

.nx-act::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset-inline-start: 23px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(148, 163, 184, 0.42);
}

.nx-act:first-child::before { top: 50%; }
.nx-act:last-child::before { bottom: 50%; }
.nx-act:only-child::before { display: none; }

.nx-act-rail {
  position: relative;
  z-index: 1;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nx-act-dot {
  position: relative;
  z-index: 1;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a78bfa;
  box-shadow: 0 0 0 3px #161d31, 0 0 0 6px rgba(167, 139, 250, 0.28);
}

.nx-act-dot.is-hot {
  background: #fb7185;
  box-shadow: 0 0 0 3px #161d31, 0 0 0 6px rgba(251, 113, 133, 0.28);
}

.nx-act-dot.is-move {
  background: #22d3ee;
  box-shadow: 0 0 0 3px #161d31, 0 0 0 6px rgba(34, 211, 238, 0.28);
}

.nx-act-dot.is-done {
  background: #34d399;
  box-shadow: 0 0 0 3px #161d31, 0 0 0 6px rgba(52, 211, 153, 0.28);
}

html[data-theme="light"] .nx-act::before {
  background: #d5dbe8;
}

html[data-theme="light"] .nx-act-dot {
  background: #6d28d9;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(109, 40, 217, 0.18);
}

html[data-theme="light"] .nx-act-dot.is-hot {
  background: #e11d48;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(225, 29, 72, 0.16);
}

html[data-theme="light"] .nx-act-dot.is-move {
  background: #0891b2;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(8, 145, 178, 0.16);
}

html[data-theme="light"] .nx-act-dot.is-done {
  background: #059669;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(5, 150, 105, 0.16);
}

.nx-act-copy {
  min-width: 0;
}

.nx-act-line {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--tf-ink-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nx-act-line strong {
  font-weight: 700;
}

.nx-act-sub {
  margin-top: 2px;
  color: var(--tf-text-muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nx-act time {
  color: var(--tf-text-muted);
  font-size: 12px;
  white-space: nowrap;
}

.nx-face {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
}

.nx-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nx-task-face .nx-face {
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.nx-spot {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 16px 16px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: start;
}

.nx-spot-top {
  display: flex;
  gap: 10px;
  align-items: center;
}

.nx-spot-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  flex-shrink: 0;
}

.nx-spot-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.nx-spot-copy strong {
  color: var(--tf-ink-strong);
  font-size: 14px;
}

.nx-spot-copy span {
  color: var(--tf-text-muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nx-spot-meter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nx-spot-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

html[data-theme="light"] .nx-spot-track {
  background: #eef0f6;
}

.nx-spot-track > div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

.nx-spot-meter b {
  color: #a5b4fc;
  font-size: 13px;
}

.nx-spot-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
}

.nx-spot-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nx-spot-stats b {
  color: var(--tf-ink-strong);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.nx-spot-stats span {
  color: var(--tf-text-muted);
  font-size: 11px;
}

.nx-home .dash-body {
  margin-top: 4px;
}

@media (max-width: 1100px) {
  .nx-kpi-row,
  .nx-home-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .nx-home-head,
  .nx-home-tools {
    flex-direction: column;
    align-items: flex-start;
  }

  .nx-home-title,
  .nx-home-title .dash-hero-name {
    font-size: 24px;
  }

  .nx-kpi-row,
  .nx-home-grid {
    grid-template-columns: 1fr;
  }
}

/* Project boards */
body.page-boards {
  background: var(--tf-canvas);
}

.boards-bg,
.boards-blob,
.boards-grid-pattern {
  display: none;
}

.boards-btn-glow,
.boards-btn-glow:hover {
  box-shadow: none;
  transform: none;
}

.boards-cinema-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--tf-primary);
  box-shadow: none;
}

/* Boards */
body.page-kanban {
  background: var(--tf-canvas);
}

.kanban-column {
  border-radius: 12px;
  background: var(--tf-surface);
  border-color: var(--tf-border);
  box-shadow: none;
  backdrop-filter: none;
}

.kanban-card {
  border-radius: 10px;
  background: var(--tf-bubble);
  border-color: var(--tf-border);
}

.kanban-card:hover {
  transform: none;
  box-shadow: var(--tf-shadow-sm);
  border-color: rgba(99, 102, 241, 0.45);
}

/* Sign-in keeps the indigo brand panel, without the floating blobs */
.auth-brand-panel {
  background: #0e1422;
}

.auth-blob {
  opacity: 0.16;
  filter: blur(70px);
}

.auth-card,
.tf-panel,
.modal-content {
  border-radius: 12px;
}

.btn-primary,
.btn-outline-primary,
.form-control,
.form-select {
  border-radius: 8px;
}

.dash-readout-value,
.tf-topbar-title,
.kanban-card-title {
  font-variant-numeric: tabular-nums;
}

body.page-settings .nx-set {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: none;
}

body.page-settings .nx-set-head {
  position: relative;
  padding: 8px 0 12px;
  overflow: hidden;
}

body.page-settings .nx-set-head::after {
  content: "";
  position: absolute;
  inset-inline-end: -120px;
  top: -70px;
  width: min(640px, 52%);
  height: 220px;
  background:
    radial-gradient(180px 90px at 62% 42%, rgba(139, 92, 246, 0.45), transparent 70%),
    radial-gradient(140px 70px at 38% 62%, rgba(99, 102, 241, 0.32), transparent 72%),
    radial-gradient(90px 50px at 78% 28%, rgba(167, 139, 250, 0.35), transparent 70%);
  pointer-events: none;
}

html[data-theme="light"] body.page-settings .nx-set-head::after {
  background:
    radial-gradient(120px 70px at 70% 40%, rgba(124, 58, 237, 0.16), transparent 70%),
    radial-gradient(90px 50px at 40% 70%, rgba(99, 102, 241, 0.12), transparent 70%);
}

body.page-settings .nx-set-back {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--tf-text-muted);
  font-size: 12px;
  text-decoration: none;
}

body.page-settings .nx-set-kicker {
  position: relative;
  z-index: 1;
  margin: 0 0 4px;
  color: #a5b4fc;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.page-settings .nx-set-head h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--tf-ink-strong);
}

body.page-settings .nx-set-head > p:last-child {
  position: relative;
  z-index: 1;
  margin: 4px 0 0;
  color: var(--tf-text-muted);
  font-size: 14px;
}

body.page-settings .nx-set .tf-panel {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #161d31;
  box-shadow: none;
  padding: 14px 16px;
}

html[data-theme="light"] body.page-settings .nx-set .tf-panel {
  background: #fff;
  border-color: #e6e8f0;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.04);
}

body.page-settings .nx-set-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

body.page-settings .nx-set-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(99, 102, 241, 0.16);
  color: #a5b4fc;
  font-size: 16px;
}

html[data-theme="light"] body.page-settings .nx-set-icon {
  background: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
}

body.page-settings .nx-set-copy {
  min-width: 0;
  flex: 1;
}

body.page-settings .nx-set-code {
  display: block;
  color: #818cf8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

body.page-settings .nx-set-copy h2,
body.page-settings .nx-set-form-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--tf-ink-strong);
}

body.page-settings .nx-set-copy p {
  margin: 2px 0 0;
  color: var(--tf-text-muted);
  font-size: 12.5px;
  line-height: 1.45;
}

body.page-settings .nx-set-calendar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 20px;
  align-items: center;
}

body.page-settings .nx-set-cal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}

body.page-settings .nx-set-cal-art {
  width: 128px;
  height: 104px;
}

body.page-settings .nx-set-cal-art svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 10px 16px rgba(99, 102, 241, 0.35));
}

body.page-settings .nx-set-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--tf-ink);
  font-size: 12.5px;
  font-weight: 600;
}

body.page-settings .nx-set-select {
  position: relative;
}

body.page-settings .nx-set-select > i {
  position: absolute;
  inset-inline-start: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--tf-text-muted);
  pointer-events: none;
}

body.page-settings .nx-set-select .form-select {
  padding-inline-start: 34px;
  min-height: 40px;
  border-radius: 10px;
}

body.page-settings .nx-set-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

body.page-settings .nx-set-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  height: 100%;
}

body.page-settings .nx-set-labels-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
}

body.page-settings .nx-set-go {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--tf-text-muted);
  text-decoration: none;
}

body.page-settings .nx-set-go:hover {
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
}

html[dir="rtl"] body.page-settings .nx-set-go i {
  transform: scaleX(-1);
}

body.page-settings .nx-set-board-label {
  display: block;
  margin-top: 10px;
  margin-bottom: 6px;
  color: var(--tf-ink);
  font-size: 12.5px;
  font-weight: 600;
}

body.page-settings .nx-set-board {
  display: block;
  width: 100%;
  max-width: none;
  min-height: 40px;
}

body.page-settings .nx-set-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

body.page-settings .nx-set-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--tf-ink-strong);
  font-size: 12px;
  font-weight: 650;
}

html[data-theme="light"] body.page-settings .nx-set-chip {
  background: #f3f4f8;
}

body.page-settings .nx-set-chip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

body.page-settings .nx-set-chip.is-closed {
  opacity: 0.72;
}

body.page-settings .nx-set-chip-empty {
  color: var(--tf-text-muted);
  font-size: 12.5px;
}

body.page-settings .nx-set-count {
  color: var(--tf-text-muted);
  font-size: 12px;
  white-space: nowrap;
}

body.page-settings .nx-set .tf-audit-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: 12px;
}

body.page-settings .nx-set .tf-audit-search,
body.page-settings .nx-set .tf-audit-filters .form-select,
body.page-settings .nx-set .tf-audit-filters .form-control,
body.page-settings .nx-set .tf-audit-filters .tf-datepicker,
body.page-settings .nx-set .tf-audit-filters .btn {
  width: 100%;
  min-width: 0;
  min-height: 36px;
}

body.page-settings .nx-set-log {
  max-height: 240px;
  margin-top: 10px;
  overflow: auto;
}

body.page-settings .nx-set .tf-audit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

body.page-settings .nx-set .tf-audit-who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

body.page-settings .nx-set .tf-activity-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
}

body.page-settings .nx-set .tf-audit-item {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

html[data-theme="light"] body.page-settings .nx-set .tf-audit-item {
  border-bottom-color: #eef0f6;
}

body.page-settings .nx-set .tf-audit-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

body.page-settings .nx-set-labels {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 8px;
  min-height: 72px;
}

body.page-settings .nx-set-labels:empty {
  display: none;
}

body.page-settings .nx-set .tf-empty-state {
  margin: 8px 0 0;
  padding: 16px 8px;
  text-align: center;
  color: var(--tf-text-muted);
  font-size: 13px;
}

body.page-settings .nx-set .tf-empty-state i {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
  color: #818cf8;
}

body.page-settings .nx-set-form-title {
  margin-top: 14px;
}

body.page-settings .nx-set-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px auto;
  gap: 10px;
  align-items: end;
  margin-top: auto;
  padding-top: 14px;
}

body.page-settings .nx-set-color .form-control-color {
  width: 100%;
  height: 40px;
  padding: 4px;
}

body.page-settings .nx-set-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

body.page-settings .nx-set-add {
  min-height: 40px;
  border-radius: 10px;
  white-space: nowrap;
}

body.page-settings .nx-set .tf-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

html[data-theme="light"] body.page-settings .nx-set .tf-status-row {
  border-bottom-color: #eef0f6;
}

@media (max-width: 980px) {
  body.page-settings .nx-set-calendar,
  body.page-settings .nx-set-cal,
  body.page-settings .nx-set-grid,
  body.page-settings .nx-set-form,
  body.page-settings .nx-set .tf-audit-filters {
    grid-template-columns: 1fr;
  }

  body.page-settings .nx-set-cal-art {
    display: none;
  }
}

/* Task details drawer. Shared by the board and any later entry point. */
.nx-draw {
  position: fixed;
  inset: 0;
  z-index: 1040;
  visibility: hidden;
  pointer-events: none;
}

.nx-draw.is-open {
  visibility: visible;
  pointer-events: auto;
}

.nx-draw-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nx-draw.is-open .nx-draw-backdrop {
  opacity: 1;
}

.nx-draw-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-end: 0;
  width: min(520px, 100%);
  background: var(--tf-surface);
  color: var(--tf-text);
  border-inline-start: 1px solid var(--tf-border);
  box-shadow: -16px 0 40px rgba(2, 6, 23, 0.28);
  transform: translateX(105%);
  transition: transform 0.22s ease;
  outline: none;
}

html[dir="rtl"] .nx-draw-panel {
  transform: translateX(-105%);
  box-shadow: 16px 0 40px rgba(2, 6, 23, 0.28);
}

.nx-draw.is-open .nx-draw-panel,
html[dir="rtl"] .nx-draw.is-open .nx-draw-panel {
  transform: translateX(0);
}

.nx-draw.is-page .nx-draw-backdrop {
  background: var(--tf-canvas, var(--tf-bg));
  opacity: 1;
}

.nx-draw.is-page .nx-draw-panel {
  inset-inline: 0;
  width: 100%;
  border: 0;
  box-shadow: none;
}

.nx-draw-sheet {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.nx-draw.is-page .nx-draw-sheet {
  width: min(880px, calc(100% - 48px));
  margin-inline: auto;
}

.nx-draw-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 10px;
}

.nx-draw-idline {
  min-width: 0;
}

.nx-draw-code {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--tf-hud-accent, #818cf8);
}

.nx-draw-context {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--tf-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nx-draw-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.nx-draw-iconbtn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--tf-text-muted);
}

.nx-draw-iconbtn:hover:not(:disabled) {
  background: var(--tf-fill-hover);
  color: var(--tf-text);
}

.nx-draw-iconbtn:disabled {
  opacity: 0.35;
}

.nx-draw-save {
  padding-inline: 10px;
}

.nx-draw-more {
  position: relative;
}

.nx-draw-menu {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-end: 0;
  z-index: 2;
  min-width: 196px;
  padding: 6px;
  border: 1px solid var(--tf-border);
  border-radius: 12px;
  background: var(--tf-surface);
  box-shadow: var(--tf-shadow);
}

.nx-draw-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--tf-text);
  font: inherit;
  font-size: 0.84rem;
  text-align: start;
  text-decoration: none;
}

.nx-draw-menu-item:hover {
  background: var(--tf-fill-hover);
}

.nx-draw-menu .kanban-chat-link {
  margin-top: 0;
  font-weight: 500;
  font-size: 0.84rem;
}

.nx-draw-menu-danger {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--tf-border);
}

.nx-draw-danger {
  color: #e11d48;
}

.nx-draw-tabs {
  display: flex;
  gap: 2px;
  padding: 0 14px;
  border-bottom: 1px solid var(--tf-border);
  overflow-x: auto;
  scrollbar-width: none;
}

.nx-draw-tabs::-webkit-scrollbar {
  display: none;
}

.nx-draw-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 10px 12px 11px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--tf-text-muted);
  font-size: 0.82rem;
  font-weight: 650;
  white-space: nowrap;
}

.nx-draw-tab.is-on {
  color: var(--tf-text);
  border-bottom-color: #6366f1;
}

.nx-draw-count {
  min-width: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--tf-fill-2);
  color: var(--tf-text-muted);
  font-size: 0.7rem;
  line-height: 18px;
  text-align: center;
}

.nx-draw-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px 16px 18px;
}

.nx-draw-title {
  width: 100%;
  margin: 8px 0 4px;
  padding: 8px 2px 12px;
  border: 0;
  border-bottom: 1px solid var(--tf-border);
  background: transparent;
  color: var(--tf-text);
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.35;
}

.nx-draw-title:focus {
  outline: none;
}

.nx-draw-card {
  margin-top: 14px;
  padding: 12px 14px 6px;
  border: 1px solid var(--tf-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--tf-fill-2) 70%, transparent);
}

.nx-draw-card-title {
  margin: 2px 0 8px;
  color: var(--tf-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nx-draw-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin: 0;
  padding: 7px 0;
}

.nx-draw-row + .nx-draw-row {
  border-top: 1px solid var(--tf-border);
}

.nx-draw-row.is-top {
  align-items: start;
}

.nx-draw-row.is-top > .nx-draw-k {
  padding-top: 7px;
}

.nx-draw-k {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--tf-text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
}

.nx-draw-k i {
  flex: 0 0 auto;
  width: 16px;
  text-align: center;
  font-size: 0.9rem;
}

.nx-draw-val {
  display: block;
  min-width: 0;
}

.nx-draw .form-control,
.nx-draw .form-select {
  width: 100%;
  min-height: 36px;
  border-radius: 10px;
}

.nx-draw .scrum-field-hint {
  margin: 4px 0 0;
  font-size: 0.72rem;
}

.nx-draw .tf-assignee-picker,
.nx-draw .tf-label-picker {
  gap: 6px;
}

.nx-draw .tf-assignee-chip:hover:not(:disabled) {
  transform: none;
}

.nx-draw-rich {
  border: 1px solid var(--tf-border);
  border-radius: 12px;
  background: var(--tf-fill, transparent);
  overflow: hidden;
}

.nx-draw-rich-bar {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-bottom: 1px solid var(--tf-border);
}

.nx-draw-rich-bar button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--tf-text-muted);
}

.nx-draw-rich-bar button:hover:not(:disabled) {
  background: var(--tf-fill-hover);
  color: var(--tf-text);
}

.nx-draw-rich-body {
  min-height: 96px;
  max-height: 220px;
  overflow: auto;
  padding: 10px 12px;
  color: var(--tf-text);
  font-size: 0.92rem;
  line-height: 1.55;
}

.nx-draw-rich-body.is-empty:before {
  content: attr(data-placeholder);
  color: var(--tf-text-muted);
}

.nx-draw-rich-body:focus {
  outline: none;
}

.nx-draw-fold {
  padding-bottom: 10px;
}

.nx-draw-fold summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}

.nx-draw-fold summary::-webkit-details-marker {
  display: none;
}

.nx-draw-fold summary .nx-draw-card-title {
  margin: 0;
  color: var(--tf-text);
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.86rem;
}

.nx-draw-fold summary .kanban-fold-meta {
  margin-inline-start: auto;
  color: var(--tf-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.nx-draw-fold summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-inline-end: 1.5px solid var(--tf-text-muted);
  border-bottom: 1.5px solid var(--tf-text-muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.nx-draw-fold[open] summary::after {
  transform: rotate(225deg);
}

.nx-draw-fold-body {
  padding-top: 4px;
}

.nx-draw-empty {
  margin-bottom: 16px;
  color: var(--tf-text-muted);
  font-size: 0.86rem;
}

.nx-draw-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid var(--tf-border);
  border-radius: 12px;
  background: transparent;
  color: var(--tf-text);
  text-align: start;
}

.nx-draw-child small {
  color: var(--tf-text-muted);
  font-size: 0.75rem;
}

.nx-draw-child:hover {
  border-color: rgba(99, 102, 241, 0.45);
}

.nx-draw-file {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  margin: 8px 0 10px;
  border: 1px dashed var(--tf-border);
  border-radius: 12px;
  color: var(--tf-text-muted);
  font-size: 0.84rem;
  font-weight: 650;
  cursor: pointer;
}

.nx-draw-file input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.nx-draw-file:has(input:disabled) {
  opacity: 0.55;
  cursor: default;
}

.nx-draw-comments {
  flex-shrink: 0;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--tf-border);
  background: var(--tf-surface);
}

.nx-draw-comment-head {
  margin-bottom: 8px;
  color: var(--tf-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nx-draw-comments .kanban-comment-list {
  max-height: 148px;
  margin-bottom: 8px;
}

.nx-draw-comments .kanban-comment {
  padding: 8px 10px;
  border-radius: 10px;
}

.nx-arch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nx-arch-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.18);
  color: var(--tf-hud-accent, #818cf8);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.nx-arch {
  position: fixed;
  inset: 0;
  z-index: 1030;
}

.nx-arch[hidden] {
  display: none;
}

.nx-arch-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.nx-arch-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-end: 0;
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  background: var(--tf-surface);
  color: var(--tf-text);
  border-inline-start: 1px solid var(--tf-border);
  box-shadow: -16px 0 40px rgba(2, 6, 23, 0.28);
}

.nx-arch-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 16px 12px;
  border-bottom: 1px solid var(--tf-border);
}

.nx-arch-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.nx-arch-head p {
  margin: 4px 0 0;
  color: var(--tf-text-muted);
  font-size: 0.8rem;
}

.nx-arch-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.nx-arch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px 8px 8px 12px;
  border: 1px solid var(--tf-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--tf-fill-2) 70%, transparent);
}

.nx-arch-open {
  flex: 1;
  min-width: 0;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: start;
}

.nx-arch-open strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
}

.nx-arch-open span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--tf-text-muted);
  font-size: 0.75rem;
}

.nx-arch-restore {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--tf-border);
  border-radius: 10px;
  background: transparent;
  color: var(--tf-text);
}

.nx-arch-restore:hover {
  border-color: rgba(99, 102, 241, 0.5);
  color: var(--tf-hud-accent, #818cf8);
}

.nx-draw .kanban-checklist {
  margin: 0 0 12px;
  padding: 0 0 12px;
  border: 0;
  border-bottom: 1px solid var(--tf-border);
  border-radius: 0;
  background: transparent;
}

.nx-draw .kanban-checklist:last-child {
  margin-bottom: 4px;
  padding-bottom: 2px;
  border-bottom: 0;
}

.nx-draw .kanban-checklist-header {
  margin-bottom: 6px;
}

.nx-draw .kanban-checklist-title {
  font-size: 0.92rem;
}

.nx-check-count {
  color: var(--tf-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.nx-check-bar {
  height: 4px;
  margin: 0 0 8px;
  border-radius: 999px;
  background: var(--tf-fill-2);
  overflow: hidden;
}

.nx-check-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #6366f1;
}

.nx-draw .kanban-checklist-item {
  min-height: 34px;
  margin: 0 -6px;
  padding: 2px 6px;
  border-radius: 8px;
}

.nx-draw .kanban-checklist-item:hover {
  background: var(--tf-fill-hover);
}

.nx-draw .kanban-checklist-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  accent-color: #6366f1;
}

.nx-check-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.nx-check-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--tf-text-muted);
}

.nx-check-icon:hover {
  background: var(--tf-fill-2);
  color: var(--tf-text);
}

.nx-check-icon.is-danger:hover {
  color: #e11d48;
}

.nx-draw .input-group {
  flex-wrap: nowrap;
}

.nx-draw .input-group > .form-control {
  width: 1%;
  flex: 1 1 auto;
}

.nx-draw .input-group > .btn {
  flex: 0 0 36px;
  width: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nx-check-add {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.nx-check-add .form-control {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

.nx-check-add .btn {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 760px) {
  .nx-draw-panel,
  html[dir="rtl"] .nx-draw-panel,
  .nx-draw.is-open .nx-draw-panel {
    inset-inline: 0;
    width: 100%;
    border: 0;
  }

  .nx-draw.is-page .nx-draw-sheet,
  .nx-draw-sheet {
    width: 100%;
  }

  .nx-draw-row {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .nx-draw-backdrop {
    background: var(--tf-canvas, var(--tf-bg));
  }
}
