/* ==========================================
   BMC Application Styles
   ==========================================
   Table of Contents:
   1. Base & Typography
   2. Form Validation
   3. Blazor Error Handling
   4. Startup Loader
   5. Layout - Login Page
   6. Login Card Component
   7. Islamic Loader Component
   8. Profile Page Styles
   9. Responsive Design
   10. Utility Classes
   11. Schedule Preview Dialog
   ========================================== */

/* ==========================================
   1. Base & Typography
   ========================================== */

* {
    font-family: "Cairo", sans-serif !important;
    font-optical-sizing: auto !important;
    font-style: normal !important;
}

code {
    color: #c02d76;
}

/* ==========================================
   2. Form Validation
   ========================================== */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

.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;
}

/* ==========================================
   3. Blazor Error Handling
   ========================================== */

#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."
}

/* ==========================================
   4. Startup Loader (index.html)
   ========================================== */

.startup-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d1b2a 0%, #1b3a4b 50%, #065a60 100%);
    z-index: 9999;
}

.logo-loader-container {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.4) 0%, rgba(212, 175, 55, 0.1) 40%, transparent 70%);
    border-radius: 50%;
    animation: startup-logoGlowPulse 2s ease-in-out infinite;
    filter: blur(10px);
}

.loader-logo {
    width: 140px;
    height: auto;
    position: relative;
    z-index: 2;
    animation: startup-logoFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 10px 30px rgba(212, 175, 55, 0.5));
}

.loader-ring {
    position: absolute;
    width: 170px;
    height: 170px;
    border: 3px solid transparent;
    border-top-color: #d4af37;
    border-right-color: rgba(212, 175, 55, 0.5);
    border-radius: 50%;
    animation: startup-ringRotate 1.5s linear infinite;
}

.loader-ring::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 3px solid transparent;
    border-bottom-color: rgba(255, 255, 255, 0.3);
    border-left-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: startup-ringRotateReverse 2s linear infinite;
}

.loader-text {
    margin-top: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.loader-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #d4af37;
    text-shadow: 0 2px 10px rgba(212, 175, 55, 0.5);
    letter-spacing: 2px;
}

.loader-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

.loading-dots::after {
    content: '';
    animation: startup-loadingDots 1.5s infinite;
}

.progress-bar-container {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 12px;
}

.progress-bar {
    width: var(--blazor-load-percentage, 0%);
    height: 100%;
    background: linear-gradient(90deg, #d4af37, #f4d03f, #d4af37);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: startup-shimmer 1.5s ease-in-out infinite;
    transition: width 0.3s ease-out;
}

/* Startup Loader Animations */
@keyframes startup-logoGlowPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

@keyframes startup-logoFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.02); }
}

@keyframes startup-ringRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes startup-ringRotateReverse {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

@keyframes startup-loadingDots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}

@keyframes startup-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==========================================
   5. Layout - Login Page
   ========================================== */

.login-layout {
    min-height: 100vh;
    max-height: 100vh;
    width: 100vw;
    max-width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Prevent scroll on body when on login page */
body:has(.login-layout) {
    overflow: hidden;
    max-height: 100vh;
    max-width: 100vw;
}

.login-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--mud-palette-primary-darken) 0%, var(--mud-palette-primary) 50%, var(--mud-palette-primary-lighten) 100%);
    opacity: 0.1;
    z-index: 0;
}

.login-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.login-controls {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    overflow: visible;
}

/* Prevent body scroll when login menu is open */
.login-layout .mud-popover-open {
    position: fixed;
}

[dir="rtl"] .login-controls {
    right: auto;
    left: 1rem;
}

.login-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    padding: 1rem;
}

.authorizing-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--mud-palette-background) 0%, var(--mud-palette-surface) 100%);
}

/* ==========================================
   6. Login Card Component
   ========================================== */

.login-container {
    width: 100%;
    max-width: 460px;
    perspective: 1000px;
}

.login-card {
    position: relative;
    padding: 3rem 2.5rem;
    border-radius: 24px;
    background: linear-gradient(145deg, var(--mud-palette-surface) 0%, var(--mud-palette-background) 100%);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: login-cardEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

/* Login Card Decoration */
.login-decoration {
    position: absolute;
    top: -100px;
    right: -100px;
    width: 250px;
    height: 250px;
    opacity: 0.08;
    pointer-events: none;
}

.geometric-pattern {
    position: relative;
    width: 100%;
    height: 100%;
}

.pattern-ring {
    position: absolute;
    border: 2px solid var(--mud-palette-primary);
    border-radius: 8px;
    transform: rotate(45deg);
}

.ring-outer {
    width: 200px;
    height: 200px;
    top: 25px;
    left: 25px;
    animation: login-rotatePattern 20s linear infinite;
}

.ring-middle {
    width: 150px;
    height: 150px;
    top: 50px;
    left: 50px;
    animation: login-rotatePattern 15s linear infinite reverse;
}

.ring-inner {
    width: 100px;
    height: 100px;
    top: 75px;
    left: 75px;
    animation: login-rotatePattern 10s linear infinite;
}

/* Login Header */
.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}

.login-logo-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
    width: 120px;
    height: 120px;
}

.login-logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.4) 0%, rgba(212, 175, 55, 0.1) 40%, transparent 70%);
    border-radius: 50%;
    filter: blur(15px);
    animation: login-glowPulse 3s ease-in-out infinite;
}

.login-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    animation: login-logoFloat 4s ease-in-out infinite;
}

.logo-image {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 20px rgba(212, 175, 55, 0.4));
}

.login-logo-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 115px;
    height: 115px;
    border: 2px solid transparent;
    border-top-color: rgba(212, 175, 55, 0.8);
    border-right-color: rgba(212, 175, 55, 0.4);
    border-radius: 50%;
    animation: login-ringRotate 2s linear infinite;
}

.login-logo-ring::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid transparent;
    border-bottom-color: rgba(255, 255, 255, 0.2);
    border-left-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: login-ringRotateReverse 3s linear infinite;
}

.login-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, var(--mud-palette-primary) 0%, var(--mud-palette-secondary) 50%, var(--mud-palette-primary) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: login-textShine 4s linear infinite;
    letter-spacing: 1px;
}

.login-subtitle {
    font-size: 0.95rem;
    color: var(--mud-palette-text-secondary);
    margin: 0;
    opacity: 0.8;
}

/* Login Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.input-group {
    opacity: 0;
    transform: translateX(-20px);
    animation: login-inputSlideIn 0.5s ease-out forwards;
}

.input-animate-1 { animation-delay: 0.2s; }
.input-animate-2 { animation-delay: 0.3s; }
.input-animate-3 { animation-delay: 0.4s; }
.input-animate-4 { animation-delay: 0.5s; }

.login-input {
    transition: all 0.3s ease;
}

.login-input:focus-within {
    transform: scale(1.02);
}

.remember-me-row {
    display: flex;
    align-items: center;
}

/* Login Button */
.button-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
}

.login-submit-button {
    height: 58px !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    border-radius: 14px !important;
    text-transform: none !important;
    letter-spacing: 0.5px !important;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    position: relative;
    z-index: 1;
}

.button-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-submit-button:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 15px 35px rgba(var(--mud-palette-primary-rgb), 0.4),
        0 5px 15px rgba(0, 0, 0, 0.1) !important;
}

.login-submit-button:active:not(:disabled) {
    transform: translateY(-1px) scale(0.98);
}

.button-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: login-buttonShine 3s ease-in-out infinite;
    pointer-events: none;
}

/* Login Footer */
.login-footer {
    margin-top: 2rem;
    text-align: center;
}

.footer-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--mud-palette-lines-default), transparent);
    max-width: 100px;
}

.divider-ornament {
    width: 8px;
    height: 8px;
    background: var(--mud-palette-primary);
    transform: rotate(45deg);
    opacity: 0.6;
}

.footer-text {
    font-size: 0.8rem;
    color: var(--mud-palette-text-secondary);
    margin: 0;
    opacity: 0.6;
    letter-spacing: 0.5px;
}

/* Login Card Animations */
@keyframes login-cardEntrance {
    0% { opacity: 0; transform: translateY(40px) rotateX(10deg); }
    100% { opacity: 1; transform: translateY(0) rotateX(0); }
}

@keyframes login-rotatePattern {
    from { transform: rotate(45deg); }
    to { transform: rotate(405deg); }
}

@keyframes login-glowPulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.15); }
}

@keyframes login-logoFloat {
    0%, 100% { transform: translate(-50%, -50%) translateY(0) scale(1); }
    50% { transform: translate(-50%, -50%) translateY(-6px) scale(1.02); }
}

@keyframes login-ringRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes login-ringRotateReverse {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

@keyframes login-textShine {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

@keyframes login-inputSlideIn {
    to { opacity: 1; transform: translateX(0); }
}

@keyframes login-buttonShine {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

/* ==========================================
   7. Islamic Loader Component
   ========================================== */

.islamic-loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.islamic-loader-container.islamic-loader-small {
    padding: 0;
}

.islamic-loader-container.islamic-loader-small .islamic-loader {
    width: 24px;
    height: 24px;
}

.islamic-loader-container.islamic-loader-small .star {
    border-width: 2px;
}

.islamic-loader-container.islamic-loader-small .center-circle {
    width: 6px;
    height: 6px;
}

.islamic-loader {
    width: 80px;
    height: 80px;
    position: relative;
    animation: islamic-rotate 3s linear infinite;
}

.islamic-pattern {
    width: 100%;
    height: 100%;
    position: relative;
}

.star {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid var(--mud-palette-primary);
    opacity: 0.8;
}

.star-1 {
    transform: rotate(0deg);
    animation: islamic-pulse 1.5s ease-in-out infinite;
}

.star-2 {
    transform: rotate(45deg);
    animation: islamic-pulse 1.5s ease-in-out infinite 0.2s;
}

.star-3 {
    transform: rotate(22.5deg);
    animation: islamic-pulse 1.5s ease-in-out infinite 0.4s;
    border-color: var(--mud-palette-secondary);
}

.star-4 {
    transform: rotate(67.5deg);
    animation: islamic-pulse 1.5s ease-in-out infinite 0.6s;
    border-color: var(--mud-palette-secondary);
}

.center-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: var(--mud-palette-primary);
    border-radius: 50%;
    animation: islamic-centerPulse 1.5s ease-in-out infinite;
}

.islamic-loader-text {
    animation: islamic-fadeInOut 1.5s ease-in-out infinite;
}

/* Islamic Loader Animations */
@keyframes islamic-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes islamic-pulse {
    0%, 100% { opacity: 0.3; transform: rotate(var(--rotation, 0deg)) scale(0.9); }
    50% { opacity: 1; transform: rotate(var(--rotation, 0deg)) scale(1); }
}

@keyframes islamic-centerPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

@keyframes islamic-fadeInOut {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ==========================================
   8. Profile Page Styles
   ========================================== */

.profile-page {
    max-width: 1200px;
    margin: 0 auto;
}

.profile-header {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.profile-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 180px;
    background: linear-gradient(135deg, var(--mud-palette-primary) 0%, var(--mud-palette-secondary) 100%);
    opacity: 0.9;
}

.profile-header-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 180px;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.profile-header-content {
    position: relative;
    z-index: 1;
    padding: 2rem;
    padding-top: 100px;
}

.profile-avatar-wrapper {
    position: relative;
    display: inline-block;
}

.profile-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 5px solid var(--mud-palette-surface);
    background: linear-gradient(135deg, var(--mud-palette-primary) 0%, var(--mud-palette-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: profile-avatarFloat 3s ease-in-out infinite;
}

.profile-avatar-icon {
    font-size: 4rem !important;
    color: white !important;
}

.profile-user-info {
    margin-top: 1.5rem;
}

.profile-user-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    margin: 0;
}

.profile-user-email {
    font-size: 1rem;
    color: var(--mud-palette-text-secondary);
    margin: 0.5rem 0 0;
}

.profile-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.profile-stat-item {
    text-align: center;
    padding: 1rem 1.5rem;
    background: var(--mud-palette-surface);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.profile-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mud-palette-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.profile-currency-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    background: linear-gradient(135deg, var(--mud-palette-primary) 0%, var(--mud-palette-primary-darken) 100%);
    color: white;
    border-radius: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.profile-stat-label {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
    margin-top: 0.25rem;
}

.profile-card {
    border-radius: 20px !important;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1) !important;
}

.profile-card-header {
    background: linear-gradient(135deg, rgba(var(--mud-palette-primary-rgb), 0.05) 0%, rgba(var(--mud-palette-secondary-rgb), 0.05) 100%);
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.profile-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.profile-section-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--mud-palette-primary) 0%, var(--mud-palette-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* Profile Page Animations */
@keyframes profile-avatarFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ==========================================
   9. Responsive Design
   ========================================== */

/* Mobile devices (max-width: 599px) */
@media (max-width: 599px) {
    /* Login Card */
    .login-card {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }

    .login-logo-wrapper {
        width: 100px;
        height: 100px;
    }

    .login-logo {
        width: 80px;
        height: 80px;
    }

    .login-logo-glow {
        width: 120px;
        height: 120px;
    }

    .login-logo-ring {
        width: 95px;
        height: 95px;
    }

    .login-title {
        font-size: 1.5rem;
    }

    .login-subtitle {
        font-size: 0.85rem;
    }

    .login-submit-button {
        height: 50px !important;
        font-size: 1rem !important;
    }

    /* Startup Loader */
    .logo-loader-container {
        width: 140px;
        height: 140px;
    }

    .loader-logo {
        width: 100px;
    }

    .logo-glow {
        width: 160px;
        height: 160px;
    }

    .loader-ring {
        width: 130px;
        height: 130px;
    }

    .loader-title {
        font-size: 1.2rem;
    }

    .loader-subtitle {
        font-size: 0.9rem;
    }

    .progress-bar-container {
        width: 160px;
    }

    /* Profile Page */
    .profile-header-bg,
    .profile-header-pattern {
        height: 140px;
    }

    .profile-header-content {
        padding: 1.5rem;
        padding-top: 80px;
        text-align: center;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
    }

    .profile-avatar-ring {
        width: 110px;
        height: 110px;
    }

    .profile-avatar-icon {
        font-size: 2.5rem !important;
    }

    .profile-user-name {
        font-size: 1.25rem;
    }

    .profile-stats {
        justify-content: center;
        gap: 1rem;
    }

    .profile-stat-item {
        padding: 0.75rem 1rem;
        flex: 1;
        min-width: 80px;
    }

    .profile-stat-value {
        font-size: 1.25rem;
    }

    .profile-stat-label {
        font-size: 0.75rem;
    }

    /* General Mobile Adjustments */
    .mud-fab .mud-fab-label {
        display: none;
    }

    .mud-table-toolbar .mud-stack {
        gap: 0.5rem !important;
    }
}

/* Tablet devices (600px - 959px) */
@media (min-width: 600px) and (max-width: 959px) {
    .login-card {
        padding: 2.5rem 2rem;
    }

    .profile-header-content {
        padding: 2rem;
        padding-top: 90px;
    }

    .profile-stats {
        gap: 1.5rem;
    }
}

/* Desktop adjustments */
@media (min-width: 960px) {
    .profile-header-content {
        display: flex;
        align-items: flex-end;
        gap: 2rem;
    }

    .profile-user-info {
        margin-top: 0;
    }

    .profile-stats {
        margin-left: auto;
        margin-top: 0;
    }
}

/* RTL Support for responsive */
[dir="rtl"] .profile-stats {
    margin-left: 0;
    margin-right: auto;
}

/* ==========================================
   10. Utility Classes
   ========================================== */

.full-width {
    width: 100% !important;
}

.overflow-visible-content {
    max-height: none !important;
    overflow: visible !important;
}

.text-gradient {
    background: linear-gradient(135deg, var(--mud-palette-primary) 0%, var(--mud-palette-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-hover-effect {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover-effect:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1) !important;
}

/* ==========================================
   11. Schedule Preview Dialog
   ========================================== */

.schedule-preview-dialog {
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3) !important;
}

.schedule-preview-dialog .mud-dialog-content {
    padding: 0 !important;
}

.schedule-preview-dialog .mud-dialog-actions {
    display: none !important;
}

.schedule-dialog-header {
    position: relative;
    background: var(--mud-palette-surface);
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.schedule-header-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--mud-palette-primary), var(--mud-palette-secondary), var(--mud-palette-primary));
    background-size: 200% 100%;
    animation: schedule-accentShimmer 3s ease-in-out infinite;
}

.schedule-header-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    padding-top: calc(0.875rem + 3px);
    font-size: 0.9rem;
}

.schedule-header-icon {
    color: var(--mud-palette-primary) !important;
    opacity: 0.9;
}

.schedule-header-title {
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.schedule-header-divider {
    color: var(--mud-palette-text-disabled);
    font-size: 0.75rem;
}

.schedule-header-subtitle {
    color: var(--mud-palette-text-secondary);
    font-weight: 500;
}

.schedule-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mud-palette-background);
    padding: 0.5rem;
}

.schedule-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 4px;
}

@keyframes schedule-accentShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Schedule Preview Dialog - Responsive */
@media (max-width: 599px) {
    .schedule-header-content {
        padding: 0.75rem;
        padding-top: calc(0.75rem + 3px);
        font-size: 0.8rem;
    }

    .schedule-image {
        max-height: 70vh;
    }
}

/* ==========================================
   Footer Styles
   ========================================== */

/* Ensure MudLayout fills the viewport */
.mud-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* MudMainContent fills remaining space */
.main-content-wrapper.mud-main-content {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    min-height: 0;
}

.main-content-wrapper > .mud-container {
    flex: 1 0 auto;
}

.app-footer {
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--mud-palette-surface) 0%, var(--mud-palette-background) 100%);
    border-top: 1px solid var(--mud-palette-divider);
    padding: 1.5rem 2rem;
    margin-top: auto;
    width: 100%;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-icon {
    color: var(--mud-palette-primary);
}

.footer-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--mud-palette-primary);
    letter-spacing: 0.5px;
}

.footer-copyright {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}

/* Footer RTL Support */
[dir="rtl"] .footer-content {
    flex-direction: row-reverse;
}

/* Footer Responsive */
@media (max-width: 599px) {
    .app-footer {
        padding: 1rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .footer-brand {
        justify-content: center;
    }

    [dir="rtl"] .footer-content {
        flex-direction: column;
    }
}

/* ==========================================
   12. Nav Control Buttons (Theme & Language)
   ========================================== */

/* Base nav control button styles */
.nav-control-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 12px !important;
}

.nav-control-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.15) !important;
}

.nav-control-btn:active {
    transform: scale(0.95);
}

/* Theme toggle button */
.theme-toggle {
    position: relative;
    overflow: hidden;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.theme-toggle:hover::before {
    width: 150%;
    height: 150%;
}

/* Rotate animation for theme icon */
.theme-toggle .mud-icon-root {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle:hover .mud-icon-root {
    transform: rotate(30deg);
}

/* Language menu styles */
.language-menu {
    border-radius: 12px !important;
}

.language-menu .mud-icon-root {
    transition: transform 0.3s ease;
}

.language-menu:hover .mud-icon-root {
    transform: rotate(-15deg) scale(1.1);
}

/* Language drop-down option styles */
.language-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
    min-width: 180px;
}

.language-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--mud-palette-primary) 0%, var(--mud-palette-primary-darken) 100%);
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 8px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(var(--mud-palette-primary-rgb), 0.3);
    transition: all 0.2s ease;
}

.language-code.arabic-code {
    font-size: 1rem;
    font-family: "Cairo", sans-serif;
}

.language-name {
    flex: 1;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}

/* Selected language item */
.language-item-selected {
    background: rgba(var(--mud-palette-primary-rgb), 0.08) !important;
}

.language-item-selected .language-code {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(var(--mud-palette-primary-rgb), 0.4);
}

.language-item-selected .language-name {
    color: var(--mud-palette-primary);
    font-weight: 600;
}

/* Menu item hover effects */
.mud-menu-item:hover .language-code {
    transform: scale(1.1);
}

.mud-menu-item:hover .language-name {
    color: var(--mud-palette-primary);
}

/* Login page control button styles */
.login-control {
    background: rgba(var(--mud-palette-primary-rgb), 0.1) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--mud-palette-primary-rgb), 0.2);
}

.login-control:hover {
    background: rgba(var(--mud-palette-primary-rgb), 0.2) !important;
    border-color: rgba(var(--mud-palette-primary-rgb), 0.4);
    box-shadow: 0 4px 20px rgba(var(--mud-palette-primary-rgb), 0.3);
}

/* Menu popup animation */
.mud-popover-open .mud-list {
    animation: menuFadeIn 0.2s ease-out;
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* RTL adjustments for language menu */
[dir="rtl"] .language-option {
    flex-direction: row-reverse;
}

[dir="rtl"] .language-name {
    text-align: right;
}

/* Responsive adjustments */
@media (max-width: 599px) {
    .language-option {
        min-width: 150px;
        gap: 8px;
    }

    .language-code {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .language-code.arabic-code {
        font-size: 0.9rem;
    }

    .language-name {
        font-size: 0.9rem;
    }
}
