* {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.auth-page-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px 12px;
    width: 100%;
}

.login-card {
    background: #fff;
    padding: 36px 28px 28px;
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    width: 100%;
    max-width: 420px;
    text-align: center;
    position: relative;
}

.login-card h3 {
    margin: 0 0 18px;
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
}

.close-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    text-decoration: none;
    font-size: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.15s, transform 0.1s;
}

.close-btn:hover {
    color: #850606;
    transform: rotate(4deg);
}

.auth-errors {
    background: #fde8e8;
    border-radius: 10px;
    padding: 12px 14px;
    margin: 0 0 14px;
    text-align: right;
}

.auth-errors p {
    margin: 0;
    color: #c0392b;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-errors i {
    color: #eab308;
}

.logo-container {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px auto 16px;
    border: 1px solid #eee;
    background: radial-gradient(circle, rgba(93, 9, 129, 0.55) 0%, rgba(255, 255, 255, 0) 70%);
    box-shadow: 0 0 18px rgba(116, 41, 139, 0.45);
    overflow: hidden;
}

.logo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.input-field {
    width: 100%;
    padding: 12px 20px;
    margin: 0;
    border: 1px solid #e5e7eb;
    background-color: #f3f4f6;
    border-radius: 30px;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    outline: none;
}

.input-field:focus {
    border-color: #850606;
    background: #fff;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: #850606;
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 800;
    font-family: 'Tajawal', sans-serif;
    font-size: 15px;
    cursor: pointer;
    margin-top: 6px;
}

.btn-login:hover {
    background: #5c0404;
}

.forgot-password {
    display: block;
    margin: 14px 0 0;
    color: #60a5fa;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    text-align: right;
}

.divider {
    display: flex;
    align-items: center;
    color: #9ca3af;
    margin: 16px 0;
    font-size: 13px;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
    margin: 0 10px;
}

.signup-link {
    display: block;
    margin: 0;
    color: #334155;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.signup-link:hover {
    color: #850606;
}

.btn-google {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 30px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Tajawal', sans-serif;
}

.google-link {
    text-decoration: none;
    display: block;
}

.icon-background {
    width: 30px;
    height: 30px;
    background-color: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.google-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.btn-text {
    color: #334155;
    font-weight: 700;
    font-size: 13px;
}

.input-container,
.password-container {
    position: relative;
    width: 100%;
    margin-bottom: 12px;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    z-index: 1;
}

#togglePassword {
    pointer-events: auto;
    cursor: pointer;
}

/* التذييل ضمن عمود الصفحة وليس فوق البطاقة */
body > .site-footer {
    padding-bottom: 20px;
}

@media (max-width: 480px) {
    .auth-page-wrap {
        padding: 16px 12px 8px;
        align-items: flex-start;
    }

    .login-card {
        padding: 24px 16px 20px;
        border-radius: 14px;
    }

    .login-card h3 {
        font-size: 18px;
    }
}
