:root {
    font-size: var(--rz-root-font-size);
    --app-bg: #f4efe6;
    --app-bg-strong: #efe4d1;
    --app-panel: rgba(255, 251, 244, 0.88);
    --app-panel-strong: #fffaf1;
    --app-ink: #1f2933;
    --app-muted: #5b6b78;
    --app-border: rgba(116, 92, 58, 0.18);
    --app-accent: #a4491d;
    --app-accent-soft: rgba(164, 73, 29, 0.14);
    --app-navy: #123043;
    --app-shadow: 0 24px 60px rgba(24, 35, 43, 0.12);
}

html,
body {
    min-height: 100%;
}

body {
    font-family: "IBM Plex Sans", sans-serif;
    color: var(--app-ink);
    font-size: var(--rz-body-font-size);
    line-height: 1.6;
    background:
        radial-gradient(circle at top left, rgba(236, 199, 137, 0.28), transparent 30rem),
        radial-gradient(circle at bottom right, rgba(18, 48, 67, 0.12), transparent 28rem),
        linear-gradient(180deg, #faf5ed 0%, var(--app-bg) 56%, #ece2d1 100%);
    background-attachment: fixed;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(18, 48, 67, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(18, 48, 67, 0.035) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.4), transparent 88%);
    pointer-events: none;
    z-index: -1;
}

a {
    color: var(--app-accent);
}

a:hover,
a:focus {
    color: #7f2f0f;
}

.rz-body {
    --rz-body-padding: 0;
}

.rz-layout,
.rz-sidebar,
.rz-header,
.rz-body {
    background: transparent;
}

.app-shell__eyebrow,
.section-eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--app-accent);
    font-weight: 700;
}

.app-shell__title,
.hero-title,
.panel-title,
.auth-title {
    font-family: "Sora", sans-serif;
    letter-spacing: -0.04em;
}

.app-shell__subtitle,
.muted-text {
    color: var(--app-muted);
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(18, 48, 67, 0.06);
    border: 1px solid rgba(18, 48, 67, 0.08);
}

.user-chip__dot {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #d98d5d, var(--app-accent));
    box-shadow: 0 0 0 0.25rem rgba(164, 73, 29, 0.12);
}

.app-shell__body {
    padding: 0.8rem 0.8rem 0.8rem 0;
}

.app-shell__content {
    max-width: 1360px;
    animation: fade-up 320ms ease;
}

.app-shell__sidebar {
    margin: 0 0 0.8rem 1rem;
    border-radius: 1.45rem;
    border: 1px solid rgba(18, 48, 67, 0.09);
    background: linear-gradient(180deg, rgba(22, 44, 58, 0.97), rgba(18, 48, 67, 0.94));
    color: #f7eee1;
    box-shadow: 0 24px 50px rgba(18, 48, 67, 0.18);
    overflow: hidden;
    height: calc(100vh - 1.6rem);
    position: sticky;
    top: 0.8rem;
}

.app-shell__sidebar-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.sidebar-brand {
    gap: 0.75rem;
    padding: 0.95rem 0.95rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.sidebar-brand__top {
    display: flex;
    justify-content: flex-start;
}

.sidebar-brand__mark {
    width: min(100%, 8rem);
    padding: 0.7rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin: 0 auto;
}

.sidebar-brand__mark img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.sidebar-brand__copy {
    display: grid;
    gap: 0.25rem;
}

.sidebar-brand__name {
    color: #fff7ef;
    font-family: "Sora", sans-serif;
    font-size: 0.95rem;
    letter-spacing: -0.03em;
}

.sidebar-brand__tag {
    color: rgba(255, 247, 239, 0.7);
    text-align: left;
}

.sidebar-session {
    display: grid;
    gap: 0.3rem;
    margin: 0.8rem 0.8rem 0;
    padding: 0.75rem 0.85rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-session__eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 247, 239, 0.66);
    font-weight: 700;
}

.sidebar-session__name {
    color: #fff7ef;
    font-family: "Sora", sans-serif;
    font-size: 0.92rem;
    letter-spacing: -0.03em;
    line-height: 1.2;
    word-break: break-word;
}

.sidebar-session__status {
    color: rgba(255, 247, 239, 0.72);
    font-size: 0.92rem;
}

.sidebar-session__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.1rem;
}

.sidebar-session__button.rz-button {
    min-height: 2.2rem;
    padding: 0 0.8rem;
    border-radius: 999px;
    font-size: 0.84rem;
}

.app-shell__menu-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(217, 141, 93, 0.4) transparent;
}

.app-shell__sidebar .rz-navigation-item-link,
.app-shell__sidebar .rz-navigation-item-text {
    color: #fff7ef;
}

.app-shell__sidebar .rz-panel-menu {
    padding: 0.6rem 0.45rem;
}

.app-shell__sidebar .rz-navigation-item-link {
    border-radius: 0.95rem;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.app-shell__footer {
    color: rgba(255, 247, 239, 0.68);
    padding: 0.85rem 1rem 1.1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: auto;
    background: linear-gradient(180deg, rgba(18, 48, 67, 0), rgba(18, 48, 67, 0.42));
}

.panel {
    border-radius: 1.4rem;
    border: 1px solid var(--app-border);
    background: var(--app-panel);
    box-shadow: 0 18px 42px rgba(24, 35, 43, 0.1);
    backdrop-filter: blur(18px);
}

.panel--strong {
    background: var(--app-panel-strong);
}

.panel--hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(18, 48, 67, 0.94), rgba(28, 66, 91, 0.92)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent);
    color: #f9f4ec;
}

.panel--hero::after {
    content: "";
    position: absolute;
    inset: auto -3rem -4rem auto;
    width: 15rem;
    height: 15rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 141, 93, 0.45), transparent 66%);
}

.panel-body {
    padding: 1.15rem;
}

.hero-brand-lockup {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.95rem;
}

.hero-brand-lockup__mark {
    width: min(100%, 6.75rem);
    padding: 0.7rem 0.85rem;
    border-radius: 1.05rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    flex: 0 1 6.75rem;
}

.hero-brand-lockup__mark img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.hero-title {
    font-size: clamp(1.55rem, 3vw, 1.9rem);
    line-height: 1.08;
    margin: 0;
}

.hero-copy {
    max-width: 38rem;
    color: rgba(249, 244, 236, 0.82);
    font-size: 0.95rem;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.hero-metric {
    padding: 0.85rem 0.95rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-metric__value {
    display: block;
    font-family: "Sora", sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
}

.hero-metric__label {
    color: rgba(249, 244, 236, 0.72);
    font-size: 0.86rem;
}

.badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.scope-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    background: var(--app-accent-soft);
    color: var(--app-accent);
    font-weight: 600;
    font-size: 0.8rem;
}

.auth-shell {
    min-height: calc(100vh - 8rem);
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 1.5rem;
    align-items: stretch;
}

.auth-shell__visual,
.auth-shell__form {
    position: relative;
    overflow: hidden;
}

.auth-shell__visual {
    padding: 2rem;
    color: #fdf6ed;
    background:
        linear-gradient(180deg, rgba(18, 48, 67, 0.8), rgba(18, 48, 67, 0.88)),
        url("/images/login.jpg") center/cover no-repeat;
}

.auth-shell__visual::after {
    content: "";
    position: absolute;
    inset: auto -3rem -3rem auto;
    width: 16rem;
    height: 16rem;
    background: radial-gradient(circle, rgba(217, 141, 93, 0.34), transparent 64%);
}

.auth-shell__visual-content,
.auth-shell__form-content {
    position: relative;
    z-index: 1;
}

.auth-shell__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 2rem;
    max-width: 100%;
}

.auth-shell__brand img {
    width: min(4.5rem, 100%);
    max-width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.55rem;
    object-fit: contain;
    flex: 0 0 auto;
}

.auth-shell__hero-mark {
    width: min(100%, 15rem);
    margin-bottom: 1.5rem;
    padding: 1rem 1.15rem;
    border-radius: 1.4rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-shell__hero-mark img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.auth-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin: 0;
}

.auth-copy {
    max-width: 34rem;
    color: rgba(253, 246, 237, 0.82);
}

.auth-list {
    display: grid;
    gap: 0.95rem;
    margin-top: 2rem;
}

.auth-list__item {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-list__item strong {
    display: block;
    margin-bottom: 0.2rem;
}

.auth-shell__form {
    padding: 2rem;
    display: flex;
    align-items: center;
}

.auth-card {
    width: 100%;
    max-width: 34rem;
    margin: 0 auto;
    padding: 2rem;
}

.auth-form {
    display: grid;
    gap: 1rem;
}

.form-field {
    display: grid;
    gap: 0.45rem;
}

.form-label {
    color: var(--app-muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.form-input,
.rz-inputtext {
    width: 100%;
    border-radius: 0.95rem;
    border: 1px solid rgba(18, 48, 67, 0.12);
    background: rgba(255, 255, 255, 0.86);
    padding: 0.9rem 1rem;
    color: var(--app-ink);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.form-input:focus,
.rz-inputtext:focus {
    outline: none;
    border-color: rgba(164, 73, 29, 0.4);
    box-shadow: 0 0 0 0.25rem rgba(164, 73, 29, 0.12);
    transform: translateY(-1px);
}

.form-check {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--app-muted);
    font-weight: 500;
}

.app-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 3.1rem;
    border-radius: 999px;
    border: 0;
    padding: 0.9rem 1.25rem;
    font-family: "Sora", sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #b45827, var(--app-accent));
    color: #fff8f1;
    box-shadow: 0 14px 28px rgba(164, 73, 29, 0.22);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.app-button:hover,
.app-button:focus {
    transform: translateY(-1px);
    filter: brightness(1.02);
    box-shadow: 0 18px 32px rgba(164, 73, 29, 0.26);
}

.app-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.app-button--secondary {
    background: rgba(18, 48, 67, 0.08);
    color: var(--app-navy);
    box-shadow: none;
}

.app-message {
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    border: 1px solid transparent;
    font-weight: 500;
}

.app-message--error {
    background: rgba(150, 27, 27, 0.08);
    border-color: rgba(150, 27, 27, 0.12);
    color: #7c1f1f;
}

.app-message--success {
    background: rgba(30, 103, 77, 0.08);
    border-color: rgba(30, 103, 77, 0.12);
    color: #205b48;
}

.user-grid {
    display: grid;
    gap: 1rem;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th {
    text-align: left;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--app-muted);
    padding: 0 0 0.6rem;
}

.users-table td {
    padding: 0.75rem 0;
    border-top: 1px solid rgba(18, 48, 67, 0.08);
    vertical-align: top;
}

.users-table tr:first-child td {
    border-top: 0;
}

.users-table__meta {
    color: var(--app-muted);
    font-size: 0.9rem;
}

.role-picker {
    display: grid;
    gap: 0.55rem;
}

.role-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.8rem 0.95rem;
    border-radius: 1rem;
    background: rgba(18, 48, 67, 0.045);
    border: 1px solid rgba(18, 48, 67, 0.07);
    color: var(--app-ink);
}

.role-chip__text {
    display: grid;
    gap: 0.15rem;
}

.role-chip__text small {
    color: var(--app-muted);
}

.stack-gap-sm {
    display: grid;
    gap: 0.65rem;
}

.stack-gap-md {
    display: grid;
    gap: 0.85rem;
}

.nav-tile {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.nav-tile:hover,
.nav-tile:focus {
    transform: translateY(-2px);
    border-color: rgba(164, 73, 29, 0.24);
    box-shadow: 0 20px 40px rgba(18, 48, 67, 0.12);
    color: inherit;
}

.detail-list {
    display: grid;
    gap: 0.85rem;
}

.detail-list div {
    display: grid;
    gap: 0.2rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(18, 48, 67, 0.08);
}

.detail-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.detail-list strong {
    color: var(--app-muted);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.admin-form-grid__full {
    grid-column: 1 / -1;
}

.form-input--multiline {
    min-height: 8rem;
    resize: vertical;
}

.action-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.notice-preview {
    display: grid;
    gap: 0.45rem;
}

.notice-preview strong {
    color: var(--app-navy);
    font-size: 0.86rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.notice-preview p {
    margin: 0 0 0.75rem;
    color: var(--app-muted);
}

.dashboard-hero {
    display: grid;
    gap: 0.9rem;
}

.dashboard-hero__header {
    display: flex;
    justify-content: space-between;
    gap: 0.9rem;
    align-items: flex-start;
}

.dashboard-hero__copy {
    display: grid;
    gap: 0.5rem;
}

.dashboard-hero__mark {
    margin-left: auto;
}

.dashboard-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dashboard-meta__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(249, 244, 236, 0.88);
    font-size: 0.82rem;
}

.dashboard-meta__chip strong {
    color: #fffaf4;
    font-size: 0.76rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dashboard-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0.75rem;
}

.dashboard-metric-card {
    display: grid;
    gap: 0.2rem;
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(18, 48, 67, 0.08);
    background: rgba(18, 48, 67, 0.035);
}

.dashboard-metric-card--hero {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.dashboard-metric-card__eyebrow {
    color: rgba(249, 244, 236, 0.76);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-metric-card__value {
    font-family: "Sora", sans-serif;
    font-size: 1.3rem;
    line-height: 1.1;
}

.dashboard-metric-card__note {
    color: rgba(249, 244, 236, 0.72);
    font-size: 0.84rem;
}

.dashboard-stack {
    display: grid;
    gap: 0.85rem;
}

.dashboard-panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.dashboard-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: rgba(18, 48, 67, 0.06);
    border: 1px solid rgba(18, 48, 67, 0.08);
    color: var(--app-navy);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
}

.dashboard-link:hover,
.dashboard-link:focus {
    color: var(--app-navy);
    border-color: rgba(164, 73, 29, 0.2);
    background: rgba(164, 73, 29, 0.08);
}

.dashboard-list {
    display: grid;
    gap: 0.55rem;
}

.dashboard-list--dense {
    gap: 0.45rem;
}

.dashboard-list-item {
    display: grid;
    gap: 0.18rem;
    padding: 0.75rem 0.85rem;
    border-radius: 1rem;
    background: rgba(18, 48, 67, 0.04);
    border: 1px solid rgba(18, 48, 67, 0.07);
}

.dashboard-list-item--link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.dashboard-list-item--link:hover,
.dashboard-list-item--link:focus {
    transform: translateY(-1px);
    color: inherit;
    border-color: rgba(164, 73, 29, 0.18);
    box-shadow: 0 10px 24px rgba(18, 48, 67, 0.08);
}

.dashboard-list-item__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.dashboard-list-item__title {
    font-family: "Sora", sans-serif;
    font-size: 0.94rem;
    line-height: 1.2;
}

.dashboard-list-item__meta {
    color: var(--app-muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.dashboard-list-item__amount {
    font-family: "Sora", sans-serif;
    font-size: 0.92rem;
}

.dashboard-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    background: rgba(18, 48, 67, 0.08);
    color: var(--app-navy);
    font-size: 0.76rem;
    font-weight: 700;
}

.dashboard-status-pill--alert {
    background: rgba(150, 27, 27, 0.1);
    color: #8a2323;
}

.dashboard-empty {
    padding: 0.85rem 0.95rem;
    border-radius: 1rem;
    border: 1px dashed rgba(18, 48, 67, 0.14);
    color: var(--app-muted);
    font-size: 0.9rem;
}

#blazor-error-ui {
    background: rgba(124, 31, 31, 0.94);
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    width: auto;
    border-radius: 1rem;
    box-shadow: 0 18px 36px rgba(38, 12, 12, 0.18);
    padding: 0.85rem 1rem 0.9rem 1rem;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: #8d2424;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--app-accent);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-shell__visual {
        min-height: 18rem;
    }

    .hero-brand-lockup {
        flex-direction: column;
    }

    .dashboard-hero__header,
    .dashboard-panel-heading,
    .dashboard-list-item__row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .app-shell__body {
        padding: 0.65rem;
    }

    .app-shell__sidebar {
        margin: 0 0 0.65rem 0.65rem;
        border-radius: 1.2rem;
        height: calc(100vh - 1.3rem);
        top: 0.65rem;
    }

    .panel,
    .auth-card {
        border-radius: 1.15rem;
    }

    .hero-title,
    .auth-title {
        font-size: 1.8rem;
    }

    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .users-table thead {
        display: none;
    }

    .users-table,
    .users-table tbody,
    .users-table tr,
    .users-table td {
        display: block;
        width: 100%;
    }

    .users-table td {
        padding: 0.55rem 0;
        border-top: 0;
    }

    .users-table tr {
        padding: 1rem 0;
        border-top: 1px solid rgba(18, 48, 67, 0.08);
    }
}
/* MuniBill Figma revision 1 tokens, mapped to the existing Blazor design system. */
:root {
  --mb-palette-navy: #123043;
  --mb-navy: #123043;
  --mb-palette-ink: #18313d;
  --mb-ink: #18313d;
  --mb-palette-muted: #536773;
  --mb-muted: #536773;
  --mb-palette-white: #ffffff;
  --mb-white: #ffffff;
  --mb-palette-canvas: #f3f6f7;
  --mb-canvas: #f3f6f7;
  --mb-palette-line: #d8e2e6;
  --mb-line: #d8e2e6;
  --mb-palette-teal: #006b63;
  --mb-teal: #006b63;
  --mb-palette-tealHover: #00534d;
  --mb-tealHover: #00534d;
  --mb-palette-tint: #e6f3f0;
  --mb-tint: #e6f3f0;
  --mb-palette-amber: #805500;
  --mb-amber: #805500;
  --mb-palette-amberTint: #fff3d6;
  --mb-amberTint: #fff3d6;
  --mb-palette-red: #aa3030;
  --mb-red: #aa3030;
  --mb-palette-redTint: #fff0ee;
  --mb-redTint: #fff0ee;
  --mb-palette-blue: #235e9b;
  --mb-blue: #235e9b;
  --mb-palette-blueTint: #eaf2fb;
  --mb-blueTint: #eaf2fb;
  --mb-palette-navText: #c7d9e2;
  --mb-navText: #c7d9e2;
  --mb-space-0: 0px;
  --mb-space-4: 4px;
  --mb-space-8: 8px;
  --mb-space-12: 12px;
  --mb-space-16: 16px;
  --mb-space-20: 20px;
  --mb-space-24: 24px;
  --mb-space-32: 32px;
  --mb-space-40: 40px;
  --mb-space-48: 48px;
  --mb-space-64: 64px;
  --mb-radius-0: 0px;
  --mb-radius-6: 6px;
  --mb-radius-12: 12px;
  --mb-radius-20: 20px;
  --mb-font-body: "IBM Plex Sans", sans-serif;
  --mb-font-heading: "Sora", sans-serif;
}

/* Staff shell and operational overview: Figma 9:2, adapted to live, authorized data. */
:root {
    --app-bg: var(--mb-canvas); --app-bg-strong: var(--mb-canvas);
    --app-panel: var(--mb-white); --app-panel-strong: var(--mb-white);
    --app-ink: var(--mb-ink); --app-muted: var(--mb-muted); --app-border: var(--mb-line);
    --app-accent: var(--mb-teal); --app-accent-soft: var(--mb-tint); --app-navy: var(--mb-navy);
    --app-shadow: none;
    --rz-primary: var(--mb-teal); --rz-primary-dark: var(--mb-tealHover);
}
body { background: var(--mb-canvas); color: var(--mb-ink); font: 16px/1.5 var(--mb-font-body); }
body::before { display: none; }
a { color: var(--mb-teal); }
a:hover, a:focus { color: var(--mb-tealHover); }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid var(--mb-blue); outline-offset: 3px; }
.mb-skip-link { position: fixed; top: 8px; left: 8px; z-index: 10000; padding: 12px 20px; background: white; transform: translateY(-200%); }
.mb-skip-link:focus { transform: translateY(0); }
.mb-workspace { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.mb-sidebar { background: var(--mb-navy); color: var(--mb-white); padding: 24px 16px; display: flex; flex-direction: column; gap: 28px; min-height: 100vh; }
.mb-sidebar a { color: var(--mb-navText); text-decoration: none; }
.mb-brand { display: grid; gap: 4px; padding: 0 8px; color: white !important; font: 600 20px/28px var(--mb-font-heading); }
.mb-brand span { font: 400 12px/20px var(--mb-font-body); color: var(--mb-navText); letter-spacing: .04em; }
.mb-municipality { display: grid; padding: 8px; gap: 4px; font-size: 14px; }
.mb-municipality span { color: var(--mb-navText); font-size: 13px; }
.mb-navigation { display: grid; gap: 8px; }
.mb-navigation > a, .mb-nav-group summary, .mb-nav-group a { display: flex; align-items: center; min-height: 48px; padding: 12px; border-radius: 6px; font-size: 16px; }
.mb-navigation a:hover, .mb-nav-group summary:hover { background: #1d4358; color: white; }
.mb-navigation a.active { background: var(--mb-teal); color: white; }
.mb-nav-group summary { cursor: pointer; list-style: revert; font-size: 14px; color: var(--mb-navText); }
.mb-nav-group a { font-size: 14px; padding-left: 20px; }
.mb-staff-session { display: grid; gap: 12px; margin-top: auto; padding: 16px 8px 8px; font-size: 14px; border-top: 1px solid #345569; }
.mb-staff-session a { display: inline-flex; align-items: center; min-height: 32px; }
.mb-workspace-main { min-width: 0; }
.mb-toolbar { min-height: 96px; padding: 24px; display: flex; align-items: center; gap: 24px; background: white; border-bottom: 1px solid var(--mb-line); }
.mb-account-search { padding: 12px 16px; flex: 1; max-width: 670px; border-radius: 6px; background: var(--mb-canvas); color: var(--mb-muted); text-decoration: none; min-height: 48px; }
.mb-toolbar time { font-size: 14px; color: var(--mb-muted); margin-left: auto; white-space: nowrap; }
.mb-toolbar-label { font-weight: 500; }
.mb-menu-toggle { display: none; }
.mb-page-content { padding: 40px; max-width: 1680px; margin: 0 auto; min-width: 0; }
.mb-page-content:focus { outline: none; }
.mb-overview { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 24px; }
.mb-overview > * { min-width: 0; }
.mb-page-heading p { margin: 0; color: var(--mb-muted); }
.mb-page-heading .section-eyebrow { color: var(--mb-teal); margin-bottom: 8px; font-size: 14px; letter-spacing: .025em; }
.mb-page-heading h1 { margin: 0 0 8px; font: 600 28px/38px var(--mb-font-heading); letter-spacing: -.035em; overflow-wrap: anywhere; }
.mb-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 24px; }
.mb-metric { display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--mb-line); border-radius: 12px; background: white; padding: 24px; min-width: 0; }
.mb-metric > span { font-size: 14px; color: var(--mb-muted); font-weight: 500; }
.mb-metric strong { font: 600 clamp(22px, 2.1vw, 32px)/1.3 var(--mb-font-heading); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.mb-metric small { color: var(--mb-muted); font-size: 13px; }
.mb-metric--emphasis { background: var(--mb-navy); color: white; border-color: var(--mb-navy); }
.mb-metric--emphasis > span, .mb-metric--emphasis small { color: var(--mb-navText); }
.mb-notice { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 24px; border-radius: 12px; color: var(--mb-amber); background: var(--mb-amberTint); }
.mb-notice h2 { font: 600 20px/28px var(--mb-font-heading); margin: 0 0 4px; color: inherit; }
.mb-notice p { margin: 0; }
.mb-notice--error { background: var(--mb-redTint); color: var(--mb-red); }
.mb-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 12px 20px; border: 1px solid transparent; border-radius: 6px; font: 500 14px/20px var(--mb-font-body); background: var(--mb-teal); color: white; text-decoration: none; cursor: pointer; flex-shrink: 0; }
.mb-button:hover, .mb-button:focus { color: white; background: var(--mb-tealHover); }
.mb-button--secondary { background: white; color: var(--mb-ink); border-color: var(--mb-line); }
.mb-button--secondary:hover { background: var(--mb-canvas); color: var(--mb-ink); }
.mb-surface { padding: 24px; border: 1px solid var(--mb-line); border-radius: 12px; background: white; min-width: 0; }
.mb-section-heading { display: flex; flex-wrap: wrap; gap: 24px; align-items: baseline; margin-bottom: 20px; }
.mb-section-heading h2 { margin: 0; font: 600 20px/28px var(--mb-font-heading); }
.mb-section-heading span { color: var(--mb-muted); }
.mb-table-scroll { overflow-x: auto; }
.mb-record-table { width: 100%; min-width: 660px; border-collapse: collapse; text-align: left; font-size: 14px; }
.mb-record-table th, .mb-record-table td { padding: 16px; vertical-align: top; border-bottom: 1px solid var(--mb-line); }
.mb-record-table thead th { font-size: 12px; font-weight: 500; text-transform: uppercase; background: var(--mb-canvas); }
.mb-record-table tbody th { font-weight: 500; width: 25%; }
.mb-record-table td:nth-child(2) { width: 28%; }
.mb-record-table td:last-child a { font-weight: 500; white-space: nowrap; }
.mb-worklist-actions { display: flex; gap: 24px; align-items: center; margin-top: 24px; flex-wrap: wrap; }
.mb-empty { padding: 32px 16px; color: var(--mb-muted); }
.mb-empty h3 { color: var(--mb-ink); font-size: 18px; margin: 0 0 8px; }
.mb-empty p { margin: 0; }
.mb-footnote { margin: 0; color: var(--mb-muted); font-size: 13px; }
.panel, .panel--strong, .panel--hero { background: white; border: 1px solid var(--mb-line); box-shadow: none; }
.form-input, .form-select, input:not([type=checkbox]):not([type=hidden]), select, textarea { border-color: var(--mb-muted); }
.rz-button { min-height: 44px; }
@media (max-width: 1200px) { .mb-page-content { padding: 28px; } .mb-metric-grid { gap: 16px; grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 800px) {
    .mb-workspace { grid-template-columns: 1fr; }
    .mb-sidebar { display: none; min-height: auto; }
    .mb-sidebar.is-open { display: flex; }
    .mb-navigation { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .mb-staff-session { margin-top: 8px; }
    .mb-toolbar { min-height: 76px; padding: 16px; gap: 12px; }
    .mb-toolbar time { display: none; }
    .mb-menu-toggle { display: inline-flex; padding: 12px; min-height: 44px; border: 1px solid var(--mb-muted); background: white; border-radius: 6px; color: var(--mb-ink); }
    .mb-page-content { padding: 24px 16px; }
    .mb-notice { align-items: flex-start; flex-direction: column; }
    .mb-page-heading h1 { font-size: 24px; line-height: 32px; }
}
@media (max-width: 480px) { .mb-metric-grid { grid-template-columns: 1fr; } .mb-metric strong { font-size: 30px; } .mb-surface { padding: 16px; } .mb-navigation { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }


/* Predictable component sizing across legacy Radzen and semantic Figma layouts. */
.mb-workspace, .mb-workspace *, .mb-workspace *::before, .mb-workspace *::after { box-sizing: border-box; }
.resident-shell, .resident-shell *, .resident-shell *::before, .resident-shell *::after,
.mb-public-shell, .mb-public-shell *, .mb-public-shell *::before, .mb-public-shell *::after { box-sizing: border-box; }
.auth-shell__visual { background: var(--mb-navy) !important; border-color: var(--mb-navy) !important; color: var(--mb-white); }
.auth-title { font-family: var(--mb-font-heading), sans-serif; font-size: clamp(1.9rem,3.2vw,3rem); line-height:1.18; color:var(--mb-ink); }
.auth-shell__visual .auth-title { color:var(--mb-white); }
.auth-copy, .auth-list__item span, .auth-shell__visual .section-eyebrow { color:var(--mb-navText); }
.auth-list__item strong, .auth-shell__visual .app-shell__title { color:var(--mb-white); }
.auth-shell { grid-template-columns: minmax(0,1fr) minmax(320px,1fr); }
@media(max-width:900px) { .auth-shell { grid-template-columns:1fr; } .auth-shell__visual { padding:24px; } .auth-shell__hero-mark { display:none; } }

.mb-nav-backdrop, .mb-sidebar-close { display:none; }
.mb-security-page { min-height:100vh; background:var(--mb-canvas,#f3f6f7); color:var(--mb-ink,#18313d); margin:0; padding:clamp(1rem,4vw,3rem); }
.mb-security-brand { display:flex; flex-wrap:wrap; align-items:baseline; gap:.75rem; max-width:44rem; margin:0 auto 2rem; }
.mb-security-brand a { color:var(--mb-navy,#123043); font:600 1.4rem var(--mb-font-heading),sans-serif; text-decoration:none; }
.mb-security-brand span, .mb-security-footer { color:var(--mb-muted,#536773); font-size:.9rem; }
.mb-security-card { box-sizing:border-box; width:100%; max-width:44rem; margin:2rem auto; overflow-wrap:anywhere; }
.mb-security-card h1 { font-family:var(--mb-font-heading),sans-serif; font-size:clamp(1.6rem,4vw,2.2rem); line-height:1.2; }
.mb-security-card p { line-height:1.6; }
.mb-security-card code { white-space:normal; overflow-wrap:anywhere; }
.mb-security-form label { display:flex; flex-direction:column; gap:.5rem; font-weight:600; }
.mb-security-form input:not([type=hidden]) { box-sizing:border-box; width:100%; min-height:44px; padding:.75rem; border:1px solid var(--mb-line,#d8e2e6); border-radius:6px; background:#fff; color:var(--mb-ink,#18313d); font:inherit; }
.mb-security-footer { max-width:44rem; margin:2rem auto; }
@media(max-width:800px) {
    .mb-nav-backdrop { display:block; position:fixed; inset:0; border:0; z-index:100; background:rgba(18,48,67,.45); }
    .mb-sidebar.is-open { position:fixed; z-index:101; top:0; bottom:0; left:0; width:min(320px,90vw); overflow-y:auto; }
    .mb-sidebar-close { display:block; min-height:44px; border:1px solid var(--mb-navText); background:transparent; color:white; border-radius:6px; padding:10px 16px; }
}
