/* ??????????????????????????????????????????????????
   Satlify Public — Global Polish
   ?????????????????????????????????????????????????? */

/* ?? Typography ?? */
*,
*::before,
*::after {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.mud-typography {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* ?? Global transitions ?? */
a, button, .mud-button-root, .mud-icon-button, .mud-nav-link,
.mud-chip, .mud-paper {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ?? Smooth scrolling & rendering ?? */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ?? Content fade-in after load ?? */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-enter {
    animation: fadeInUp 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Staggered children animation */
.page-enter > * {
    animation: fadeInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.page-enter > *:nth-child(1) { animation-delay: 0.04s; }
.page-enter > *:nth-child(2) { animation-delay: 0.08s; }
.page-enter > *:nth-child(3) { animation-delay: 0.12s; }
.page-enter > *:nth-child(4) { animation-delay: 0.16s; }
.page-enter > *:nth-child(5) { animation-delay: 0.20s; }
.page-enter > *:nth-child(6) { animation-delay: 0.24s; }

/* ?? AppBar glassmorphism ?? */
.mud-appbar {
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

/* ?? NavLink refinement ?? */
.mud-nav-link {
    border-radius: 10px !important;
    padding: 8px 14px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.mud-nav-link:hover {
    background: rgba(247, 147, 26, 0.08) !important;
}

.mud-nav-link.active {
    background: rgba(247, 147, 26, 0.12) !important;
    color: #f7931a !important;
    font-weight: 600 !important;
}

/* ?? Button hover/press refinement ?? */
.mud-button-filled:hover {
    filter: brightness(1.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.mud-button-filled:active {
    transform: scale(0.98);
}

.mud-button-outlined:hover {
    background: rgba(0, 0, 0, 0.04);
}

/* ?? Card / Paper hover polish ?? */
.hover-scale {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.hover-scale:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.10) !important;
}

/* ?? Snackbar polish ?? */
.mud-snackbar {
    border-radius: 12px !important;
    font-weight: 500 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
    animation: snackEnter 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes snackEnter {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ?? Dialog entrance ?? */
.mud-dialog {
    border-radius: 20px !important;
    animation: dialogEnter 0.25s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes dialogEnter {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.mud-overlay {
    animation: overlayFadeIn 0.2s ease both;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ?? Popover polish ?? */
.mud-popover {
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
    animation: popoverEnter 0.15s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes popoverEnter {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ?? Tooltip refinement ?? */
.mud-tooltip {
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    padding: 6px 12px !important;
}

/* ?? Expansion panel polish ?? */
.mud-expand-panel {
    transition: margin 0.2s ease, box-shadow 0.2s ease;
}

.mud-expand-panel-header {
    transition: background 0.2s ease !important;
}

/* ?? Skeleton loader (for loading states) ?? */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.06) 25%,
        rgba(0, 0, 0, 0.03) 50%,
        rgba(0, 0, 0, 0.06) 75%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes skeletonShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-text--sm {
    height: 10px;
    width: 60%;
}

.skeleton-text--lg {
    height: 24px;
    width: 50%;
}

.skeleton-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 20px 24px;
    height: 100%;
}

/* ?? Selection / highlight ?? */
::selection {
    background: color-mix(in srgb, #f7931a 25%, transparent);
    color: inherit;
}

/* ?? Scrollbar polish ?? */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* ?? Alert polish ?? */
.mud-alert {
    border-radius: 12px !important;
}

/* ?? Chip polish ?? */
.mud-chip {
    border-radius: 8px !important;
    font-weight: 500 !important;
}

/* ?? Focus state ?? */
.mud-input-outlined .mud-input-outlined-border {
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.mud-input.mud-input-outlined:focus-within .mud-input-outlined-border {
    box-shadow: 0 0 0 3px rgba(247, 147, 26, 0.15);
}

/* ?? Blazor error UI ?? */
h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    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: #929292;
}