:root {
    --primary-color: #2D8C8C;
    --primary-gradient: linear-gradient(135deg, #2D8C8C 0%, #48C1C1 100%);
    --bg-color: #f0f4f8;
    --bg-gradient: radial-gradient(circle at 0% 0%, #f0f4f8 0%, #e2e8f0 100%);
    --text-main: #1a202c;
    --text-muted: #4a5568;
    --white: #ffffff;
    --shadow-soft: 0 20px 50px rgba(0, 0, 0, 0.04);
    --shadow-premium: 0 25px 60px -12px rgba(45, 140, 140, 0.15);
    --radius-xl: 30px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body.premium-login-page {
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    font-family: 'Cairo', sans-serif;
    overflow-x: hidden;
}

.login-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Left Side: Visual Section */
.login-visual {
    flex: 1;
    position: relative;
    background: url('../img/login/bg.png') no-repeat center center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 5rem;
    color: #ffffff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.login-visual::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(45, 140, 140, 0.6) 0%, rgba(58, 175, 169, 0.4) 100%);
    z-index: 1;
}

.visual-content {
    position: relative;
    z-index: 2;
}

.card-logo {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.card-logo img {
    height: 70px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.branding-tagline {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    font-weight: 500;
}

.tagline-container {
    margin-top: auto;
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.tagline {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    max-width: 600px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
}

.tagline-sub {
    font-size: 1.2rem;
    line-height: 1.6;
    opacity: 1;
    max-width: 500px;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

/* Right Side: Form Section */
.login-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-gradient);
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 3.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft), var(--shadow-premium);
    width: 100%;
    max-width: 500px;
    animation: fadeInScale 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: var(--transition);
}

.login-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 70px -10px rgba(45, 140, 140, 0.2);
}

.login-header {
    margin-bottom: 2.2rem;
    text-align: center;
}

.login-header h2 {
    color: var(--text-main);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Form Styling */
.form-group, .form-options, .btn-login {
    margin-bottom: 1.5rem;
    position: relative;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.animate-1 { animation-delay: 0.3s; }
.animate-2 { animation-delay: 0.4s; }
.animate-3 { animation-delay: 0.5s; }
.animate-4 { animation-delay: 0.6s; }

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    right: 16px;
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: var(--transition);
}

.form-control-premium {
    width: 100%;
    padding: 1.1rem 3.5rem 1.1rem 1rem;
    border: 2px solid #eef2f6;
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-main);
    background-color: #f8fafc;
    transition: var(--transition);
    outline: none;
}

.form-control-premium:focus {
    border-color: var(--primary-color);
    background-color: var(--white);
    box-shadow: 0 10px 20px -5px rgba(45, 140, 140, 0.15);
    transform: translateY(-1px);
}

.form-control-premium:focus + .input-icon {
    color: var(--primary-color);
}

.password-toggle {
    position: absolute;
    left: 16px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    border: none;
    background: none;
    padding: 0;
}

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

/* Floating Label Alternative */
.input-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.9rem;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.remember-me input {
    accent-color: var(--primary-color);
    width: 18px;
    height: 18px;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.forgot-password:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.btn-login {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 50px;
    background: var(--primary-gradient);
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(45, 140, 140, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login .loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

.btn-login.loading .loader {
    display: inline-block;
}

.btn-login.loading .btn-text {
    opacity: 0.7;
}

/* Animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes revealText {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
}

.tagline {
    animation: revealText 1.2s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

.login-visual::before {
    animation: fadeIn 2s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 992px) {
    .login-visual {
        display: none;
    }
    .login-form-section {
        padding: 1rem;
    }
    .login-card {
        padding: 2rem;
    }
}

/* RTL Specific Adjustments */
[dir="rtl"] .form-control-premium {
    padding: 1rem 3.5rem 1rem 1rem;
}
[dir="rtl"] .input-icon {
    right: 16px;
    left: auto;
}
[dir="rtl"] .password-toggle {
    left: 16px;
    right: auto;
}
