h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

:root {
  --na-bg: #eef3f0;
  --na-read: #f6faf8;
  --na-surface: #fff;
  --na-surface-2: #f1f6f3;
  --na-ink: #0e1a15;
  --na-ink-soft: #36443d;
  --na-muted: #6c7c74;
  --na-faint: #9aa9a2;
  --na-line: #e0e9e4;
  --na-line-strong: #cdd9d3;
  --na-forest: #0e1a15;
  --na-forest-2: #13241c;
  --na-forest-3: #1c352a;
  --na-green: #1f8a5b;
  --na-green-d: #136848;
  --na-mint: #37d495;
  --na-mint-d: #22b87d;
  --na-mint-soft: #e6f6ee;
  --na-mint-line: #bfe6d2;
  --na-amber: #d9913a;
  --na-amber-soft: #fbf0db;
  --na-coral: #df6a5c;
  --na-coral-soft: #fbe7e3;
  --na-blue: #3f7fb8;
  --na-blue-soft: #e6f0f8;
  --na-display: 'Space Grotesk', system-ui, sans-serif;
  --na-body: 'Figtree', system-ui, sans-serif;
  --na-mono: 'JetBrains Mono', monospace;
}

html, body {
  font-family: var(--na-body);
  background: var(--na-read);
  color: var(--na-ink);
  margin: 0;
}

h1, h2, h3, h4, .mud-typography-h1, .mud-typography-h2, .mud-typography-h3, .mud-typography-h4, .mud-typography-h5, .mud-typography-h6 {
  font-family: var(--na-display) !important;
  letter-spacing: -0.01em;
}

.na-mono { font-family: var(--na-mono); }

/* ============ Auth split screen ============ */
.na-auth-shell { min-height: 100vh; display: flex; width: 100%; }
.na-auth-brand {
  flex: 0 0 44%; max-width: 620px; position: relative; overflow: hidden; color: #dcebe3;
  background: radial-gradient(900px 500px at 80% -10%, rgba(55,212,149,.18), transparent 60%),
              radial-gradient(700px 480px at -10% 110%, rgba(31,138,91,.24), transparent 55%), var(--na-forest);
  padding: 48px 54px; display: flex; flex-direction: column;
}
.na-auth-brand::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(600px 400px at 75% 10%, #000, transparent 75%);
}
.na-auth-brand > * { position: relative; z-index: 1; }
.na-auth-form { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 28px; background: var(--na-surface); }
.na-stat .v { font-family: var(--na-display); font-weight: 700; font-size: 26px; color: #fff; }
.na-stat .l { font-size: 12px; color: #7f968a; margin-top: 2px; }
@media (max-width: 900px) { .na-auth-brand { display: none; } }

/* ============ App shell ============ */
.na-shell { display: flex; min-height: 100vh; background: var(--na-read); }
.na-side {
  width: 258px; flex: 0 0 258px; background: var(--na-forest); color: #bccfc5;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; border-right: 1px solid #06100b;
}
.na-side-brand { padding: 20px 20px 16px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid #1b3024; }
.na-side-brand .nm { font-family: var(--na-display); font-weight: 600; font-size: 17px; color: #fff; }
.na-side-brand .nm b { color: var(--na-mint); font-weight: 700; }
.na-side-brand .tg { font-family: var(--na-mono); font-size: 9.5px; letter-spacing: .12em; color: #7f968a; }
.na-side-nav { flex: 1; overflow-y: auto; padding: 12px 12px 20px; }
.na-side-gh { font-family: var(--na-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: #5f7669; padding: 14px 12px 6px; }
.na-side-link {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: #bccfc5;
  font-size: 14px; font-weight: 500; margin-bottom: 2px; position: relative; text-decoration: none; cursor: pointer;
}
.na-side-link:hover { background: #16291f; color: #fff; }
.na-side-link.active { background: linear-gradient(90deg, rgba(55,212,149,.18), transparent); color: #fff; }
.na-side-link.active::before { content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--na-mint); }
.na-side-link .cnt { margin-left: auto; font-family: var(--na-mono); font-size: 10.5px; background: #1c352a; color: #9fb3a8; padding: 2px 7px; border-radius: 20px; }
.na-side-link.active .cnt { background: var(--na-mint); color: var(--na-forest); }
.na-side-foot { padding: 14px 16px; border-top: 1px solid #1b3024; display: flex; align-items: center; gap: 10px; }
.na-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--na-mint), var(--na-green));
  display: grid; place-items: center; font-family: var(--na-display); font-weight: 700; color: var(--na-forest); font-size: 14px; flex: 0 0 34px;
}
.na-side-foot .who { font-size: 13px; color: #dceae2; font-weight: 600; line-height: 1.2; }
.na-side-foot .who small { display: block; font-weight: 400; color: #7f968a; font-size: 11px; }

.na-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.na-topbar {
  position: sticky; top: 0; z-index: 10; background: rgba(246,250,248,.9); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--na-line); padding: 14px 30px; display: flex; align-items: center; gap: 16px;
}
.na-content { padding: 26px 30px 60px; flex: 1; }

.na-kpi { background: var(--na-surface); border: 1px solid var(--na-line); border-radius: 20px; padding: 18px 20px; box-shadow: 0 1px 2px rgba(14,26,21,.06); height: 100%; }
.na-kpi-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--na-mint-soft); border: 1px solid var(--na-mint-line); display: grid; place-items: center; color: var(--na-green-d); }
.na-kpi-num { font-family: var(--na-display); font-weight: 700; font-size: 28px; letter-spacing: -.02em; margin-top: 12px; line-height: 1; }
.na-kpi-label { font-size: 13px; color: var(--na-muted); margin-top: 5px; }
.na-delta-up { background: var(--na-mint-soft); color: var(--na-green-d); font-family: var(--na-mono); font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 20px; }
.na-delta-down { background: var(--na-coral-soft); color: #b4453a; font-family: var(--na-mono); font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 20px; }

.na-card { background: var(--na-surface); border: 1px solid var(--na-line); border-radius: 20px; box-shadow: 0 1px 2px rgba(14,26,21,.06); }
.na-card-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--na-line); }
.na-card-title { font-family: var(--na-display); font-weight: 600; font-size: 16px; }
.na-card-body { padding: 18px 20px; }

.na-feed-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--na-line); }
.na-feed-item:last-child { border-bottom: 0; }
.na-feed-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 32px; }

.na-u-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--na-display); font-weight: 600; font-size: 13px; color: #fff; flex: 0 0 34px; }

.na-stub { display: grid; place-items: center; text-align: center; padding: 60px 20px; background: var(--na-surface); border: 1px dashed var(--na-line-strong); border-radius: 20px; }

@media (max-width: 900px) {
  .na-side { position: fixed; z-index: 50; transform: translateX(-100%); transition: transform .25s; }
  .na-shell.nav-open .na-side { transform: none; }
}

/* ============ Responsive page shell ============ */
@media (max-width: 900px) {
  .na-content { padding: 16px 14px 40px; }
  .na-topbar { padding: 10px 14px; }
  .page-head { align-items: flex-start !important; }
}

/* ============ Responsive list: table <-> card view ============ */
.na-view-toggle { display: inline-flex; border: 1px solid var(--na-line); border-radius: 10px; overflow: hidden; }
.na-view-toggle button {
  border: none; background: var(--na-surface); color: var(--na-muted); padding: 6px 10px; cursor: pointer;
  display: flex; align-items: center; line-height: 0;
}
.na-view-toggle button.active { background: var(--na-mint-soft); color: var(--na-green-d); }
.na-view-toggle button + button { border-left: 1px solid var(--na-line); }

.na-responsive-list .na-list-cards { display: none; }
.na-responsive-list.mode-card .na-list-table { display: none; }
.na-responsive-list.mode-card .na-list-cards { display: block; }

.na-card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; padding: 16px;
}
.na-list-card {
  background: var(--na-surface); border: 1px solid var(--na-line); border-radius: 16px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px; box-shadow: 0 1px 2px rgba(14,26,21,.05);
}
.na-list-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.na-list-card-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.na-list-card-row .k { color: var(--na-muted); }
.na-list-card-row .v { color: var(--na-ink); font-weight: 500; text-align: right; }
.na-list-card-actions { display: flex; justify-content: flex-end; gap: 6px; padding-top: 4px; border-top: 1px solid var(--na-line); margin-top: 4px; }

@media (max-width: 900px) {
  /* Below the tablet breakpoint, always show cards regardless of the toggle. */
  .na-responsive-list .na-list-table { display: none !important; }
  .na-responsive-list .na-list-cards { display: block !important; }
  .na-view-toggle { display: none !important; }
  .na-card-grid { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
}
