:root {
    --body-background:
        radial-gradient(circle at top left, rgba(255, 224, 232, 0.46), transparent 24%),
        radial-gradient(circle at top right, rgba(203, 229, 255, 0.34), transparent 23%),
        radial-gradient(circle at bottom left, rgba(220, 242, 232, 0.28), transparent 26%),
        linear-gradient(180deg, #fffaf8 0%, #f6f8fc 56%, #fbf8f3 100%);
    --sidebar-background:
        radial-gradient(circle at top left, rgba(255, 224, 232, 0.12), transparent 24%),
        radial-gradient(circle at bottom right, rgba(161, 212, 230, 0.12), transparent 30%),
        linear-gradient(180deg, #21364e 0%, #28475d 54%, #2d5c5d 100%);
    --sidebar-header-background: #21364e;
    --hero-background:
        linear-gradient(135deg, rgba(33, 78, 117, 0.96) 0%, rgba(43, 109, 132, 0.94) 52%, rgba(208, 116, 130, 0.9) 100%),
        radial-gradient(circle at top right, rgba(255, 238, 189, 0.24), transparent 38%);
    --hero-text: #fffdf9;
    --hero-subtle-text: rgba(255, 253, 249, 0.88);
    --page-text: #243243;
    --muted-text: #556375;
    --link-color: #214f8a;
    --link-hover-color: #163b66;
    --accent-gradient: linear-gradient(180deg, #2d6b9e 0%, #1f5079 100%);
    --accent-gradient-hover: linear-gradient(180deg, #3878ad 0%, #214e75 100%);
    --accent-border: #1f5079;
    --accent-border-strong: #173d5f;
    --accent-soft-bg: rgba(45, 107, 158, 0.16);
    --accent-soft-text: #1f4f78;
    --accent-soft-strong-bg: rgba(45, 107, 158, 0.28);
    --danger-gradient: linear-gradient(180deg, #c95e73 0%, #a94157 100%);
    --danger-border: #973649;
    --danger-soft-bg: rgba(252, 233, 237, 0.98);
    --danger-soft-text: #8f3146;
    --neutral-soft-bg: rgba(232, 236, 245, 0.94);
    --neutral-soft-text: #4e5e75;
    --surface-panel: rgba(255, 252, 248, 0.86);
    --surface-panel-strong: rgba(255, 252, 248, 0.97);
    --surface-card: rgba(255, 255, 255, 0.8);
    --surface-card-strong: rgba(255, 255, 255, 0.94);
    --surface-overlay: rgba(255, 253, 251, 0.98);
    --surface-border: rgba(62, 88, 117, 0.18);
    --surface-border-soft: rgba(62, 88, 117, 0.12);
    --surface-shadow: 0 18px 48px rgba(40, 55, 74, 0.12);
    --surface-shadow-strong: 0 24px 56px rgba(32, 47, 66, 0.2);
    --input-background: rgba(255, 253, 251, 0.96);
    --input-border: rgba(62, 88, 117, 0.22);
    --focus-ring: rgba(37, 93, 142, 0.3);
    --focus-outline: #1f5d8f;
    --credit-color: #0d5a37;
    --credit-fill: rgba(13, 90, 55, 0.2);
    --debit-color: #9c3048;
    --debit-fill: rgba(156, 48, 72, 0.18);
    --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-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: clamp(3.8rem, 3.72rem + 0.45vw, 3.95rem);
    --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));
}

html {
    min-height: 100%;
}

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);
}
a, .btn-link {
    color: var(--link-color);
}

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

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

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

.btn-outline-secondary {
    color: var(--page-text);
    border-color: var(--surface-border);
    background: color-mix(in srgb, var(--surface-card-strong) 88%, white 12%);
}

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

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

.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;
}

.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);
}

.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;
}

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.8;
}

.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);
}

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

.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: "";
    position: absolute;
    inset: auto -3rem -5rem auto;
    width: 14rem;
    height: 14rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 238, 189, 0.18) 0%, rgba(255, 238, 189, 0) 70%);
    pointer-events: 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,
.profile-detail-grid {
    display: grid;
    gap: 1.15rem;
}

.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;
}

.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;
}

.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-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.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: color-mix(in srgb, var(--surface-card-strong) 86%, white 14%);
}

.profile-form-card {
    background: color-mix(in srgb, var(--surface-card-strong) 92%, white 8%);
}

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

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

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

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

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

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

@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.8fr) minmax(0, 1.5fr);
    }

    .profile-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .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-form-header {
        flex-direction: row;
        align-items: flex-start;
    }

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







