.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+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."
    }

/* ============================================
   Dark Theme Loading Animation - Car Tracking
   ============================================ */

/* Loading state - dark theme background */
body.loading #app {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    position: relative;
    overflow: hidden;
}

/* Animated Background Particles - only during loading */
body.loading #app::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(118, 75, 162, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
    animation: backgroundPulse 8s ease-in-out infinite;
    z-index: 0;
}

/* Default app state (after loading) */
#app {
    min-height: 100vh;
    background: transparent;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.loading-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 500px;
    z-index: 1;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    padding: 2rem;
}

/* Company Logo in Loading */
.logo-container-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    animation: logoFadeIn 0.8s ease-out;
}

.company-logo {
    max-width: 200px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.5))
            drop-shadow(0 0 40px rgba(118, 75, 162, 0.3));
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes logoGlow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.5))
                drop-shadow(0 0 40px rgba(118, 75, 162, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 30px rgba(102, 126, 234, 0.8))
                drop-shadow(0 0 60px rgba(118, 75, 162, 0.5));
    }
}

/* GPS Signal Animation */
.gps-signal {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.signal-center {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    position: absolute;
    z-index: 4;
    box-shadow: 
        0 0 20px rgba(102, 126, 234, 0.6),
        0 0 40px rgba(118, 75, 162, 0.4),
        inset 0 0 10px rgba(255, 255, 255, 0.2);
    animation: signalPulse 2s ease-in-out infinite;
}

@keyframes signalPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
        box-shadow: 
            0 0 20px rgba(102, 126, 234, 0.6),
            0 0 40px rgba(118, 75, 162, 0.4),
            inset 0 0 10px rgba(255, 255, 255, 0.2);
    }
    50% { 
        transform: scale(1.2);
        opacity: 0.8;
        box-shadow: 
            0 0 30px rgba(102, 126, 234, 0.8),
            0 0 60px rgba(118, 75, 162, 0.6),
            inset 0 0 15px rgba(255, 255, 255, 0.3);
    }
}

.signal-ring {
    position: absolute;
    border: 2px solid;
    border-radius: 50%;
    opacity: 0;
}

.signal-ring.ring-1 {
    width: 60px;
    height: 60px;
    border-color: rgba(102, 126, 234, 0.6);
    animation: ringExpand 2s ease-out infinite;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.signal-ring.ring-2 {
    width: 90px;
    height: 90px;
    border-color: rgba(118, 75, 162, 0.5);
    animation: ringExpand 2s ease-out infinite 0.3s;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.signal-ring.ring-3 {
    width: 120px;
    height: 120px;
    border-color: rgba(59, 130, 246, 0.4);
    animation: ringExpand 2s ease-out infinite 0.6s;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

@keyframes ringExpand {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Vehicle Loader */
.vehicle-loader {
    width: 200px;
    height: 120px;
    position: relative;
    margin: 1rem 0;
}

.vehicle-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 10px 30px rgba(102, 126, 234, 0.4));
}

.road-path {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: roadDraw 3s ease-in-out infinite;
}

@keyframes roadDraw {
    0% { stroke-dashoffset: 200; }
    50% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -200; }
}

.vehicle-body {
    animation: vehicleMove 3s ease-in-out infinite;
    transform-origin: center;
}

@keyframes vehicleMove {
    0% { transform: translateX(-10px); }
    50% { transform: translateX(10px); }
    100% { transform: translateX(-10px); }
}

.headlight {
    animation: headlightBlink 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 8px #fbbf24);
}

@keyframes headlightBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.wheel {
    animation: wheelRotate 1s linear infinite;
    transform-origin: center;
}

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

.wheel-inner {
    animation: wheelRotate 1s linear infinite reverse;
    transform-origin: center;
}

/* Progress Container */
.progress-container {
    width: 100%;
    max-width: 400px;
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #3b82f6 100%);
    border-radius: 10px;
    position: relative;
    transition: width 0.3s ease-out;
    box-shadow: 
        0 0 10px rgba(102, 126, 234, 0.6),
        0 0 20px rgba(118, 75, 162, 0.4);
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.loading-text {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.loading-dots {
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.loading-dots .dot-1,
.loading-dots .dot-2,
.loading-dots .dot-3 {
    animation: dotFade 1.4s ease-in-out infinite;
}

.loading-dots .dot-1 {
    animation-delay: 0s;
}

.loading-dots .dot-2 {
    animation-delay: 0.2s;
}

.loading-dots .dot-3 {
    animation-delay: 0.4s;
}

@keyframes dotFade {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.loading-percentage {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(102, 126, 234, 1);
    text-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

/* Legacy Loading Support (for Blazor) */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
    opacity: 0;
    pointer-events: none;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #1b6ec2;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
    opacity: 0;
    pointer-events: none;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

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

/* Persian/RTL Support and Custom Styles */
* {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #0a0a0a;
    color: #ffffff;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.text-primary {
    color: #667eea !important;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #65408a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

/* Smooth scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Card animations */
.card {
    transition: all 0.3s ease;
}

/* Leaflet map RTL support */
.leaflet-container {
    direction: ltr;
}

/* Loading animation improvement */
.spinner-border {
    animation: spinner-border 0.75s linear infinite;
}

/* Better shadow */
.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}