:root {
    /* Updated modern color palette */
    --primary-color: #5468ff;
    --primary-light: #7b86ff;
    --primary-dark: #3a4cdc;
    
    /* Secondary colors for accents */
    --secondary-color: #ff5a5f;
    --accent-color: #00c9a7;
    
    /* Neutral palette for backgrounds and text */
    --text-color: #1a202c;
    --text-muted: #4a5568;
    --light-gray: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e0;
    --white: #ffffff;
    
    /* Shadow system - enhanced for depth */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.04);
    --shadow-md: 0 6px 12px rgba(0,0,0,0.05);
    --shadow-lg: 0 12px 24px rgba(0,0,0,0.07);
    
    /* Status colors - brighter and more vibrant */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Font settings */
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-sm: 0.875rem;
    --line-height-base: 1.5;
}

:root {
    /* More sophisticated and harmonious color palette */
    --primary-color: #4285f4;
    --primary-light: #6fa2ff;
    --primary-dark: #2b68ca;
    
    /* Secondary colors for accents - more subtle and balanced */
    --secondary-color: #34a853;
    --accent-color: #8ab4f8;
    
    /* Neutral palette for backgrounds and text - warmer and easier on the eyes */
    --text-color: #202124;
    --text-muted: #5f6368;
    --light-gray: #f8f9fa;
    --gray-100: #f1f3f4;
    --gray-200: #e8eaed;
    --gray-300: #dadce0;
    --white: #ffffff;
    
    /* Shadow system - softer for better visual comfort */
    --shadow-sm: 0 2px 4px rgba(60, 64, 67, 0.06);
    --shadow-md: 0 6px 12px rgba(60, 64, 67, 0.08);
    --shadow-lg: 0 8px 20px rgba(60, 64, 67, 0.1);
    
    /* Status colors - more subdued and professional */
    --success: #0f9d58;
    --warning: #fbbc05;
    --danger: #ea4335;
    --info: #4285f4;

    /* Font settings */
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-sm: 0.875rem;
    --line-height-base: 1.5;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    background-color: var(--light-gray);
    line-height: var(--line-height-base);
}

.kt-grid.kt-login {
    overflow: hidden;
}

.kt-grid__item.kt-grid.kt-grid--desktop {
    background-size: cover;
    background-position: center;
    position: relative;
    background-image: none !important;
    background-color: var(--light-gray);
}

.kt-grid__item.kt-grid.kt-grid--desktop::before {
    content: none;
}

.kt-login__left {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(145deg, #3b78e7, #4285f4, #5094ed);
    position: relative;
    box-shadow: inset -10px 0 20px -10px rgba(0,0,0,0.1);
    color: white;
}

.kt-login__left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.4;
}

.kt-login__wrapper {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.kt-login__logo img {
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
    max-width: 120px;
    margin-bottom: 1.3rem !important;
}

.kt-login__logo img:hover {
    transform: scale(1.05);
}

.kt-login__title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.2rem !important;
    margin-top: 1.2rem !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    letter-spacing: -0.5px;
}

.kt-login__desc {
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.kt-login__divider div {
    width: 1px;
    height: 70%;
    background: linear-gradient(to bottom, transparent, var(--gray-300), transparent);
    margin: 0 auto;
}

.kt-login__right {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
}

.language-switcher {
    position: absolute;
    top: -10px;
    right: 100px;
    z-index: 10;
}

.language-switcher .btn {
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.25s ease;
    margin: 0 5px;
    color: var(--text-muted);
    background-color: var(--gray-100);
    border: 1px solid var(--gray-200);
}

.language-switcher .btn.active {
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    color: var(--white);
    box-shadow: 0 4px 8px rgba(66, 133, 244, 0.2);
    border-color: transparent;
}

.language-switcher .btn:hover:not(.active) {
    transform: translateY(-2px);
    background-color: var(--gray-200);
    color: var(--text-color);
}

.login-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 430px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(218, 220, 224, 0.5);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.login-card::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-light));
    opacity: 0.04;
    z-index: 0.5;
}

.login-card::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    opacity: 0.04;
    z-index: 0.5;
}

.form-group {
    position: relative;
    margin-bottom: 1.75rem;
}

.form-control {
    height: 52px;
    border-radius: 8px;
    padding-left: 50px !important;
    font-size: 0.95rem;
    border: 1px solid var(--gray-200);
    background-color: var(--gray-100);
    transition: all 0.3s ease;
    color: var(--text-color);
    box-shadow: var(--shadow-sm);
    font-weight: 400;
}

.form-control:focus {
    border-color: var(--primary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.08);
    transform: translateY(0);
}

.input-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 16px;
    color: var(--primary-color);
    font-size: 1rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.form-control:focus ~ .input-icon {
    opacity: 1;
}

.input-wrapper {
    position: relative;
}

.input-label {
    position: absolute;
    top: 50%;
    left: 50px;
    transform: translateY(-50%);
    transition: all 0.3s ease;
    pointer-events: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.form-control:focus + .input-label,
.form-control:not(:placeholder-shown) + .input-label {
    top: 0;
    left: 15px;
    transform: translateY(-100%);
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 500;
    letter-spacing: 0.01em;
}

.form-control::placeholder {
    opacity: 0;
    transition: opacity 0.3s;
}

.form-control:focus::placeholder {
    opacity: 0.5;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    transition: color 0.2s;
    outline: none;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.btn-signin {
    height: 56px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.25s ease;
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    border: none;
    letter-spacing: 0.3px;
    font-size: 1.05rem;
    position: relative;
    overflow: hidden;
}

.btn-signin::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s;
}

.btn-signin:hover::before {
    left: 100%;
}

.btn-signin:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(66, 133, 244, 0.2);
    background: linear-gradient(to right, var(--primary-dark), var(--primary-color));
}

.kt-login__head {
    text-align: center;
    margin-bottom: 2.5rem;
}

.kt-login__signin .kt-login__title {
    color: var(--text-color);
    font-size: 1.75rem;
}

.forgot-link {
    color: var(--primary-color);
    transition: all 0.2s ease;
    font-weight: 500;
    text-decoration: none;
    position: relative;
}

.forgot-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.forgot-link:hover::after {
    width: 100%;
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

.kt-checkbox {
    margin-bottom: 0;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

.kt-checkbox span {
    border: 1px solid var(--gray-300);
    border-radius: 4px;
}

/* Features section styles */
.features-highlights {
    margin-top: 3rem;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
    padding: 1.15rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.feature-item:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.25rem;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.feature-text h5 {
    color: white;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 1.05rem;
}

.feature-text p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Help section */
.login-help-section {
    text-align: center;
    margin-top: 2rem;
    z-index: 10;
}

.login-help-section p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.help-link {
    color: var(--primary-light);
    font-weight: 500;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    z-index: 11;
}

.help-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.help-link:hover::after {
    width: 100%;
}

/* RTL Specific Styles */
html[dir="rtl"] .input-icon {
    left: auto;
    right: 20px;
}

html[dir="rtl"] .form-control {
    padding-left: 15px !important;
    padding-right: 55px !important;
}

/* Animation styles */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.btn-pulse {
    animation: pulse 1.5s ease-in-out;
}

.form-control, .btn-signin, .language-switcher .btn {
    transition: all 0.3s ease;
}

.kt-login__left, .login-card {
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .kt-login__left, .kt-login__right {
        padding: 2rem;
    }
    
    .kt-login__title {
        font-size: 2rem;
    }
    
    .login-card {
        padding: 2.5rem 2rem;
    }
}

@media (max-width: 767px) {
    .kt-login__left {
        display: none;
    }
    
    .kt-login__divider {
        display: none;
    }
    
    .kt-login__right {
        width: 100%;
        padding: 2rem 1.5rem;
    }

    .login-card {
        max-width: 100%;
        padding: 2rem 1.5rem;
    }
}

/* Accessibility improvements */
/* High contrast focus states */
a:focus, button:focus, input:focus, select:focus, textarea:focus, [tabindex]:focus {
    outline: 3px solid var(--primary-color) !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 3px rgba(84, 104, 255, 0.3) !important;
}

/* Skip to main content link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    z-index: 9999;
    transition: top 0.3s;
    border-radius: 0 0 4px 0;
    font-weight: 500;
}

.skip-to-content:focus {
    top: 0;
}

/* Ensure color contrast meets WCAG AA standard */
.kt-login__desc {
    color: rgba(255, 255, 255, 0.95);
}

.form-control::placeholder {
    color: #718096;
}

/* Add underline to links for better visibility */
.forgot-link:hover, .help-link:hover {
    text-decoration: none !important;
    color: var(--primary-color);
}

/* Ensure sufficient contrast for error messages */
.alert-danger {
    color: #ffffff;
    background-color: #ef4444;
    border-color: #dc2626;
    border-radius: 12px;
    padding: 1rem;
}

/* Support for Windows High Contrast Mode */
@media (forced-colors: active) {
    .btn-signin, .language-switcher .btn, .feature-icon {
        border: 2px solid transparent;
    }
    
    .form-control, .login-card {
        border: 1px solid CanvasText;
    }
}


.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    opacity: 0.05;
    box-shadow: 0 0 10px 2px rgba(84, 104, 255, 0.05);
}

.particle:nth-child(1) {
    width: 150px;
    height: 150px;
    top: -75px;
    right: 10%;
    animation: floating 20s infinite;
}

.particle:nth-child(2) {
    width: 80px;
    height: 80px;
    top: 20%;
    right: 20%;
    animation: floating 12s infinite 1s;
}

.particle:nth-child(3) {
    width: 120px;
    height: 120px;
    bottom: 10%;
    right: 15%;
    animation: floating 18s infinite 2s;
}

.particle:nth-child(4) {
    width: 65px;
    height: 65px;
    bottom: 30%;
    left: 10%;
    animation: floating 15s infinite 3s;
}

.particle:nth-child(5) {
    width: 100px;
    height: 100px;
    top: 40%;
    left: 20%;
    animation: floating 20s infinite 4s;
}

.particle:nth-child(6) {
    width: 40px;
    height: 40px;
    top: 10%;
    left: 30%;
    animation: floating 10s infinite 5s;
}

.particle:nth-child(7) {
    width: 90px;
    height: 90px;
    bottom: -30px;
    left: 40%;
    animation: floating 16s infinite 6s;
}

.particle:nth-child(8) {
    width: 50px;
    height: 50px;
    top: 60%;
    right: 30%;
    animation: floating 14s infinite 7s;
}

@keyframes floating {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(-10px, 15px) rotate(5deg);
    }
    50% {
        transform: translate(10px, 30px) rotate(10deg);
    }
    75% {
        transform: translate(15px, 15px) rotate(5deg);
    }
    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

.features-highlights {
    margin-top: 3rem;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-item:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.15);
}

.feature-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.feature-text h5 {
    color: white;
    margin-bottom: 5px;
    font-weight: 600;
}

.feature-text p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
    font-size: 0.85rem;
}

/* .help-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.5);
    padding-bottom: 2px;
    transition: all 0.3s;
}

.help-link:hover {
    color: white;
    text-decoration: none;
    border-bottom-color: white;
} */

/* Responsive styles for features */
@media (max-width: 767px) {
    .features-highlights {
        display: none;
    }
    
    .login-help-section {
        margin-top: 2rem;
    }
}