/* Base RTL setup for the entire document or a specific container */
body[dir="rtl"] .login-container,
.login-container[dir="rtl"] {
    direction: rtl;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Background is handled by space-bg in HTML */
    padding: 20px;
    position: relative;
    overflow: hidden;
    z-index: 10;
}

/* Remove old overlay */
.login-container::before {
    display: none;
}

.login-card {
    padding: 48px;
    border-radius: 24px;
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;

    /* Stronger Glassmorphism for Dark Theme */
    background: rgba(6, 44, 67, 0.6);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(85, 145, 169, 0.3);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card .brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
}

.brand img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(85, 145, 169, 0.5));
}

.login-card .logo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, #5591a933, transparent);
    margin-bottom: 5px;
    border: 1px solid rgba(85, 145, 169, 0.3);
}

.login-card h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    letter-spacing: -0.5px;
}

.login-card .sub {
    color: var(--secondary);
    font-size: 14px;
    text-align: center;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
    font-weight: 500;
    text-align: start;
    font-family: 'Space Grotesk', sans-serif;
}

.login-card input[type=text],
.login-card input[type=email],
.login-card input[type=password] {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(85, 145, 169, 0.3);
    background: rgba(6, 44, 67, 0.6);
    font-size: 15px;
    transition: all 0.3s ease;
    color: var(--text-light);
    font-weight: 400;
    font-family: 'Space Grotesk', sans-serif;
}

.login-card input::placeholder {
    color: rgba(240, 244, 248, 0.4);
}

.login-card input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(6, 44, 67, 0.9);
    box-shadow: 0 0 0 3px rgba(85, 145, 169, 0.2);
}

.login-card button.btn {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 0;
    background: linear-gradient(135deg, #5591a9, #054569);
    color: white;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(85, 145, 169, 0.3);
}

.login-card button.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(85, 145, 169, 0.5);
    filter: brightness(1.1);
}

.login-card button.btn:active {
    transform: translateY(0);
}

.form-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(85, 145, 169, 0.2);
}

.form-footer p {
    color: rgba(240, 244, 248, 0.6);
    font-size: 12px;
    margin: 0;
    font-weight: 400;
    font-family: 'JetBrains Mono', monospace;
}