@import url("modal-forms.css");

:root {
    color-scheme: light;
    --app-theme-name: "periwinkle";
    --body-background: oklch(98.2% 0.01 250);
    --app-chrome-bg: oklch(48% 0.112 268);
    --app-chrome-bg-strong: oklch(41% 0.11 268);
    --app-chrome-text: #fffdf9;
    --app-chrome-text-muted: oklch(91% 0.026 268);
    --app-chrome-border: color-mix(in srgb, var(--app-chrome-text) 16%, transparent);
    --app-chrome-control-bg: color-mix(in srgb, var(--app-chrome-text) 10%, transparent);
    --app-chrome-control-bg-hover: color-mix(in srgb, var(--app-chrome-text) 17%, transparent);
    --app-chrome-active-bg: color-mix(in srgb, #f0f2ff 88%, var(--surface-card-strong) 12%);
    --app-chrome-active-text: #273a68;
    --app-chrome-shadow: 0 16px 34px rgba(48, 59, 122, 0.16);
    --sidebar-background: var(--app-chrome-bg);
    --sidebar-header-background: var(--app-chrome-bg-strong);
    --hero-background: oklch(62% 0.105 268);
    --hero-text: #fffdf9;
    --hero-subtle-text: color-mix(in srgb, var(--hero-text) 86%, transparent);
    --page-text: #243243;
    --muted-text: #586575;
    --text-muted: var(--muted-text);
    --link-color: #4e5eb8;
    --link-hover-color: #39499d;
    --accent-gradient: oklch(62% 0.105 268);
    --accent-gradient-hover: oklch(54% 0.125 268);
    --accent-border: oklch(52% 0.125 268);
    --accent-border-strong: oklch(43% 0.13 268);
    --accent-soft-bg: oklch(94.5% 0.035 268);
    --accent-soft-text: #39499d;
    --accent-soft-strong-bg: oklch(89% 0.052 268);
    --danger-gradient: oklch(64% 0.13 12);
    --danger-border: oklch(52% 0.15 12);
    --danger-soft-bg: oklch(95% 0.03 12);
    --danger-soft-text: #7c263b;
    --warning-color: #8c5a1f;
    --warning-soft-bg: oklch(94.5% 0.055 84);
    --success-color: #2f6b4b;
    --success-soft-bg: oklch(94.5% 0.04 150);
    --neutral-soft-bg: oklch(93% 0.018 150);
    --neutral-soft-text: #4d5b6b;
    --surface-panel: color-mix(in srgb, #fffdf9 96%, var(--body-background) 4%);
    --surface-panel-strong: #fffdf9;
    --surface-card: color-mix(in srgb, #fffdf9 95%, var(--body-background) 5%);
    --surface-card-strong: #fffdf9;
    --surface-overlay: #fffdf9;
    --surface-border: color-mix(in srgb, #dce5ef 82%, var(--accent-soft-bg) 18%);
    --surface-border-soft: color-mix(in srgb, #dce5ef 60%, transparent);
    --surface-shadow: 0 16px 34px rgba(50, 67, 86, 0.08);
    --surface-shadow-strong: 0 24px 54px rgba(50, 67, 86, 0.12);
    --input-background: color-mix(in srgb, #fffdf9 96%, var(--body-background) 4%);
    --input-border: color-mix(in srgb, #dce5ef 76%, var(--accent-border) 24%);
    --focus-ring: color-mix(in srgb, var(--accent-gradient) 28%, transparent);
    --focus-ring-strong: color-mix(in srgb, var(--accent-border) 38%, transparent);
    --focus-outline: #4e5eb8;
    --credit-color: var(--success-color);
    --credit-fill: color-mix(in srgb, var(--success-soft-bg) 78%, transparent);
    --debit-color: #a63f55;
    --debit-fill: color-mix(in srgb, var(--danger-soft-bg) 76%, transparent);
    --font-size-caption-tight: clamp(0.72rem, 0.71rem + 0.06vw, 0.74rem);
    --font-size-caption: clamp(0.75rem, 0.73rem + 0.12vw, 0.78rem);
    --font-size-support: clamp(0.8rem, 0.78rem + 0.14vw, 0.82rem);
    --font-size-body-sm: clamp(0.88rem, 0.86rem + 0.18vw, 0.95rem);
    --font-size-body: clamp(0.98rem, 0.96rem + 0.18vw, 1.02rem);
    --font-size-title-xsm: clamp(0.92rem, 0.89rem + 0.18vw, 1.02rem);
    --font-size-title-sm: clamp(1.05rem, 1rem + 0.35vw, 1.25rem);
    --font-size-title-md: clamp(1.2rem, 1.12rem + 0.55vw, 1.4rem);
    --font-size-title-lg: clamp(1.35rem, 1.23rem + 0.8vw, 1.8rem);
    --font-size-title-xl: clamp(1.8rem, 1.62rem + 1.1vw, 2.4rem);
    --font-size-display-sm: clamp(2rem, 1.78rem + 1.45vw, 2.8rem);
    --font-size-display-md: clamp(2rem, 1.82rem + 1.85vw, 3.4rem);
    --font-size-display-lg: clamp(2.55rem, 2.18rem + 2.4vw, 4.2rem);
    --font-size-display-xl: clamp(2.8rem, 2.35rem + 2.75vw, 4.8rem);
    --mobile-nav-height: 62px;
    --desktop-header-height: 4.25rem;
    --floating-action-mobile-offset: 1rem;
    --floating-action-bottom-mobile: calc(env(safe-area-inset-bottom, 0px) + var(--floating-action-mobile-offset));
    --floating-action-right-mobile: calc(env(safe-area-inset-right, 0px) + var(--floating-action-mobile-offset));
    --floating-action-desktop-offset: 1.5rem;
    --floating-action-bottom-desktop: var(--floating-action-desktop-offset);
    --floating-action-right-desktop: var(--floating-action-desktop-offset);
    --floating-action-size-mobile: 3.6rem;
    --floating-action-size-desktop: 4.1rem;
}

html[data-theme="sage"]:not(.family-scope-active):not([data-family-scope="family"]) {
    --app-theme-name: "sage";
    --body-background: oklch(97.8% 0.012 150);
    --app-chrome-bg: oklch(45% 0.075 154);
    --app-chrome-bg-strong: oklch(39% 0.07 154);
    --app-chrome-text: #fffdf9;
    --app-chrome-text-muted: oklch(91% 0.026 154);
    --app-chrome-border: color-mix(in srgb, var(--app-chrome-text) 16%, transparent);
    --app-chrome-control-bg: color-mix(in srgb, var(--app-chrome-text) 10%, transparent);
    --app-chrome-control-bg-hover: color-mix(in srgb, var(--app-chrome-text) 17%, transparent);
    --app-chrome-active-bg: color-mix(in srgb, #edf8f1 88%, var(--surface-card-strong) 12%);
    --app-chrome-active-text: #233f32;
    --app-chrome-shadow: 0 16px 34px rgba(33, 72, 54, 0.16);
    --hero-background: oklch(62% 0.085 154);
    --link-color: #2f6b4b;
    --link-hover-color: #24573c;
    --accent-gradient: oklch(62% 0.085 154);
    --accent-gradient-hover: oklch(54% 0.105 154);
    --accent-border: oklch(52% 0.105 154);
    --accent-border-strong: oklch(43% 0.11 154);
    --accent-soft-bg: oklch(94.5% 0.04 150);
    --accent-soft-text: #2f6b4b;
    --accent-soft-strong-bg: oklch(89% 0.055 150);
    --focus-outline: #2f6b4b;
}

html.family-scope-active,
html[data-family-scope="family"] {
    --app-theme-name: "family-deep-teal";
    --body-background: oklch(98% 0.012 180);
    --app-chrome-bg: oklch(42% 0.075 180);
    --app-chrome-bg-strong: oklch(35% 0.07 180);
    --app-chrome-text: #fffdf9;
    --app-chrome-text-muted: oklch(91% 0.026 180);
    --app-chrome-border: color-mix(in srgb, var(--app-chrome-text) 16%, transparent);
    --app-chrome-control-bg: color-mix(in srgb, var(--app-chrome-text) 10%, transparent);
    --app-chrome-control-bg-hover: color-mix(in srgb, var(--app-chrome-text) 17%, transparent);
    --app-chrome-active-bg: color-mix(in srgb, #edf8f7 88%, var(--surface-card-strong) 12%);
    --app-chrome-active-text: #21433f;
    --app-chrome-shadow: 0 16px 34px rgba(33, 78, 75, 0.16);
    --hero-background: oklch(60% 0.085 180);
    --link-color: #2b6f69;
    --link-hover-color: #215954;
    --accent-gradient: oklch(60% 0.085 180);
    --accent-gradient-hover: oklch(52% 0.105 180);
    --accent-border: oklch(50% 0.105 180);
    --accent-border-strong: oklch(40% 0.11 180);
    --accent-soft-bg: oklch(94% 0.035 180);
    --accent-soft-text: #2b6f69;
    --accent-soft-strong-bg: oklch(88.5% 0.052 180);
    --focus-outline: #2b6f69;
}

html[data-theme="mist"]:not(.family-scope-active):not([data-family-scope="family"]) {
    --app-theme-name: "mist";
    --body-background: oklch(98.2% 0.01 240);
    --app-chrome-bg: oklch(95% 0.018 245);
    --app-chrome-bg-strong: oklch(93% 0.022 245);
    --app-chrome-text: #243243;
    --app-chrome-text-muted: #586575;
    --app-chrome-border: color-mix(in srgb, #dce5ef 88%, var(--accent-soft-bg) 12%);
    --app-chrome-control-bg: color-mix(in srgb, var(--accent-soft-bg) 48%, var(--surface-card-strong) 52%);
    --app-chrome-control-bg-hover: color-mix(in srgb, var(--accent-soft-bg) 72%, var(--surface-card-strong) 28%);
    --app-chrome-active-bg: color-mix(in srgb, var(--accent-soft-bg) 78%, var(--surface-card-strong) 22%);
    --app-chrome-active-text: #273a68;
    --app-chrome-shadow: 0 12px 28px rgba(50, 67, 86, 0.08);
    --hero-background: oklch(67% 0.102 268);
}

html {
    min-height: 100%;
    scrollbar-gutter: stable;
}

body {
    font-family: Aptos, "Segoe UI Variable", "Segoe UI", sans-serif;
    font-size: var(--font-size-body);
    line-height: 1.5;
    background: var(--body-background);
    color: var(--page-text);
    min-height: 100%;
    text-rendering: optimizeLegibility;
}

:where(p, li, dt, dd, label, input, select, textarea, button) {
    font-size: inherit;
}

:where(.btn, .btn-link, .form-control, .form-select, .form-label, small, .small) {
    font-size: var(--font-size-body-sm);
}

:where(h1, h2, h3, h4, h5, h6) {
    line-height: 1.1;
}

h1 {
    font-size: var(--font-size-title-xl);
}

h2 {
    font-size: var(--font-size-title-lg);
}

h3 {
    font-size: var(--font-size-title-md);
}

h4 {
    font-size: var(--font-size-title-sm);
}

h5 {
    font-size: var(--font-size-body);
}

h6 {
    font-size: var(--font-size-body-sm);
}

.page-heading-section {
    padding: 1.35rem 1.15rem;
    background: var(--hero-background);
    color: var(--hero-text);
    border: none;
    box-shadow: var(--surface-shadow-strong);
}

.page-heading-section::before {
    content: none;
}

.page-heading-section h2 {
    font-size: var(--font-size-title-xl);
    letter-spacing: -0.03em;
    margin: 0;
}

.auth-layout {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.auth-section {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--surface-border);
    border-radius: 1.5rem;
    padding: 1.45rem;
    box-shadow: var(--surface-shadow);
    backdrop-filter: blur(12px);
}

.auth-section::before {
    content: none;
}

.auth-section > * {
    position: relative;
    z-index: 1;
}

.legal-layout {
    gap: 1.4rem;
}

.legal-section {
    display: grid;
    gap: 1.25rem;
    border: none;
    box-shadow: none;
}

.legal-meta {
    color: var(--muted-text);
    font-size: var(--font-size-body-sm);
    font-weight: 600;
}

.legal-copy {
    display: grid;
    gap: 1.3rem;
    color: var(--page-text);
}

.legal-copy section {
    display: grid;
    gap: 0.65rem;
}

.legal-copy h2 {
    margin: 0;
    font-size: var(--font-size-title-sm);
    color: var(--page-text);
}

.legal-copy p,
.legal-copy li {
    color: var(--muted-text);
    line-height: 1.7;
}

.legal-copy ul {
    margin: 0;
    padding-left: 1.25rem;
    display: grid;
    gap: 0.5rem;
}

.legal-copy a {
    color: var(--link-color);
}

.legal-copy a:hover {
    color: var(--link-hover-color);
}

.auth-title-section,
.auth-form-section {
    width: min(100%, 22rem);
    margin-left: auto;
    margin-right: auto;
}

.auth-title-section h1 {
    margin: 0;
    font-size: var(--font-size-title-xl);
    letter-spacing: -0.03em;
    color: var(--hero-text);
}

.auth-form-section {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    background: var(--surface-card-strong);
}

.auth-form-section form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-form-section .btn-primary {
    margin-top: 1.5rem;
}

.auth-field-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-field-stack-spaced {
    margin-top: 1rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.auth-field label,
.auth-checkbox {
    font-weight: 600;
}

.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.auth-password-requirement {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.2rem;
    color: var(--muted-text);
    font-size: var(--font-size-support);
    line-height: 1.35;
}

.auth-password-requirement.is-met {
    color: var(--credit-color);
}

.auth-password-requirement.is-error {
    color: var(--danger-border);
}

.auth-password-requirement.is-met .auth-password-requirement-text,
.auth-password-requirement.is-met .auth-password-requirement-icon,
.auth-password-requirement.is-met .auth-password-requirement-icon svg,
.auth-password-requirement.is-met .auth-password-requirement-icon circle,
.auth-password-requirement.is-met .auth-password-requirement-icon path {
    color: var(--credit-color);
    stroke: currentColor;
    fill: none;
}

.auth-password-requirement.is-error .auth-password-requirement-text,
.auth-password-requirement.is-error .auth-password-requirement-icon,
.auth-password-requirement.is-error .auth-password-requirement-icon svg,
.auth-password-requirement.is-error .auth-password-requirement-icon circle,
.auth-password-requirement.is-error .auth-password-requirement-icon path {
    color: var(--danger-border);
    stroke: currentColor;
    fill: none;
}

.auth-password-requirement-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    flex: 0 0 auto;
}

.auth-password-requirement-icon svg {
    width: 100%;
    height: 100%;
}

.auth-password-requirement-icon circle {
    stroke: currentColor;
}

.auth-password-requirement-text {
    min-width: 0;
}

.auth-secondary-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-honeypot-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.floating-add-button {
    position: fixed;
    right: var(--floating-action-right-mobile);
    bottom: var(--floating-action-bottom-mobile);
    width: var(--floating-action-size-mobile);
    height: var(--floating-action-size-mobile);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--accent-border) 44%, var(--surface-border) 56%);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-card-strong) 92%, var(--accent-soft-bg) 8%);
    color: var(--accent-soft-text);
    -webkit-text-fill-color: var(--accent-soft-text);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 18px 38px color-mix(in srgb, var(--accent-border) 22%, transparent), 0 0 0 6px color-mix(in srgb, var(--surface-card-strong) 72%, transparent);
    z-index: 40;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.floating-add-button span {
    display: grid;
    place-items: center;
    width: calc(var(--floating-action-size-mobile) - 1.15rem);
    height: calc(var(--floating-action-size-mobile) - 1.15rem);
    border-radius: inherit;
    background: var(--accent-gradient);
    color: var(--hero-text);
    -webkit-text-fill-color: var(--hero-text);
    line-height: 1;
    margin-top: -0.08rem;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hero-text) 18%, transparent);
}

.floating-add-button:hover,
.floating-add-button:focus-visible {
    border-color: color-mix(in srgb, var(--accent-border) 68%, var(--surface-border) 32%);
    box-shadow: 0 22px 44px color-mix(in srgb, var(--accent-border) 28%, transparent), 0 0 0 7px color-mix(in srgb, var(--surface-card-strong) 78%, transparent);
    transform: translateY(-1px);
}

a, .btn-link {
    color: var(--link-color);
}

a:hover, .btn-link:hover {
    color: var(--link-hover-color);
}

a:not(.btn):not(.nav-link) {
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.14em;
    text-decoration-skip-ink: auto;
}

a:not(.btn):not(.nav-link):hover,
a:not(.btn):not(.nav-link):focus-visible {
    text-decoration-thickness: 0.12em;
}

.btn-primary {
    color: #fbfaf6;
    background: var(--accent-gradient);
    border-color: var(--accent-border);
}

.btn-primary:hover,
.btn-primary:focus {
    color: var(--hero-text);
    background: var(--accent-gradient-hover);
    border-color: var(--accent-border-strong);
}

.btn-outline-secondary {
    color: var(--page-text);
    border-color: var(--surface-border);
    background: var(--surface-card-strong);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    color: var(--page-text);
    background: color-mix(in srgb, var(--accent-soft-bg) 34%, var(--surface-card-strong) 66%);
    border-color: var(--accent-soft-strong-bg);
}

.btn-danger {
    background: var(--danger-gradient);
    border-color: var(--danger-border);
}

.busy-action-button.hero-action-button,
.busy-action-button.secondary-action-button,
.busy-action-button.bucket-action-button {
    border-radius: 999px;
    border: 1px solid var(--surface-border-soft);
    font-weight: 800;
    padding: 0.72rem 1.05rem;
    width: 100%;
    justify-content: center;
}

.busy-action-button.hero-action-button {
    background: var(--accent-gradient);
    color: var(--hero-text);
}

.busy-action-button.secondary-action-button,
.busy-action-button.bucket-action-button {
    background: var(--surface-card-strong);
    color: var(--page-text);
}

.busy-action-button.bucket-action-button.delete {
    color: var(--danger-soft-text);
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem rgba(255, 252, 247, 0.95), 0 0 0 0.28rem var(--focus-ring);
}

:where(a, button, input, select, textarea, [tabindex]:not([tabindex="-1"])):focus-visible {
    outline: 3px solid var(--focus-outline);
    outline-offset: 3px;
    box-shadow: 0 0 0 0.12rem rgba(255, 255, 255, 0.94), 0 0 0 0.32rem var(--focus-ring-strong);
}

.form-control,
.form-select {
    border-radius: 0.9rem;
    border: 1px solid var(--input-border);
    background: var(--input-background);
    color: var(--page-text);
}

.form-control::placeholder,
.form-select::placeholder {
    color: var(--muted-text);
}

:where(.summary-label, .summary-meta, .field-hint, .section-subtitle, .empty-state, .summary-range, .form-text) {
    color: var(--muted-text);
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--accent-border);
}

.invalid {
    outline: 1px solid #c04b40;
}

.validation-message {
    color: #a53a32;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeGxibnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #9f342f;
    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: #6e7f74;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

a,
button {
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

:where(.icon-button, .section-icon-button, .section-add-button, .bucket-action-button.icon-only, .category-toggle, .desktop-sidebar-toggle-label, .navbar-toggler) {
    min-width: 2.75rem;
    min-height: 2.75rem;
}

:where(.chip-remove) {
    min-width: 1.9rem;
    min-height: 1.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.type-toggle {
    display: inline-flex;
    width: 100%;
    border: 1px solid var(--surface-border);
    border-radius: 0.95rem;
    overflow: hidden;
    background: var(--surface-card-strong);
}

.type-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 6rem;
    padding: 0.72rem 1rem;
    border: none;
    background: var(--surface-card-strong);
    color: var(--page-text);
    font-weight: 700;
    text-align: center;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.type-option.active {
    background: var(--accent-gradient);
    color: var(--hero-text);
}

.notes-field-block {
    margin-top: 1rem;
}

.notes-input {
    min-height: 5.5rem;
}

.category-picker-field {
    position: relative;
}

.category-picker {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
}

.single-category-picker .category-search {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

.single-category-picker .category-toggle {
    flex: 0 0 auto;
    width: 3rem;
}

.category-search {
    flex: 1;
}

.category-toggle {
    min-width: 3rem;
}

.category-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 20;
    margin-top: 0.35rem;
    max-height: 220px;
    overflow-y: auto;
    padding: 0.5rem;
    border-radius: 1rem;
    background: var(--surface-overlay);
    border: 1px solid var(--surface-border-soft);
    box-shadow: 0 18px 32px rgba(17, 38, 31, 0.12);
}

.category-option-button {
    width: 100%;
    display: block;
    border: none;
    border-radius: 0.8rem;
    background: transparent;
    color: var(--page-text);
    text-align: left;
    padding: 0.65rem 0.75rem;
    font-weight: 600;
    transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.category-option-button.selected {
    background: color-mix(in srgb, var(--accent-soft-bg) 35%, white 65%);
}

.type-option:hover,
.type-option:focus-visible,
.category-option-button:hover,
.category-option-button:focus-visible {
    transform: translateY(-1px);
}

.selected-category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.selected-category-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-soft-bg) 90%, white 10%);
    border: 1px solid color-mix(in srgb, var(--accent-soft-strong-bg) 32%, transparent);
    color: var(--accent-soft-text);
    font-weight: 600;
}

.chip-remove {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: var(--font-size-body-sm);
    line-height: 1;
    padding: 0;
}

.import-rule-action-button {
    border: 0;
    background: transparent;
    color: var(--bs-primary);
    padding: 0;
}

.import-rule-action-button:hover {
    background: rgba(var(--bs-primary-rgb), 0.08);
    color: var(--bs-primary);
}

.import-rule-action-button.import-rule-delete-button {
    color: var(--bs-danger);
}

.import-rule-action-button.import-rule-delete-button:hover {
    background: rgba(var(--bs-danger-rgb), 0.08);
    color: var(--bs-danger);
}

.import-rule-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
}

.import-rule-status-active {
    color: var(--bs-success);
}

.import-rule-status-icon {
    width: 0.95rem;
    height: 0.95rem;
}

.import-rule-status-inactive {
    color: var(--bs-secondary-color);
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.glyph-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
}

.glyph-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8px;
}

.auth-page-shell,
.profile-page-shell {
    margin: 1.35rem 0 2.6rem;
    display: grid;
    gap: 1.15rem;
}

.auth-page-card,
.profile-page-card,
.profile-detail-card,
.profile-form-card {
    position: relative;
    overflow: hidden;
    background: var(--surface-panel);
    border: 1px solid var(--surface-border);
    border-radius: 1.45rem;
    box-shadow: var(--surface-shadow);
}

.profile-page-card.profile-content-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    overflow: visible;
}

.auth-page-card,
.profile-page-card,
.profile-detail-card,
.profile-form-card {
    padding: 1.35rem;
}

.profile-email-card,
.profile-currency-card {
    max-width: 363px;
    width: 100%;
}

.profile-password-card {
    max-width: 400px;
    width: 100%;
}

.profile-page-card.profile-content-card {
    padding: 0;
}

.auth-page-hero,
.profile-page-hero {
    background: var(--hero-background);
    color: var(--hero-text);
    border: none;
    box-shadow: var(--surface-shadow-strong);
}

.auth-page-hero::after,
.profile-page-hero::after {
    content: none;
}

.auth-page-kicker,
.profile-page-kicker,
.profile-card-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: var(--font-size-caption);
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-page-kicker,
.profile-page-kicker {
    color: var(--hero-subtle-text);
}

.auth-page-hero h1,
.profile-page-hero h1 {
    color: var(--hero-text);
    margin: 0.35rem 0 0;
    font-size: var(--font-size-display-sm);
    letter-spacing: -0.05em;
}

.auth-page-hero p,
.profile-page-hero p {
    margin: 0.7rem 0 0;
    max-width: 42rem;
    line-height: 1.65;
    color: var(--hero-subtle-text);
}

.auth-page-grid,
.profile-page-grid {
    display: grid;
    gap: 1.15rem;
}

.profile-detail-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .profile-detail-grid {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

.auth-page-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.85fr);
    align-items: start;
}

.profile-page-grid {
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.5fr);
    align-items: start;
}

profile-page-flex {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.auth-page-form-card h2,
.auth-page-aside h3,
.profile-nav-card h2,
.profile-form-header h2 {
    margin-top: 0;
}

.auth-page-form-card hr,
.auth-page-aside hr,
.profile-nav-card hr {
    margin: 1rem 0;
}

.auth-page-aside p,
.profile-card-copy {
    color: var(--muted-text);
    line-height: 1.6;
}

.auth-page-checkbox .form-label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.auth-page-links p {
    margin-bottom: 0.65rem;
}

.turnstile-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.turnstile-field .cf-turnstile {
    align-self: flex-start;
}

.turnstile-field-error {
    margin: 0;
    color: var(--danger-text);
    font-size: var(--font-size-support);
}

.profile-nav-card .nav-link {
    border-radius: 0.9rem;
    color: var(--page-text);
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.profile-nav-card .nav-link.active {
    background: color-mix(in srgb, var(--accent-soft-bg) 72%, white 28%);
    color: var(--accent-soft-text);
}

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

.profile-form-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.profile-detail-card strong {
    display: block;
    margin-top: 0.35rem;
    font-size: var(--font-size-title-sm);
    letter-spacing: -0.03em;
    color: var(--page-text);
}

.profile-card-label {
    color: var(--muted-text);
}

.profile-detail-card.accent-card {
    background: color-mix(in srgb, var(--accent-soft-bg) 42%, white 58%);
    border-color: var(--accent-soft-strong-bg);
}

.profile-detail-card.readonly-card {
    background: var(--surface-card-strong);
}

.profile-form-card {
/*    max-width: 343px;*/
    background: var(--surface-card-strong);
}

.profile-save-button {
    min-width: 12rem;
}

.profile-action-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-action-form {
    display: flex;
}

.profile-action-button {
    width: 100%;
    min-width: 12rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-page-grid,
.profile-page-grid {
    grid-template-columns: 1fr;
}

.auth-page-shell,
.profile-page-shell {
    margin-top: 1rem;
    gap: 1rem;
}

@media (max-width: 767px) {
    .profile-page-hero {
        display: none;
    }
}

.auth-page-card,
.profile-page-card,
.profile-detail-card,
.profile-form-card {
    padding: 1.15rem;
    border-radius: 1.2rem;
}

.profile-page-card.profile-content-card {
    padding: 0;
    border-radius: 0;
}

.profile-form-header {
    flex-direction: column;
    align-items: stretch;
}

.profile-save-button {
    width: 100%;
}

@media (max-width: 767px) {
    .type-option {
        min-width: 0;
    }

    body.mobile-nav-open .dashboard-toolbar,
    body.mobile-nav-open .dashboard-toolbar .customize-trigger {
        pointer-events: none;
    }

    body.mobile-nav-open .dashboard-toolbar {
        opacity: 0.45;
    }

    body.mobile-nav-open .floating-add-button {
        pointer-events: none;
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
        transition-duration: 0.01ms;
        scroll-behavior: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
        transition-duration: 0.01ms;
        scroll-behavior: auto;
    }
}

@media (max-width: 767.98px) {
    .page-root-layout :is(
        [class$='-card'],
        [class*='-card '],
        [class$='-section'],
        [class*='-section '],
        [class$='-panel'],
        [class*='-panel ']
    ) {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

@media (max-width: 767.98px) {
    .page-heading-section {
        display: none;
    }
}

@media (min-width: 768px) {
    .floating-add-button {
        right: var(--floating-action-right-desktop);
        bottom: var(--floating-action-bottom-desktop);
        width: var(--floating-action-size-desktop);
        height: var(--floating-action-size-desktop);
    }

    .floating-add-button span {
        width: calc(var(--floating-action-size-desktop) - 1.35rem);
        height: calc(var(--floating-action-size-desktop) - 1.35rem);
    }
}

@media (min-width: 768px) {
    .auth-page-grid {
        grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.85fr);
    }

    .profile-page-grid {
        grid-template-columns: minmax(260px, 0.45fr) minmax(0, 1.5fr);
    }

    .auth-page-shell,
    .profile-page-shell {
        margin: 1.35rem 0 2.6rem;
        gap: 1.35rem;
    }

    .auth-page-card,
    .profile-page-card,
    .profile-detail-card,
    .profile-form-card {
        padding: 1.35rem;
    }

    .profile-page-card.profile-content-card {
        padding: 0;
    }

    .profile-form-header {
        flex-direction: row;
        align-items: flex-start;
    }

    .profile-save-button {
        width: auto;
    }

    .profile-action-row {
        flex-direction: row;
        align-items: stretch;
    }

    .profile-action-row > * {
        flex: 1 1 0;
    }

    .auth-layout {
        margin: 1.35rem 0 2.6rem;
        gap: 1.35rem;
    }

    .auth-section {
        padding: 1.35rem;
    }
}

@media (max-width: 575.98px) {
    .auth-layout {
        gap: 1rem;
        margin-top: 1rem;
    }

    .auth-section {
        padding: 1.15rem;
        border-radius: 1.2rem;
    }

    .auth-title-section {
        padding: 1.15rem 1rem;
    }
}
