html, body {
    font-family: 'Poppins', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--mud-palette-background);
    color: var(--mud-palette-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Brand utilities --- */
.brand-gradient-text {
    background: linear-gradient(90deg, #1F6E79 0%, #4E888F 50%, #F4A261 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.soft-shadow {
    box-shadow: 0 4px 24px rgba(31, 110, 121, 0.08), 0 1px 3px rgba(31, 110, 121, 0.05);
}

.hover-lift {
    transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s cubic-bezier(.2,.8,.2,1);
    will-change: transform;
}

.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 38px rgba(31, 110, 121, 0.15), 0 4px 8px rgba(31, 110, 121, 0.06);
}

.icon-bubble {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(31,110,121,0.12) 0%, rgba(244,162,97,0.18) 100%);
    color: #1F6E79;
}

.icon-bubble .mud-icon-root {
    color: #1F6E79;
}

/* Floating animation for hero image */
@keyframes float-y {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.float-anim {
    animation: float-y 6s ease-in-out infinite;
}

/* Glow ring behind hero image */
.hero-glow {
    position: relative;
}

.hero-glow::before {
    content: "";
    position: absolute;
    inset: -10%;
    background: radial-gradient(circle at 50% 50%, rgba(78,136,143,0.35) 0%, rgba(244,162,97,0.18) 35%, transparent 70%);
    filter: blur(40px);
    z-index: -1;
    border-radius: 50%;
}

/* Fade-in on load */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-up { animation: fade-up .7s cubic-bezier(.2,.8,.2,1) both; }
.fade-up-delay-1 { animation: fade-up .7s cubic-bezier(.2,.8,.2,1) .1s both; }
.fade-up-delay-2 { animation: fade-up .7s cubic-bezier(.2,.8,.2,1) .2s both; }
.fade-up-delay-3 { animation: fade-up .7s cubic-bezier(.2,.8,.2,1) .3s both; }

/* Pill button helper */
.pill-btn {
    border-radius: 999px !important;
    padding: 10px 26px !important;
    font-weight: 600 !important;
}

/* --- Tech marquee (conveyor) --- */
.tech-marquee {
    overflow: hidden;
    width: 100%;
    padding: 8px 0;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
}

.tech-marquee-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    width: max-content;
    animation: tech-scroll 50s linear infinite;
    will-change: transform;
}

.tech-marquee-track.reverse {
    animation: tech-scroll-reverse 60s linear infinite;
}

.tech-marquee:hover .tech-marquee-track {
    animation-play-state: paused;
}

@keyframes tech-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@keyframes tech-scroll-reverse {
    from { transform: translateX(-50%); }
    to   { transform: translateX(0); }
}

.tech-pill {
    flex-shrink: 0;
    background: #FFFFFF;
    color: #1A2A33;
    border: 1px solid #E2E8EA;
    border-radius: 999px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 6px rgba(31, 110, 121, 0.04);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.tech-pill:hover {
    transform: translateY(-2px);
    border-color: #1F6E79;
    box-shadow: 0 8px 18px rgba(31, 110, 121, 0.12);
}

.tech-pill .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1F6E79, #F4A261);
}

@media (prefers-reduced-motion: reduce) {
    .tech-marquee-track,
    .tech-marquee-track.reverse {
        animation: none;
    }
}

/* --- Mouse-spotlight glow on cards --- */
.spotlight {
    position: relative;
    isolation: isolate; /* keep the ::before glow contained */
}

.spotlight::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(
        320px circle at var(--mx, 50%) var(--my, 50%),
        rgba(31, 110, 121, 0.14),
        rgba(244, 162, 97, 0.06) 35%,
        transparent 65%
    );
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 0;
}

.spotlight:hover::before {
    opacity: 1;
}

/* Make sure card content sits above the glow */
.spotlight > * {
    position: relative;
    z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
    .spotlight::before { display: none; }
}

/* --- Live data pulse dot --- */
.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1F8A70;
    position: relative;
    box-shadow: 0 0 0 0 rgba(31, 138, 112, 0.6);
    animation: live-pulse 2s infinite;
    margin-right: 6px;
}

@keyframes live-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(31, 138, 112, 0.55); }
    70%  { box-shadow: 0 0 0 10px rgba(31, 138, 112, 0); }
    100% { box-shadow: 0 0 0 0 rgba(31, 138, 112, 0); }
}

/* --- Dashboard chart card --- */
.chart-card {
    border-radius: 18px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    isolation: isolate;
}

/* Apply spotlight glow to chart cards too */
.chart-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(
        320px circle at var(--mx, 50%) var(--my, 50%),
        rgba(31, 110, 121, 0.14),
        rgba(244, 162, 97, 0.06) 35%,
        transparent 65%
    );
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 0;
}

.chart-card:hover::before {
    opacity: 1;
}

.chart-card > * {
    position: relative;
    z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
    .chart-card::before { display: none; }
}

.chart-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.chart-card-header .icon-bubble {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.chart-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    line-height: 1.2;
}

.chart-card-subtitle {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    line-height: 1.2;
    margin-top: 2px;
}

.chart-card-body {
    padding: 8px;
    flex-grow: 1;
}

.chart-skeleton {
    height: 280px;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--mud-palette-background-gray, #F2F6F7) 0%, var(--mud-palette-surface) 50%, var(--mud-palette-background-gray, #F2F6F7) 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.6s linear infinite;
    margin: 12px;
}

@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.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,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodH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AxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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

/* --- Pre-Blazor brand loader --- */
.brand-loader {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #F7FAFB;
    font-family: 'Poppins', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    z-index: 9999;
}

.brand-loader-logo {
    width:450px;
    max-width: 60vw;
    max-height: 40vh;
    animation: brand-logo-spin 2.5s ease-in-out infinite;
    transform-style: preserve-3d;
    backface-visibility: visible;
}

@keyframes brand-logo-spin {
    0%   { transform: perspective(900px) rotateY(0deg); }
    100% { transform: perspective(900px) rotateY(360deg); }
}

.brand-loader-bar {
    width: 320px;
    max-width: 70vw;
    height: 7px;
    background: #E2E8EA;
    border-radius: 999px;
    overflow: hidden;
}

.brand-loader-bar-fill {
    width: var(--blazor-load-percentage, 0%);
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #1F6E79 0%, #4E888F 50%, #F4A261 100%);
    transition: width 0.2s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    .brand-loader-logo {
        animation: none;
    }
}

code {
    color: #c02d76;
}

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

.responsive-heading-h3 {
    font-size: 2rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    line-height: 1.15 !important;
}

@media (min-width: 768px) {
    .responsive-heading-h3 {
        font-size: 2.4rem !important;
    }
}

@media (min-width: 1200px) {
    .responsive-heading-h3 {
        font-size: 3.25rem !important;
    }
}

.responsive-hero-headline {
    font-size: 2.25rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.025em !important;
    line-height: 1.1 !important;
}

@media (min-width: 768px) {
    .responsive-hero-headline {
        font-size: 3rem !important;
    }
}

@media (min-width: 1200px) {
    .responsive-hero-headline {
        font-size: 3.75rem !important;
    }
}

.responsive-button {
    width: 100%; /* Mobile default */
}

@media (min-width: 768px) {
    .responsive-button {
        width: 35%;
    }
}
