html, body {
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Auth / Login shell */
.curepink-auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    position: relative;

    /* branded background */
    background:
        radial-gradient(900px 500px at 15% 15%, rgba(16, 118, 183, 0.22), transparent 60%),
        radial-gradient(900px 500px at 85% 85%, rgba(26, 89, 153, 0.18), transparent 60%),
        linear-gradient(135deg, #f7fafc 0%, #eef5ff 45%, #ffffff 100%);
}

body.dark-theme .curepink-auth-shell {
    background:
        radial-gradient(900px 500px at 15% 15%, rgba(100, 181, 246, 0.18), transparent 60%),
        radial-gradient(900px 500px at 85% 85%, rgba(74, 159, 212, 0.14), transparent 60%),
        linear-gradient(135deg, #0d1117 0%, #121926 55%, #0b0f14 100%);
}

.curepink-login-card {
    width: min(440px, 100%);
    padding: 28px 28px 24px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(26, 89, 153, 0.14);
    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(10px);
}

body.dark-theme .curepink-login-card {
    background: rgba(22, 27, 34, 0.72);
    border: 1px solid rgba(100, 181, 246, 0.16);
    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.55),
        0 4px 12px rgba(0, 0, 0, 0.40);
}

.curepink-login-title {
    letter-spacing: 0.2px;
}

.curepink-login-logo {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 20%, #ffffff 0%, #e3f2fd 40%, #bbdefb 100%);
    box-shadow: 0 10px 24px rgba(26, 89, 153, 0.25);
    overflow: hidden;
}

.curepink-login-logo img {
    max-width: 70%;
    max-height: 70%;
    object-fit: contain;
    display: block;
}

body.dark-theme .curepink-login-logo {
    background: radial-gradient(circle at 30% 20%, #1e2935 0%, #102437 45%, #0b1521 100%);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
}

.curepink-layout--locked {
    pointer-events: none;
    user-select: none;
    filter: blur(3px);
}

.curepink-force-password-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: rgba(13, 17, 23, 0.55);
    backdrop-filter: blur(4px);
}

.curepink-force-password-card {
    width: min(440px, 100%);
    padding: 28px 28px 24px;
    border-radius: 16px;
    pointer-events: auto;
}

.curepink-password-requirements {
    margin: 4px 0 0;
    padding-left: 1.25rem;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.curepink-password-requirements li {
    margin-bottom: 2px;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0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em;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #f5f5f5 0%, #e3f2fd 50%, #bbdefb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
    will-change: opacity, visibility;
    contain: layout style paint;
}

.loading-container .loading-content {
    text-align: center;
    color: #1a5999;
    animation: pulse 2s ease-in-out infinite;
    will-change: transform, opacity;
}

.loading-container .spinner-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-radius: 50%;
    animation: rotate 2s linear infinite;
}

.loading-container .spinner-circle:nth-child(1) {
    border-top-color: #1a5999;
    border-right-color: rgba(26, 89, 153, 0.3);
    animation-delay: 0s;
}

.loading-container .spinner-circle:nth-child(2) {
    border-top-color: rgba(26, 89, 153, 0.8);
    border-right-color: rgba(26, 89, 153, 0.2);
    animation-delay: -0.4s;
    transform: scale(0.8);
}

.loading-container .spinner-circle:nth-child(3) {
    border-top-color: rgba(26, 89, 153, 0.6);
    border-right-color: rgba(26, 89, 153, 0.1);
    animation-delay: -0.8s;
    transform: scale(0.6);
}

.loading-container .loading-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 500;
    color: #1a5999;
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    letter-spacing: 0.5px;
    min-height: 2rem;
}

.loading-container .loading-text p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.8;
    color: #424242;
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 300;
    transition: opacity .3s ease;
    min-height: 3.2em;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
    contain: layout style;
}

.loading-container .loading-text p.hide {
    opacity: 0;
}

body.dark-theme .loading-container {
    background: linear-gradient(135deg, #0d1117 0%, #161b22 50%, #21262d 100%);
}

body.dark-theme .loading-container .loading-content {
    color: #64b5f6;
}

body.dark-theme .loading-container .spinner-circle:nth-child(1) {
    border-top-color: #64b5f6;
    border-right-color: rgba(100, 181, 246, 0.3);
}

body.dark-theme .loading-container .spinner-circle:nth-child(2) {
    border-top-color: rgba(100, 181, 246, 0.8);
    border-right-color: rgba(100, 181, 246, 0.2);
}

body.dark-theme .loading-container .spinner-circle:nth-child(3) {
    border-top-color: rgba(100, 181, 246, 0.6);
    border-right-color: rgba(100, 181, 246, 0.1);
}

body.dark-theme .loading-container .loading-text h3 {
    color: #64b5f6;
}

body.dark-theme .loading-container .loading-text p {
    color: #8b949e;
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem auto;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.02);
    }
}

.loading-container.fade-out {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out, transform 0.5s ease-out;
}

@media (prefers-color-scheme: dark) {
    .loading-container {
        background: linear-gradient(135deg, #121212 0%, #1e1e1e 50%, #2c2c2c 100%);
    }
}

code {
    color: #c02d76;
}

/* Snackbar  balanced contrast in light and dark (elevated slate toast) */
.mud-snackbar-container {
    min-width: min(460px, calc(100vw - 32px));
    max-width: 620px;
}

.mud-snackbar {
    font-size: 1rem;
    line-height: 1.45;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid transparent;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
}

/* Mud default blur(18px) is heavy  lighter frost, content stays legible */
.mud-snackbar.mud-snackbar-blurred {
    -webkit-backdrop-filter: blur(10px) saturate(125%);
    backdrop-filter: blur(10px) saturate(125%);
}

body:not(.dark-theme) .mud-snackbar {
    background-color: rgba(51, 65, 85, 0.88) !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28);
}

body.dark-theme .mud-snackbar {
    background-color: rgba(71, 85, 105, 0.9) !important;
    color: #f1f5f9 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
}

.mud-snackbar .mud-snackbar-content-message,
.mud-snackbar .mud-snackbar-message {
    color: inherit !important;
    font-weight: 500;
}

.mud-snackbar .mud-snackbar-icon {
    opacity: 0.95;
}

.mud-snackbar .mud-button-root.mud-icon-button {
    color: rgba(248, 250, 252, 0.85) !important;
}

.mud-snackbar .mud-button-root.mud-icon-button:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Severity  subtle left accent, readable on both themes */
body:not(.dark-theme) .mud-snackbar.mud-alert-filled-success,
body.dark-theme .mud-snackbar.mud-alert-filled-success {
    border-left: 4px solid #7dd956 !important;
}

body:not(.dark-theme) .mud-snackbar.mud-alert-filled-error,
body.dark-theme .mud-snackbar.mud-alert-filled-error {
    border-left: 4px solid #f87171 !important;
}

body:not(.dark-theme) .mud-snackbar.mud-alert-filled-warning,
body.dark-theme .mud-snackbar.mud-alert-filled-warning {
    border-left: 4px solid #fbbf24 !important;
}

body:not(.dark-theme) .mud-snackbar.mud-alert-filled-info,
body.dark-theme .mud-snackbar.mud-alert-filled-info {
    border-left: 4px solid #38bdf8 !important;
}


.appbar-breadcrumb-sep {
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1rem;
    margin: 0 4px;
    opacity: 1 !important;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
}

.appbar-breadcrumbs li.mud-breadcrumb-separator {
    color: #ffffff !important;
    opacity: 1 !important;
}

.appbar-breadcrumb-link {
    color: rgba(255, 255, 255, 1) !important;
    font-weight: 600;
    text-decoration: none;
}

.appbar-breadcrumb-link:hover {
    color: rgba(255, 255, 255, 0.75) !important;
}

.appbar-breadcrumb-current {
    color: rgba(255, 255, 255, 0.45) !important;
    font-weight: 400;
    cursor: default;
}

.mobile-breadcrumbs .mud-breadcrumb-separator {
    color: #555 !important;
    font-weight: 700;
    opacity: 1 !important;
}

.mobile-breadcrumbs .mud-breadcrumb-item a {
    color: #60b319 !important;
    font-weight: 600;
    text-decoration: none;
}

.mobile-breadcrumbs .mud-breadcrumb-item a:hover {
    color: #4a8a12 !important;
}

.mobile-breadcrumbs .mud-breadcrumb-item span {
    color: #555 !important;
    opacity: 0.7;
}

body.dark-theme .mobile-breadcrumbs .mud-breadcrumb-separator {
    color: rgba(255, 255, 255, 0.55) !important;
}

body.dark-theme .mobile-breadcrumbs .mud-breadcrumb-item a {
    color: #7bc142 !important;
}

body.dark-theme .mobile-breadcrumbs .mud-breadcrumb-item a:hover {
    color: #9fd466 !important;
}

body.dark-theme .mobile-breadcrumbs .mud-breadcrumb-item span {
    color: rgba(255, 255, 255, 0.45) !important;
    opacity: 1;
}
