/* --- Login Page Premium Design --- */
:root {
    --primary-red: #d32f2f;
    --primary-red-hover: #b71c1c;
    --dark-bg: #1a1a1a;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-light: #64748b;
    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 40px -12px rgba(211, 47, 47, 0.15);
    --radius-xl: 24px;
    --radius-lg: 16px;
    --radius-md: 12px;
}

body {
    background-color: #f8fafc;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    color: var(--text-main);
    overflow-x: hidden;
}

/* Main Container */
.main-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px 30px;
    position: relative;
    overflow: hidden;
}

/* Animated Background Elements */
.floating-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    filter: blur(50px);
    animation: float 20s infinite ease-in-out;
    pointer-events: none;
    z-index: -1;
}

.floating-circle:nth-child(1) {
    width: 300px;
    height: 300px;
    background: rgba(211, 47, 47, 0.08);
    top: -50px;
    right: -50px;
    animation-delay: 0s;
}

.floating-circle:nth-child(2) {
    width: 250px;
    height: 250px;
    background: rgba(239, 68, 68, 0.08);
    bottom: 10%;
    left: 5%;
    animation-delay: -5s;
}

.floating-circle:nth-child(3) {
    width: 200px;
    height: 200px;
    background: rgba(211, 47, 47, 0.05);
    top: 30%;
    left: 40%;
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -50px) rotate(10deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }
}

/* Login Container (Card) */
.login-container {
    background: #ffffff;
    border-radius: var(--radius-xl);
    padding: 50px 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-soft);
    position: relative;
    z-index: 10;
    border: 1.5px solid rgb(255 174 174 / 64%);
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login Header */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary-red);
    font-size: 2rem;
    box-shadow: 0 10px 25px rgba(211, 47, 47, 0.1);
    transition: transform 0.3s ease;
}

.login-container:hover .login-logo {
    transform: rotate(10deg) scale(1.05);
}

.login-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.5;
}

/* Admin Alert */
.admin-alert {
    background: #fff7ed;
    /* Light Amber/Orange tint */
    color: #9a3412;
    /* Dark Amber/Orange text */
    border: 1px solid #fed7aa;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 600;
}

.admin-alert i {
    font-size: 1.1rem;
    color: #f97316;
    /* Bright Orange icon */
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-lg);
    background: #f8fafc;
    font-size: 1rem;
    color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-red);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(211, 47, 47, 0.1);
}

/* Password Toggle */
.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.3s;
    padding: 0;
}

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

/* Login Button */
.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px rgba(211, 47, 47, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

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

.login-btn:hover::after {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(211, 47, 47, 0.35);
}

.login-btn i {
    transition: transform 0.3s ease;
}

.login-btn:hover i {
    transform: translateX(-5px);
    /* Move arrow left because of RTL content flow? Wait, button text is Arabic, icon is arrow-left. Usually back/submit icon. Let's assume standard behavior. */
}

/* Footer (Forgot Password) */
.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.forgot-password {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 50px;
    background: transparent;
}

.forgot-password:hover {
    color: var(--primary-red);
    background: #fff1f2;
}

/* Messages */
.form-message {
    padding: 15px;
    border-radius: var(--radius-md);
    margin-bottom: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    display: none;
    text-align: center;
    animation: shake 0.5s ease;
}

.form-message.error {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fee2e2;
}

.form-message.success {
    background: #f0fdf4;
    color: #10b981;
    border: 1px solid #dcfce7;
}

.form-message.show {
    display: block;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* Responsive */
@media (max-width: 576px) {
    .main-container {
        padding: 30px 15px 30px;
    }

    .login-container {
        padding: 40px 25px;
    }

    .login-title {
        font-size: 1.8rem;
    }

    .login-logo {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }
}